Core/ObjectMgr: Refactor sItemStorage
This commit is contained in:
@@ -189,7 +189,7 @@ class item_mysterious_egg : public ItemScript
|
||||
{
|
||||
public:
|
||||
item_mysterious_egg() : ItemScript("item_mysterious_egg") { }
|
||||
bool OnExpire(Player *pPlayer, ItemPrototype const * /*pItemProto*/)
|
||||
bool OnExpire(Player *pPlayer, ItemTemplate const * /*pItemProto*/)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 39883, 1); // Cracked Egg
|
||||
@@ -209,7 +209,7 @@ class item_disgusting_jar : public ItemScript
|
||||
public:
|
||||
item_disgusting_jar() : ItemScript("item_disgusting_jar") {}
|
||||
|
||||
bool OnExpire(Player *pPlayer, ItemPrototype const * /*pItemProto*/)
|
||||
bool OnExpire(Player *pPlayer, ItemTemplate const * /*pItemProto*/)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 44718, 1); // Ripe Disgusting Jar
|
||||
|
||||
@@ -233,10 +233,10 @@ bool EquippedOk(Player* pPlayer, uint32 spellId)
|
||||
{
|
||||
pItem = pPlayer->GetItemByPos(INVENTORY_SLOT_BAG_0, j);
|
||||
if (pItem)
|
||||
if (pItem->GetProto()->RequiredSpell == reqSpell)
|
||||
if (pItem->GetTemplate()->RequiredSpell == reqSpell)
|
||||
{
|
||||
//player has item equipped that require specialty. Not allow to unlearn, player has to unequip first
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetProto()->ItemId);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetTemplate()->ItemId);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user