Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook

User Tag List

Likes Likes:  0
Results 1 to 2 of 2
  1. #1
    Graphics Guru

    Join Date
    Feb 2009
    Post Thanks / Like
    1 Post(s)
    0 Thread(s)
    Rep Power

    [Patch] Multi Trainer

    Register to remove this ad
    Since Rochet2 shared multi vendor patch, I tought I can make something similar such multi trainer :P
    patch link:

    TRAINER_ID can be left blank and will use default npc's trainer list if has one.

    For example I have a simple creature gossip script to test that:For example I have a simple creature gossip script to test that:
    #include "ScriptPCH.h" class TestGossipNpc : public CreatureScript { public: TestGossipNpc() : CreatureScript("TestGossipNpc") { } bool OnGossipHello(Player* player, Creature* pCreature) { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "trainer 1 [default]", GOSSIP_SENDER_MAIN, 1); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "trainer 2 [entry: 918]", GOSSIP_SENDER_MAIN, 2); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "trainer 3 [entry: 914]", GOSSIP_SENDER_MAIN, 3); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "trainer 4 [entry: 928]", GOSSIP_SENDER_MAIN, 4); player->PlayerTalkClass->SendGossipMenu(1, pCreature->GetGUID()); return true; } bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { case 1: player->GetSession()->SendTrainerList(creature->GetGUID()); // if using without trainer_id specified, then the npc has to containthis flag id UNIT_NPC_FLAG_TRAINER = 16, in this case we will use 17 since the npc needs flag id 1 for gossip and 16 to set the npc as a trainer break; case 2: player->GetSession()->SendTrainerList(creature->GetGUID(), 918); // rogue trainer list break; case 3: player->GetSession()->SendTrainerList(creature->GetGUID(), 914); // warrior trainer list break; case 4: player->GetSession()->SendTrainerList(creature->GetGUID(), 928); // paladin trainer list break; } return true; } }; void AddSC_TestGossipNpc() { new TestGossipNpc(); }
    This patch does NOT spawn any creature around, if you are going to think that.

    Credits : Alexewarr

    › See More: [Patch] Multi Trainer

  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2

    Join Date
    Jul 2014
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)
    Rep Power

    Register to remove this ad
    hello bro, can you upload the File Patch? please.




Visitors found this page by searching for:


SEO Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -5. The time now is 08:46 PM.
Powered by vBulletin® Copyright ©2000-2017, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. User Alert System provided by Advanced User Tagging v3.3.0 (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org