Jump to content

ascent

Members
  • Posts

    179
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by ascent

  1. I said to "prevent" crash, just for safe

    your care is good, but,

    And this will most wrong way from possible.

    Remember simple thing: never never add new includes to .h file if you not 100% sure that this correct and will not add unexpected results.

    In C/C++ very easy get cyclic header dependences with very unclear error messages.

    Alswasy instead if possible use forward class/structure declarations.

  2. rev 10421
    sd2

    1. Serpent Sting,Scorpid Sting can use many target.

    but originally is only 1 target, on spell( two spell not overlap, but this can.)

    2. Lock and Load not work.

    3. Hunter's Mark bonus damege not work?(i'm not sure)

    4. T.N.T. not work.

    vmap is problem.

    visual is ok.

    but, creature is get through the wall.

    and fly(no fly creature). gravity ignore.

  3. And this will most wrong way from possible.

    Remember simple thing: never never add new includes to .h file if you not 100% sure that this correct and will not add unexpected results.

    In C/C++ very easy get cyclic header dependences with very unclear error messages.

    Alswasy instead if possible use forward class/structure declarations.

    copy that ^^;;

    thx ur advice

  4. Description of the feature?

    none

    For which repository revision was the patch created?

    10409

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

    Spell.h

             void EffectTitanGrip(SpellEffectIndex eff_idx);
             void EffectEnchantItemPrismatic(SpellEffectIndex eff_idx);
             void EffectPlayMusic(SpellEffectIndex eff_idx); 
    +         void EffectRedirectThreat(SpellEffectIndex eff_idx);
             void EffectSpecCount(SpellEffectIndex eff_idx);
             void EffectActivateSpec(SpellEffectIndex eff_idx);
    

    SpellAuras.cpp

                       return;
                }
    
    +             case 34477: //Misdirection    
    +             case 57934: //Tricks of Trade    
    +             {    
    +                 if(Unit * caster = GetCaster())    
    +                     caster->SetThreatRedirectionTarget(0, 0);    
    +                 return;    
    +             }    
                case 58600:                                     // Restricted Flight Area    
                {    
                    AreaTableEntry const* area = GetAreaEntryByAreaID(target->GetAreaId());
    

    SpellEffects.cpp

        &Spell::EffectProspecting,                              //127 SPELL_EFFECT_PROSPECTING Prospecting spell    
        &Spell::EffectApplyAreaAura,                            //128 SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
        &Spell::EffectApplyAreaAura,                            //129 SPELL_EFFECT_APPLY_AREA_AURA_ENEMY     
    -    &Spell::EffectNULL,                                     //130 SPELL_EFFECT_REDIRECT_THREAT    
    +    &Spell::EffectRedirectThreat,                           //130 SPELL_EFFECT_REDIRECT_THREAT    
        &Spell::EffectUnused,                                   //131 SPELL_EFFECT_131                      used in some test spells    
        &Spell::EffectPlayMusic,                                //132 SPELL_EFFECT_PLAY_MUSIC               sound id in misc value (SoundEntries.dbc)    
        &Spell::EffectUnlearnSpecialization,                    //133 SPELL_EFFECT_UNLEARN_SPECIALIZATION   unlearn profession specialization
    ...    ...    
    @@ -8348,6 +8348,17 @@ void Spell::EffectRestoreItemCharges( SpellEffectIndex eff_idx )    
        item->RestoreCharges();    
    }    
    
    +void Spell::EffectRedirectThreat(SpellEffectIndex eff_idx)    
    +{    
    +    if(unitTarget)    
    +    {    
    +        m_caster->SetThreatRedirectionTarget(unitTarget->GetGUID(), (uint32)damage);    
    +    
    +        // Tricks of trade hacky buff applying (15% damage increase)    
    +        if( m_spellInfo->Id == 57934 )    
    +            unitTarget->CastSpell(unitTarget, 57933, true);    
    +    }    
    +}    
    void Spell::EffectTeachTaxiNode( SpellEffectIndex eff_idx )    
    {    
        if (unitTarget->GetTypeId() != TYPEID_PLAYER)
    

    SpellMgr.cpp

                if( spellInfo_1->SpellIconID == 2285 && spellInfo_2->SpellIconID == 2285 )    
                    return false;    
    
    +            //Tricks of Trade
    +            if( spellInfo_1->SpellIconID == 3413 && spellInfo_2->SpellIconID == 3413 )
    +                return false;
    +    
                // Garrote -> Garrote-Silence (multi-family check)
                if( spellInfo_1->SpellIconID == 498 && spellInfo_2->SpellIconID == 498 && spellInfo_2->SpellVisual[0] == 0 )
                    return false;
    
    

    ThreatManager.cpp

        float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, pThreat, crit, schoolMask, pThreatSpell);    
    
    +    if( pVictim->GetThreatRedirectionPercent() && threat > 0.0f )    
    +    {    
    +        float redirectedThreat = threat * pVictim->GetThreatRedirectionPercent() / 100;    
    +        threat -= redirectedThreat;    
    +        if(Unit *unit = pVictim->GetMisdirectionTarget())    
    +            iThreatContainer.addThreat(unit, redirectedThreat);    
    +    }    
    +    
        HostileReference* ref = iThreatContainer.addThreat(pVictim, threat);    
        // Ref is online    
        if (ref)
    

    Unit.cpp

        m_charmInfo = NULL;    
    
    +    m_ThreatRedirectionPercent = 0;
    +    m_misdirectionTargetGUID = 0;
    +    
        // remove aurastates allowing special moves
        for(int i=0; i < MAX_REACTIVE; ++i)    
            m_reactiveTimer[i] = 0;
    

    Unit.h

            void AddPetAura(PetAura const* petSpell);    
            void RemovePetAura(PetAura const* petSpell);
    
    +        void SetThreatRedirectionTarget(uint64 guid, uint32 pct)    
    +        {
    +            m_misdirectionTargetGUID = guid;    
    +            m_ThreatRedirectionPercent = pct;    
    +        }    
    +        uint32 GetThreatRedirectionPercent() { return m_ThreatRedirectionPercent; }
    +        Unit *GetMisdirectionTarget() { return m_misdirectionTargetGUID ? GetMap()->GetUnit(m_misdirectionTargetGUID) : NULL; }    
    +    
            // Movement info    
            MovementInfo m_movementInfo;    
    
    ...    ...    
    @@ -1971,6 +1979,8 @@ class MANGOS_DLL_SPEC Unit : public WorldObject    
            ComboPointHolderSet m_ComboPointHolders;
    
            GuardianPetList m_guardianPets;
    +        uint32 m_ThreatRedirectionPercent;    
    +        uint64 m_misdirectionTargetGUID;
    
            uint64 m_TotemSlot[MAX_TOTEM_SLOT];    
    };
    

    good luck

  5. REV 10409
    SD2

    for unit.h

    Unit *GetMisdirectionTarget() { return m_misdirectionTargetGUID ? GetMap()->GetUnit(m_misdirectionTargetGUID) : NULL; }

    Error

    6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2027: undefined type 'Map' and (a) was used. 
    6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Object.h (73): 'Map' to see the declaration. 
    6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2227: '-> GetUnit' left the class / struct / union / generic type point must. 
    6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2027: undefined type 'Map' and (a) was used. 
    6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Object.h (73): 'Map' to see the declaration. 
    6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2227: '-> GetUnit' left the class / struct / union / generic type point must. 
    6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2027: undefined type 'Map' and (a) was used. 
    6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Object.h (73): 'Map' to see the declaration. 
    6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2227: '-> GetUnit' left the class / struct / union / generic type point must.

    how can fix? that? so what do i change?

×
×
  • 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