Jump to content

laise

Members
  • Posts

    344
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by laise

  1. try this :

    -- (56342) Lock and Load (Rank 1,2,3)
    DELETE FROM `spell_proc_event` WHERE `entry` IN (56342,56343,56344);
    INSERT INTO `spell_proc_event` VALUES
    (56342, 0x00, 9, 0x00000080, 0x00000000, 0x00004000, 0x00000000, 0x00000000, 0.000000, 0.000000, 22);
    INSERT INTO `spell_proc_event` VALUES
    (56343, 0x00, 9, 0x00000080, 0x00000000, 0x00004000, 0x00000000, 0x00000000, 0.000000, 0.000000, 22);
    INSERT INTO `spell_proc_event` VALUES
    (56344, 0x00, 9, 0x00000080, 0x00000000, 0x00004000, 0x00000000, 0x00000000, 0.000000, 0.000000, 22);

  2. What bug does the patch fix? What features does the patch add?

    fixes crit chance related part of Improved Faerie Fire Talent

    For which repository revision was the patch created?

    9100

    Is there a thread in the bug report section or at lighthouse?

    haven't seen any

    Who has been writing this patch? Please include either forum user names or email addresses.

    Me

    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index c980507..04ee5fb 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -9051,6 +9051,25 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
                                }
                            }
                            break;
    +                    case SPELLFAMILY_DRUID:
    +                        // Improved Faerie Fire
    +                        if (!IsPositiveSpell(spellProto->Id))
    +                        {
    +                            // search for Faerie Fire (not self-casted only?), use second effect aura for smaller aura list size
    +                            if (pVictim->GetAura(SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE, SPELLFAMILY_DRUID, UI64LIT(0x000000000000400)))
    +                            {
    +                                Unit::AuraList const& improvedFFire = GetAurasByType(SPELL_AURA_DUMMY);
    +                                for(Unit::AuraList::const_iterator iter = improvedFFire.begin(); iter != improvedFFire.end(); ++iter)
    +                                {
    +                                    if ((*iter)->GetSpellProto()->SpellIconID == 109 && (*iter)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID)
    +                                    {
    +                                        crit_chance += (*iter)->GetModifier()->m_amount;
    +                                        break;
    +                                    }
    +                                }
    +                            }
    +                        }
    +                        break;
                        case SPELLFAMILY_PALADIN:
                            // Sacred Shield
                            if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000040000000))
    

    idk if there is better way to check *damage-only* spells except FamilyFlags

    --

    will merge with Improved Insect Swarm depending on which one gets accepted first (if it gets accepted)

  3. What bug does the patch fix? What features does the patch add?

    implements Improved Insect Swarm talent

    For which repository revision was the patch created?

    9095

    Is there a thread in the bug report section or at lighthouse?

    No

    Who has been writing this patch? Please include either forum user names or email addresses.

    Me

    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 6fa3e19..1d3c734 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -8922,6 +8922,27 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
                }
                break;
            }
    +        case SPELLFAMILY_DRUID:
    +        {
    +            // Improved Insect Swarm (Wrath part)
    +            if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000001))
    +            {
    +                // if Insect Swarm on target
    +                if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, UI64LIT(0x000000000200000), 0, GetGUID()))
    +                {
    +                    Unit::AuraList const& improvedSwarm = GetAurasByType(SPELL_AURA_DUMMY);
    +                    for(Unit::AuraList::const_iterator iter = improvedSwarm.begin(); iter != improvedSwarm.end(); ++iter)
    +                    {
    +                        if ((*iter)->GetSpellProto()->SpellIconID == 1771)
    +                        {
    +                            DoneTotalMod *= ((*iter)->GetModifier()->m_amount+100.0f) / 100.0f;
    +                            break;
    +                        }
    +                    }
    +                }
    +            }
    +            break;
    +        }
            case SPELLFAMILY_DEATHKNIGHT:
            {
                // Icy Touch, Howling Blast and Frost Strike
    @@ -9223,6 +9244,25 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
                                }
                            }
                            break;
    +                    case SPELLFAMILY_DRUID:
    +                        // Improved Insect Swarm (Starfire part)
    +                        if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000004))
    +                        {
    +                            // search for Moonfire on target
    +                            if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, UI64LIT(0x000000000000002), 0, GetGUID()))
    +                            {
    +                                Unit::AuraList const& improvedSwarm = GetAurasByType(SPELL_AURA_DUMMY);
    +                                for(Unit::AuraList::const_iterator iter = improvedSwarm.begin(); iter != improvedSwarm.end(); ++iter)
    +                                {
    +                                    if ((*iter)->GetSpellProto()->SpellIconID == 1771)
    +                                    {
    +                                        crit_chance += (*iter)->GetModifier()->m_amount;
    +                                        break;
    +                                    }
    +                                }
    +                            }
    +                        }
    +                        break;
                        case SPELLFAMILY_PALADIN:
                            // Sacred Shield
                            if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000040000000))
    
    

    couldn't avoid going over victim aura list - because both parts of the talent depend on it and going over self aura list to determine if talent aura is on player. Effect index doesn't matter cause both have same value in m_amount

  4. can some1 explain why there are strange calculations like urand(0,10000) there instead of something looking like this :

    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 11b89dc..2fbda5c 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -2638,15 +2638,13 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
        int32 skillDiff = attackerWeaponSkill - int32(pVictim->GetMaxSkillValueForLevel(this));
        int32 fullSkillDiff = attackerWeaponSkill - int32(pVictim->GetDefenseSkillValue(this));
    
    -    uint32 roll = urand (0, 10000);
    -
    -    uint32 missChance = uint32(MeleeSpellMissChance(pVictim, attType, fullSkillDiff, spell)*100.0f);
    +    float missChance = MeleeSpellMissChance(pVictim, attType, fullSkillDiff, spell);
    +    
        // Roll miss
    -    uint32 tmp = missChance;
    -    if (roll < tmp)
    +    if (roll_chance_f(missChance))
            return SPELL_MISS_MISS;
    
    -    // Chance resist mechanic (select max value from every mechanic spell effect)
    +    // Chance resist mechanic (select max value from every mechanic spell effect
        int32 resist_mech = 0;
        // Get effects mechanic and chance
        for(int eff = 0; eff < 3; ++eff)
    @@ -2655,13 +2653,12 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
            if (effect_mech)
            {
                int32 temp = pVictim->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_MECHANIC_RESISTANCE, effect_mech);
    -            if (resist_mech < temp*100)
    -                resist_mech = temp*100;
    +            if (resist_mech < temp)
    +                resist_mech = temp;
            }
        }
        // Roll chance
    -    tmp += resist_mech;
    -    if (roll < tmp)
    +    if (roll_chance_i(resist_mech))
            return SPELL_MISS_RESIST;
    
        bool canDodge = true;
    @@ -2677,9 +2674,8 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
            // only if in front
            if (pVictim->HasInArc(M_PI,this))
            {
    -            int32 deflect_chance = pVictim->GetTotalAuraModifier(SPELL_AURA_DEFLECT_SPELLS)*100;
    -            tmp+=deflect_chance;
    -            if (roll < tmp)
    +            int32 deflect_chance = pVictim->GetTotalAuraModifier(SPELL_AURA_DEFLECT_SPELLS);
    +            if (roll_chance_i(deflect_chance))
                    return SPELL_MISS_DEFLECT;
            }
            return SPELL_MISS_NONE;
    @@ -2721,36 +2717,34 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
        if (canDodge)
        {
            // Roll dodge
    -        int32 dodgeChance = int32(pVictim->GetUnitDodgeChance()*100.0f) - skillDiff * 4;
    +        float dodgeChance = pVictim->GetUnitDodgeChance() - skillDiff * 0.04f;
            // Reduce enemy dodge chance by SPELL_AURA_MOD_COMBAT_RESULT_CHANCE
    -        dodgeChance+= GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_COMBAT_RESULT_CHANCE, VICTIMSTATE_DODGE)*100;
    +        dodgeChance+= GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_COMBAT_RESULT_CHANCE, VICTIMSTATE_DODGE);
            // Reduce dodge chance by attacker expertise rating
            if (GetTypeId() == TYPEID_PLAYER)
    -            dodgeChance-=int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f);
    +            dodgeChance-= ((Player*)this)->GetExpertiseDodgeOrParryReduction(attType);
            else
    -            dodgeChance -= GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE)*25;
    +            dodgeChance -= GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE) * 0.25f;
            if (dodgeChance < 0)
                dodgeChance = 0;
    
    -        tmp += dodgeChance;
    -        if (roll < tmp)
    +        if (roll_chance_f(dodgeChance))
                return SPELL_MISS_DODGE;
        }
    
        if (canParry)
        {
            // Roll parry
    -        int32 parryChance = int32(pVictim->GetUnitParryChance()*100.0f)  - skillDiff * 4;
    +        float parryChance = pVictim->GetUnitParryChance() - skillDiff * 0.04f;
            // Reduce parry chance by attacker expertise rating
            if (GetTypeId() == TYPEID_PLAYER)
    -            parryChance-=int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f);
    +            parryChance-=((Player*)this)->GetExpertiseDodgeOrParryReduction(attType);
            else
    -            parryChance -= GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE)*25;
    +            parryChance -= GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE) * 0.25f;
            if (parryChance < 0)
                parryChance = 0;
    
    -        tmp += parryChance;
    -        if (roll < tmp)
    +        if (roll_chance_f(parryChance))
                return SPELL_MISS_PARRY;
        }

  5. What bug does the patch fix? What features does the patch add?

    fixes

    54760 Glyph of Entangling Roots

    56244 Glyph of Fear

    56376 Glyph of Frost Nova

    63291 Glyph of Hex

    For which repository revision was the patch created?

    9061

    Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

    haven't found any

    Who has been writing this patch? Please include either forum user names or email addresses.

    me

    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 0715d5b..1bee202 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -381,6 +381,23 @@ void Unit::RemoveSpellbyDamageTaken(AuraType auraType, uint32 damage)
    
        // The chance to dispel an aura depends on the damage taken with respect to the casters level.
        uint32 max_dmg = getLevel() > 8 ? 25 * getLevel() - 150 : 50;
    +
    +    AuraList const& typeAuras = GetAurasByType(auraType);
    +    for (AuraList::const_iterator iter = typeAuras.begin(); iter != typeAuras.end(); ++iter)
    +    {
    +        Unit *caster = (*iter)->GetCaster();
    +
    +        if (!caster)
    +            continue;
    +
    +        AuraList const& mOverrideClassScript = caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
    +        for(AuraList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
    +        {
    +            if ((*i)->GetModifier()->m_miscvalue == 7801 && (*i)->isAffectedOnSpell((*iter)->GetSpellProto()))
    +                max_dmg += (*i)->GetModifier()->m_amount * max_dmg / 100;
    +        }
    +    }
    +
        float chance = float(damage) / max_dmg * 100.0f;
        if (roll_chance_f(chance))
            RemoveSpellsCausingAura(auraType);
    

  6. There is another (maybe related problem) that might be caused by this: get 2 chars of opposite faction, attack one, wait till out of combat and logout victim. The victim char will die on logout.

    this is happening with the fix or on clean?

           else if (!_player->getAttackers().empty())
    

    in void WorldSession::LogoutPlayer(bool Save) .. yeah guess its related

  7. another way as u said with only display id replace

    diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
    index 167d0e2..80d186f 100644
    --- a/src/game/SpellAuras.cpp
    +++ b/src/game/SpellAuras.cpp
    @@ -2587,6 +2587,31 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
                        else
                            m_target->m_AuraFlags |= ~UNIT_AURAFLAG_ALIVE_INVISIBLE;
                        return;
    +                // Festive Holiday Mount
    +                case 62061: 
    +                    if (apply && m_target->GetMountID())
    +                    {
    +                        if (!m_target->GetAurasByType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED).empty)
    +                            m_target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,22724);
    +                        else
    +                            m_target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,15902);
    +                    }
    +                    else if(!apply && m_target->GetMountID() == 15902 || m_target->GetMountID() == 22724)
    +                    {
    +                        if (!m_target->GetAurasByType(SPELL_AURA_MOUNTED).empty())
    +                        {
    +                            uint32 cr_id = m_target->GetAurasByType(SPELL_AURA_MOUNTED).front()->GetModifier()->m_miscvalue;
    +                            if (CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(cr_id))
    +                            {
    +                                uint32 team = 0;
    +                                if (m_target->GetTypeId() == TYPEID_PLAYER)
    +                                    team = ((Player*)m_target)->GetTeam();
    +
    +                                uint32 display_id = sObjectMgr.ChooseDisplayId(team, ci);
    +                                CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
    +                                if (minfo)
    +                                    display_id = minfo->modelid;
    +
    +                                m_target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, display_id);
    +                            }
    +                        }
    +                    }
    +                    return;
                }
                break;
            }
    @@ -4285,6 +4310,10 @@ void Aura::HandleAuraModIncreaseMountedSpeed(bool /*apply*/, bool Real)
        if(!Real)
            return;
    
    +    // Festive Holiday Mount
    +    if (apply && m_target->HasAura(62061,0) && m_target->GetMountID())
    +        m_target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,15902);
    +
        m_target->UpdateSpeed(MOVE_RUN, true);
    }
    
    @@ -4313,6 +4342,10 @@ void Aura::HandleAuraModIncreaseFlightSpeed(bool apply, bool Real)
            // Dragonmaw Illusion (overwrite mount model, mounted aura already applied)
            if( apply && m_target->HasAura(42016,0) && m_target->GetMountID())
                m_target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,16314);
    +        
    +        // Festive Holiday Mount
    +        if (apply && m_target->HasAura(62061,0) && m_target->GetMountID())
    +            m_target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,22724);
        }
    
        m_target->UpdateSpeed(MOVE_FLIGHT, true);

  8. What bug does the patch fix? What features does the patch add?

    fixes mote/shard gaining , cd to proc and final dmg spell laucn on third mote/shard

    For which repository revision was the patch created?

    9362

    Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

    haven't seen any

    Who has been writing this patch? Please include either forum user names or email addresses.

    me

    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 6344463..7489c45 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -7603,6 +7603,32 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
                    trigger_spell_id = 54843;
                    target = pVictim;
                }
    +            // Reign of the Unliving, Item - Coliseum 25 Normal Caster Trinket
    +            else if (auraSpellInfo->Id == 67712)
    +            {
    +                Aura *aur = GetAura(67713, 0);
    +                if (aur && int32(aur->GetStackAmount() + 1) >= triggerAmount)
    +                {
    +                    RemoveAurasDueToSpell(67713);
    +                    CastSpell(pVictim, 67714, true, NULL, triggeredByAura);
    +                    return true;
    +                }
    +                else
    +                    trigger_spell_id = 67713;
    +            }
    +            // Reign of the Unliving (heroic), Item - Coliseum 25 Heroic Caster Trinket
    +            else if (auraSpellInfo->Id == 67758)
    +            {
    +                Aura *aur = GetAura(67759, 0);
    +                if (aur && int32(aur->GetStackAmount() + 1) >= triggerAmount)
    +                {
    +                    RemoveAurasDueToSpell(67759);
    +                    CastSpell(pVictim, 67760, true, NULL, triggeredByAura);
    +                    return true;
    +                }
    +                else
    +                    trigger_spell_id = 67759;
    +            }
                break;
            }
            case SPELLFAMILY_SHAMAN:
    

    -- (67758) Item - Coliseum 25 Heroic Caster Trinket ()
    DELETE FROM `spell_proc_event` WHERE `entry` IN (67758);
    INSERT INTO `spell_proc_event` VALUES
    (67758, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 2);
    
    -- (67712) Item - Coliseum 25 Normal Caster Trinket ()
    DELETE FROM `spell_proc_event` WHERE `entry` IN (67712);
    INSERT INTO `spell_proc_event` VALUES
    (67712, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 2);

  9. What bug does the patch fix? What features does the patch add?

    makes caster considered undead (example : death coil heal on self for death knight)

    For which repository revision was the patch created?

    9006

    Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

    haven't seen any

    Who has been writing this patch? Please include either forum user names or email addresses.

    me

    diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
    index 3a62eb6..8c5cecc 100644
    --- a/src/game/SpellAuras.cpp
    +++ b/src/game/SpellAuras.cpp
    @@ -3023,6 +3023,8 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
            case FORM_SPIRITOFREDEMPTION:
                modelid = 16031;
                break;
    +        case FORM_UNDEAD:
    +            break;
            default:
                sLog.outError("Auras: Unknown Shapeshift Type: %u, SpellId %u.", m_modifier.m_miscvalue, GetId());
        }
    @@ -6192,6 +6194,13 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
            }
            case SPELLFAMILY_DEATHKNIGHT:
            {
    +            // Lichborne undead form
    +            if (GetId() == 49039)
    +            {
    +                spellId1 = 50397;
    +                break;
    +            }
    +
                if (GetSpellSpecific(m_spellProto->Id) != SPELL_PRESENCE)
                    return;
    
    diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
    index bc98152..442b769 100644
    --- a/src/game/SpellMgr.cpp
    +++ b/src/game/SpellMgr.cpp
    @@ -1693,6 +1693,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
                    // Unholy Presence and Unholy Presence (triggered)
                    if( spellInfo_1->SpellIconID == 2633 && spellInfo_2->SpellIconID == 2633 )
                        return false;
    +
    +                // Lichborne and Lichborne triggered
    +                if( spellInfo_1->SpellIconID == 61 && spellInfo_2->SpellIconID == 61 )
    +                    return false;
                }
                break;
            default:
    diff --git a/src/game/Unit.h b/src/game/Unit.h
    index 3f94258..1835166 100644
    --- a/src/game/Unit.h
    +++ b/src/game/Unit.h
    @@ -182,6 +182,7 @@ enum ShapeshiftForm
        FORM_TEST               = 0x14,
        FORM_ZOMBIE             = 0x15,
        FORM_METAMORPHOSIS      = 0x16,
    +    FORM_UNDEAD             = 0x19,
        FORM_FLIGHT_EPIC        = 0x1B,
        FORM_SHADOW             = 0x1C,
        FORM_FLIGHT             = 0x1D,

    used boosts because triggered spell has different duration

  10. What bug does the patch fix? What features does the patch add?

    adds correct proc flags

    For which repository revision was the patch created?

    8967

    Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

    havent found any

    Who has been writing this patch? Please include either forum user names or email addresses.

    me

    [code-- (67363) Item - Paladin T9 Holy Relic (Judgement) ()

    DELETE FROM `spell_proc_event` WHERE `entry` IN (67363);

    INSERT INTO `spell_proc_event` VALUES

    (67363, 0x00, 10, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);

    [/code]

  11. What bug does the patch fix? What features does the patch add?

    adds correct proc flags

    For which repository revision was the patch created?

    8967

    Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

    havent found any

    Who has been writing this patch? Please include either forum user names or email addresses.

    me

    -- (54696) Wracking Pains ()
    DELETE FROM `spell_proc_event` WHERE `entry` IN (54696);
    INSERT INTO `spell_proc_event` VALUES
    (54696, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000104, 0x00000001, 0.000000, 0.000000, 0);
    

  12. attempt to fix proper creature evade when player teleports - example:

    enter instance, aggro few mobs, run to exit, enter instance again - same mobs will be waiting for you (stuck there)happening because ObjectGridStoper::Visit(CreatureMapType &m) explicitly stops attack so when creature gets ::Update it falls on the check

      // no target but something prevent go to evade mode
       if( !isInCombat() || HasAuraType(SPELL_AURA_MOD_TAUNT) )
           return false;

    in bool Unit::SelectHostileTarget() - preventing to enter proper EvadeMode when there is no target..

    I think there are cases when isInCombat is needed in this if & same with CombatStop() that sometimes just need to stop combat so i dont want to touch 'em

    so here is my fix :

    diff --git a/src/game/ObjectGridLoader.cpp b/src/game/ObjectGridLoader.cpp
    index 506cac1..41f9d7e 100644
    --- a/src/game/ObjectGridLoader.cpp
    +++ b/src/game/ObjectGridLoader.cpp
    @@ -20,6 +20,7 @@
    #include "ObjectAccessor.h"
    #include "ObjectMgr.h"
    #include "Creature.h"
    +#include "CreatureAI.h"
    #include "GameObject.h"
    #include "DynamicObject.h"
    #include "Corpse.h"
    @@ -288,8 +289,7 @@ ObjectGridStoper::Visit(CreatureMapType &m)
        // stop any fights at grid de-activation and remove dynobjects created at cast by creatures
        for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
        {
    -        iter->getSource()->CombatStop();
    -        iter->getSource()->DeleteThreatList();
    +        iter->getSource()->AI()->EnterEvadeMode();
            iter->getSource()->RemoveAllDynObjects();
        }
    }

    so far the only known bug(?) with it is - when you enter instance again after you left mobs in the entrance you will see them going back to their places (evade)..

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use