bug tracing on entity list mismatch

This commit is contained in:
neckkola
2022-01-25 23:16:33 -04:00
parent cf2c7060be
commit 478fa24a70
3 changed files with 8 additions and 7 deletions
+4 -4
View File
@@ -5048,10 +5048,10 @@ bool Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, EQ::skills::Skill
} }
} }
} }
else // else
{ // {
entity_list.RemoveBot(this->GetID()); entity_list.RemoveBot(this->GetID());
} // }
return true; return true;
} }
+2 -2
View File
@@ -152,8 +152,8 @@ public:
ExtraAttackOptions *opts = nullptr); ExtraAttackOptions *opts = nullptr);
virtual bool HasRaid() { return (GetRaid() ? true : false); } virtual bool HasRaid() { return (GetRaid() ? true : false); }
virtual bool HasGroup() { return (GetGroup() ? true : false); } virtual bool HasGroup() { return (GetGroup() ? true : false); }
virtual Raid* GetRaid() { return entity_list.GetRaidByMob(this); } virtual Raid* GetRaid() { return entity_list.GetRaidByMob(this); } // GetRaidByMob(this);
virtual Group* GetGroup() { return entity_list.GetGroupByMob(this); } virtual Group* GetGroup() { return entity_list.GetGroupByMob(this); } // GetGroupByMob;
// Common, but informal "interfaces" with Client object // Common, but informal "interfaces" with Client object
uint32 CharacterID() { return GetBotID(); } // Just returns the Bot Id uint32 CharacterID() { return GetBotID(); } // Just returns the Bot Id
+2 -1
View File
@@ -3033,7 +3033,8 @@ void Mob::QuestJournalledSay(Client *QuestInitiator, const char *str, Journal::O
const char *Mob::GetCleanName() const char *Mob::GetCleanName()
{ {
if (clean_name != NULL && !strlen(clean_name)) { //extra check added for crash condition. Mitch if (clean_name != NULL && !strlen(clean_name)) { //extra check added for crash condition. Mitch
CleanMobName(GetName(), clean_name); if (this)
CleanMobName(GetName(), clean_name);
} }
return clean_name; return clean_name;