*Rename SPELL_EFFECT_CHARGE_2 to SPELL_EFFECT_CHARGE_DEST, fix its implementation.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-07-19 19:22:05 +02:00
parent 07b8d33869
commit e1e16310ec
4 changed files with 8 additions and 15 deletions
@@ -750,7 +750,7 @@ enum SpellEffects
SPELL_EFFECT_ACTIVATE_RUNE = 146,
SPELL_EFFECT_QUEST_FAIL = 147,
SPELL_EFFECT_148 = 148,
SPELL_EFFECT_149 = 149,
SPELL_EFFECT_CHARGE_DEST = 149,
SPELL_EFFECT_150 = 150,
SPELL_EFFECT_TRIGGER_SPELL_2 = 151,
SPELL_EFFECT_152 = 152,
+4 -13
View File
@@ -214,7 +214,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectActivateRune, //146 SPELL_EFFECT_ACTIVATE_RUNE
&Spell::EffectQuestFail, //147 SPELL_EFFECT_QUEST_FAIL quest fail
&Spell::EffectUnused, //148 SPELL_EFFECT_148 unused
&Spell::EffectCharge2, //149 SPELL_EFFECT_CHARGE2 swoop
&Spell::EffectChargeDest, //149 SPELL_EFFECT_CHARGE_DEST
&Spell::EffectUnused, //150 SPELL_EFFECT_150 unused
&Spell::EffectTriggerRitualOfSummoning, //151 SPELL_EFFECT_TRIGGER_SPELL_2
&Spell::EffectNULL, //152 SPELL_EFFECT_152 summon Refer-a-Friend
@@ -7129,22 +7129,13 @@ void Spell::EffectCharge(uint32 /*i*/)
m_caster->Attack(target, true);
}
void Spell::EffectCharge2(uint32 /*i*/)
void Spell::EffectChargeDest(uint32 /*i*/)
{
float x, y, z;
if (m_targets.HasDst())
m_targets.m_dstPos.GetPosition(x, y, z);
else if (Unit *target = m_targets.getUnitTarget())
{
target->GetContactPoint(m_caster, x, y, z);
// not all charge effects used in negative spells
if (!IsPositiveSpell(m_spellInfo->Id) && m_caster->GetTypeId() == TYPEID_PLAYER)
m_caster->Attack(target, true);
m_targets.m_dstPos.GetPosition(x, y, z);
m_caster->GetMotionMaster()->MoveCharge(x, y, z);
}
else
return;
m_caster->GetMotionMaster()->MoveCharge(x, y, z);
}
void Spell::EffectKnockBack(uint32 i)
+1 -1
View File
@@ -347,7 +347,7 @@ class Spell
void EffectSelfResurrect(uint32 i);
void EffectSkinning(uint32 i);
void EffectCharge(uint32 i);
void EffectCharge2(uint32 i);
void EffectChargeDest(uint32 i);
void EffectProspecting(uint32 i);
void EffectMilling(uint32 i);
void EffectRenamePet(uint32 i);
+2
View File
@@ -83,6 +83,7 @@ SpellMgr::SpellMgr()
case SPELL_EFFECT_APPLY_AREA_AURA_OWNER:
case SPELL_EFFECT_APPLY_AREA_AURA_RAID:
case SPELL_EFFECT_CHARGE:
case SPELL_EFFECT_CHARGE_DEST:
case SPELL_EFFECT_JUMP:
case SPELL_EFFECT_JUMP2:
case SPELL_EFFECT_LEAP_BACK:
@@ -3461,6 +3462,7 @@ void SpellMgr::LoadSpellCustomAttr()
count++;
break;
case SPELL_EFFECT_CHARGE:
case SPELL_EFFECT_CHARGE_DEST:
case SPELL_EFFECT_JUMP:
case SPELL_EFFECT_JUMP2:
case SPELL_EFFECT_LEAP_BACK: