Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
This commit is contained in:
commit
39cce3344c
23 files changed
+111
-125
No files matched your search
@@ -800,7 +800,7 @@ public:
|
||||
if (show == "info")
|
||||
{
|
||||
// Check if the user did specify a visual waypoint
|
||||
if (target && target->GetEntry() != VISUAL_WAYPOINT)
|
||||
if (!target || target->GetEntry() != VISUAL_WAYPOINT)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_VP_SELECT);
|
||||
handler->SetSentErrorMessage(true);
|
||||
|
||||
@@ -553,7 +553,8 @@ public:
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -710,12 +710,14 @@ public:
|
||||
{
|
||||
SpeechTimer = 0;
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* speechCreature = Unit::GetCreature(*me, instance->GetData64(Speeches[speechCount].creature)))
|
||||
speechCreature->AI()->Talk(Speeches[speechCount].textid);
|
||||
if (speechCount == 12)
|
||||
if (Creature* pAnveena = Unit::GetCreature(*me, instance->GetData64(DATA_ANVEENA)))
|
||||
pAnveena->CastSpell(me, SPELL_SACRIFICE_OF_ANVEENA, false);
|
||||
// ChangeTimers(true, 10000); // Kil should do an emote while screaming without attacking for 10 seconds
|
||||
if (speechCount == 12)
|
||||
if (Creature* pAnveena = Unit::GetCreature(*me, instance->GetData64(DATA_ANVEENA)))
|
||||
pAnveena->CastSpell(me, SPELL_SACRIFICE_OF_ANVEENA, false);
|
||||
// ChangeTimers(true, 10000); // Kil should do an emote while screaming without attacking for 10 seconds
|
||||
}
|
||||
if (speechCount == speechPhaseEnd)
|
||||
TimerIsDeactivated[TIMER_SPEECH]=true;
|
||||
speechCount++;
|
||||
|
||||
@@ -274,7 +274,8 @@ public:
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -530,10 +530,10 @@ public:
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
Creature* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f, me);
|
||||
Creature* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f, me);
|
||||
Creature* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f, me);
|
||||
Creature* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f, me);
|
||||
Creature* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f);
|
||||
Creature* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f);
|
||||
Creature* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f);
|
||||
Creature* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f);
|
||||
|
||||
if (!Fandral || !Arygos || !Caelestrasz || !Merithra)
|
||||
return;
|
||||
|
||||
@@ -138,7 +138,7 @@ struct boss_horAI : ScriptedAI
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
if (instance->GetData(DATA_WAVE_COUNT) != NOT_STARTED)
|
||||
if (instance && instance->GetData(DATA_WAVE_COUNT) != NOT_STARTED)
|
||||
instance->ProcessEvent(0, EVENT_DO_WIPE);
|
||||
}
|
||||
|
||||
|
||||
@@ -242,6 +242,7 @@ public:
|
||||
eckTheFerociousDoorBehindGUID = go->GetGUID();
|
||||
if (isHeroic && m_auiEncounter[4] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
break;
|
||||
case GO_GALDARAH_DOOR1:
|
||||
galDarahDoor1GUID = go->GetGUID();
|
||||
if (m_auiEncounter[3] == DONE)
|
||||
|
||||
@@ -137,28 +137,36 @@ public:
|
||||
case NPC_BELGARISTRASZ:
|
||||
belgaristraszGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
|
||||
{
|
||||
creature->SetWalk(true),
|
||||
creature->GetMotionMaster()->MovePoint(0, 941.453f, 1044.1f, 359.967f),
|
||||
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
break;
|
||||
case NPC_ETERNOS:
|
||||
eternosGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
|
||||
{
|
||||
creature->SetWalk(true),
|
||||
creature->GetMotionMaster()->MovePoint(0, 943.202f, 1059.35f, 359.967f),
|
||||
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
break;
|
||||
case NPC_VERDISA:
|
||||
verdisaGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
|
||||
{
|
||||
creature->SetWalk(true),
|
||||
creature->GetMotionMaster()->MovePoint(0, 949.188f, 1032.91f, 359.967f),
|
||||
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
break;
|
||||
case NPC_GREATER_WHELP:
|
||||
if (GetBossState(DATA_UROM_EVENT) == DONE)
|
||||
{
|
||||
creature->SetPhaseMask(1, true);
|
||||
gwhelpList.push_back(creature->GetGUID());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -209,9 +217,13 @@ public:
|
||||
break;
|
||||
case DATA_UROM_EVENT:
|
||||
if (state == DONE)
|
||||
{
|
||||
if (Creature* eregos = instance->GetCreature(eregosGUID))
|
||||
{
|
||||
eregos->SetPhaseMask(1, true);
|
||||
GreaterWhelps();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DATA_EREGOS_EVENT:
|
||||
if (state == DONE)
|
||||
@@ -288,10 +300,8 @@ public:
|
||||
return;
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = gwhelpList.begin(); itr != gwhelpList.end(); ++itr)
|
||||
{
|
||||
if (Creature* gwhelp = instance->GetCreature(*itr))
|
||||
gwhelp->SetPhaseMask(1, true);
|
||||
}
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
|
||||
@@ -1154,7 +1154,7 @@ class npc_lorekeeper : public CreatureScript
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (!instance)
|
||||
return true;
|
||||
@@ -1162,19 +1162,13 @@ class npc_lorekeeper : public CreatureScript
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
if (player)
|
||||
{
|
||||
player->PrepareGossipMenu(creature);
|
||||
instance->instance->LoadGrid(364, -16); //make sure leviathan is loaded
|
||||
player->PrepareGossipMenu(creature);
|
||||
instance->instance->LoadGrid(364, -16); //make sure leviathan is loaded
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
}
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
if (player)
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
|
||||
if (Creature* leviathan = instance->instance->GetCreature(instance->GetData64(BOSS_LEVIATHAN)))
|
||||
{
|
||||
leviathan->AI()->DoAction(ACTION_START_HARD_MODE);
|
||||
|
||||
@@ -503,6 +503,7 @@ class instance_ulduar : public InstanceMapScript
|
||||
case GO_MOLE_MACHINE:
|
||||
if (GetBossState(BOSS_RAZORSCALE) == IN_PROGRESS)
|
||||
gameObject->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case GO_HODIR_DOOR:
|
||||
HodirDoorGUID = gameObject->GetGUID();
|
||||
break;
|
||||
|
||||
@@ -667,14 +667,14 @@ public:
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
{
|
||||
listOfMobs.Summon(summoned);
|
||||
if (summoned)
|
||||
if (instance)
|
||||
instance->SetData64(DATA_ADD_TRASH_MOB, summoned->GetGUID());
|
||||
}
|
||||
|
||||
void SummonedMobDied(Creature* summoned)
|
||||
void SummonedCreatureDies(Creature* summoned, Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
listOfMobs.Despawn(summoned);
|
||||
if (summoned)
|
||||
if (instance)
|
||||
instance->SetData64(DATA_DEL_TRASH_MOB, summoned->GetGUID());
|
||||
}
|
||||
};
|
||||
@@ -737,7 +737,7 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
if (!bHasGotMovingPoints)
|
||||
{
|
||||
bHasGotMovingPoints = true;
|
||||
switch (portalLocationID)
|
||||
switch (portalLocationID)
|
||||
{
|
||||
case 0:
|
||||
for (int i=0;i<6;i++)
|
||||
@@ -763,7 +763,7 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
case 2:
|
||||
for (int i=0;i<8;i++)
|
||||
AddWaypoint(i, ThirdPortalWPs[i][0]+irand(-1, 1), ThirdPortalWPs[i][1]+irand(-1, 1), ThirdPortalWPs[i][2], 0);
|
||||
me->SetHomePosition(ThirdPortalWPs[7][0], ThirdPortalWPs[7][1], ThirdPortalWPs[7][2], 3.149439f);
|
||||
me->SetHomePosition(ThirdPortalWPs[7][0], ThirdPortalWPs[7][1], ThirdPortalWPs[7][2], 3.149439f);
|
||||
break;
|
||||
case 3:
|
||||
for (int i=0;i<9;i++)
|
||||
@@ -789,12 +789,7 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* portal = Unit::GetCreature((*me), instance->GetData64(DATA_TELEPORTATION_PORTAL)))
|
||||
CAST_AI(npc_teleportation_portal_vh::npc_teleportation_portalAI, portal->AI())->SummonedMobDied(me);
|
||||
|
||||
instance->SetData(DATA_NPC_PRESENCE_AT_DOOR_REMOVE, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void CreatureStartAttackDoor()
|
||||
@@ -1080,26 +1075,18 @@ class npc_azure_stalker : public CreatureScript
|
||||
public:
|
||||
npc_azure_stalker() : CreatureScript("npc_azure_stalker") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_azure_stalkerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_azure_stalkerAI : public violet_hold_trashAI
|
||||
{
|
||||
npc_azure_stalkerAI(Creature* creature) : violet_hold_trashAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
uint32 uiBackstabTimer;
|
||||
uint32 uiTacticalBlinkTimer;
|
||||
bool TacticalBlinkCasted;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
uiBackstabTimer = 1300;
|
||||
uiTacticalBlinkTimer = 8000;
|
||||
TacticalBlinkCasted =false;
|
||||
_backstabTimer = 1300;
|
||||
_tacticalBlinkTimer = 8000;
|
||||
_tacticalBlinkCast =false;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -1110,33 +1097,42 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!TacticalBlinkCasted)
|
||||
if (!_tacticalBlinkCast)
|
||||
{
|
||||
if (uiTacticalBlinkTimer <= diff)
|
||||
if (_tacticalBlinkTimer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true);
|
||||
if (target)
|
||||
DoCast(target, SPELL_TACTICAL_BLINK);
|
||||
uiTacticalBlinkTimer = 6000;
|
||||
TacticalBlinkCasted = true;
|
||||
} else uiTacticalBlinkTimer -= diff;
|
||||
_tacticalBlinkTimer = 6000;
|
||||
_tacticalBlinkCast = true;
|
||||
} else _tacticalBlinkTimer -= diff;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (uiBackstabTimer <= diff)
|
||||
if (_backstabTimer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0, 10, true);
|
||||
DoCast(target, SPELL_BACKSTAB);
|
||||
TacticalBlinkCasted = false;
|
||||
uiBackstabTimer =1300;
|
||||
} else uiBackstabTimer -= diff;
|
||||
_tacticalBlinkCast = false;
|
||||
_backstabTimer =1300;
|
||||
} else _backstabTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _backstabTimer;
|
||||
uint32 _tacticalBlinkTimer;
|
||||
bool _tacticalBlinkCast;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_azure_stalkerAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_azure_spellbreaker : public CreatureScript
|
||||
|
||||
+2
-1
@@ -106,7 +106,8 @@ class instance_ramparts : public InstanceMapScript
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ class instance_shattered_halls : public InstanceMapScript
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1014,11 +1014,11 @@ public:
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_USE_OUTHOUSE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_VACANT, go->GetGUID());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_OUTHOUSE_INUSE, go->GetGUID());
|
||||
return true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
@@ -1109,8 +1109,7 @@ class go_gjalerbron_cage : public GameObjectScript
|
||||
{
|
||||
if (Creature* prisoner = go->FindNearestCreature(NPC_GJALERBRON_PRISONER, 5.0f))
|
||||
{
|
||||
if (player)
|
||||
player->KilledMonsterCredit(NPC_GJALERBRON_PRISONER, 0);
|
||||
player->KilledMonsterCredit(NPC_GJALERBRON_PRISONER, 0);
|
||||
|
||||
prisoner->AI()->Talk(SAY_FREE);
|
||||
prisoner->DespawnOrUnsummon(6000);
|
||||
|
||||
Reference in new issue
Block a user