Eliminated tabs!

Eliminated tabs!
This commit is contained in:
Charles A Edwards 2016-02-07 19:01:56 +00:00 committed by Antz
parent 0f19fec851
commit 942dd64a53
27 changed files with 247 additions and 247 deletions

View file

@ -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");