Merge commit '6c1e4bc20d68d9fb548eb4896bd8b84a4c3ec4ff' into 4.3.4
Conflicts: README.md sql/updates/world/2015_04_04_00_world.sql sql/updates/world/2015_04_04_01_world.sql sql/updates/world/2015_04_05_06_world_335.sql src/server/game/Battlegrounds/Battleground.cpp src/server/game/DataStores/DBCStores.cpp src/server/game/DataStores/DBCStructure.h src/server/game/DataStores/DBCfmt.h src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Player/Player.h src/server/game/Entities/Unit/Unit.cpp src/server/game/Handlers/CharacterHandler.cpp src/server/game/Server/WorldSession.cpp src/server/game/Server/WorldSocket.cpp src/server/game/Spells/Spell.cpp src/server/game/Spells/SpellInfo.cpp src/server/game/World/World.cpp src/server/scripts/Commands/cs_account.cpp src/tools/map_extractor/System.cpp src/tools/vmap4_extractor/adtfile.cpp
This commit is contained in:
commit
224c7dc6ae
181 files changed
+707
-1014
No files matched your search
@@ -149,6 +149,8 @@ include_directories(
|
||||
${VALGRIND_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_library(scripts STATIC
|
||||
${scripts_STAT_SRCS}
|
||||
${scripts_STAT_PCH_SRC}
|
||||
|
||||
@@ -47,15 +47,15 @@ public:
|
||||
{
|
||||
{ "player", rbac::RBAC_PERM_COMMAND_LFG_PLAYER, false, &HandleLfgPlayerInfoCommand, "", NULL },
|
||||
{ "group", rbac::RBAC_PERM_COMMAND_LFG_GROUP, false, &HandleLfgGroupInfoCommand, "", NULL },
|
||||
{ "queue", rbac::RBAC_PERM_COMMAND_LFG_QUEUE, false, &HandleLfgQueueInfoCommand, "", NULL },
|
||||
{ "clean", rbac::RBAC_PERM_COMMAND_LFG_CLEAN, false, &HandleLfgCleanCommand, "", NULL },
|
||||
{ "options", rbac::RBAC_PERM_COMMAND_LFG_OPTIONS, false, &HandleLfgOptionsCommand, "", NULL },
|
||||
{ "queue", rbac::RBAC_PERM_COMMAND_LFG_QUEUE, true, &HandleLfgQueueInfoCommand, "", NULL },
|
||||
{ "clean", rbac::RBAC_PERM_COMMAND_LFG_CLEAN, true, &HandleLfgCleanCommand, "", NULL },
|
||||
{ "options", rbac::RBAC_PERM_COMMAND_LFG_OPTIONS, true, &HandleLfgOptionsCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand commandTable[] =
|
||||
{
|
||||
{ "lfg", rbac::RBAC_PERM_COMMAND_LFG, false, NULL, "", lfgCommandTable },
|
||||
{ "lfg", rbac::RBAC_PERM_COMMAND_LFG, true, NULL, "", lfgCommandTable },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
return commandTable;
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
|
||||
static bool HandleLfgQueueInfoCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
handler->SendSysMessage(sLFGMgr->DumpQueueInfo(atoi(args) != 0).c_str());
|
||||
handler->SendSysMessage(sLFGMgr->DumpQueueInfo(*args != '\0').c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "Language.h"
|
||||
#include "MovementGenerator.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Opcodes.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "TargetedMovementGenerator.h"
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
if (dist(xn, yn, xh, yh) >= dist(xn, yn, xp, yp) || dist(xp, yp, xh, yh) >= dist(xn, yn, xp, yp))
|
||||
return false;
|
||||
// check distance from the beam
|
||||
return (abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/dist(xn, yn, xp, yp) < 1.5f);
|
||||
return (std::abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/dist(xn, yn, xp, yp) < 1.5f);
|
||||
}
|
||||
|
||||
float dist(float xa, float ya, float xb, float yb) // auxiliary method for distance
|
||||
|
||||
@@ -268,7 +268,7 @@ public:
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void Load(char const* chrIn)
|
||||
void Load(char const* chrIn) override
|
||||
{
|
||||
if (!chrIn)
|
||||
{
|
||||
|
||||
@@ -1657,7 +1657,7 @@ public:
|
||||
{
|
||||
npc_the_lich_king_tirion_dawnAI(Creature* creature) : ScriptedAI(creature) { Reset(); }
|
||||
void Reset() override { }
|
||||
void AttackStart(Unit* /*who*/) { } // very sample, just don't make them aggreesive override
|
||||
void AttackStart(Unit* /*who*/) override { } // very sample, just don't make them aggreesive
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
void JustDied(Unit* /*killer*/) override { }
|
||||
};
|
||||
|
||||
@@ -236,7 +236,7 @@ public:
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
void Update(uint32 uiDiff)
|
||||
void Update(uint32 uiDiff) override
|
||||
{
|
||||
if (GetData(TYPE_FENRUS) != DONE)
|
||||
return;
|
||||
|
||||
@@ -108,7 +108,7 @@ class npc_professor_phizzlethorpe : public CreatureScript
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE)
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_RESQUE_OOX_09)
|
||||
{
|
||||
|
||||
+1
-1
@@ -421,7 +421,7 @@ public:
|
||||
gossipStep = 0;
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if (who && !who->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))
|
||||
npc_escortAI::AttackStart(who);
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Update(uint32 /*diff*/)
|
||||
void Update(uint32 /*diff*/) override
|
||||
{
|
||||
if (WardKeeperDeath == WARD_KEEPERS_NR)
|
||||
if (GameObject* go = instance->GetGameObject(DoorWardGUID))
|
||||
|
||||
@@ -57,7 +57,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 bossId, EncounterState state)
|
||||
bool SetBossState(uint32 bossId, EncounterState state) override
|
||||
{
|
||||
if (!InstanceScript::SetBossState(bossId, state))
|
||||
return false;
|
||||
|
||||
@@ -99,7 +99,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
uint32 EnrageTimer;
|
||||
|
||||
virtual bool IAmVeklor() = 0;
|
||||
virtual void Reset() = 0;
|
||||
virtual void Reset() override = 0;
|
||||
virtual void CastSpellOnBug(Creature* target) = 0;
|
||||
|
||||
void TwinReset()
|
||||
@@ -400,7 +400,7 @@ public:
|
||||
|
||||
struct boss_veknilashAI : public boss_twinemperorsAI
|
||||
{
|
||||
bool IAmVeklor() {return false;}
|
||||
bool IAmVeklor() override {return false;}
|
||||
boss_veknilashAI(Creature* creature) : boss_twinemperorsAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
|
||||
}
|
||||
|
||||
void CastSpellOnBug(Creature* target)
|
||||
void CastSpellOnBug(Creature* target) override
|
||||
{
|
||||
target->setFaction(14);
|
||||
target->AI()->AttackStart(me->getThreatManager().getHostilTarget());
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
|
||||
struct boss_veklorAI : public boss_twinemperorsAI
|
||||
{
|
||||
bool IAmVeklor() {return true;}
|
||||
bool IAmVeklor() override {return true;}
|
||||
boss_veklorAI(Creature* creature) : boss_twinemperorsAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
@@ -516,7 +516,7 @@ public:
|
||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true);
|
||||
}
|
||||
|
||||
void CastSpellOnBug(Creature* target)
|
||||
void CastSpellOnBug(Creature* target) override
|
||||
{
|
||||
target->setFaction(14);
|
||||
target->AddAura(SPELL_EXPLODEBUG, target);
|
||||
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
virtual void Update(uint32 diff)
|
||||
virtual void Update(uint32 diff) override
|
||||
{
|
||||
switch (PyramidPhase)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,6 @@ SDCategory: Ashenvale Forest
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_torek
|
||||
npc_ruul_snowhoof
|
||||
EndContentData */
|
||||
|
||||
@@ -33,132 +32,6 @@ EndContentData */
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
/*####
|
||||
# npc_torek
|
||||
####*/
|
||||
|
||||
enum Torek
|
||||
{
|
||||
SAY_READY = 0,
|
||||
SAY_MOVE = 1,
|
||||
SAY_PREPARE = 2,
|
||||
SAY_WIN = 3,
|
||||
SAY_END = 4,
|
||||
SPELL_REND = 11977,
|
||||
SPELL_THUNDERCLAP = 8078,
|
||||
QUEST_TOREK_ASSULT = 6544,
|
||||
NPC_SPLINTERTREE_RAIDER = 12859,
|
||||
NPC_DURIEL = 12860,
|
||||
NPC_SILVERWING_SENTINEL = 12896,
|
||||
NPC_SILVERWING_WARRIOR = 12897,
|
||||
FACTION_QUEST = 113
|
||||
};
|
||||
|
||||
class npc_torek : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_torek() : CreatureScript("npc_torek") { }
|
||||
|
||||
struct npc_torekAI : public npc_escortAI
|
||||
{
|
||||
npc_torekAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
rend_Timer = 5000;
|
||||
thunderclap_Timer = 8000;
|
||||
_completed = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_TOREK_ASSULT)
|
||||
{
|
||||
/// @todo find companions, make them follow Torek, at any time (possibly done by core/database in future?)
|
||||
Talk(SAY_READY, player);
|
||||
me->setFaction(FACTION_QUEST);
|
||||
npc_escortAI::Start(true, true, player->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId) override
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
Talk(SAY_MOVE, player);
|
||||
break;
|
||||
case 8:
|
||||
Talk(SAY_PREPARE, player);
|
||||
break;
|
||||
case 19:
|
||||
/// @todo verify location and creatures amount.
|
||||
me->SummonCreature(NPC_DURIEL, 1776.73f, -2049.06f, 109.83f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(NPC_SILVERWING_SENTINEL, 1774.64f, -2049.41f, 109.83f, 1.40f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(NPC_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 20:
|
||||
Talk(SAY_WIN, player);
|
||||
_completed = true;
|
||||
player->GroupEventHappens(QUEST_TOREK_ASSULT, me);
|
||||
break;
|
||||
case 21:
|
||||
Talk(SAY_END, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (rend_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_REND);
|
||||
rend_Timer = 20000;
|
||||
} else rend_Timer -= diff;
|
||||
|
||||
if (thunderclap_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_THUNDERCLAP);
|
||||
thunderclap_Timer = 30000;
|
||||
} else thunderclap_Timer -= diff;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 rend_Timer;
|
||||
uint32 thunderclap_Timer;
|
||||
bool _completed;
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_torekAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*####
|
||||
# npc_ruul_snowhoof
|
||||
####*/
|
||||
@@ -169,6 +42,7 @@ enum RuulSnowhoof
|
||||
NPC_THISTLEFUR_TOTEMIC = 3922,
|
||||
NPC_THISTLEFUR_PATHFINDER = 3926,
|
||||
QUEST_FREEDOM_TO_RUUL = 6482,
|
||||
FACTION_QUEST = 113,
|
||||
GO_CAGE = 178147
|
||||
};
|
||||
|
||||
@@ -204,7 +78,7 @@ public:
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_FREEDOM_TO_RUUL)
|
||||
{
|
||||
@@ -346,7 +220,7 @@ public:
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_VORSHA)
|
||||
{
|
||||
@@ -472,7 +346,6 @@ class go_naga_brazier : public GameObjectScript
|
||||
|
||||
void AddSC_ashenvale()
|
||||
{
|
||||
new npc_torek();
|
||||
new npc_ruul_snowhoof();
|
||||
new npc_muglash();
|
||||
new go_naga_brazier();
|
||||
|
||||
@@ -350,7 +350,7 @@ public:
|
||||
Talk(SAY_AGGRO, who);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_A_CRY_FOR_SAY_HELP)
|
||||
{
|
||||
|
||||
@@ -29,11 +29,12 @@ EndContentData */
|
||||
|
||||
#include "Player.h"
|
||||
#include "Group.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "CellImpl.h"
|
||||
|
||||
/*######
|
||||
## npc_webbed_creature
|
||||
@@ -360,7 +361,10 @@ public:
|
||||
|
||||
struct npc_demolitionist_legosoAI : public npc_escortAI
|
||||
{
|
||||
npc_demolitionist_legosoAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
npc_demolitionist_legosoAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
@@ -394,11 +398,16 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
_phase = PHASE_NONE;
|
||||
_moveTimer = 0;
|
||||
_eventStarterGuidLow = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->SetCanDualWield(true);
|
||||
|
||||
_events.Reset();
|
||||
|
||||
@@ -451,7 +451,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDidDialogueStep(int32 entry)
|
||||
void JustDidDialogueStep(int32 entry) override
|
||||
{
|
||||
switch (entry)
|
||||
{
|
||||
@@ -550,7 +550,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Creature* GetSpeakerByEntry(int32 entry)
|
||||
Creature* GetSpeakerByEntry(int32 entry) override
|
||||
{
|
||||
switch (entry)
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ class boss_prince_taldaram : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_CONJURE_FLAME_SPHERES, 5000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
BossAI::JustSummoned(summon);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class instance_ruby_sanctum : public InstanceMapScript
|
||||
BaltharusSharedHealth = 0;
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* /*player*/)
|
||||
void OnPlayerEnter(Player* /*player*/) override
|
||||
{
|
||||
if (!GetGuidData(DATA_HALION_CONTROLLER) && GetBossState(DATA_HALION) != DONE && GetBossState(DATA_GENERAL_ZARITHRIAN) == DONE)
|
||||
{
|
||||
|
||||
@@ -1873,7 +1873,7 @@ class spell_igb_rocket_pack_useable : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_igb_rocket_pack_useable_AuraScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
return GetOwner()->GetInstanceScript() != nullptr;
|
||||
}
|
||||
@@ -2001,7 +2001,7 @@ class spell_igb_cannon_blast : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_igb_cannon_blast_SpellScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
@@ -2343,7 +2343,7 @@ class spell_igb_gunship_fall_teleport : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_igb_gunship_fall_teleport_SpellScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetInstanceScript() != nullptr;
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
}
|
||||
|
||||
// Weekly quest spawn prevention
|
||||
uint32 GetCreatureEntry(uint32 /*guidLow*/, CreatureData const* data)
|
||||
uint32 GetCreatureEntry(uint32 /*guidLow*/, CreatureData const* data) override
|
||||
{
|
||||
uint32 entry = data->id;
|
||||
switch (entry)
|
||||
|
||||
@@ -564,7 +564,7 @@ class instance_naxxramas : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target = NULL*/, uint32 /*miscvalue1 = 0*/)
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target = NULL*/, uint32 /*miscvalue1 = 0*/) override
|
||||
{
|
||||
switch (criteria_id)
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
frenzy = false;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
BossAI::Reset();
|
||||
Initialize();
|
||||
|
||||
@@ -458,7 +458,7 @@ class spell_general_vezax_mark_of_the_faceless : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_general_vezax_mark_of_the_faceless_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_THE_FACELESS_DAMAGE))
|
||||
return false;
|
||||
|
||||
@@ -1128,7 +1128,7 @@ class npc_ominous_cloud : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
|
||||
void DoAction(int32 action) override
|
||||
void DoAction(int32 /*action*/) override
|
||||
{
|
||||
me->GetMotionMaster()->MoveCirclePath(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY(), me->GetPositionZ() + 5.0f, me->GetDistance2d(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY()), true, 16);
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ class instance_ulduar : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameObject)
|
||||
void OnGameObjectCreate(GameObject* gameObject) override
|
||||
{
|
||||
switch (gameObject->GetEntry())
|
||||
{
|
||||
|
||||
@@ -141,7 +141,7 @@ class boss_ingvar_the_plunderer : public CreatureScript
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId)
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
if (actionId == ACTION_START_PHASE_2)
|
||||
StartZombiePhase();
|
||||
|
||||
@@ -802,7 +802,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId)
|
||||
void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId) override
|
||||
{
|
||||
switch (uiEventId)
|
||||
{
|
||||
|
||||
@@ -184,9 +184,9 @@ class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint
|
||||
public:
|
||||
OPvPCapturePointZM_GraveYard(OutdoorPvP* pvp);
|
||||
|
||||
bool Update(uint32 diff);
|
||||
bool Update(uint32 diff) override;
|
||||
|
||||
void ChangeState() { }
|
||||
void ChangeState() override { }
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
@@ -196,11 +196,11 @@ class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint
|
||||
|
||||
void SetBeaconState(uint32 controlling_team); // not good atm
|
||||
|
||||
bool HandleGossipOption(Player* player, ObjectGuid guid, uint32 gossipid);
|
||||
bool HandleGossipOption(Player* player, ObjectGuid guid, uint32 gossipid) override;
|
||||
|
||||
bool HandleDropFlag(Player* player, uint32 spellId);
|
||||
bool HandleDropFlag(Player* player, uint32 spellId) override;
|
||||
|
||||
bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso);
|
||||
bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso) override;
|
||||
|
||||
uint32 GetGraveYardState() const;
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class boss_ambassador_hellmaw : public CreatureScript
|
||||
{
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId)
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
if (actionId == ACTION_AMBASSADOR_HELLMAW_INTRO)
|
||||
DoIntro();
|
||||
|
||||
@@ -92,7 +92,7 @@ class instance_shadow_labyrinth : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void OnUnitDeath(Unit* unit)
|
||||
void OnUnitDeath(Unit* unit) override
|
||||
{
|
||||
Creature* creature = unit->ToCreature();
|
||||
if (!creature)
|
||||
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->GetSource() && i->GetSource()->IsAlive() && me->HasInArc(float(diff/20000*M_PI*2), i->GetSource()) && me->IsWithinDist(i->GetSource(), SPOUT_DIST) && !i->GetSource()->IsInWater())
|
||||
if (i->GetSource() && i->GetSource()->IsAlive() && me->HasInArc(diff/20000.f*float(M_PI)*2.f, i->GetSource()) && me->IsWithinDist(i->GetSource(), SPOUT_DIST) && !i->GetSource()->IsInWater())
|
||||
DoCast(i->GetSource(), SPELL_SPOUT, true); // only knock back players in arc, in 100yards, not in water
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
instance->SetBossState(DATA_MAULGAR, DONE);
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId)
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
if (actionId == ACTION_ADD_DEATH)
|
||||
Talk(SAY_OGRE_DEATH);
|
||||
|
||||
+1
-1
@@ -416,7 +416,7 @@ class npc_omrogg_heads : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void SetData(uint32 data, uint32 value)
|
||||
void SetData(uint32 data, uint32 value) override
|
||||
{
|
||||
if (data == SETDATA_DATA && value == SETDATA_YELL)
|
||||
{
|
||||
|
||||
@@ -316,10 +316,10 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
Portals[i][2] = PORTAL_Z;
|
||||
}
|
||||
}
|
||||
if ((abs(Portals[2][0] - Portals[1][0]) < 7) && (abs(Portals[2][1] - Portals[1][1]) < 7))
|
||||
if ((std::abs(Portals[2][0] - Portals[1][0]) < 7) && (std::abs(Portals[2][1] - Portals[1][1]) < 7))
|
||||
{
|
||||
int i=1;
|
||||
if (abs(CENTER_X + 26.0f - Portals[2][0]) < 7)
|
||||
if (std::abs(CENTER_X + 26.0f - Portals[2][0]) < 7)
|
||||
i = -1;
|
||||
Portals[2][0] = Portals[2][0]+7*i;
|
||||
Portals[2][1] = Portal_Y(Portals[2][0], LARGE_PORTAL_RADIUS);
|
||||
|
||||
@@ -42,7 +42,7 @@ class instance_mechanar : public InstanceMapScript
|
||||
LoadDoorData(doorData);
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameObject)
|
||||
void OnGameObjectCreate(GameObject* gameObject) override
|
||||
{
|
||||
switch (gameObject->GetEntry())
|
||||
{
|
||||
|
||||
@@ -29,7 +29,6 @@ npc_bloodmaul_brute
|
||||
npc_nether_drake
|
||||
npc_daranelle
|
||||
go_legion_obelisk
|
||||
go_thunderspike
|
||||
EndContentData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
@@ -507,31 +506,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## go_thunderspike
|
||||
######*/
|
||||
|
||||
enum TheThunderspike
|
||||
{
|
||||
NPC_GOR_GRIMGUT = 21319,
|
||||
QUEST_THUNDERSPIKE = 10526,
|
||||
};
|
||||
|
||||
class go_thunderspike : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_thunderspike() : GameObjectScript("go_thunderspike") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_THUNDERSPIKE) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(NPC_GOR_GRIMGUT, 25.0f, true))
|
||||
if (Creature* gorGrimgut = go->SummonCreature(NPC_GOR_GRIMGUT, -2413.4f, 6914.48f, 25.01f, 3.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000))
|
||||
gorGrimgut->AI()->AttackStart(player);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
enum SimonGame
|
||||
{
|
||||
NPC_SIMON_BUNNY = 22923,
|
||||
@@ -1224,7 +1198,6 @@ void AddSC_blades_edge_mountains()
|
||||
new npc_nether_drake();
|
||||
new npc_daranelle();
|
||||
new go_legion_obelisk();
|
||||
new go_thunderspike();
|
||||
new npc_simon_bunny();
|
||||
new go_simon_cluster();
|
||||
new go_apexis_relic();
|
||||
|
||||
@@ -289,7 +289,7 @@ public:
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,6 @@ npc_enslaved_netherwing_drake
|
||||
npc_drake_dealer_hurlunk
|
||||
npcs_flanis_swiftwing_and_kagrosh
|
||||
npc_karynaku
|
||||
npc_overlord_morghor
|
||||
npc_earthmender_wilda
|
||||
npc_torloth_the_magnificent
|
||||
npc_illidari_spawn
|
||||
@@ -676,331 +675,6 @@ class npc_karynaku : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
/*####
|
||||
# npc_overlord_morghor
|
||||
# this whole script is wrong and needs a rewrite.even the illidan npc used is the wrong one.npc id 23467 may be the correct one
|
||||
####*/
|
||||
enum OverlordData
|
||||
{
|
||||
QUEST_LORD_ILLIDAN_STORMRAGE = 11108,
|
||||
|
||||
C_ILLIDAN = 22083,
|
||||
C_YARZILL = 23141,
|
||||
|
||||
SPELL_ONE = 39990, // Red Lightning Bolt
|
||||
SPELL_TWO = 41528, // Mark of Stormrage
|
||||
SPELL_THREE = 40216, // Dragonaw Faction
|
||||
SPELL_FOUR = 42016, // Dragonaw Trasform
|
||||
|
||||
OVERLORD_SAY_1 = 0,
|
||||
OVERLORD_SAY_2 = 1,
|
||||
//OVERLORD_SAY_3 = 2,
|
||||
OVERLORD_SAY_4 = 3,
|
||||
OVERLORD_SAY_5 = 4,
|
||||
OVERLORD_SAY_6 = 5,
|
||||
|
||||
OVERLORD_YELL_1 = 6,
|
||||
OVERLORD_YELL_2 = 7,
|
||||
|
||||
LORD_ILLIDAN_SAY_1 = 0,
|
||||
LORD_ILLIDAN_SAY_2 = 1,
|
||||
LORD_ILLIDAN_SAY_3 = 2,
|
||||
LORD_ILLIDAN_SAY_4 = 3,
|
||||
LORD_ILLIDAN_SAY_5 = 4,
|
||||
LORD_ILLIDAN_SAY_6 = 5,
|
||||
LORD_ILLIDAN_SAY_7 = 6,
|
||||
|
||||
YARZILL_THE_MERC_SAY = 0
|
||||
};
|
||||
|
||||
class npc_overlord_morghor : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_overlord_morghor() : CreatureScript("npc_overlord_morghor") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest *_Quest) override
|
||||
{
|
||||
if (_Quest->GetQuestId() == QUEST_LORD_ILLIDAN_STORMRAGE)
|
||||
{
|
||||
ENSURE_AI(npc_overlord_morghor::npc_overlord_morghorAI, creature->AI())->PlayerGUID = player->GetGUID();
|
||||
ENSURE_AI(npc_overlord_morghor::npc_overlord_morghorAI, creature->AI())->StartEvent();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_overlord_morghorAI(creature);
|
||||
}
|
||||
|
||||
struct npc_overlord_morghorAI : public ScriptedAI
|
||||
{
|
||||
npc_overlord_morghorAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
PlayerGUID.Clear();
|
||||
IllidanGUID.Clear();
|
||||
|
||||
ConversationTimer = 0;
|
||||
Step = 0;
|
||||
|
||||
Event = false;
|
||||
}
|
||||
|
||||
ObjectGuid PlayerGUID;
|
||||
ObjectGuid IllidanGUID;
|
||||
|
||||
uint32 ConversationTimer;
|
||||
uint32 Step;
|
||||
|
||||
bool Event;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 2);
|
||||
}
|
||||
|
||||
void StartEvent()
|
||||
{
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
Unit* Illidan = me->SummonCreature(C_ILLIDAN, -5107.83f, 602.584f, 85.2393f, 4.92598f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if (Illidan)
|
||||
{
|
||||
IllidanGUID = Illidan->GetGUID();
|
||||
Illidan->SetVisible(false);
|
||||
}
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
|
||||
if (player)
|
||||
Talk(OVERLORD_SAY_1, player);
|
||||
}
|
||||
ConversationTimer = 4200;
|
||||
Step = 0;
|
||||
Event = true;
|
||||
}
|
||||
|
||||
uint32 NextStep(uint32 Step)
|
||||
{
|
||||
Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
|
||||
Creature* Illi = ObjectAccessor::GetCreature(*me, IllidanGUID);
|
||||
|
||||
if (!player)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (Step)
|
||||
{
|
||||
case 0:
|
||||
return 0;
|
||||
break;
|
||||
case 1:
|
||||
me->GetMotionMaster()->MovePoint(0, -5104.41f, 595.297f, 85.6838f);
|
||||
return 9000;
|
||||
break;
|
||||
case 2:
|
||||
Talk(OVERLORD_YELL_1, player);
|
||||
return 4500;
|
||||
break;
|
||||
case 3:
|
||||
me->SetInFront(player);
|
||||
return 3200;
|
||||
break;
|
||||
case 4:
|
||||
Talk(OVERLORD_SAY_2, player);
|
||||
return 2000;
|
||||
break;
|
||||
case 5:
|
||||
if (Illi)
|
||||
{
|
||||
Illi->SetVisible(true);
|
||||
Illi->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Illi->SetDisplayId(21526);
|
||||
}
|
||||
return 350;
|
||||
break;
|
||||
case 6:
|
||||
if (Illi)
|
||||
{
|
||||
Illi->CastSpell(Illi, SPELL_ONE, true);
|
||||
Illi->SetTarget(me->GetGUID());
|
||||
me->SetTarget(IllidanGUID);
|
||||
}
|
||||
return 2000;
|
||||
break;
|
||||
case 7:
|
||||
Talk(OVERLORD_YELL_2);
|
||||
return 4500;
|
||||
break;
|
||||
case 8:
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 8);
|
||||
return 2500;
|
||||
break;
|
||||
case 9:
|
||||
// missing text "Lord Illidan, this is the Dragonmaw that I, and others, have told you about. He will lead us to victory!"
|
||||
return 5000;
|
||||
break;
|
||||
case 10:
|
||||
if (Illi)
|
||||
Illi->AI()->Talk(LORD_ILLIDAN_SAY_1);
|
||||
return 5000;
|
||||
break;
|
||||
case 11:
|
||||
Talk(OVERLORD_SAY_4, player);
|
||||
return 6000;
|
||||
break;
|
||||
case 12:
|
||||
if (Illi)
|
||||
Illi->AI()->Talk(LORD_ILLIDAN_SAY_2);
|
||||
return 5500;
|
||||
break;
|
||||
case 13:
|
||||
if (Illi)
|
||||
Illi->AI()->Talk(LORD_ILLIDAN_SAY_3);
|
||||
return 4000;
|
||||
break;
|
||||
case 14:
|
||||
if (Illi)
|
||||
Illi->SetTarget(PlayerGUID);
|
||||
return 1500;
|
||||
break;
|
||||
case 15:
|
||||
if (Illi)
|
||||
Illi->AI()->Talk(LORD_ILLIDAN_SAY_4);
|
||||
return 1500;
|
||||
break;
|
||||
case 16:
|
||||
if (Illi)
|
||||
Illi->CastSpell(player, SPELL_TWO, true);
|
||||
player->RemoveAurasDueToSpell(SPELL_THREE);
|
||||
player->RemoveAurasDueToSpell(SPELL_FOUR);
|
||||
return 5000;
|
||||
break;
|
||||
case 17:
|
||||
if (Illi)
|
||||
Illi->AI()->Talk(LORD_ILLIDAN_SAY_5);
|
||||
return 5000;
|
||||
break;
|
||||
case 18:
|
||||
if (Illi)
|
||||
Illi->AI()->Talk(LORD_ILLIDAN_SAY_6);
|
||||
return 5000;
|
||||
break;
|
||||
case 19:
|
||||
if (Illi)
|
||||
Illi->AI()->Talk(LORD_ILLIDAN_SAY_7);
|
||||
return 5000;
|
||||
break;
|
||||
case 20:
|
||||
if (Illi)
|
||||
{
|
||||
Illi->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
Illi->SetDisableGravity(true);
|
||||
}
|
||||
return 500;
|
||||
break;
|
||||
case 21:
|
||||
Talk(OVERLORD_SAY_5);
|
||||
return 500;
|
||||
break;
|
||||
case 22:
|
||||
if (Illi)
|
||||
{
|
||||
Illi->SetVisible(false);
|
||||
Illi->setDeathState(JUST_DIED);
|
||||
}
|
||||
return 1000;
|
||||
break;
|
||||
case 23:
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
return 2000;
|
||||
break;
|
||||
case 24:
|
||||
me->SetTarget(PlayerGUID);
|
||||
return 5000;
|
||||
break;
|
||||
case 25:
|
||||
Talk(OVERLORD_SAY_6);
|
||||
return 2000;
|
||||
break;
|
||||
case 26:
|
||||
player->GroupEventHappens(QUEST_LORD_ILLIDAN_STORMRAGE, me);
|
||||
return 6000;
|
||||
break;
|
||||
case 27:
|
||||
{
|
||||
Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f);
|
||||
if (Yarzill)
|
||||
Yarzill->SetTarget(PlayerGUID);
|
||||
return 500;
|
||||
}
|
||||
break;
|
||||
case 28:
|
||||
player->RemoveAurasDueToSpell(SPELL_TWO);
|
||||
player->RemoveAurasDueToSpell(41519);
|
||||
player->CastSpell(player, SPELL_THREE, true);
|
||||
player->CastSpell(player, SPELL_FOUR, true);
|
||||
return 1000;
|
||||
break;
|
||||
case 29:
|
||||
{
|
||||
if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f))
|
||||
Yarzill->AI()->Talk(YARZILL_THE_MERC_SAY, player);
|
||||
return 5000;
|
||||
}
|
||||
break;
|
||||
case 30:
|
||||
{
|
||||
if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f))
|
||||
Yarzill->SetTarget(ObjectGuid::Empty);
|
||||
return 5000;
|
||||
}
|
||||
break;
|
||||
case 31:
|
||||
{
|
||||
if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f))
|
||||
Yarzill->CastSpell(player, 41540, true);
|
||||
return 1000;
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
me->GetMotionMaster()->MovePoint(0, -5085.77f, 577.231f, 86.6719f);
|
||||
return 5000;
|
||||
break;
|
||||
case 33:
|
||||
me->SetTarget(ObjectGuid::Empty);
|
||||
Reset();
|
||||
return 100;
|
||||
break;
|
||||
default :
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!ConversationTimer)
|
||||
return;
|
||||
|
||||
if (ConversationTimer <= diff)
|
||||
{
|
||||
if (Event && PlayerGUID)
|
||||
ConversationTimer = NextStep(++Step);
|
||||
} else ConversationTimer -= diff;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*####
|
||||
# npc_earthmender_wilda
|
||||
####*/
|
||||
@@ -2026,7 +1700,6 @@ void AddSC_shadowmoon_valley()
|
||||
new npc_drake_dealer_hurlunk();
|
||||
new npcs_flanis_swiftwing_and_kagrosh();
|
||||
new npc_karynaku();
|
||||
new npc_overlord_morghor();
|
||||
new npc_earthmender_wilda();
|
||||
new npc_lord_illidan_stormrage();
|
||||
new go_crystal_prison();
|
||||
|
||||
@@ -477,7 +477,7 @@ class spell_item_flask_of_the_north : public SpellScriptLoader
|
||||
break;
|
||||
}
|
||||
|
||||
caster->CastSpell(caster, possibleSpells[irand(0, (possibleSpells.size() - 1))], true, NULL);
|
||||
caster->CastSpell(caster, possibleSpells[urand(0, (possibleSpells.size() - 1))], true, NULL);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in new issue
Block a user