diff options
| author | megamage <none@none> | 2009-05-26 10:46:08 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-05-26 10:46:08 -0500 |
| commit | 7823461e866e31d4c651aa8d7789976aca436050 (patch) | |
| tree | f0d010164d7dab652c8223b36e0b395c758db35f /src | |
| parent | 5eedbc7af4bfc93b2225dcc09fb024c0473110c3 (diff) | |
*Fix typo that causes crash for charm spells. Thanks to Drahy.
*Allow aura 206 to affect other types of pets.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Unit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 18cfd1f3424..480eb9f9121 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8470,7 +8470,7 @@ void Unit::SetCharm(Unit* charm, bool apply) if(!charm->RemoveUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID())) sLog.outCrash("Unit %u is being uncharmed, but it has another charmer %u", charm->GetEntry(), charm->GetCharmerGUID()); - if(!charm->GetOwnerGUID() == GetGUID()) + if(charm->GetOwnerGUID() != GetGUID()) m_Controlled.erase(charm); } } @@ -10421,7 +10421,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced) return; case MOVE_FLIGHT: { - if (GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isVehicle()) + if (GetTypeId()==TYPEID_UNIT && IsControlledByPlayer()) // not sure if good for pet { main_speed_mod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED); stack_bonus = GetTotalAuraMultiplier(SPELL_AURA_MOD_VEHICLE_SPEED_ALWAYS); @@ -10429,7 +10429,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced) // for some spells this mod is applied on vehicle owner uint32 owner_speed_mod = 0; - if (Unit * owner = ((Vehicle*)this)->GetCharmer()) + if (Unit * owner = GetCharmer()) uint32 owner_speed_mod = owner->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED); main_speed_mod = main_speed_mod>owner_speed_mod ? main_speed_mod : owner_speed_mod; |
