* Implement item limit category (based on changes by VladimirMangos)

* Additional check for HandleAutoBankItemOpcode (thanks to VladimitMangos)
* Properly show empty vendor list for empty item list (author: a1ien)
* More stricted checks for store operations (thanks to VladimirMangos)
* Prevent autostoring of not empty bags (thanks to L1ghtGu4rd)

Changes need testing. Please post bugs on our tracker.

--HG--
branch : trunk
This commit is contained in:
azazel
2010-08-05 22:08:07 +06:00
parent a042b972ed
commit 885fc368fd
20 changed files with 198 additions and 179 deletions
@@ -6097,7 +6097,7 @@ void AuraEffect::HandleChannelDeathItem(AuraApplication const * aurApp, uint8 mo
if (msg != EQUIP_ERR_OK)
{
count-=noSpaceForCount;
plCaster->SendEquipError(msg, NULL, NULL);
plCaster->SendEquipError(msg, NULL, NULL, GetSpellProto()->EffectItemType[m_effIndex]);
if (count == 0)
return;
}
+3 -2
View File
@@ -6116,9 +6116,10 @@ SpellCastResult Spell::CheckItems()
if (msg != EQUIP_ERR_OK)
{
ItemPrototype const *pProto = objmgr.GetItemPrototype(m_spellInfo->EffectItemType[i]);
// TODO: Needs review
if (pProto && !(pProto->ItemLimitCategory))
{
p_caster->SendEquipError(msg, NULL, NULL);
p_caster->SendEquipError(msg, NULL, NULL, m_spellInfo->EffectItemType[i]);
return SPELL_FAILED_DONT_REPORT;
}
else
@@ -6149,7 +6150,7 @@ SpellCastResult Spell::CheckItems()
uint8 msg = p_caster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, m_spellInfo->EffectItemType[i], 1);
if (msg != EQUIP_ERR_OK)
{
p_caster->SendEquipError(msg, NULL, NULL);
p_caster->SendEquipError(msg, NULL, NULL, m_spellInfo->EffectItemType[i]);
return SPELL_FAILED_DONT_REPORT;
}
}
+1 -1
View File
@@ -2878,7 +2878,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
else
{
// if not created by another reason from full inventory or unique items amount limitation
player->SendEquipError(msg, NULL, NULL);
player->SendEquipError(msg, NULL, NULL, newitemid);
return;
}
}