diff --git a/zone/npc.cpp b/zone/npc.cpp index 153233979..1027d5679 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -160,42 +160,43 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi size = 5; } - taunting = false; - proximity = nullptr; - copper = 0; - silver = 0; - gold = 0; - platinum = 0; - max_dmg = npc_type_data->max_dmg; - min_dmg = npc_type_data->min_dmg; - attack_count = npc_type_data->attack_count; - grid = 0; - wp_m = 0; - max_wp = 0; - save_wp = 0; - spawn_group_id = 0; - swarmInfoPtr = nullptr; - spellscale = npc_type_data->spellscale; - healscale = npc_type_data->healscale; - pAggroRange = npc_type_data->aggroradius; - pAssistRange = npc_type_data->assistradius; - findable = npc_type_data->findable; - trackable = npc_type_data->trackable; - MR = npc_type_data->MR; - CR = npc_type_data->CR; - DR = npc_type_data->DR; - FR = npc_type_data->FR; - PR = npc_type_data->PR; - Corrup = npc_type_data->Corrup; - PhR = npc_type_data->PhR; - STR = npc_type_data->STR; - STA = npc_type_data->STA; - AGI = npc_type_data->AGI; - DEX = npc_type_data->DEX; - INT = npc_type_data->INT; - WIS = npc_type_data->WIS; - CHA = npc_type_data->CHA; - npc_mana = npc_type_data->Mana; + taunting = false; + proximity = nullptr; + copper = 0; + silver = 0; + gold = 0; + platinum = 0; + max_dmg = npc_type_data->max_dmg; + min_dmg = npc_type_data->min_dmg; + attack_count = npc_type_data->attack_count; + grid = 0; + wp_m = 0; + max_wp = 0; + save_wp = 0; + spawn_group_id = 0; + swarmInfoPtr = nullptr; + spellscale = npc_type_data->spellscale; + healscale = npc_type_data->healscale; + pAggroRange = npc_type_data->aggroradius; + pAssistRange = npc_type_data->assistradius; + findable = npc_type_data->findable; + trackable = npc_type_data->trackable; + MR = npc_type_data->MR; + CR = npc_type_data->CR; + DR = npc_type_data->DR; + FR = npc_type_data->FR; + PR = npc_type_data->PR; + Corrup = npc_type_data->Corrup; + PhR = npc_type_data->PhR; + STR = npc_type_data->STR; + STA = npc_type_data->STA; + AGI = npc_type_data->AGI; + DEX = npc_type_data->DEX; + INT = npc_type_data->INT; + WIS = npc_type_data->WIS; + CHA = npc_type_data->CHA; + npc_mana = npc_type_data->Mana; + m_is_underwater_only = npc_type_data->underwater; //quick fix of ordering if they screwed it up in the DB if (max_dmg < min_dmg) { diff --git a/zone/npc.h b/zone/npc.h index 418927d35..4c75edac9 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -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 mercTypeList; std::list mercDataList;