diff --git a/zone/client.cpp b/zone/client.cpp index 0175503ed..504164273 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -305,6 +305,8 @@ Client::Client(EQStreamInterface* ieqs) active_light = innate_light; spell_light = equip_light = NOT_USED; + + AI_Init(); } Client::~Client() { diff --git a/zone/merc.cpp b/zone/merc.cpp index 89da59df4..01b4fbee7 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -75,7 +75,6 @@ Merc::Merc(const NPCType* d, float x, float y, float z, float heading) SetMana(GetMaxMana()); SetEndurance(GetMaxEndurance()); - AI_Init(); AI_Start(); } @@ -1737,7 +1736,6 @@ void Merc::AI_Process() { } void Merc::AI_Start(int32 iMoveDelay) { - NPC::AI_Start(iMoveDelay); if (!pAIControlled) return; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index ea2bdc3d5..e6b3c514d 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -422,7 +422,8 @@ bool EntityList::AICheckCloseBeneficialSpells(NPC* caster, uint8 iChance, float return false; } -void Mob::AI_Init() { +void Mob::AI_Init() +{ pAIControlled = false; AIthink_timer = nullptr; AIwalking_timer = nullptr; @@ -441,9 +442,8 @@ void Mob::AI_Init() { pDontCureMeBefore = 0; } -void NPC::AI_Init() { - Mob::AI_Init(); - +void NPC::AI_Init() +{ AIautocastspell_timer = nullptr; casting_spell_AIindex = static_cast(AIspells.size()); @@ -458,8 +458,8 @@ void NPC::AI_Init() { roambox_delay = 2500; } -void Client::AI_Init() { - Mob::AI_Init(); +void Client::AI_Init() +{ minLastFightingDelayMoving = CLIENT_LD_TIMEOUT; maxLastFightingDelayMoving = CLIENT_LD_TIMEOUT; } diff --git a/zone/npc.cpp b/zone/npc.cpp index b9c465195..1375559a5 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -250,8 +250,8 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if npc_aggro = d->npc_aggro; - if(!IsMerc()) - AI_Start(); + AI_Init(); + AI_Start(); d_melee_texture1 = d->d_melee_texture1; d_melee_texture2 = d->d_melee_texture2;