Battlefield/Wintergrasp: improvements:

- Move Wintergrasp Keep guard spawns from core to db, removing all duplicates in the meanwhile.
- Add Alliance Brigadier General inside the relic room.

Closes #7593.
This commit is contained in:
SnapperRy
2016-10-08 14:16:05 +02:00
committed by Aokromes
parent c24c06ddcc
commit 76c462d04f
4 changed files with 103 additions and 151 deletions

View File

@@ -486,6 +486,56 @@ class npc_wg_quest_giver : public CreatureScript
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
return true;
}
struct npc_wg_quest_giverAI : public ScriptedAI
{
npc_wg_quest_giverAI(Creature* creature) : ScriptedAI(creature) { }
void JustDied(Unit* killer) override
{
if (killer->GetTypeId() != TYPEID_PLAYER)
return;
BattlefieldWG* wintergrasp = (BattlefieldWG*)sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
if (!wintergrasp)
return;
wintergrasp->HandlePromotion(killer->ToPlayer(), me);
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_wg_quest_giverAI(creature);
}
};
class npc_wg_guard : public CreatureScript
{
public:
npc_wg_guard() : CreatureScript("npc_wg_guard") { }
struct npc_wg_guardAI : public ScriptedAI
{
npc_wg_guardAI(Creature* creature) : ScriptedAI(creature) { }
void JustDied(Unit* killer) override
{
if (killer->GetTypeId() != TYPEID_PLAYER)
return;
BattlefieldWG* wintergrasp = (BattlefieldWG*)sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
if (!wintergrasp)
return;
wintergrasp->HandlePromotion(killer->ToPlayer(), me);
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_wg_guardAI(creature);
}
};
class spell_wintergrasp_force_building : public SpellScriptLoader
@@ -677,6 +727,7 @@ void AddSC_wintergrasp()
new npc_wg_demolisher_engineer();
new go_wg_vehicle_teleporter();
new npc_wg_quest_giver();
new npc_wg_guard();
new spell_wintergrasp_force_building();
new spell_wintergrasp_grab_passenger();
new achievement_wg_didnt_stand_a_chance();