TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
item_disgusting_jar Class Reference

Public Member Functions

 item_disgusting_jar ()
 
bool OnExpire (Player *player, ItemTemplate const *) override
 
- Public Member Functions inherited from ItemScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, Item *)
 
virtual bool OnQuestAccept (Player *, Item *, Quest const *)
 
virtual bool OnUse (Player *, Item *, SpellCastTargets const &)
 
virtual bool OnRemove (Player *, Item *)
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 

Additional Inherited Members

- Protected Member Functions inherited from ItemScript
 ItemScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 

Constructor & Destructor Documentation

item_disgusting_jar::item_disgusting_jar ( )
inline
175 : ItemScript("item_disgusting_jar") { }
ItemScript(const char *name)
Definition: ScriptMgr.cpp:1580

Member Function Documentation

bool item_disgusting_jar::OnExpire ( Player player,
ItemTemplate const  
)
inlineoverridevirtual

Reimplemented from ItemScript.

178  {
179  ItemPosCountVec dest;
180  uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 44718, 1); // Ripe Disgusting Jar
181  if (msg == EQUIP_ERR_OK)
182  player->StoreNewItem(dest, 44718, true, Item::GenerateItemRandomPropertyId(44718));
183 
184  return true;
185  }
Definition: Unit.h:379
Definition: Item.h:48
Definition: Unit.h:378
static int32 GenerateItemRandomPropertyId(uint32 item_id)
Definition: Item.cpp:594
uint8_t uint8
Definition: Define.h:152

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: