Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit. --HG-- branch : trunk
This commit is contained in:
@@ -126,7 +126,7 @@ void GuardAI::UpdateAI(const uint32 /*diff*/)
|
||||
|
||||
bool GuardAI::IsVisible(Unit *pl) const
|
||||
{
|
||||
return me->IsWithinDist(pl,(float)sWorld.getConfig(CONFIG_SIGHT_GUARDER))
|
||||
return me->IsWithinDist(pl,sWorld.getFloatConfig(CONFIG_SIGHT_GUARDER))
|
||||
&& pl->isVisibleForOrDetect(me,true);
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ void CreatureAI::MoveInLineOfSight(Unit *who)
|
||||
if (me->canStartAttack(who, false))
|
||||
AttackStart(who);
|
||||
//else if (who->getVictim() && me->IsFriendlyTo(who)
|
||||
// && me->IsWithinDistInMap(who, sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS))
|
||||
// && me->IsWithinDistInMap(who, sWorld.getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS))
|
||||
// && me->canStartAttack(who->getVictim(), true)) // TODO: if we use true, it will not attack it when it arrives
|
||||
// me->GetMotionMaster()->MoveChase(who->getVictim());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user