mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
*Correctly process more movement packets. Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
@@ -93,7 +93,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
||||
&Spell::EffectUnused, // 26 SPELL_EFFECT_DEFENSE one spell: Defense
|
||||
&Spell::EffectPersistentAA, // 27 SPELL_EFFECT_PERSISTENT_AREA_AURA
|
||||
&Spell::EffectSummonType, // 28 SPELL_EFFECT_SUMMON
|
||||
&Spell::EffectMomentMove, // 29 SPELL_EFFECT_LEAP
|
||||
&Spell::EffectLeapForward, // 29 SPELL_EFFECT_LEAP
|
||||
&Spell::EffectEnergize, // 30 SPELL_EFFECT_ENERGIZE
|
||||
&Spell::EffectWeaponDmg, // 31 SPELL_EFFECT_WEAPON_PERCENT_DAMAGE
|
||||
&Spell::EffectTriggerMissileSpell, // 32 SPELL_EFFECT_TRIGGER_MISSILE
|
||||
@@ -202,7 +202,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
||||
&Spell::EffectNULL, //135 SPELL_EFFECT_CALL_PET
|
||||
&Spell::EffectHealPct, //136 SPELL_EFFECT_HEAL_PCT
|
||||
&Spell::EffectEnergizePct, //137 SPELL_EFFECT_ENERGIZE_PCT
|
||||
&Spell::EffectJump2, //138 SPELL_EFFECT_138 Leap
|
||||
&Spell::EffectJump2, //138 SPELL_EFFECT_LEAP_BACK Leap back
|
||||
&Spell::EffectUnused, //139 SPELL_EFFECT_CLEAR_QUEST (misc - is quest ID)
|
||||
&Spell::EffectForceCast, //140 SPELL_EFFECT_FORCE_CAST
|
||||
&Spell::EffectNULL, //141 SPELL_EFFECT_141 damage and reduce speed?
|
||||
@@ -6188,7 +6188,7 @@ void Spell::EffectBlock(uint32 /*i*/)
|
||||
((Player*)unitTarget)->SetCanBlock(true);
|
||||
}
|
||||
|
||||
void Spell::EffectMomentMove(uint32 i)
|
||||
void Spell::EffectLeapForward(uint32 i)
|
||||
{
|
||||
if(unitTarget->isInFlight())
|
||||
return;
|
||||
@@ -6444,26 +6444,10 @@ void Spell::EffectSendTaxi(uint32 i)
|
||||
|
||||
void Spell::EffectPlayerPull(uint32 i)
|
||||
{
|
||||
if(!unitTarget || !m_caster)
|
||||
if(!unitTarget)
|
||||
return;
|
||||
|
||||
// Effect only works on players
|
||||
if(unitTarget->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
float vsin = sin(unitTarget->GetAngle(m_caster));
|
||||
float vcos = cos(unitTarget->GetAngle(m_caster));
|
||||
|
||||
WorldPacket data(SMSG_MOVE_KNOCK_BACK, 8+4+4+4+4+4);
|
||||
data.append(unitTarget->GetPackGUID());
|
||||
data << uint32(0); // Sequence
|
||||
data << float(vcos); // x direction
|
||||
data << float(vsin); // y direction
|
||||
// Horizontal speed
|
||||
data << float(damage ? damage : unitTarget->GetDistance2d(m_caster));
|
||||
data << float(m_spellInfo->EffectMiscValue[i])/-10; // Z Movement speed
|
||||
|
||||
((Player*)unitTarget)->GetSession()->SendPacket(&data);
|
||||
unitTarget->KnockbackFrom(m_caster->GetPositionX(), m_caster->GetPositionY(), float(damage ? damage : unitTarget->GetDistance2d(m_caster)), float(m_spellInfo->EffectMiscValue[i])/10);
|
||||
}
|
||||
|
||||
void Spell::EffectDispelMechanic(uint32 i)
|
||||
|
||||
Reference in New Issue
Block a user