mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
[SD2] 1058
Simplify scripts using manual call ActivateTaxiPathTo(). --HG-- branch : trunk
This commit is contained in:
1
sql/updates/3422_world_scripts.sql
Normal file
1
sql/updates/3422_world_scripts.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE creature_template SET ScriptName='npc_karynaku' WHERE entry=22112;
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user