Skip to content

Commit 113b966

Browse files
virusavReve
authored andcommitted
[1819] Added correct version of All allong the watchtowers patch. Patch by virusav.
Added correct version of All allong the watchtowers patch. Patch by virusav. DB support needed for the correct work. git-svn-id: https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2@1819 5f9c896b-1e26-0410-94da-f77f675e2462
1 parent 0de0180 commit 113b966

5 files changed

Lines changed: 22 additions & 15 deletions

File tree

scripts/world/go_scripts.cpp

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ go_tablet_of_madness
3838
go_tablet_of_the_seven
3939
go_tele_to_dalaran_crystal
4040
go_tele_to_violet_stand
41-
go_beacon_torch
41+
go_andorhal_tower
4242
go_scourge_enclosure
4343
EndContentData */
4444

@@ -445,7 +445,7 @@ bool GOHello_go_blood_filled_orb(Player* pPlayer, GameObject* pGo)
445445
}
446446

447447
/*######
448-
## go_beacon_torch
448+
## go_andorhal_tower
449449
######*/
450450

451451
enum
@@ -455,23 +455,27 @@ enum
455455
NPC_ANDORHAL_TOWER_1 = 10902,
456456
NPC_ANDORHAL_TOWER_2 = 10903,
457457
NPC_ANDORHAL_TOWER_3 = 10904,
458-
NPC_ANDORHAL_TOWER_4 = 10905
458+
NPC_ANDORHAL_TOWER_4 = 10905,
459+
GO_ANDORHAL_TOWER_1 = 176094,
460+
GO_ANDORHAL_TOWER_2 = 176095,
461+
GO_ANDORHAL_TOWER_3 = 176096,
462+
GO_ANDORHAL_TOWER_4 = 176097
459463
};
460464

461-
static const uint32 m_aTowerDummies[] = {NPC_ANDORHAL_TOWER_1, NPC_ANDORHAL_TOWER_2, NPC_ANDORHAL_TOWER_3, NPC_ANDORHAL_TOWER_4};
462-
463-
bool GOHello_go_beacon_torch(Player* pPlayer, GameObject* pGo)
465+
bool GOHello_go_andorhal_tower(Player* pPlayer, GameObject* pGo)
464466
{
465467
if (pPlayer->GetQuestStatus(QUEST_ALL_ALONG_THE_WATCHTOWERS_ALLIANCE) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_ALL_ALONG_THE_WATCHTOWERS_HORDE) == QUEST_STATUS_INCOMPLETE)
466468
{
467-
for (uint8 i = 0; i < 4; ++i)
469+
uint32 uiKillCredit = 0;
470+
switch(pGo->GetEntry())
468471
{
469-
if (GetClosestCreatureWithEntry(pPlayer, m_aTowerDummies[i], 2*INTERACTION_DISTANCE))
470-
{
471-
pPlayer->KilledMonsterCredit(m_aTowerDummies[i]);
472-
break;
473-
}
472+
case GO_ANDORHAL_TOWER_1: uiKillCredit = NPC_ANDORHAL_TOWER_1; break;
473+
case GO_ANDORHAL_TOWER_2: uiKillCredit = NPC_ANDORHAL_TOWER_2; break;
474+
case GO_ANDORHAL_TOWER_3: uiKillCredit = NPC_ANDORHAL_TOWER_3; break;
475+
case GO_ANDORHAL_TOWER_4: uiKillCredit = NPC_ANDORHAL_TOWER_4; break;
474476
}
477+
if (uiKillCredit)
478+
pPlayer->KilledMonsterCredit(uiKillCredit);
475479
}
476480
return true;
477481
}
@@ -602,8 +606,8 @@ void AddSC_go_scripts()
602606
pNewScript->RegisterSelf();
603607

604608
pNewScript = new Script;
605-
pNewScript->Name = "go_beacon_torch";
606-
pNewScript->pGOHello = &GOHello_go_beacon_torch;
609+
pNewScript->Name = "go_andorhal_tower";
610+
pNewScript->pGOHello = &GOHello_go_andorhal_tower;
607611
pNewScript->RegisterSelf();
608612

609613
pNewScript = new Script;

sql/Updates/r1819_mangos.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
UPDATE gameobject_template SET ScriptName='' WHERE entry=176093;
2+
UPDATE gameobject_template SET ScriptName='go_andorhal_tower' WHERE entry IN (176094,176095,176096,176097);
3+

sql/mangos_scriptname_full.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ UPDATE gameobject_template SET ScriptName='go_tablet_of_the_seven' WHERE entry=1
7373
UPDATE gameobject_template SET ScriptName='go_tele_to_dalaran_crystal' WHERE entry=191230;
7474
UPDATE gameobject_template SET ScriptName='go_tele_to_violet_stand' WHERE entry=191229;
7575
UPDATE gameobject_template SET ScriptName='go_blood_filled_orb' WHERE entry=182024;
76-
UPDATE gameobject_template SET ScriptName='go_beacon_torch' WHERE entry=176093;
76+
UPDATE gameobject_template SET ScriptName='go_andorhal_tower' WHERE entry IN (176094,176095,176096,176097);
7777
UPDATE gameobject_template SET ScriptName='go_scourge_enclosure' WHERE entry=191548;
7878

7979
/* GUARD */

0 commit comments

Comments
 (0)