mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
Merge commit 'origin/master' into 320
This commit is contained in:
commit
2d65ce8b87
30 changed files with 1149 additions and 355 deletions
|
|
@ -86,7 +86,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
|
||||
|
|
@ -195,7 +195,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
|||
&Spell::EffectNULL, //135 SPELL_EFFECT_CALL_PET
|
||||
&Spell::EffectHealPct, //136 SPELL_EFFECT_HEAL_PCT
|
||||
&Spell::EffectEnergisePct, //137 SPELL_EFFECT_ENERGIZE_PCT
|
||||
&Spell::EffectNULL, //138 SPELL_EFFECT_138 Leap
|
||||
&Spell::EffectLeapBack, //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?
|
||||
|
|
@ -1234,6 +1234,11 @@ void Spell::EffectDummy(uint32 i)
|
|||
m_caster->CastSpell(m_caster,spell_id,true,NULL);
|
||||
return;
|
||||
}
|
||||
case 60932: // Disengage (one from creature versions)
|
||||
if (!unitTarget)
|
||||
return;
|
||||
m_caster->CastSpell(unitTarget,60934,true,NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
//All IconID Check in there
|
||||
|
|
@ -1568,6 +1573,28 @@ void Spell::EffectDummy(uint32 i)
|
|||
return;
|
||||
}
|
||||
|
||||
// Disengage
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000400000000000))
|
||||
{
|
||||
Unit* target = unitTarget;
|
||||
uint32 spellid;
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
case 781: // player case
|
||||
target = m_caster;
|
||||
spellid = 56446;
|
||||
break;
|
||||
case 57635: spellid = 57636; break; // one from creature cases
|
||||
case 61507: spellid = 61508; break; // one from creature cases
|
||||
default:
|
||||
sLog.outError("Spell %u not handled propertly in EffectDummy(Disengage)",m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
if (!target || !target->isAlive())
|
||||
return;
|
||||
m_caster->CastSpell(target,spellid,true,NULL);
|
||||
}
|
||||
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
case 23989: // Readiness talent
|
||||
|
|
@ -5985,7 +6012,7 @@ void Spell::EffectBlock(uint32 /*i*/)
|
|||
((Player*)unitTarget)->SetCanBlock(true);
|
||||
}
|
||||
|
||||
void Spell::EffectMomentMove(uint32 i)
|
||||
void Spell::EffectLeapForward(uint32 i)
|
||||
{
|
||||
if(unitTarget->isInFlight())
|
||||
return;
|
||||
|
|
@ -6013,6 +6040,14 @@ void Spell::EffectMomentMove(uint32 i)
|
|||
}
|
||||
}
|
||||
|
||||
void Spell::EffectLeapBack(uint32 i)
|
||||
{
|
||||
if(unitTarget->isInFlight())
|
||||
return;
|
||||
|
||||
m_caster->KnockBackFrom(unitTarget,float(m_spellInfo->EffectMiscValue[i])/10,float(damage)/10);
|
||||
}
|
||||
|
||||
void Spell::EffectReputation(uint32 i)
|
||||
{
|
||||
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
@ -6242,25 +6277,10 @@ void Spell::EffectSummonCritter(uint32 i)
|
|||
|
||||
void Spell::EffectKnockBack(uint32 i)
|
||||
{
|
||||
if(!unitTarget || !m_caster)
|
||||
if(!unitTarget)
|
||||
return;
|
||||
|
||||
// Effect only works on players
|
||||
if(unitTarget->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
float vsin = sin(m_caster->GetAngle(unitTarget));
|
||||
float vcos = cos(m_caster->GetAngle(unitTarget));
|
||||
|
||||
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
|
||||
data << float(m_spellInfo->EffectMiscValue[i])/10; // Horizontal speed
|
||||
data << float(damage/-10); // Z Movement speed (vertical)
|
||||
|
||||
((Player*)unitTarget)->GetSession()->SendPacket(&data);
|
||||
unitTarget->KnockBackFrom(m_caster,float(m_spellInfo->EffectMiscValue[i])/10,float(damage)/10);
|
||||
}
|
||||
|
||||
void Spell::EffectSendTaxi(uint32 i)
|
||||
|
|
@ -6273,26 +6293,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,float(damage ? damage : unitTarget->GetDistance2d(m_caster)),float(m_spellInfo->EffectMiscValue[i])/10);
|
||||
}
|
||||
|
||||
void Spell::EffectDispelMechanic(uint32 i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue