Fix build

This commit is contained in:
Carbenium committed 2015-07-24 01:49:34 +02:00
1 parent 293658fb13
commit aaf3f090ea
22 files changed
+107 -148

No files matched your search

@@ -26,8 +26,7 @@
#include "Cell.h"
#include "CellImpl.h"
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
/*####
# npc_omen
####*/
+3 -8
View File
@@ -25,6 +25,7 @@
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "SpellHistory.h"
#include "Containers.h"
enum DeathKnightSpells
@@ -1527,7 +1528,7 @@ class spell_dk_will_of_the_necropolis : public SpellScriptLoader
{
//! HACK due to currenct proc system implementation
if (Player* player = GetTarget()->ToPlayer())
if (player->HasSpellCooldown(GetId()))
if (player->GetSpellHistory()->HasCooldown(GetId()))
return false;
return GetTarget()->HealthBelowPctDamaged(30, eventInfo.GetDamageInfo()->GetDamage());
@@ -1535,13 +1536,7 @@ class spell_dk_will_of_the_necropolis : public SpellScriptLoader
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
GetTarget()->CastSpell(GetTarget(), SPELL_DK_WILL_OF_THE_NECROPOLIS, true, NULL, aurEff);
if (Player* player = GetTarget()->ToPlayer())
{
player->RemoveSpellCooldown(SPELL_DK_RUNE_TAP, true);
player->AddSpellCooldown(GetId(), 0, time(NULL) + 45);
}
GetTarget()->CastSpell(GetTarget(), SPELL_DK_WILL_OF_THE_NECROPOLIS, true, nullptr, aurEff);
}
void Register() override
+2 -1
View File
@@ -25,6 +25,7 @@
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "SpellHistory.h"
#include "Containers.h"
enum DruidSpells
@@ -123,7 +124,7 @@ class spell_dru_eclipse : public SpellScriptLoader
return;
if (caster->ToPlayer()->GetAuraOfRankedSpell(SPELL_DRUID_NATURES_GRACE))
caster->ToPlayer()->RemoveSpellCooldown(SPELL_DRUID_NATURES_GRACE_TRIGGER, true);
caster->ToPlayer()->GetSpellHistory()->ResetCooldown(SPELL_DRUID_NATURES_GRACE_TRIGGER, true);
}
void Register() override
+1 -1
View File
@@ -632,7 +632,7 @@ class spell_mage_glyph_of_ice_block : public SpellScriptLoader
{
PreventDefaultAction();
// Remove Frost Nova cooldown
GetTarget()->ToPlayer()->RemoveSpellCooldown(SPELL_MAGE_FROST_NOVA, true);
GetTarget()->ToPlayer()->GetSpellHistory()->ResetCooldown(SPELL_MAGE_FROST_NOVA, true);
}
void Register() override
+1 -1
View File
@@ -657,7 +657,7 @@ class spell_pal_grand_crusader : public SpellScriptLoader
void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
{
GetTarget()->ToPlayer()->RemoveSpellCooldown(SPELL_PALADIN_AVENGERS_SHIELD, true);
GetTarget()->ToPlayer()->GetSpellHistory()->ResetCooldown(SPELL_PALADIN_AVENGERS_SHIELD, true);
}
void Register() override
+3 -13
View File
@@ -611,22 +611,12 @@ class spell_rog_preparation : public SpellScriptLoader
if (spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE)
return false;
return (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP || // Cold Blood, Shadowstep
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT) || // Vanish, Evasion, Sprint
(caster->HasAura(SPELL_ROGUE_GLYPH_OF_PREPARATION) &&
(spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_DISMANTLE || // Dismantle
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_KICK || // Kick
(spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY && // Blade Flurry
spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY)));
}, true);
continue;
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG0_ROGUE_VAN_SPRINT) || // Vanish, Sprint
return (spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG0_ROGUE_VAN_SPRINT) || // Vanish, Sprint
// Glyph of Preparation
(caster->HasAura(SPELL_ROGUE_GLYPH_OF_PREPARATION) &&
(spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_DISMANTLE_SMOKE_BOMB || // Dismantle, Smoke Bomb
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG0_ROGUE_KICK))) // Kick
{
caster->RemoveSpellCooldown((itr++)->first, true);
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG0_ROGUE_KICK));
}, true);
}
void Register() override
+4 -4
View File
@@ -463,7 +463,7 @@ class spell_sha_feedback : public SpellScriptLoader
{
PreventDefaultAction(); // will prevent default effect execution
if (Player* target = GetTarget()->ToPlayer())
target->ModifySpellCooldown(SPELL_SHAMAN_ELEMENTAL_MASTERY, aurEff->GetBaseAmount());
target->GetSpellHistory()->ModifyCooldown(SPELL_SHAMAN_ELEMENTAL_MASTERY, aurEff->GetBaseAmount());
}
void Register() override
@@ -988,7 +988,7 @@ class spell_sha_lava_surge_proc : public SpellScriptLoader
void HandleDummy(SpellEffIndex /*effIndex*/)
{
GetCaster()->ToPlayer()->RemoveSpellCooldown(SPELL_SHAMAN_LAVA_BURST, true);
GetCaster()->ToPlayer()->GetSpellHistory()->ResetCooldown(SPELL_SHAMAN_LAVA_BURST, true);
}
void Register() override
@@ -1056,7 +1056,7 @@ class spell_sha_nature_guardian : public SpellScriptLoader
{
//! HACK due to currenct proc system implementation
if (Player* player = GetTarget()->ToPlayer())
if (player->HasSpellCooldown(GetSpellInfo()->Id))
if (player->GetSpellHistory()->HasCooldown(GetSpellInfo()->Id))
return false;
return GetTarget()->HealthBelowPctDamaged(30, eventInfo.GetDamageInfo()->GetDamage());
@@ -1073,7 +1073,7 @@ class spell_sha_nature_guardian : public SpellScriptLoader
eventInfo.GetProcTarget()->getThreatManager().modifyThreatPercent(GetTarget(), -10);
if (Player* player = GetTarget()->ToPlayer())
player->AddSpellCooldown(GetSpellInfo()->Id, 0, time(NULL) + aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue());
player->GetSpellHistory()->AddCooldown(GetSpellInfo()->Id, 0, std::chrono::seconds(GetSpellInfo()->Effects[EFFECT_1].CalcValue()));
}
void Register() override
+2 -2
View File
@@ -815,7 +815,7 @@ class spell_warr_sudden_death : public SpellScriptLoader
{
// Remove cooldown on Colossus Smash
if (Player* player = GetTarget()->ToPlayer())
player->RemoveSpellCooldown(SPELL_WARRIOR_COLOSSUS_SMASH, true);
player->GetSpellHistory()->ResetCooldown(SPELL_WARRIOR_COLOSSUS_SMASH, true);
}
void Register() override
@@ -917,7 +917,7 @@ class spell_warr_sword_and_board : public SpellScriptLoader
{
// Remove cooldown on Shield Slam
if (Player* player = GetTarget()->ToPlayer())
player->RemoveSpellCooldown(SPELL_WARRIOR_SHIELD_SLAM, true);
player->GetSpellHistory()->ResetCooldown(SPELL_WARRIOR_SHIELD_SLAM, true);
}
void Register() override