Skip to content

Commit

Permalink
Eversong: completly remove prospector anvilward script and rework it …
Browse files Browse the repository at this point in the history
…into database
  • Loading branch information
miraco authored and killerwife committed Jul 12, 2024
1 parent 95ad74d commit 315e635
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 103 deletions.
12 changes: 0 additions & 12 deletions sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,6 @@ UPDATE creature_template SET ScriptName='npc_eris_havenfire' WHERE entry=14494;
/* EVERSONG WOODS */
UPDATE creature_template SET ScriptName='npc_kelerun_bloodmourn' WHERE entry=17807;
UPDATE gameobject_template SET ScriptName='go_harbinger_second_trial' WHERE entry=182052;
UPDATE creature_template SET ScriptName='npc_prospector_anvilward' WHERE entry=15420;
UPDATE creature_template SET ScriptName='npc_apprentice_mirveda' WHERE entry=15402;
UPDATE creature_template SET ScriptName='npc_infused_crystal' WHERE entry=16364;

Expand Down Expand Up @@ -6143,17 +6142,6 @@ INSERT INTO script_waypoint (Entry, PathId, Point, PositionX, PositionY, Positio
(12858,0,21,1776.9,-2024.56,109.83,0,0,0,'win'),
(12858,0,22,1776.87,-2028.31,109.83,0,60000,0,'stay'),
(12858,0,23,1776.9,-2028.3,109.83,0,0,0,''),
(15420, 0, 1, 9296.278, -6676.996, 22.358725, 100, 0, 0, 'Prospector Anvilward'),
(15420, 0, 2, 9299.323, -6668.9614, 22.41846, 100, 0, 0, 'Prospector Anvilward'),
(15420, 0, 3, 9303.353, -6666.7637, 22.432236, 100, 0, 0, 'Prospector Anvilward'),
(15420, 0, 4, 9307.93, -6660.8057, 22.43064, 100, 0, 0, 'Prospector Anvilward'),
(15420, 0, 5, 9309.302, -6656.1987, 23.005793, 100, 0, 0, 'Prospector Anvilward'),
(15420, 0, 6, 9307.386, -6651.9053, 24.834118, 100, 0, 0, 'Prospector Anvilward'),
(15420, 0, 7, 9300.505, -6648.1587, 28.052294, 100, 0, 0, 'Prospector Anvilward'),
(15420, 0, 8, 9293.393, -6650.7246, 30.57717, 100, 0, 0, 'Prospector Anvilward'),
(15420, 0, 9, 9290.5205, -6654.362, 31.830189, 100, 0, 0, 'Prospector Anvilward'),
(15420, 0, 10, 9289.944, -6657.774, 31.828085, 100, 0, 0, 'Prospector Anvilward'),
(15420, 0, 11, 9290.866, -6658.0156, 31.823935, 0.104719758033752441, 60000, 0, 'Prospector Anvilward'),
(16812,0,1,-10868.3,-1779.84,90.476,0,2500,0,'Open door, begin walking'),
(16812,0,2,-10875.6,-1779.58,90.478,0,0,0,''),
(16812,0,3,-10887.4,-1779.26,90.476,0,0,0,''),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ EndScriptData */
/* ContentData
npc_kelerun_bloodmourn
go_harbinger_second_trial
npc_prospector_anvilward
npc_apprentice_mirveda
npc_infused_crystal
EndContentData */
Expand Down Expand Up @@ -250,89 +249,6 @@ bool GOUse_go_harbinger_second_trial(Player* /*pPlayer*/, GameObject* pGO)
return false;
}

/*######
## npc_prospector_anvilward
######*/
enum
{
SAY_ANVIL1 = 11734,
SAY_ANVIL2 = 11735,

GOSSIP_ITEM_MOMENT = -3000108,
GOSSIP_ITEM_SHOW = -3000110,

GOSSIP_TEXT_ID_MOMENT = 8239,
GOSSIP_TEXT_ID_SHOW = 8240,

FACTION_HOSTILE = 14,

QUEST_THE_DWARVEN_SPY = 8483
};

struct npc_prospector_anvilwardAI : public npc_escortAI
{
// UnitAI functions
npc_prospector_anvilwardAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();}

void Reset() override { }

// Pure Virtual Functions
void WaypointReached(uint32 uiPointId) override
{
Player* pPlayer = GetPlayerForEscort();

if (!pPlayer)
return;

switch (uiPointId)
{
case 11:
DoBroadcastText(SAY_ANVIL2, m_creature, pPlayer);
m_creature->GetMotionMaster()->Clear(false, true);
m_creature->GetMotionMaster()->MoveIdle();
m_creature->SetFactionTemporary(FACTION_HOSTILE, TEMPFACTION_RESTORE_RESPAWN);
m_creature->AI()->SetReactState(REACT_DEFENSIVE);
m_creature->ForcedDespawn(60000);
break;
}
}
};

UnitAI* GetAI_npc_prospector_anvilward(Creature* pCreature)
{
return new npc_prospector_anvilwardAI(pCreature);
}

bool GossipHello_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature)
{
if (pPlayer->GetQuestStatus(QUEST_THE_DWARVEN_SPY) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOMENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);

pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_MOMENT, pCreature->GetObjectGuid());
return true;
}

bool GossipSelect_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SHOW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_SHOW, pCreature->GetObjectGuid());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->CLOSE_GOSSIP_MENU();

if (npc_prospector_anvilwardAI* pEscortAI = dynamic_cast<npc_prospector_anvilwardAI*>(pCreature->AI()))
{
DoBroadcastText(SAY_ANVIL1, pCreature, pPlayer);
pEscortAI->Start(false, pPlayer);
}

break;
}
return true;
}

/*######
## npc_apprentice_mirveda
Expand Down Expand Up @@ -578,13 +494,6 @@ void AddSC_eversong_woods()
pNewScript->pGOUse = &GOUse_go_harbinger_second_trial;
pNewScript->RegisterSelf();

pNewScript = new Script;
pNewScript->Name = "npc_prospector_anvilward";
pNewScript->GetAI = &GetAI_npc_prospector_anvilward;
pNewScript->pGossipHello = &GossipHello_npc_prospector_anvilward;
pNewScript->pGossipSelect = &GossipSelect_npc_prospector_anvilward;
pNewScript->RegisterSelf();

pNewScript = new Script;
pNewScript->Name = "npc_apprentice_mirveda";
pNewScript->GetAI = &GetAI_npc_apprentice_mirvedaAI;
Expand Down

0 comments on commit 315e635

Please sign in to comment.