Storm Peaks: support for 'They took our men!' quest, by Manuel
--HG-- branch : trunk
This commit is contained in:
@@ -968,6 +968,8 @@ UPDATE `creature_template` SET `ScriptName`='npc_kaya_flathoof' WHERE `entry`=11
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_agnetta_tyrsdottar' WHERE `entry`=30154;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_frostborn_scout' WHERE `entry`=29811;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_thorim' WHERE `entry`=29445;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_goblin_prisioner' WHERE `entry`=29446;
|
||||
UPDATE `gameobject_template` SET ScriptName = 'go_rusty_cage' WHERE `entry`=191544;
|
||||
|
||||
/* STORMWIND CITY */
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_archmage_malin' WHERE `entry`=2708;
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_goblin_prisioner' WHERE `entry`=29446;
|
||||
UPDATE `gameobject_template` SET ScriptName = 'go_rusty_cage' WHERE `entry`=191544;
|
||||
@@ -169,6 +169,37 @@ bool GossipSelect_npc_thorim(Player* pPlayer, Creature* pCreature, uint32 uiSend
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_goblin_prisioner
|
||||
######*/
|
||||
|
||||
enum eGoblinPrisioner
|
||||
{
|
||||
GO_RUSTY_CAGE = 191544
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_goblin_prisionerAI : public ScriptedAI
|
||||
{
|
||||
npc_goblin_prisionerAI(Creature* pCreature) : ScriptedAI (pCreature){}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetReactState(REACT_PASSIVE);
|
||||
|
||||
if(GameObject* pGO = m_creature->FindNearestGameObject(GO_RUSTY_CAGE,5.0f))
|
||||
{
|
||||
if(pGO->GetGoState() == GO_STATE_ACTIVE)
|
||||
pGO->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_goblin_prisioner(Creature* pCreature)
|
||||
{
|
||||
return new npc_goblin_prisionerAI(pCreature);
|
||||
}
|
||||
|
||||
void AddSC_storm_peaks()
|
||||
{
|
||||
Script* newscript;
|
||||
@@ -191,4 +222,9 @@ void AddSC_storm_peaks()
|
||||
newscript->pGossipHello = &GossipHello_npc_thorim;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_thorim;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_goblin_prisioner";
|
||||
newscript->GetAI = &GetAI_npc_goblin_prisioner;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/* ScriptData
|
||||
SDName: GO_Scripts
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089
|
||||
SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089,12843
|
||||
SDCategory: Game Objects
|
||||
EndScriptData */
|
||||
|
||||
@@ -39,6 +39,7 @@ go_tablet_of_madness
|
||||
go_tablet_of_the_seven
|
||||
go_tele_to_dalaran_crystal
|
||||
go_tele_to_violet_stand
|
||||
go_rusty_cage
|
||||
EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
@@ -536,6 +537,24 @@ bool GOHello_go_matrix_punchograph(Player* pPlayer, GameObject* pGo)
|
||||
return false;
|
||||
}
|
||||
|
||||
enum eRustyCage
|
||||
{
|
||||
NPC_GOBLIN_PRISIONER = 29466
|
||||
};
|
||||
|
||||
bool GOHello_go_rusty_cage(Player* pPlayer, GameObject* pGO)
|
||||
{
|
||||
if(Creature* m_creature = pGO->FindNearestCreature(NPC_GOBLIN_PRISIONER,5.0f,true))
|
||||
{
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
pPlayer->KilledMonsterCredit(NPC_GOBLIN_PRISIONER,m_creature->GetGUID());
|
||||
m_creature->DisappearAndDie();
|
||||
m_creature->RemoveCorpse();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddSC_go_scripts()
|
||||
{
|
||||
Script *newscript;
|
||||
@@ -655,5 +674,10 @@ void AddSC_go_scripts()
|
||||
newscript->Name = "go_matrix_punchograph";
|
||||
newscript->pGOHello = &GOHello_go_matrix_punchograph;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "go_rusty_cage";
|
||||
newscript->pGOHello = &GOHello_go_rusty_cage;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user