Skip to content

Instantly share code, notes, and snippets.

@Retriman
Created November 2, 2011 22:53
Show Gist options
  • Save Retriman/1335208 to your computer and use it in GitHub Desktop.
Save Retriman/1335208 to your computer and use it in GitHub Desktop.
Delay Spells
----------------------- src/server/game/Spells/Spell.cpp -----------------------
index 3acfa51..fe10d59 100644
@@ -1464,9 +1464,9 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool
else if (m_caster->IsFriendlyTo(unit))
{
// for delayed spells ignore negative spells (after duel end) for friendly targets
- // TODO: this cause soul transfer bugged
- if (m_spellInfo->Speed > 0.0f && unit->GetTypeId() == TYPEID_PLAYER && !m_spellInfo->IsPositive())
- return SPELL_MISS_EVADE;
+ // TODO: this cause soul transfer bugged..We realy need it?¿ :s
+ //if (m_spellInfo->Speed > 0.0f && unit->GetTypeId() == TYPEID_PLAYER && !m_spellInfo->IsPositive())
+ //return SPELL_MISS_EVADE;
// assisting case, healing and resurrection
if (unit->HasUnitState(UNIT_STAT_ATTACK_PLAYER))
--------------------- src/server/game/Spells/SpellMgr.cpp ---------------------
index 3c2fb12..fcab36d 100644
@@ -2670,12 +2670,16 @@ void SpellMgr::LoadSpellCustomAttr()
{
switch (spellInfo->Effects[j].ApplyAuraName)
{
- case SPELL_AURA_MOD_POSSESS:
- case SPELL_AURA_MOD_CONFUSE:
+ case SPELL_AURA_MOD_POSSESS:
case SPELL_AURA_MOD_CHARM:
case SPELL_AURA_AOE_CHARM:
+ spellInfo->AttributesCu |= SPELL_ATTR0_CU_AURA_CC;
+ break;
case SPELL_AURA_MOD_FEAR:
case SPELL_AURA_MOD_STUN:
+ case SPELL_AURA_MOD_CONFUSE:
+ if (spellInfo->speed == 0)
+ spellInfo->speed = 200; // Añadimos 0.2 segundos de delay a las spell
spellInfo->AttributesCu |= SPELL_ATTR0_CU_AURA_CC;
break;
case SPELL_AURA_PERIODIC_HEAL:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment