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

Public Member Functions

 item_mysterious_egg ()
 
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_mysterious_egg::item_mysterious_egg ( )
inline
155 : ItemScript("item_mysterious_egg") { }
ItemScript(const char *name)
Definition: ScriptMgr.cpp:1580

Member Function Documentation

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

Reimplemented from ItemScript.

158  {
159  ItemPosCountVec dest;
160  uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 39883, 1); // Cracked Egg
161  if (msg == EQUIP_ERR_OK)
162  player->StoreNewItem(dest, 39883, true, Item::GenerateItemRandomPropertyId(39883));
163 
164  return true;
165  }
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: