Core: Fix some warnings

--HG--
branch : trunk
This commit is contained in:
Spp
2010-08-23 07:51:19 +02:00
parent ccc2a83510
commit 16d95d3115
30 changed files with 121 additions and 85 deletions
+2 -2
View File
@@ -239,7 +239,7 @@ bool TurretAI::CanAIAttack(const Unit * /*who*/) const
{
// TODO: use one function to replace it
if (!me->IsWithinCombatRange(me->getVictim(), me->m_CombatDistance)
|| m_minRange && me->IsWithinCombatRange(me->getVictim(), m_minRange))
|| (m_minRange && me->IsWithinCombatRange(me->getVictim(), m_minRange)))
return false;
return true;
}
@@ -367,4 +367,4 @@ void VehicleAI::CheckConditions(const uint32 diff)
}
m_ConditionsTimer = VEHICLE_CONDITION_CHECK_TIME;
} else m_ConditionsTimer -= diff;
}
}
+1 -1
View File
@@ -556,7 +556,7 @@ typedef UNORDERED_MAP<uint32, std::vector<CreatureEventAI_Event> > CreatureEvent
struct CreatureEventAI_Summon
{
uint32 id2;
//uint32 id;
float position_x;
float position_y;
@@ -356,7 +356,7 @@ void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, flo
if (!pUnit || pUnit->GetTypeId() != TYPEID_PLAYER)
{
if (pUnit)
sLog.outError("TSCR: Creature %u (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: %u) to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO);
sLog.outError("TSCR: Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO);
return;
}
@@ -481,7 +481,7 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
//disable npcflags
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
sLog.outDebug("TSCR: EscortAI started with %u waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = %u", WaypointList.size(), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
sLog.outDebug("TSCR: EscortAI started with %u waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", WaypointList.size(), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
CurrentWP = WaypointList.begin();
@@ -304,7 +304,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const
me->GetMotionMaster()->MoveFollow(pLeader, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
sLog.outDebug("TSCR: FollowerAI start follow %s (GUID %u)", pLeader->GetName(), m_uiLeaderGUID);
sLog.outDebug("TSCR: FollowerAI start follow %s (GUID " UI64FMTD ")", pLeader->GetName(), m_uiLeaderGUID);
}
Player* FollowerAI::GetLeaderForFollower()
@@ -68,6 +68,7 @@ void guardAI::UpdateAI(const uint32 diff)
//Buff timer (only buff when we are alive and not in combat
if (me->isAlive() && !me->isInCombat())
{
if (BuffTimer <= diff)
{
//Find a spell that targets friendly and applies an aura (these are generally buffs)
@@ -86,6 +87,7 @@ void guardAI::UpdateAI(const uint32 diff)
} //Try again in 30 seconds
else BuffTimer = 30000;
} else BuffTimer -= diff;
}
//Return since we have no target
if (!UpdateVictim())
@@ -214,7 +214,7 @@ void SimpleAI::UpdateAI(const uint32 diff)
if (Spell_Timer[i] <= diff)
{
//Check if this is a percentage based
if (Spell[i].First_Cast < 0 && Spell[i].First_Cast > -100 && me->GetHealth()*100 / me->GetMaxHealth() > -Spell[i].First_Cast)
if (Spell[i].First_Cast < 0 && Spell[i].First_Cast > -100 && me->GetHealth()*100 / me->GetMaxHealth() > uint32(-Spell[i].First_Cast))
continue;
//Check Current spell