Core/Vehicles: revert 95152d5753 and 95152d5753
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
This commit is contained in:
@@ -17064,7 +17064,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
|
||||
}
|
||||
|
||||
if (IsInMap(caster))
|
||||
caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId, target, GetVehicleKit() ? TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE : TRIGGERED_NONE, NULL, NULL, origCasterGUID);
|
||||
caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId + 1, target, GetVehicleKit() ? TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE : TRIGGERED_NONE, NULL, NULL, origCasterGUID);
|
||||
else // This can happen during Player::_LoadAuras
|
||||
{
|
||||
int32 bp0 = seatId;
|
||||
@@ -17094,7 +17094,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
|
||||
|
||||
void Unit::EnterVehicle(Unit* base, int8 seatId)
|
||||
{
|
||||
CastCustomSpell(VEHICLE_SPELL_RIDE_HARDCODED, SPELLVALUE_BASE_POINT0, seatId, base, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE);
|
||||
CastCustomSpell(VEHICLE_SPELL_RIDE_HARDCODED, SPELLVALUE_BASE_POINT0, seatId + 1, base, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE);
|
||||
}
|
||||
|
||||
void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* aurApp)
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user