Ressurection / Redemption / Ancestral Spirit

Issue #57 resolved
Former user created an issue

cast is not failing on entering combat

Comments (4)

  1. lukaasm
    # HG changeset patch
    # User lukaasm
    # Date 1275905794 -7200
    
    Interupt cast spell while entering combat if spell has attr: SPELL_ATTR_CANT_USED_IN_COMBAT ;]
    
    diff -r 943ed57f9f48 -r 5a64348916f3 src/game/Unit.cpp
    --- a/src/game/Unit.cpp	Sun Jun 06 21:55:06 2010 +0200
    +++ b/src/game/Unit.cpp	Mon Jun 07 12:16:34 2010 +0200
    @@ -9056,6 +9056,12 @@
     
         SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
     
    +    if(m_currentSpells[CURRENT_GENERIC_SPELL] && m_currentSpells[CURRENT_GENERIC_SPELL]->getState() != SPELL_STATE_FINISHED)
    +    {
    +        if(m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->Attributes & SPELL_ATTR_CANT_USED_IN_COMBAT)
    +            InterruptSpell(CURRENT_GENERIC_SPELL);
    +    }
    +
         if (GetTypeId() != TYPEID_PLAYER && GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
             ToCreature()->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
     
    
  2. Log in to comment