mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Build error fixes
43 errors left at this point
This commit is contained in:
parent
3abc31c429
commit
924d182855
18 changed files with 123 additions and 71 deletions
|
|
@ -39,7 +39,7 @@ namespace FactorySelector
|
|||
CreatureAI* selectAI(Creature* creature)
|
||||
{
|
||||
// Allow scripting AI for normal creatures and not controlled pets (guardians and mini-pets)
|
||||
if ((!creature->IsPet() || !((Pet*)creature)->isControlled()) && !creature->isCharmed())
|
||||
if ((!creature->IsPet() || !((Pet*)creature)->isControlled()) && !creature->IsCharmed())
|
||||
if (CreatureAI* scriptedAI = sScriptMgr.GetCreatureAI(creature))
|
||||
return scriptedAI;
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ namespace FactorySelector
|
|||
// excplicit check for isControlled() and owner type to allow guardian, mini-pets and pets controlled by NPCs to be scripted by EventAI
|
||||
Unit* owner = NULL;
|
||||
if ((creature->IsPet() && ((Pet*)creature)->isControlled() &&
|
||||
((owner = creature->GetOwner()) && owner->GetTypeId() == TYPEID_PLAYER)) || creature->isCharmed())
|
||||
((owner = creature->GetOwner()) && owner->GetTypeId() == TYPEID_PLAYER)) || creature->IsCharmed())
|
||||
ai_factory = ai_registry.GetRegistryItem("PetAI");
|
||||
else if (creature->IsTotem())
|
||||
ai_factory = ai_registry.GetRegistryItem("TotemAI");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue