Advertisement
MichaelCrow

[Trinity] Item Active Template

Sep 6th, 2012
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. class Scrollofwhatever : public ItemScript
  4. {
  5.     public:
  6.         Scrollofwhatever() : ItemScript("Scrollofwhatever"){}
  7.  
  8.         bool OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const& /*targets*/)
  9.         {
  10.             if(!pPlayer)
  11.                 return false;
  12.  
  13.             if(!pItem)
  14.                 return false;
  15.  
  16.             pPlayer->DestroyItemCount(pItem->GetEntry(), 1, true);
  17.             //pPlayer->AddItem(entryid, how many);
  18.            
  19.             return true;
  20.         }
  21. };
  22.  
  23. void Scrollofwhatever()
  24. {
  25.     new Scrollofwhatever();
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement