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
This commit is contained in:
Shauren
2010-12-17 13:43:24 +01:00
parent ee3fd3ebeb
commit 82f45966fc
99 changed files with 353 additions and 361 deletions

View File

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