[7364] Really implenent server-side anti-cheating cooldown check for spells with SPELL_ATTR_DISABLED_WHILE_ACTIVE. Author: VladimirMangos

Move apply cooldown for like spells to aura apply (GO registering for owner in GO summon spell case)
    Store "infinity" cooldown for like spells, ignore it at save and reapply it at aura loading.

    Note: one problem still exist for like spells: at loading/far teleport spell icon lost diabled state at client.
          Need sedn some unknown data in SendInitialPacketsBeforeAddToMap or SendInitialPacketsAfterAddToMap for restore it state.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-02 16:59:14 -06:00
parent c6fc7f7bca
commit d7d7c3562a
6 changed files with 74 additions and 35 deletions
+10
View File
@@ -786,6 +786,16 @@ void Aura::_AddAura()
Unit* caster = GetCaster();
// set infinity cooldown state for spells
if(caster && caster->GetTypeId() == TYPEID_PLAYER)
{
if (m_spellProto->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
{
Item* castItem = m_castItemGuid ? ((Player*)caster)->GetItemByGuid(m_castItemGuid) : NULL;
((Player*)caster)->AddSpellAndCategoryCooldowns(m_spellProto,castItem ? castItem->GetEntry() : 0, NULL,true);
}
}
// passive auras (except totem auras) do not get placed in the slots
// area auras with SPELL_AURA_NONE are not shown on target
// all further code applies only to active spells