Как у нас реализовано сейчас:
// Dematerialize
if (target && target->GetTypeId() == TYPEID_PLAYER && procSpell && (procSpell->GetAllEffectsMechanicMask() & (1 HasAura(122464))
{
if (!target->ToPlayer()->HasSpellCooldown(122465))
{
target->CastSpell(target, 122465, true);
target->ToPlayer()->AddSpellCooldown(122465, 0, time(NULL) + 10);
}
}
Как должно быть:
// Dematerialize
if (target && target->GetTypeId() == TYPEID_PLAYER && procSpell && (procSpell->GetAllEffectsMechanicMask() & (1 HasAura(122464))
{
if (!target->ToPlayer()->HasSpellCooldown(122465) && target->HasAuraWithMechanic(1 {
target->CastSpell(target, 122465, true);
target->ToPlayer()->AddSpellCooldown(122465, 0, time(NULL) + 10);
}
}