mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-03 17:46:36 +00:00
[Crash] Fix IsUnderwaterOnly crash where npc data references can be stale (#2830)
* [Crash] Fix IsUnderwaterOnly crash where npc data references can be stale * m_ prefix
This commit is contained in:
+3
-1
@@ -437,7 +437,7 @@ public:
|
||||
/* Only allows players that killed corpse to loot */
|
||||
const bool HasPrivateCorpse() const { return NPCTypedata_ours ? NPCTypedata_ours->private_corpse : NPCTypedata->private_corpse; }
|
||||
|
||||
virtual const bool IsUnderwaterOnly() const { return NPCTypedata_ours ? NPCTypedata_ours->underwater : NPCTypedata->underwater; }
|
||||
virtual const bool IsUnderwaterOnly() const { return m_is_underwater_only; }
|
||||
const char* GetRawNPCTypeName() const { return NPCTypedata_ours ? NPCTypedata_ours->name : NPCTypedata->name; }
|
||||
|
||||
virtual int GetKillExpMod() const { return NPCTypedata_ours ? NPCTypedata_ours->exp_mod : NPCTypedata->exp_mod; }
|
||||
@@ -674,6 +674,8 @@ protected:
|
||||
QGlobalCache *qGlobals;
|
||||
uint32 adventure_template_id;
|
||||
|
||||
bool m_is_underwater_only = false;
|
||||
|
||||
//mercenary stuff
|
||||
std::list<MercType> mercTypeList;
|
||||
std::list<MercData> mercDataList;
|
||||
|
||||
Reference in New Issue
Block a user