SHARE
TWEET

Untitled

a guest May 19th, 2017 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "ScriptedPch.h"
  2. #include "../../shared/Config/Config.h"
  3. #ifndef _TRINITY_SCRIPT_CONFIG
  4. # define _TRINITY_SCRIPT_CONFIG  "trinitycore.conf"
  5. #endif _TRINITY_SCRIPT_CONFIG
  6.  
  7. bool GossipHello_mallguard(Player* pPlayer, Creature* pCreature)
  8. {
  9.     Config TScriptConfig;
  10.     if(!TScriptConfig.SetSource(_TRINITY_SCRIPT_CONFIG,true))
  11.         error_log("SD2: Unable to open configuration file");
  12.  
  13.     if(TScriptConfig.GetBoolDefault("mallguard.OnlyGMs", false)) // If mallguard.OnlyGMs is enabled in scriptdev2.conf
  14.         if (pPlayer->GetSession()->GetSecurity() == SEC_PLAYER)
  15.         {
  16.             pCreature->MonsterWhisper("Sorry, I can only teleport game masters.", pPlayer->GetGUID());
  17.             return true;
  18.         }
  19.  
  20.     //bool EnableResSickness = TScriptConfig.GetBoolDefault("mallguard.EnableRemoveResSickness", true);
  21.     bool EnableAlliancevsHordePvP = TScriptConfig.GetBoolDefault("mallguard.EnableAlliancevsHordePvP", true);
  22.     bool EnablePlayerTools = TScriptConfig.GetBoolDefault("mallguard.EnablePlayerTools", true);
  23.     bool EnableInnkeeper = TScriptConfig.GetBoolDefault("mallguard.EnableInnkeeper", true);
  24.     bool EnableShoppingMall = TScriptConfig.GetBoolDefault("mallguard.EnableShoppingMall", false);
  25.     bool EnableHarmonyGuildShip = TScriptConfig.GetBoolDefault("mallguard.HarmonyGuildShip", false);
  26.     bool EnableUnityGuildShip = TScriptConfig.GetBoolDefault("mallguard.UnityGuildShip", false);
  27.  
  28.     // Main Menu for Alliance
  29.     if (pPlayer->GetTeam() == ALLIANCE)
  30.     {
  31.         pPlayer->ADD_GOSSIP_ITEM( 8, "--- What Do I Do? ---"            , GOSSIP_SENDER_MAIN, 1000);
  32.         pPlayer->ADD_GOSSIP_ITEM( 7, "Weapon Trainers ->"               , GOSSIP_SENDER_MAIN, 1008);
  33.         pPlayer->ADD_GOSSIP_ITEM( 7, "Class Trainers ->"                , GOSSIP_SENDER_MAIN, 1009);
  34.         pPlayer->ADD_GOSSIP_ITEM( 7, "Class Glyph Vendors"              , GOSSIP_SENDER_MAIN, 1001);
  35.         pPlayer->ADD_GOSSIP_ITEM( 7, "PVP Items + Weapon Vendors"       , GOSSIP_SENDER_MAIN, 1002);
  36.         pPlayer->ADD_GOSSIP_ITEM( 7, "PVE Items Vendors"                , GOSSIP_SENDER_MAIN, 1003);
  37.         pPlayer->ADD_GOSSIP_ITEM( 7, "Profession Trainers + Mats"       , GOSSIP_SENDER_MAIN, 1004);
  38.         pPlayer->ADD_GOSSIP_ITEM( 7, "Reagents + Food & Drink"          , GOSSIP_SENDER_MAIN, 1005);
  39.         pPlayer->ADD_GOSSIP_ITEM( 7, "General Goods"                    , GOSSIP_SENDER_MAIN, 1006);
  40.         pPlayer->ADD_GOSSIP_ITEM( 7, "Ye Old Teleporter"                , GOSSIP_SENDER_MAIN, 1007);
  41.     }
  42.     else // Main Menu for Horde
  43.     {
  44.         pPlayer->ADD_GOSSIP_ITEM( 8, "--- What Do I Do? ---"            , GOSSIP_SENDER_MAIN, 2000);
  45.         pPlayer->ADD_GOSSIP_ITEM( 7, "Class Trainers ->"                , GOSSIP_SENDER_MAIN, 2001);
  46.         pPlayer->ADD_GOSSIP_ITEM( 7, "Weapon Trainers"                  , GOSSIP_SENDER_MAIN, 2012);
  47.         pPlayer->ADD_GOSSIP_ITEM( 7, "PvP Items Vendors"                , GOSSIP_SENDER_MAIN, 2013);
  48.         pPlayer->ADD_GOSSIP_ITEM( 7, "PvE Items Vendors"                , GOSSIP_SENDER_MAIN, 2014);
  49.         pPlayer->ADD_GOSSIP_ITEM( 7, "Weapon Vendors"                   , GOSSIP_SENDER_MAIN, 2015);
  50.         pPlayer->ADD_GOSSIP_ITEM( 7, "Profession Trainers + Mats"       , GOSSIP_SENDER_MAIN, 2019);
  51.         pPlayer->ADD_GOSSIP_ITEM( 7, "Reagents + Food & Drink"          , GOSSIP_SENDER_MAIN, 2016);
  52.         pPlayer->ADD_GOSSIP_ITEM( 7, "General Goods"                    , GOSSIP_SENDER_MAIN, 2017);
  53.         pPlayer->ADD_GOSSIP_ITEM( 7, "Ye Old Teleporter"                , GOSSIP_SENDER_MAIN, 2018);
  54.     }
  55.     pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
  56.  
  57. return true;
  58. }
  59.  
  60. void SendDefaultMenu_mallguard(Player* pPlayer, Creature* pCreature, uint32 uiAction)
  61. {
  62.  
  63. // Not allow in combat
  64. if (pPlayer->isInCombat())
  65. {
  66.     pPlayer->CLOSE_GOSSIP_MENU();
  67.     pCreature->MonsterSay("You are in combat!", LANG_UNIVERSAL, NULL);
  68.     return;
  69. }
  70.  
  71. Config TScriptConfig;
  72. if(!TScriptConfig.SetSource(_TRINITY_SCRIPT_CONFIG,true))
  73.         error_log("SD2: Unable to open configuration file");
  74. //bool EnableResSickness = TScriptConfig.GetBoolDefault("mallguard.EnableRemoveResSickness", true);
  75. bool EnableAlliancevsHordePvP = TScriptConfig.GetBoolDefault("mallguard.EnableAlliancevsHordePvP", true);
  76. bool EnablePlayerTools = TScriptConfig.GetBoolDefault("mallguard.PlayerTools", true);
  77. bool EnableInnkeeper = TScriptConfig.GetBoolDefault("mallguard.EnableInnkeeper", true);
  78. bool EnableShoppingMall = TScriptConfig.GetBoolDefault("mallguard.EnableShoppingMall", false);
  79. bool EnableHarmonyGuildShip = TScriptConfig.GetBoolDefault("mallguard.HarmonyGuildShip", false);
  80. bool EnableUnityGuildShip = TScriptConfig.GetBoolDefault("mallguard.UnityGuildShip", false);
  81.  
  82. //Mony Check
  83. if (pPlayer->GetMoney() < (TScriptConfig.GetFloatDefault("TeleGoldCost",0)))
  84. {
  85.     pPlayer->CLOSE_GOSSIP_MENU();
  86.     pCreature->MonsterWhisper("You don't have enough money.", pPlayer->GetGUID());
  87.     return;
  88. }
  89.  
  90. switch(uiAction)
  91. {
  92.  
  93. //////////////////////////////////////////////////ALLIANCE/////////////////////////////////////////////////////////////////
  94.  
  95. case 1000: //--- Why Im Here ---
  96.     pPlayer->CLOSE_GOSSIP_MENU();
  97.     pCreature->MonsterWhisper("I Will Teleport you around the mall so you can find what vendor/trainer you need!", pPlayer->GetGUID());
  98. break;
  99.  
  100. case 1001: // Class Glyph Vendors
  101.     pPlayer->CLOSE_GOSSIP_MENU();
  102.     pPlayer->TeleportTo(0, -8538.802734f, 381.096436f, 108.385902f, 5.389486f);
  103.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  104. break;
  105.  
  106.  
  107. case 1002: // PVP Items + Weapon Vendors
  108.     pPlayer->CLOSE_GOSSIP_MENU();
  109.     pPlayer->TeleportTo(0, -8433.561523f, 383.525818f, 120.885948f, 1.467249f);
  110.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  111. break;
  112.  
  113. case 1003: // PVE Items Vendors
  114.     pPlayer->CLOSE_GOSSIP_MENU();
  115.     pPlayer->TeleportTo(0, -8492.359375f, 336.840027f, 120.885933f, 3.020220f);
  116.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  117. break;
  118.  
  119. case 1004: // Profession Trainers + Mats
  120.     pPlayer->CLOSE_GOSSIP_MENU();
  121.     pPlayer->TeleportTo(0, -8406.571289f, 289.394348f, 120.885849f, 2.231670f);
  122.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  123. break;
  124.  
  125. case 1005: // Reagents + Food & Drink
  126.     pPlayer->CLOSE_GOSSIP_MENU();
  127.     pPlayer->TeleportTo(0, -8445.222656f, 337.898224f, 121.746269f, 3.014720f);
  128.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  129. break;
  130.  
  131. case 1006: // General Goods
  132.     pPlayer->CLOSE_GOSSIP_MENU();
  133.     pPlayer->TeleportTo(0, -8445.228516f, 320.483612f, 121.329735f, 1.427520f);
  134.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  135. break;
  136.  
  137. case 1007: // Ye Old Teleporter
  138.     pPlayer->CLOSE_GOSSIP_MENU();
  139.     pPlayer->TeleportTo(0, -8450.386719f, 344.422607f, 120.886024f, 1.427520f);
  140.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  141. break;
  142.  
  143. case 1008: // Weapon Trainers
  144.     pPlayer->CLOSE_GOSSIP_MENU();
  145.     pPlayer->TeleportTo(0, -8518.540039f, 430.331940f, 106.560272f, 2.267585f);
  146.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  147. break;
  148.  
  149. case 1009: // Class Trainers Menu
  150.     pPlayer->ADD_GOSSIP_ITEM( 5, "Warrior"         , GOSSIP_SENDER_MAIN, 1010);
  151.     pPlayer->ADD_GOSSIP_ITEM( 5, "Paladin"         , GOSSIP_SENDER_MAIN, 1011);
  152.     pPlayer->ADD_GOSSIP_ITEM( 5, "Hunter"          , GOSSIP_SENDER_MAIN, 1012);
  153.     pPlayer->ADD_GOSSIP_ITEM( 5, "Rogue"           , GOSSIP_SENDER_MAIN, 1013);
  154.     pPlayer->ADD_GOSSIP_ITEM( 5, "Priest"          , GOSSIP_SENDER_MAIN, 1014);
  155.     pPlayer->ADD_GOSSIP_ITEM( 5, "Death Knight"    , GOSSIP_SENDER_MAIN, 1015);
  156.     pPlayer->ADD_GOSSIP_ITEM( 5, "Shaman"          , GOSSIP_SENDER_MAIN, 1016);
  157.     pPlayer->ADD_GOSSIP_ITEM( 5, "Mage"            , GOSSIP_SENDER_MAIN, 1017);
  158.     pPlayer->ADD_GOSSIP_ITEM( 5, "Druid"           , GOSSIP_SENDER_MAIN, 1018);
  159.     pPlayer->ADD_GOSSIP_ITEM( 5, "Warlock"         , GOSSIP_SENDER_MAIN, 1019);
  160.     pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
  161. break;
  162.  
  163. case 1010: // Warrior
  164.     pPlayer->CLOSE_GOSSIP_MENU();
  165.     pPlayer->TeleportTo(0, -8463.333984f, 354.798889f, 119.031700f, 3.850944f);
  166.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  167. break;
  168.  
  169. case 1011: // Paladin
  170.     pPlayer->CLOSE_GOSSIP_MENU();
  171.     pPlayer->TeleportTo(0, -8456.321289f, 359.978821f, 119.109627f, 3.038290f);
  172.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  173. break;
  174.  
  175. case 1012: // Hunter
  176.     pPlayer->CLOSE_GOSSIP_MENU();
  177.     pPlayer->TeleportTo(0, -8467.819336f, 372.926544f, 114.787376f, 0.681858f);
  178.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  179. break;
  180.  
  181. case 1013: // Rogue
  182.     pPlayer->CLOSE_GOSSIP_MENU();
  183.     pPlayer->TeleportTo(0, -8474.327148f, 367.786133f, 114.778381f, 3.847013f);
  184.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  185. break;
  186.  
  187. case 1014: // Priest
  188.     pPlayer->CLOSE_GOSSIP_MENU();
  189.     pPlayer->TeleportTo(0, -8478.058594f, 385.497864f, 110.734901f, 0.662218f);
  190.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  191. break;
  192.  
  193. case 1015: // Death Knight
  194.     pPlayer->CLOSE_GOSSIP_MENU();
  195.     pPlayer->TeleportTo(0, -8485.129883f, 380.539215f, 110.605286f, 0.752037f);
  196.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  197. break;
  198.  
  199. case 1016: // Shaman
  200.     pPlayer->CLOSE_GOSSIP_MENU();
  201.     pPlayer->TeleportTo(0, -8494.641602f, 392.757050f, 108.385826f, 3.815592f);
  202.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  203. break;
  204.  
  205. case 1017: // Mage
  206.     pPlayer->CLOSE_GOSSIP_MENU();
  207.     pPlayer->TeleportTo(0, -8497.984375f, 411.101807f, 108.385826f, 0.682635f);
  208.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  209. break;
  210.  
  211. case 1018: // Druid
  212.     pPlayer->CLOSE_GOSSIP_MENU();
  213.     pPlayer->TeleportTo(0, -8509.306641f, 424.256165f, 107.652534f, 0.666927f);
  214.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  215. break;
  216.  
  217. case 1019: // Warlock
  218.     pPlayer->CLOSE_GOSSIP_MENU();
  219.     pPlayer->TeleportTo(0, -8515.284180f, 420.457794f, 107.574867f, 3.814803f);
  220.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  221. break;
  222.  
  223. //////////////////////////////////////////////////HORDE/////////////////////////////////////////////////////////////////
  224.  
  225. case 2000: //--- Why Im Here ---
  226.     pPlayer->CLOSE_GOSSIP_MENU();
  227.     pCreature->MonsterWhisper("I Will Teleport you around the mall so you can find what vendor/trainer you need!", pPlayer->GetGUID());
  228. break;
  229.  
  230. case 2001: // Class Trainers Menu
  231.     pPlayer->ADD_GOSSIP_ITEM( 5, "Warrior"         , GOSSIP_SENDER_MAIN, 2002);
  232.     pPlayer->ADD_GOSSIP_ITEM( 5, "Paladin"         , GOSSIP_SENDER_MAIN, 2003);
  233.     pPlayer->ADD_GOSSIP_ITEM( 5, "Hunter"          , GOSSIP_SENDER_MAIN, 2004);
  234.     pPlayer->ADD_GOSSIP_ITEM( 5, "Rogue"           , GOSSIP_SENDER_MAIN, 2005);
  235.     pPlayer->ADD_GOSSIP_ITEM( 5, "Priest"          , GOSSIP_SENDER_MAIN, 2006);
  236.     pPlayer->ADD_GOSSIP_ITEM( 5, "Death Knight"    , GOSSIP_SENDER_MAIN, 2007);
  237.     pPlayer->ADD_GOSSIP_ITEM( 5, "Shaman"          , GOSSIP_SENDER_MAIN, 2008);
  238.     pPlayer->ADD_GOSSIP_ITEM( 5, "Mage"            , GOSSIP_SENDER_MAIN, 2009);
  239.     pPlayer->ADD_GOSSIP_ITEM( 5, "Druid"           , GOSSIP_SENDER_MAIN, 2010);
  240.     pPlayer->ADD_GOSSIP_ITEM( 5, "Warlock"         , GOSSIP_SENDER_MAIN, 2011);
  241.     pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
  242. break;
  243.  
  244. case 2002: // Warrior
  245.     pPlayer->CLOSE_GOSSIP_MENU();
  246.     pPlayer->TeleportTo(1, 2170.794434f, -4732.175781f, 67.738731f, 1.838092f);
  247.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  248. break;
  249.  
  250. case 2003: // Paladin
  251.     pPlayer->CLOSE_GOSSIP_MENU();
  252.     pPlayer->TeleportTo(1, 2146.991943f, -4777.475098f, 67.739349f, 3.556549f);
  253.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  254. break;
  255.  
  256. case 2004: // Hunter
  257.     pPlayer->CLOSE_GOSSIP_MENU();
  258.     pPlayer->TeleportTo(1, 2145.008057f, -4767.587891f, 67.739349f, 3.210974f);
  259.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  260. break;
  261.  
  262. case 2005: // Rogue
  263.     pPlayer->CLOSE_GOSSIP_MENU();
  264.     pPlayer->TeleportTo(1, 2178.017822f, -4730.894531f, 67.738640f, 1.552997f);
  265.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  266. break;
  267.  
  268. case 2006: // Priest
  269.     pPlayer->CLOSE_GOSSIP_MENU();
  270.     pPlayer->TeleportTo(1, 2180.604492f, -4799.901855f, 67.738815f, 4.694591f);
  271.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  272. break;
  273.  
  274. case 2007: // Death Knight
  275.     pPlayer->CLOSE_GOSSIP_MENU();
  276.     pPlayer->TeleportTo(1, 2160.016602f, -4794.705078f, 67.738937f, 4.113399f);
  277.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  278. break;
  279.  
  280. case 2008: // Shaman
  281.     pPlayer->CLOSE_GOSSIP_MENU();
  282.     pPlayer->TeleportTo(1, 2170.020996f, -4798.661621f, 67.738937, 4.486467f);
  283.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  284. break;
  285.  
  286. case 2009: // Mage
  287.     pPlayer->CLOSE_GOSSIP_MENU();
  288.     pPlayer->TeleportTo(1, 2145.249268f, -4757.540039f, 67.739098f, 2.860692f);
  289.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  290. break;
  291.  
  292. case 2010: // Druid
  293.     pPlayer->CLOSE_GOSSIP_MENU();
  294.     pPlayer->TeleportTo(1, 2156.231201f, -4739.219238f, 67.738571f, 2.252008f);
  295.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  296. break;
  297.  
  298. case 2011: // Warlock
  299.     pPlayer->CLOSE_GOSSIP_MENU();
  300.     pPlayer->TeleportTo(1, 2162.309326f, -4735.006836f, 67.739616f, 2.010891f);
  301.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  302. break;
  303.  
  304. case 2012: // Weapon Trainers
  305.     pPlayer->CLOSE_GOSSIP_MENU();
  306.     pPlayer->TeleportTo(1, 2212.647705f, -4784.873535f, 72.876427f, 2.664350f);
  307.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  308. break;
  309.  
  310. case 2013: // PVP Vendors
  311.     pPlayer->CLOSE_GOSSIP_MENU();
  312.     pPlayer->TeleportTo(1, 1922.394165f, -4162.238770f, 40.608082f, 1.632343f);
  313.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  314.     pCreature->MonsterWhisper("These Vendors are around the centre of the room.", pPlayer->GetGUID()); 
  315. break;
  316.  
  317. case 2014: // PVE Vendors
  318.     pPlayer->CLOSE_GOSSIP_MENU();
  319.     pPlayer->TeleportTo(1, 1910.148071f, -4165.912109f, 41.148830f, 3.505517f);
  320.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  321.     pCreature->MonsterWhisper("These Vendors are around the outside of the room.", pPlayer->GetGUID());
  322. break;
  323.  
  324. case 2015: // Weapon Vendors
  325.     pPlayer->CLOSE_GOSSIP_MENU();
  326.     pPlayer->TeleportTo(1, 1929.032593f, -4210.673340f, 42.321102f, 0.100813f);
  327.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  328. break;
  329.  
  330. case 2016: // Reagents + Food & Drink
  331.     pPlayer->CLOSE_GOSSIP_MENU();
  332.     pPlayer->TeleportTo(1, 1920.384644f, -4132.679199f, 42.501503f, 1.627627f);
  333.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  334. break;
  335.  
  336. case 2017: // General Goods
  337.     pPlayer->CLOSE_GOSSIP_MENU();
  338.     pPlayer->TeleportTo(1, 1914.849243f, -4155.053223f, 40.623199f, 4.015240f);
  339.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  340. break;
  341.  
  342. case 2018: // Ye Old Teleporter
  343.     pPlayer->CLOSE_GOSSIP_MENU();
  344.     pPlayer->TeleportTo(1, 1927.1822513f, -4232.799316f, 42.232105f, 4.796710f);
  345.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  346. break;
  347.  
  348. case 2019: // Profession Trainers + mats
  349.     pPlayer->CLOSE_GOSSIP_MENU();
  350.     pPlayer->TeleportTo(1, 2201.272949f, -4743.130859f, 67.739075f, 5.794147f);
  351.     pPlayer->ModifyMoney(-(TScriptConfig.GetFloatDefault("TeleGoldCost",0)));
  352. break;
  353.  
  354.  
  355.  pPlayer->CLOSE_GOSSIP_MENU();
  356.  
  357. } // end of switch
  358. } //end of function
  359.  
  360.  
  361.  
  362. bool GossipSelect_mallguard(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
  363. {
  364.     // Main menu
  365.     if (uiSender == GOSSIP_SENDER_MAIN)
  366.     SendDefaultMenu_mallguard(pPlayer, pCreature, uiAction);
  367.  
  368. return true;
  369. }
  370.  
  371. void AddSC_mallguard()
  372. {
  373.     Script *newscript;
  374.  
  375.     newscript = new Script;
  376.     newscript->Name = "mallguard";
  377.     newscript->pGossipHello = &GossipHello_mallguard;
  378.     newscript->pGossipSelect = &GossipSelect_mallguard;
  379.     newscript->RegisterSelf();
  380. }
RAW Paste Data
Top