[6860] Implement correct effects stacking and zone limitations for item 34537.

Signed-off-by: Malah <Backbone@getmangos.com>

C++ code part rewrited for more correct work.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Malah 2008-11-30 04:07:37 +03:00 committed by VladimirMangos
parent eef8369ed6
commit 5f33f4abf4
6 changed files with 41 additions and 25 deletions

View file

@ -2571,13 +2571,23 @@ void Spell::SendCastResult(uint8 result)
break;
case SPELL_FAILED_REQUIRES_AREA:
// hardcode areas limitation case
if( m_spellInfo->Id==41618 || m_spellInfo->Id==41620 )
data << uint32(3842);
else if( m_spellInfo->Id==41617 || m_spellInfo->Id==41619 )
data << uint32(3905);
// normal case
else
data << uint32(m_spellInfo->AreaId);
switch(m_spellInfo->Id)
{
case 41617: // Cenarion Mana Salve
case 41619: // Cenarion Healing Salve
data << uint32(3905);
break;
case 41618: // Bottled Nethergon Energy
case 41620: // Bottled Nethergon Vapor
data << uint32(3842);
break;
case 45373: // Bloodberry Elixir
data << uint32(4075);
break;
default: // default case
data << uint32(m_spellInfo->AreaId);
break;
}
break;
case SPELL_FAILED_TOTEMS:
if(m_spellInfo->Totem[0])