Browse Source

[hellfire] SetupTownStores and SmithBuyPItem (#1950)

pull/876/head
Anders Jenbo 6 years ago committed by GitHub
parent
commit
5d57c3cb9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Source/debug.cpp
  2. 7
      Source/items.cpp
  3. 4
      Source/items.h
  4. 8
      Source/stores.cpp

2
Source/debug.cpp

@ -112,6 +112,7 @@ void GiveGoldCheat()
void StoresCheat()
{
#ifndef HELLFIRE
int i;
numpremium = 0;
@ -125,6 +126,7 @@ void StoresCheat()
witchitem[i]._itype = -1;
SpawnWitch(30);
#endif
}
void TakeGoldCheat()

7
Source/items.cpp

@ -4208,10 +4208,17 @@ void SpawnOnePremium(int i, int plvl)
item[0] = holditem;
}
#ifdef HELLFIRE
void SpawnPremium(int pnum)
#else
void SpawnPremium(int lvl)
#endif
{
int i;
#ifdef HELLFIRE
int lvl = plr[pnum]._pLevel;
#endif
if (numpremium < SMITH_PREMIUM_ITEMS) {
for (i = 0; i < SMITH_PREMIUM_ITEMS; i++) {
if (premiumitem[i]._itype == ITYPE_NONE)

4
Source/items.h

@ -139,7 +139,11 @@ void SpawnSmith(int lvl);
BOOL PremiumItemOk(int i);
int RndPremiumItem(int minlvl, int maxlvl);
void SpawnOnePremium(int i, int plvl);
#ifdef HELLFIRE
void SpawnPremium(int pnum);
#else
void SpawnPremium(int lvl);
#endif
BOOL WitchItemOk(int i);
int RndWitchItem(int lvl);
void SortWitch();

8
Source/stores.cpp

@ -122,7 +122,11 @@ void SetupTownStores()
SpawnWitch(l);
SpawnHealer(l);
SpawnBoy(plr[myplr]._pLevel);
#ifdef HELLFIRE
SpawnPremium(myplr);
#else
SpawnPremium(plr[myplr]._pLevel);
#endif
}
void FreeStoreMem()
@ -1956,7 +1960,11 @@ void SmithBuyPItem()
premiumitem[xx]._itype = ITYPE_NONE;
numpremium--;
#ifdef HELLFIRE
SpawnPremium(myplr);
#else
SpawnPremium(plr[myplr]._pLevel);
#endif
}
void S_SPBuyEnter()

Loading…
Cancel
Save