mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Moved around some data in Mercs to help prevent another crash... dunno if it actually will fix it but it can't hurt >_<
This commit is contained in:
parent
e0b05e573e
commit
23820a369e
@ -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());
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user