* 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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user