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
@@ -1075,7 +1075,7 @@ void AuraEffect::Update(uint32 diff, Unit * caster)
std::list<AuraApplication*> effectApplications;
GetApplicationList(effectApplications);
// tick on targets of effects
if (!caster || !caster->hasUnitState(UNIT_STAT_ISOLATED))
if (!caster || !caster->HasUnitState(UNIT_STAT_ISOLATED))
{
for (std::list<AuraApplication*>::iterator apptItr = effectApplications.begin(); apptItr != effectApplications.end(); ++apptItr)
PeriodicTick(*apptItr, caster);
@@ -1258,7 +1258,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
if (!target->isAlive())
return;
if (target->hasUnitState(UNIT_STAT_ISOLATED))
if (target->HasUnitState(UNIT_STAT_ISOLATED))
{
SendTickImmune(target, caster);
return;
@@ -1415,7 +1415,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
if (!target->isAlive())
return;
if (target->hasUnitState(UNIT_STAT_ISOLATED))
if (target->HasUnitState(UNIT_STAT_ISOLATED))
{
SendTickImmune(target, caster);
return;
@@ -1498,7 +1498,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
if (!target->isAlive())
return;
if (target->hasUnitState(UNIT_STAT_ISOLATED))
if (target->HasUnitState(UNIT_STAT_ISOLATED))
{
SendTickImmune(target, caster);
return;
@@ -1531,7 +1531,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
if (!target->isAlive())
return;
if (target->hasUnitState(UNIT_STAT_ISOLATED))
if (target->HasUnitState(UNIT_STAT_ISOLATED))
{
SendTickImmune(target, caster);
return;
@@ -1640,7 +1640,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
if (!target->isAlive())
return;
if (target->hasUnitState(UNIT_STAT_ISOLATED))
if (target->HasUnitState(UNIT_STAT_ISOLATED))
{
SendTickImmune(target, caster);
return;
@@ -1753,7 +1753,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
if (!target->isAlive())
return;
if (target->hasUnitState(UNIT_STAT_ISOLATED))
if (target->HasUnitState(UNIT_STAT_ISOLATED))
{
SendTickImmune(target, caster);
return;
@@ -1793,7 +1793,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
if (!target->isAlive())
return;
if (target->hasUnitState(UNIT_STAT_ISOLATED))
if (target->HasUnitState(UNIT_STAT_ISOLATED))
{
SendTickImmune(target, caster);
return;
@@ -1829,7 +1829,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
if (!target->isAlive())
return;
if (target->hasUnitState(UNIT_STAT_ISOLATED))
if (target->HasUnitState(UNIT_STAT_ISOLATED))
{
SendTickImmune(target, caster);
return;
@@ -3424,7 +3424,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const * aurApp, uint8 mode, bo
target->VisitNearbyObject(target->GetMap()->GetVisibilityRange(), searcher);
for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter)
{
if (!(*iter)->hasUnitState(UNIT_STAT_CASTING))
if (!(*iter)->HasUnitState(UNIT_STAT_CASTING))
continue;
for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++)
@@ -3443,7 +3443,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const * aurApp, uint8 mode, bo
// blizz like 2.0.x
target->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
target->addUnitState(UNIT_STAT_DIED);
target->AddUnitState(UNIT_STAT_DIED);
target->CombatStop();
target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION);
@@ -3468,7 +3468,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const * aurApp, uint8 mode, bo
// blizz like 2.0.x
target->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
target->clearUnitState(UNIT_STAT_DIED);
target->ClearUnitState(UNIT_STAT_DIED);
}
}
@@ -4482,7 +4482,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const * aurApp, uin
if (GetSpellProto()->Mechanic == MECHANIC_BANISH)
{
if (apply)
target->addUnitState(UNIT_STAT_ISOLATED);
target->AddUnitState(UNIT_STAT_ISOLATED);
else
{
bool banishFound = false;
@@ -4494,7 +4494,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const * aurApp, uin
break;
}
if (!banishFound)
target->clearUnitState(UNIT_STAT_ISOLATED);
target->ClearUnitState(UNIT_STAT_ISOLATED);
}
}
}