Merge commit '6390e6a4cc2d657e7fa49e80c5be32007df56ee1' into 4.3.4

Conflicts:
	sql/updates/world/2014_12_30_00_world.sql
	sql/updates/world/2014_12_30_01_world.sql
	src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
This commit is contained in:
Carbenium committed 2015-07-21 20:45:16 +02:00
commit b9c871fdb7
6 files changed
+284 -172

No files matched your search

+25 -3
View File
@@ -1076,9 +1076,12 @@ class spell_q14112_14145_chum_the_water: public SpellScriptLoader
// http://old01.wowhead.com/quest=9452 - Red Snapper - Very Tasty!
enum RedSnapperVeryTasty
{
SPELL_CAST_NET = 29866,
ITEM_RED_SNAPPER = 23614,
SPELL_NEW_SUMMON_TEST = 49214,
ITEM_RED_SNAPPER = 23614,
SPELL_CAST_NET = 29866,
SPELL_NEW_SUMMON_TEST = 49214,
GO_SCHOOL_OF_RED_SNAPPER = 181616
};
class spell_q9452_cast_net: public SpellScriptLoader
@@ -1095,6 +1098,15 @@ class spell_q9452_cast_net: public SpellScriptLoader
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
SpellCastResult CheckCast()
{
GameObject* go = GetCaster()->FindNearestGameObject(GO_SCHOOL_OF_RED_SNAPPER, 3.0f);
if (!go || go->GetRespawnTime())
return SPELL_FAILED_REQUIRES_SPELL_FOCUS;
return SPELL_CAST_OK;
}
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Player* caster = GetCaster()->ToPlayer();
@@ -1104,9 +1116,19 @@ class spell_q9452_cast_net: public SpellScriptLoader
caster->CastSpell(caster, SPELL_NEW_SUMMON_TEST, true);
}
void HandleActiveObject(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetHitGObj()->SetRespawnTime(roll_chance_i(50) ? 2 * MINUTE : 3 * MINUTE);
GetHitGObj()->Use(GetCaster());
GetHitGObj()->SetLootState(GO_JUST_DEACTIVATED);
}
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_q9452_cast_net_SpellScript::CheckCast);
OnEffectHit += SpellEffectFn(spell_q9452_cast_net_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_q9452_cast_net_SpellScript::HandleActiveObject, EFFECT_1, SPELL_EFFECT_ACTIVATE_OBJECT);
}
};