aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells
diff options
context:
space:
mode:
authorTrista <aconstantgoal@abv.bg>2012-12-30 01:06:55 +0200
committerTrista <aconstantgoal@abv.bg>2012-12-30 01:06:55 +0200
commit6edffb036d018c29f94e3817b905aa8fcd585aa8 (patch)
tree75cdbd99e6027bfeee6b696513850331109850c8 /src/server/game/Spells
parent63b9a7579cb0834e029b9ab1a189069e78d99562 (diff)
Core/Vehicles: revert 95152d57539064d8278e323899290cba2fb2b0cd and 95152d57539064d8278e323899290cba2fb2b0cd
Sorry about troubles caused, hed reason to think formula was wrong, but it wasn't. However there is part of the code that needs to be improved I describbed in this commit as TO DO: Connected with: #8195
Diffstat (limited to 'src/server/game/Spells')
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 131d84c7fc1..9f136d11b88 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -454,11 +454,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
// custom amount calculations go here
switch (GetAuraType())
{
- // Control vehicle auras should not get m_amount sum out of basepoints and DieSide calculated together,
- // but only from basepoints. Only such aura case fow now so handle it here.
case SPELL_AURA_CONTROL_VEHICLE:
- m_amount = m_baseAmount;
- break;
// crowd control auras
case SPELL_AURA_MOD_CONFUSE:
case SPELL_AURA_MOD_FEAR:
@@ -3204,7 +3200,12 @@ void AuraEffect::HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 m
if (apply)
{
- caster->_EnterVehicle(target->GetVehicleKit(), m_amount, aurApp);
+ // Currently spells that have base points 0 and DieSides 0 = "0/0" exception are pushed to -1,
+ // however the idea of 0/0 is to ingore flag VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT and -1 checks for it,
+ // so this break such spells or most of them.
+ // Current formula about m_amount: effect base points + dieside - 1
+ // TO DO: Reasearch more about 0/0 and fix it.
+ caster->_EnterVehicle(target->GetVehicleKit(), m_amount - 1, aurApp);
}
else
{