Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts: dep/PackageList.txt src/server/game/Battlegrounds/Battleground.cpp src/server/game/Combat/ThreatManager.cpp src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Handlers/BattleGroundHandler.cpp src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp src/server/game/Movement/Spline/MoveSplineInit.cpp src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/SpellEffects.cpp src/server/game/World/World.cpp src/server/game/World/World.h src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h src/server/scripts/Spells/spell_druid.cpp src/server/scripts/Spells/spell_mage.cpp src/server/scripts/Spells/spell_paladin.cpp src/server/scripts/Spells/spell_priest.cpp src/server/scripts/Spells/spell_rogue.cpp src/server/scripts/Spells/spell_shaman.cpp src/server/scripts/Spells/spell_warlock.cpp src/server/scripts/Spells/spell_warrior.cpp src/tools/map_extractor/CMakeLists.txt src/tools/map_extractor/System.cpp src/tools/map_extractor/loadlib.cpp src/tools/map_extractor/mpq_libmpq.cpp src/tools/map_extractor/mpq_libmpq04.h src/tools/vmap4_assembler/CMakeLists.txt src/tools/vmap4_extractor/CMakeLists.txt src/tools/vmap4_extractor/mpq_libmpq.cpp src/tools/vmap4_extractor/mpq_libmpq04.h
This commit is contained in:
commit
b404e0bec1
274 files changed
+28968
-2768
No files matched your search
@@ -28,10 +28,13 @@
|
||||
|
||||
enum RogueSpells
|
||||
{
|
||||
SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK = 22482,
|
||||
SPELL_ROGUE_CHEAT_DEATH_COOLDOWN = 31231,
|
||||
SPELL_ROGUE_GLYPH_OF_PREPARATION = 56819,
|
||||
SPELL_ROGUE_PREY_ON_THE_WEAK = 58670,
|
||||
SPELL_ROGUE_SHIV_TRIGGERED = 5940
|
||||
SPELL_ROGUE_SHIV_TRIGGERED = 5940,
|
||||
SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST = 57933,
|
||||
SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC = 59628,
|
||||
};
|
||||
|
||||
enum RogueSpellIcons
|
||||
@@ -39,6 +42,61 @@ enum RogueSpellIcons
|
||||
ICON_ROGUE_IMPROVED_RECUPERATE = 4819
|
||||
};
|
||||
|
||||
// 13877, 33735, (check 51211, 65956) - Blade Flurry
|
||||
class spell_rog_blade_flurry : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_rog_blade_flurry() : SpellScriptLoader("spell_rog_blade_flurry") { }
|
||||
|
||||
class spell_rog_blade_flurry_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_rog_blade_flurry_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load()
|
||||
{
|
||||
_procTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
_procTarget = eventInfo.GetActor()->SelectNearbyTarget(eventInfo.GetProcTarget());
|
||||
return _procTarget;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (eventInfo.GetDamageInfo())
|
||||
{
|
||||
int32 damage = eventInfo.GetDamageInfo()->GetDamage();
|
||||
GetTarget()->CastCustomSpell(SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK, SPELLVALUE_BASE_POINT0, damage, _procTarget, true, NULL, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_rog_blade_flurry_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_rog_blade_flurry_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE);
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _procTarget;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_rog_blade_flurry_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 31228 - Cheat Death
|
||||
class spell_rog_cheat_death : public SpellScriptLoader
|
||||
{
|
||||
@@ -404,6 +462,58 @@ class spell_rog_recuperate : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// -1943 - Rupture
|
||||
class spell_rog_rupture : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_rog_rupture() : SpellScriptLoader("spell_rog_rupture") { }
|
||||
|
||||
class spell_rog_rupture_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_rog_rupture_AuraScript);
|
||||
|
||||
bool Load()
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
return caster && caster->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
canBeRecalculated = false;
|
||||
|
||||
float const attackpowerPerCombo[6] =
|
||||
{
|
||||
0.0f,
|
||||
0.015f, // 1 point: ${($m1 + $b1*1 + 0.015 * $AP) * 4} damage over 8 secs
|
||||
0.024f, // 2 points: ${($m1 + $b1*2 + 0.024 * $AP) * 5} damage over 10 secs
|
||||
0.03f, // 3 points: ${($m1 + $b1*3 + 0.03 * $AP) * 6} damage over 12 secs
|
||||
0.03428571f, // 4 points: ${($m1 + $b1*4 + 0.03428571 * $AP) * 7} damage over 14 secs
|
||||
0.0375f // 5 points: ${($m1 + $b1*5 + 0.0375 * $AP) * 8} damage over 16 secs
|
||||
};
|
||||
|
||||
uint8 cp = caster->ToPlayer()->GetComboPoints();
|
||||
if (cp > 5)
|
||||
cp = 5;
|
||||
|
||||
amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * attackpowerPerCombo[cp]);
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_rupture_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_rog_rupture_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 5938 - Shiv
|
||||
class spell_rog_shiv : public SpellScriptLoader
|
||||
{
|
||||
@@ -445,13 +555,108 @@ class spell_rog_shiv : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 57934 - Tricks of the Trade
|
||||
class spell_rog_tricks_of_the_trade : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_rog_tricks_of_the_trade() : SpellScriptLoader("spell_rog_tricks_of_the_trade") { }
|
||||
|
||||
class spell_rog_tricks_of_the_trade_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_rog_tricks_of_the_trade_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load()
|
||||
{
|
||||
_redirectTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEFAULT)
|
||||
GetTarget()->ResetRedirectThreat();
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
_redirectTarget = GetTarget()->GetRedirectThreatTarget();
|
||||
return _redirectTarget;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
Unit* target = GetTarget();
|
||||
target->CastSpell(_redirectTarget, SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST, true);
|
||||
target->CastSpell(target, SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC, true);
|
||||
Remove(AURA_REMOVE_BY_DEFAULT); // maybe handle by proc charges
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_rog_tricks_of_the_trade_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
DoCheckProc += AuraCheckProcFn(spell_rog_tricks_of_the_trade_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_rog_tricks_of_the_trade_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_DUMMY);
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _redirectTarget;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_rog_tricks_of_the_trade_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 59628 - Tricks of the Trade (Proc)
|
||||
class spell_rog_tricks_of_the_trade_proc : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_rog_tricks_of_the_trade_proc() : SpellScriptLoader("spell_rog_tricks_of_the_trade_proc") { }
|
||||
|
||||
class spell_rog_tricks_of_the_trade_proc_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_rog_tricks_of_the_trade_proc_AuraScript);
|
||||
|
||||
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetTarget()->ResetRedirectThreat();
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_rog_tricks_of_the_trade_proc_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_rog_tricks_of_the_trade_proc_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_rogue_spell_scripts()
|
||||
{
|
||||
new spell_rog_blade_flurry();
|
||||
new spell_rog_cheat_death();
|
||||
new spell_rog_deadly_poison();
|
||||
new spell_rog_nerves_of_steel();
|
||||
new spell_rog_preparation();
|
||||
new spell_rog_prey_on_the_weak();
|
||||
new spell_rog_recuperate();
|
||||
new spell_rog_rupture();
|
||||
new spell_rog_shiv();
|
||||
new spell_rog_tricks_of_the_trade();
|
||||
new spell_rog_tricks_of_the_trade_proc();
|
||||
}
|
||||
Reference in new issue
Block a user