- started replacing direct references to class AInventory.

The easiest part was the type checks which could be changed to the name variant with a global search and replace.
This commit is contained in:
Christoph Oelckers 2018-12-02 21:35:04 +01:00
commit bfcd714186
14 changed files with 19 additions and 19 deletions

View file

@ -373,7 +373,7 @@ static FStrifeDialogueNode *ReadRetailNode (FileReader &lump, uint32_t &prevSpea
for (j = 0; j < 3; ++j)
{
auto inv = GetStrifeType(speech.ItemCheck[j]);
if (!inv->IsDescendantOf(RUNTIME_CLASS(AInventory))) inv = nullptr;
if (!inv->IsDescendantOf(NAME_Inventory)) inv = nullptr;
node->ItemCheck[j].Item = inv;
node->ItemCheck[j].Amount = -1;
}
@ -519,7 +519,7 @@ static void ParseReplies (FStrifeDialogueReply **replyptr, Response *responses)
for (k = 0; k < 3; ++k)
{
auto inv = GetStrifeType(rsp->Item[k]);
if (!inv->IsDescendantOf(RUNTIME_CLASS(AInventory))) inv = nullptr;
if (!inv->IsDescendantOf(NAME_Inventory)) inv = nullptr;
reply->ItemCheck[k].Item = inv;
reply->ItemCheck[k].Amount = rsp->Count[k];
}
@ -951,7 +951,7 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
takestuff = true;
if (reply->GiveType != NULL)
{
if (reply->GiveType->IsDescendantOf(RUNTIME_CLASS(AInventory)))
if (reply->GiveType->IsDescendantOf(NAME_Inventory))
{
if (reply->GiveType->IsDescendantOf(NAME_Weapon))
{