diff --git a/zone/merc.cpp b/zone/merc.cpp index 7fe95e4b4..a91593cbd 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -50,7 +50,6 @@ Merc::Merc(const NPCType* d, float x, float y, float z, float heading) _lost_confidence = false; _hatedCount = 0; - ourNPCData = d; memset(equipment, 0, sizeof(equipment)); SetMercID(0); @@ -74,7 +73,6 @@ Merc::Merc(const NPCType* d, float x, float y, float z, float heading) Merc::~Merc() { AI_Stop(); - safe_delete(ourNPCData); //Since mercs are dynamically alloc'd we should probably safe_delete the data they were made from. I'm not entirely sure this is safe to delete a const. entity_list.RemoveMerc(this->GetID()); UninitializeBuffSlots(); } @@ -1915,9 +1913,9 @@ void Merc::AI_Start(int32 iMoveDelay) { AIautocastspell_timer->Start(RandomTimer(0, 2000), false); } - if (ourNPCData) { + if (NPCTypedata_ours) { //AI_AddNPCSpells(ourNPCData->npc_spells_id); - NPCSpecialAttacks(ourNPCData->npc_attacks,0); + NPCSpecialAttacks(NPCTypedata_ours->npc_attacks,0); } SendTo(GetX(), GetY(), GetZ()); diff --git a/zone/merc.h b/zone/merc.h index b76bb566d..dadba3fc1 100644 --- a/zone/merc.h +++ b/zone/merc.h @@ -379,8 +379,6 @@ private: bool _lost_confidence; int _hatedCount; uint32 owner_char_id; - const NPCType* ourNPCData; - Timer endupkeep_timer; Timer rest_timer; Timer confidence_timer;