From 82f45966fc00106b52294e4c01a2848ba24e2eb8 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 17 Dec 2010 13:43:24 +0100 Subject: Core/Unit: Renamed addUnitState/hasUnitState/clearUnitState to AddUnitState/HasUnitState/ClearUnitState Core/Vehicles: Allow the vehicle to always damage the passenger (removed unneded dbc hacks from scripts) --HG-- branch : trunk --- src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 2 +- src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/server/game/AI/ScriptedAI') diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index 7717513d409..8ca697a1f46 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -90,7 +90,7 @@ bool npc_escortAI::AssistPlayerInCombat(Unit* pWho) void npc_escortAI::MoveInLineOfSight(Unit* pWho) { - if (!me->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && pWho->isInAccessiblePlaceFor(me)) + if (!me->HasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && pWho->isInAccessiblePlaceFor(me)) { if (HasEscortState(STATE_ESCORT_ESCORTING) && AssistPlayerInCombat(pWho)) return; diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index d9f753306cc..5dca322f8a0 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -38,8 +38,8 @@ void FollowerAI::AttackStart(Unit* pWho) me->SetInCombatWith(pWho); pWho->SetInCombatWith(me); - if (me->hasUnitState(UNIT_STAT_FOLLOW)) - me->clearUnitState(UNIT_STAT_FOLLOW); + if (me->HasUnitState(UNIT_STAT_FOLLOW)) + me->ClearUnitState(UNIT_STAT_FOLLOW); if (IsCombatMovement()) me->GetMotionMaster()->MoveChase(pWho); @@ -88,7 +88,7 @@ bool FollowerAI::AssistPlayerInCombat(Unit* pWho) void FollowerAI::MoveInLineOfSight(Unit* pWho) { - if (!me->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && pWho->isInAccessiblePlaceFor(me)) + if (!me->HasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && pWho->isInAccessiblePlaceFor(me)) { if (HasFollowState(STATE_FOLLOW_INPROGRESS) && AssistPlayerInCombat(pWho)) return; @@ -340,9 +340,9 @@ Player* FollowerAI::GetLeaderForFollower() void FollowerAI::SetFollowComplete(bool bWithEndEvent) { - if (me->hasUnitState(UNIT_STAT_FOLLOW)) + if (me->HasUnitState(UNIT_STAT_FOLLOW)) { - me->clearUnitState(UNIT_STAT_FOLLOW); + me->ClearUnitState(UNIT_STAT_FOLLOW); me->StopMoving(); me->GetMotionMaster()->Clear(); @@ -369,9 +369,9 @@ void FollowerAI::SetFollowPaused(bool bPaused) { AddFollowState(STATE_FOLLOW_PAUSED); - if (me->hasUnitState(UNIT_STAT_FOLLOW)) + if (me->HasUnitState(UNIT_STAT_FOLLOW)) { - me->clearUnitState(UNIT_STAT_FOLLOW); + me->ClearUnitState(UNIT_STAT_FOLLOW); me->StopMoving(); me->GetMotionMaster()->Clear(); -- cgit v1.2.3