diff options
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp | 11 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/zone_storm_peaks.cpp | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp index 15bdedc75db..68430f6f0f7 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -24,6 +24,7 @@ #include "PassiveAI.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellHistory.h" #include "SpellAuraEffects.h" #include "SpellScript.h" #include "Transport.h" @@ -644,10 +645,10 @@ protected: { if (Instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == IN_PROGRESS && !me->HasUnitState(UNIT_STATE_CASTING) && !me->HasReactState(REACT_PASSIVE) && - !me->HasSpellCooldown(BurningPitchId)) + !me->GetSpellHistory()->HasCooldown(BurningPitchId)) { DoCastAOE(BurningPitchId, true); - me->_AddCreatureSpellCooldown(BurningPitchId, time(NULL) + urand(3000, 4000) / IN_MILLISECONDS); + me->GetSpellHistory()->AddCooldown(BurningPitchId, 0, std::chrono::milliseconds(urand(3000, 4000))); } } @@ -1469,7 +1470,7 @@ struct npc_gunship_boarding_addAI : public gunship_npc_AI DoCast(me, SPELL_BATTLE_EXPERIENCE, true); DoCast(me, SPELL_TELEPORT_TO_ENEMY_SHIP, true); DoCast(me, Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_MELEE_TARGETING_ON_ORGRIMS_HAMMER : SPELL_MELEE_TARGETING_ON_SKYBREAKER, true); - me->_AddCreatureSpellCooldown(BurningPitchId, time(NULL) + 3); + me->GetSpellHistory()->AddCooldown(BurningPitchId, 0, std::chrono::seconds(3)); std::list<Player*> players; Trinity::UnitAuraCheck check(true, Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_ON_ORGRIMS_HAMMER_DECK : SPELL_ON_SKYBREAKER_DECK); @@ -1698,11 +1699,11 @@ class npc_gunship_rocketeer : public CreatureScript return; uint32 spellId = me->GetEntry() == NPC_SKYBREAKER_MORTAR_SOLDIER ? SPELL_ROCKET_ARTILLERY_A : SPELL_ROCKET_ARTILLERY_H; - if (me->HasSpellCooldown(spellId)) + if (me->GetSpellHistory()->HasCooldown(spellId)) return; DoCastAOE(spellId, true); - me->_AddCreatureSpellCooldown(spellId, time(NULL) + 9); + me->GetSpellHistory()->AddCooldown(spellId, 0, std::chrono::seconds(9)); } }; diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index bb1e88ce158..d5d9f8ae77e 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "SpellHistory.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "Vehicle.h" |
