aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-05-20 08:40:06 +0200
committerKudlaty <none@none>2009-05-20 08:40:06 +0200
commite7c630ce91f1a55677efecf17d90d9d6cd5dc6cd (patch)
tree72df507e32f103e0e442f28b760cfecef87b3dda
parent8305f6d3bc2088d78e8067e344e6df3fde978d1f (diff)
[SD2] 1058
Simplify scripts using manual call ActivateTaxiPathTo(). --HG-- branch : trunk
-rw-r--r--sql/updates/3422_world_scripts.sql1
-rw-r--r--src/bindings/scripts/scripts/npc/npc_taxi.cpp23
-rw-r--r--src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp16
-rw-r--r--src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp8
-rw-r--r--src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp10
5 files changed, 9 insertions, 49 deletions
diff --git a/sql/updates/3422_world_scripts.sql b/sql/updates/3422_world_scripts.sql
new file mode 100644
index 00000000000..7854f5d1313
--- /dev/null
+++ b/sql/updates/3422_world_scripts.sql
@@ -0,0 +1 @@
+UPDATE creature_template SET ScriptName='npc_karynaku' WHERE entry=22112;
diff --git a/src/bindings/scripts/scripts/npc/npc_taxi.cpp b/src/bindings/scripts/scripts/npc/npc_taxi.cpp
index a7a0ae9ec03..7667108683e 100644
--- a/src/bindings/scripts/scripts/npc/npc_taxi.cpp
+++ b/src/bindings/scripts/scripts/npc/npc_taxi.cpp
@@ -107,37 +107,22 @@ bool GossipHello_npc_taxi(Player *player, Creature *_Creature)
bool GossipSelect_npc_taxi(Player *player, Creature *_Creature, uint32 sender, uint32 action )
{
- std::vector<uint32> nodes;
-
switch(action) {
case GOSSIP_ACTION_INFO_DEF:
+ //spellId is correct, however it gives flight a somewhat funny effect //TaxiPath 506.
player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player,32474,true); //apparently correct spell, possible not correct place to cast, or correct caster
-
- nodes.resize(2);
- nodes[0] = 92; //from susurrus
- nodes[1] = 91; //end at exodar
-// player->ActivateTaxiPathTo(nodes,11686); //TaxiPath 506. Using invisible model, possible Trinity must allow 0(from dbc) for cases like this.
- player->ActivateTaxiPathTo(nodes);
+ player->CastSpell(player,32474,true);
break;
case GOSSIP_ACTION_INFO_DEF + 1:
player->CLOSE_GOSSIP_MENU();
-
- nodes.resize(2);
- nodes[0] = 152; //from drake
- nodes[1] = 153; //end at drake
- player->ActivateTaxiPathTo(nodes); //TaxiPath 627 (possibly 627+628(152->153->154->155) )
+ player->ActivateTaxiPathTo(627); //TaxiPath 627 (possibly 627+628(152->153->154->155) )
break;
case GOSSIP_ACTION_INFO_DEF + 2:
if( !player->HasItemCount(25853,1) ) {
player->SEND_GOSSIP_MENU(9780, _Creature->GetGUID());
} else {
player->CLOSE_GOSSIP_MENU();
-
- nodes.resize(2);
- nodes[0] = 115; //from brazen
- nodes[1] = 116; //end outside durnholde
- player->ActivateTaxiPathTo(nodes); //TaxiPath 534
+ player->ActivateTaxiPathTo(534); //TaxiPath 534
}
break;
case GOSSIP_ACTION_INFO_DEF + 3:
diff --git a/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp b/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp
index 66fd81d53b6..86274a6aed4 100644
--- a/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp
+++ b/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp
@@ -71,12 +71,7 @@ bool GossipSelect_npc_bunthen_plainswind(Player *player, Creature *_Creature, ui
player->CLOSE_GOSSIP_MENU();
if (player->getClass() == CLASS_DRUID && player->GetTeam() == HORDE)
{
- std::vector<uint32> nodes;
-
- nodes.resize(2);
- nodes[0] = 63; // Nighthaven, Moonglade
- nodes[1] = 22; // Thunder Bluff, Mulgore
- player->ActivateTaxiPathTo(nodes);
+ player->ActivateTaxiPathTo(316);
}
break;
}
@@ -177,14 +172,7 @@ bool GossipSelect_npc_silva_filnaveth(Player *player, Creature *_Creature, uint3
{
player->CLOSE_GOSSIP_MENU();
if (player->getClass() == CLASS_DRUID && player->GetTeam() == ALLIANCE)
- {
- std::vector<uint32> nodes;
-
- nodes.resize(2);
- nodes[0] = 62; // Nighthaven, Moonglade
- nodes[1] = 27; // Rut'theran Village, Teldrassil
- player->ActivateTaxiPathTo(nodes);
- }
+ player->ActivateTaxiPathTo(315);
break;
}
case GOSSIP_ACTION_INFO_DEF + 2:
diff --git a/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp b/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp
index 60644290b7e..63f037cf146 100644
--- a/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp
+++ b/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp
@@ -333,13 +333,7 @@ bool QuestAccept_npc_altruis_the_sufferer(Player *player, Creature *creature, Qu
if ( !player->GetQuestRewardStatus(9991) ) //Survey the Land, q-id 9991
{
player->CLOSE_GOSSIP_MENU();
-
- std::vector<uint32> nodes;
-
- nodes.resize(2);
- nodes[0] = 113; //from
- nodes[1] = 114; //end at
- player->ActivateTaxiPathTo(nodes); //TaxiPath 532
+ player->ActivateTaxiPathTo(532); //TaxiPath 532
}
return true;
}
diff --git a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
index cc1651507df..5231b95f73d 100644
--- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
+++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
@@ -622,15 +622,7 @@ bool GossipSelect_npc_oronok_tornheart(Player *player, Creature *_Creature, uint
bool QuestAccept_npc_karynaku(Player* player, Creature* creature, Quest const* quest)
{
if(quest->GetQuestId() == 10870) // Ally of the Netherwing
- {
- std::vector<uint32> nodes;
-
- nodes.resize(2);
- nodes[0] = 161; // From Karynaku
- nodes[1] = 162; // To Mordenai
- error_log("TSCR: Player %s started quest 10870 which has disabled taxi node, need to be fixed in core", player->GetName());
- //player->ActivateTaxiPathTo(nodes, 20811);
- }
+ player->ActivateTaxiPathTo(649);
return true;
}