Core/ObjectMgr: Refactor sItemStorage

This commit is contained in:
leak
2011-04-28 22:42:33 +02:00
parent 03365e9a57
commit a82654debd
49 changed files with 785 additions and 639 deletions
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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;
}
}