Core/Players: Don't set instanceId to 0 when player is on transport during loading, there CAN be transports inside instances

Core/Scripts: Added waypoint id to OnRelocate transport hook
Core/Scripts: Make use of ZoneScript::GetGameObjectEntry at gameobject creation (makes it possible to override gameobject entries in instances)
Core/Transports: Call InstanceScript::EventInform for transport events
Core/Transports: Use guid from db for transports, not just its entry - adds partial support for instancing them (still cannot use transports table for it, but can spawn manually now)
Scripts/Icecrown Citadel: Fixed crash in Deathbringer Saurfang when event is started by more than one person (can't do this anymore)

Closes isssue #3749.

--HG--
branch : trunk
This commit is contained in:
Shauren committed 2010-09-02 10:40:32 +02:00
1 parent 320cd16f20
commit 0f9fe8dbeb
12 files changed
+100 -41

No files matched your search

@@ -537,6 +537,10 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
{
if (action == ACTION_START_EVENT)
{
// Prevent crashes
if (events.GetPhaseMask() & PHASE_INTRO_MASK)
return;
GetCreatureListWithEntryInGrid(guardList, me, NPC_SE_KOR_KRON_REAVER, 20.0f);
guardList.sort(Trinity::ObjectDistanceOrderPred(me));
uint32 x = 1;
@@ -695,8 +699,10 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
return true;
}
bool OnGossipSelect(Player* /*pPlayer*/, Creature* pCreature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* pCreature, uint32 /*sender*/, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
player->CLOSE_GOSSIP_MENU();
if (action == -ACTION_START_EVENT)
pCreature->AI()->DoAction(ACTION_START_EVENT);
@@ -730,6 +736,11 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
{
if (action == ACTION_START_EVENT)
{
// Prevent crashes
if (events.GetPhaseMask() & PHASE_INTRO_MASK)
return;
events.SetPhase(PHASE_INTRO_A);
GetCreatureListWithEntryInGrid(guardList, me, NPC_SE_SKYBREAKER_MARINE, 20.0f);
guardList.sort(Trinity::ObjectDistanceOrderPred(me));
uint32 x = 1;
@@ -739,7 +750,6 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
DoScriptText(SAY_INTRO_ALLIANCE_1, me);
events.ScheduleEvent(EVENT_INTRO_ALLIANCE_4, 2500+17500+9500, 0, PHASE_INTRO_A);
events.SetPhase(PHASE_INTRO_A);
if (pInstance)
{
uiDeathbringerSaurfangGUID = pInstance->GetData64(DATA_DEATHBRINGER_SAURFANG);
@@ -825,8 +835,10 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
return true;
}
bool OnGossipSelect(Player* /*pPlayer*/, Creature* pCreature, uint32 /*sender*/, uint32 action)
bool OnGossipSelect(Player* player, Creature* pCreature, uint32 /*sender*/, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
player->CLOSE_GOSSIP_MENU();
if (action == -ACTION_START_EVENT+1)
pCreature->AI()->DoAction(ACTION_START_EVENT);