Advertisement
EmuDevs

EmuDevs: TrinityCore - ItemScript Simple Example

Aug 23rd, 2013
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. /*
  2.  *╔═╦═╦═╦╦╦══╦═╦╗─╔╦══╗
  3.  *║╦╣║║║║║╠╗╗║╦╣╚╦╝║══╣
  4.  *║╩╣║║║║║╠╩╝║╩╬╗║╔╬══║
  5.  *╚═╩╩═╩╩═╩══╩═╝╚═╝╚══╝
  6.  *            http://emudevs.com
  7. */
  8.  
  9. class item_tutorial : public ItemScript
  10. {
  11. public:
  12.     item_tutorial() : ItemScript("item_tutorial") { }
  13.  
  14.     bool OnUse(Player* player, Item* /* item */, SpellCastTargets const & /* targets */) OVERRIDE
  15.     {
  16.         player->GetSession()->SendNotification("NOMNOM!");
  17.         return true;
  18.     }
  19. };
  20.  
  21. void AddSC_custom_thing()
  22. {
  23.     new item_tutorial;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement