Jump to content

maly32167

Members
  • Posts

    72
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by maly32167

  1. Where did you use it ?

    maybe try implementing some headers like Object.h in whatever file you are in

    cause

    I wrote

    Player * plr = NULL;

    plr->MonsterTextEmote("test", plr, true);

    and it compiled just fine

    Edit:

    ok

    You use std::string

    so do smth like

    std::string str = "mystring%s smth etc";

    plr->MonsterTextEmote(str.c_str(), plr, true);

    (you need to use c_str() on std::strings to convert it to char *

  2. The only problem using smart pointers in mangos is Vladimir :)

    It will be an offtopic but If I may know, can you explain why :D ?

    I think implementing shared_ptr would be really efficient on mangos, especially as its stable-going project and I can imagine that implementation would be succesful compared to ascent which failed at its implementation long time ago.

  3. [Rev - Latest]

    So, for example we have Spiritual Attunement talent of prot paladin

    It should give mana on all heals

    on mangos it works only on direct heals (as procflag is 2048 + 32768)

    I've set procflag to add periodic spells (524288)

    thing is 524288 is default for negative spells so I made proc-ex for it (262144) - PROC_EX_PERIODIC_POSITIVE = 0x0040000

    However setting proc-ex makes 2048 + 32768 proc-flag not procc anymore

    Conclusion:

    You cannot make spell proc on both direct-spells and periodic-positive-only at once cause setting proc-ex for positive periodics will make direct spells not active anymore.

    Hope you understand the problem.

    Regards, Feanordev.

  4. Well

    4) ICC: Forge of Souls - Intro Dialogue

    This Dialogue should only be started once per Instance, so it needs some kind of storage of already started dialogue

    Problem:

    - Where to store?

    - How to check/ set?

    - Instance Data boolean value ?

    1) Emissary of Hate: http://www.wowhead.com/npc=25003#comments

    This mob should spawn, after 6 of the mobs around are killed (_continent_ map)

    - store & count information of killed mobs around

    - check on each kill if 6 is exceeded, if it is, spawn emissary

    - reset counter on corpse-despawn

    Problem:

    - Where to store counter, and check if should be summoned?

    - Blizz uses invisible triggers for such

    then for mobs add OnDied -> Set trigger variable -> if variable = 6 -> spawn mob

    everything but second (I dont actually understand second fully), is doable big problems

  5. As for delayed spells no - I also used some other patch from mangos forum to select which spells should be reflected- I have seen You also work on this

    I havent this patch on 'live' server so can't get much of feedback yet

    This code doesnt change much - there is check so You cant reflect reflected spell thus mask-removal is applied on reflected one - therefore it cant loop so no bugs should be "exposed" in this patch

  6. Spellsteal should have the same chances to miss(resist) as dispel (it is dispel-type mechanic)

    this applies such chance to miss spellsteal effect

    diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
    index 5e9cd37..9bc0fe3 100644
    --- a/src/game/SpellEffects.cpp
    +++ b/src/game/SpellEffects.cpp
    @@ -9196,7 +9196,22 @@ void Spell::EffectStealBeneficialBuff(SpellEffectIndex eff_idx)
                SpellAuraHolder *holder = steal_list[urand(0, list_size-1)];
                // Not use chance for steal
                // TODO possible need do it
    -            success_list.push_back( std::pair<uint32,uint64>(holder->GetId(),holder->GetCasterGUID()));
    +
    +            int32 miss_chance = 0;
    +            // Apply dispel mod from aura caster
    +            if (Unit *caster = holder->GetCaster())
    +            {
    +                if (Player* modOwner = caster->GetSpellModOwner())
    +                {
    +                    modOwner->ApplySpellMod(holder->GetSpellProto()->Id, SPELLMOD_RESIST_DISPEL_CHANCE, miss_chance, this);
    +                    miss_chance += modOwner->GetTotalAuraModifier(SPELL_AURA_MOD_DISPEL_RESIST);
    +                }
    +            }
    +
    +            // Try dispel
    +            if (!roll_chance_i(miss_chance))
    +                success_list.push_back( std::pair<uint32,uint64>(holder->GetId(),holder->GetCasterGUID()));
    +            else m_caster->SendSpellMiss(unitTarget, holder->GetSpellProto()->Id, SPELL_MISS_RESIST);
    
                // Remove buff from list for prevent doubles
                for (std::vector<SpellAuraHolder *>::iterator j = steal_list.begin(); j != steal_list.end(); )
    
    

  7. After being not able to enter instance player is first teleported at the position he was before teleport (Instance entrance) - if player cannot be teleported back, then its ported to its homebind.

    In short - it fixes annoying teleport to homebind after- entering in-progress instance. ;)

    diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
    index 3b96531..ac4e9cf 100644
    --- a/src/game/MovementHandler.cpp
    +++ b/src/game/MovementHandler.cpp
    @@ -47,7 +47,11 @@ void WorldSession::HandleMoveWorldportAckOpcode()
        if (_player->GetVehicleKit())
            _player->GetVehicleKit()->RemoveAllPassengers();
    
    -    // get the teleport destination
    +    // get current and teleport destination
    +    float currx,curry,currz;
    +    uint32 currmap = GetPlayer()->GetMapId();
    +    GetPlayer()->GetPosition(currx,curry,currz);
    +
        WorldLocation &loc = GetPlayer()->GetTeleportDest();
    
        // possible errors in the coordinate validity check
    @@ -85,9 +89,13 @@ void WorldSession::HandleMoveWorldportAckOpcode()
            GetPlayer()->ResetMap();
    
            sLog.outError("WorldSession::HandleMoveWorldportAckOpcode: player %s (%d) was teleported far but couldn't be added to map. (map:%u, x:%f, y:%f, "
    -            "z:%f) We port him to his homebind instead..", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.mapid, loc.coord_x, loc.coord_y, loc.coord_z);
    -        // teleport the player home
    -        GetPlayer()->TeleportToHomebind();
    +            "z:%f) Trying to port him to his previous place..", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.mapid, loc.coord_x, loc.coord_y, loc.coord_z);
    +        // Teleport to previous place, if cannot be ported back TP to homebind place
    +        if( !GetPlayer()->TeleportTo(currmap, currx,curry,currz, 0))
    +        {
    +            sLog.outError("WorldSession::HandleMoveWorldportAckOpcode: player %s cannot be ported to his previous place, teleporting him to his homebind place...", GetPlayer()->GetName());
    +            GetPlayer()->TeleportToHomebind();
    +        }
            return;
        }
    
    
    

  8. This fixed reflected delayed spells (not instant) to have effects applied at all and to have damage in its info too.

    Maybe its not the way it should be done - Im not actually sure I have been writting it to just fix it and by printf-debugging I found out that at delayed reflect spell's mask is taken out thus effects arent processed at all also due to DelayedSpellLaunch handling, damage is not applied at all if its reflected, would be good to have opinion from devs.

    diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
    index 36a3d43..d4d6d7d 100644
    --- a/src/game/Spell.cpp
    +++ b/src/game/Spell.cpp
    @@ -1062,7 +1062,18 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
            // mark effects that were already handled in Spell::HandleDelayedSpellLaunch on spell launch as processed
            for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
                if (IsEffectHandledOnDelayedSpellLaunch(m_spellInfo, SpellEffectIndex(i)))
    -                mask &= ~(1<<i);
    +            {
    +                if(missInfo == SPELL_MISS_REFLECT)
    +                {
    +                    SpellNonMeleeDamage damageInfo(caster, unitTarget, m_spellInfo->Id, m_spellSchoolMask);
    +                    caster->CalculateSpellDamage(&damageInfo, m_damage, m_spellInfo, m_attackType);
    +                    unitTarget->CalculateAbsorbResistBlock(caster, &damageInfo, m_spellInfo);
    +                    caster->DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
    +                     m_damage += damageInfo.damage;
    +                }
    +                else
    +                    mask &= ~(1<<i);
    +            }
    
            // maybe used in effects that are handled on hit
            m_damage += target->damage;
    
    

  9. Compared to blizzard's servers. 3xbuff biving +10% Attack Power (which is multiplied, not added) instead of only 1 such buff, 2xhaste buff, ahh, I could list so many buffs. 10k dps with gear only from Naxxramas and Obsidian Sanctum. Would this be normal on 3.3.5 with such gear?

    never seen anyone doing that, maybe you have a core mod that affects damage or your players are hacking in some say

    Sorry but uhm... that You never seen anyone doing that doesnt mean it doesnt exist;

    It is very old problem of mangos - just look at:

    Blood Pack + Commanding Shout,

    Blessing of Might + Battle Shout,

    many many more.

    the above patch fixes every case of should-not-stacking spells

  10. This is what I wrote for this annoying bug, hacky but I couldnt find real source of it too, stealth has procflag & PROC_FLAG_ON_TAKE_PERIODIC but problem is with

    - Taken spell periodic (damage / healing, determined from 14-17 flags) mangos doesnt determine whether its damage or healing (and I dont know wtf these 14-17 flags are..)

    this code doesnt break anything but it doesnt change that its hacky and damage mismatch for proc may be bugging not only stealth...

    diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp
    index 95bab48..838b6d7 100644
    --- a/src/game/UnitAuraProcHandler.cpp
    +++ b/src/game/UnitAuraProcHandler.cpp
    @@ -383,6 +383,19 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, SpellAuraHolder* holder, S
            if (!allow)
                return false;
        }
    +
    +    if (EventProcFlag & PROC_FLAG_ON_TAKE_PERIODIC && GetTypeId() == TYPEID_PLAYER && procSpell && IsPositiveSpell(procSpell->Id))
    +    {
    +        bool allow = true;
    +        for(int i = 0; i < 3; ++i)
    +            if(Aura * pAur = holder->GetAuraByEffectIndex(SpellEffectIndex(i)))
    +                if(pAur->GetModifier()->m_auraname == SPELL_AURA_MOD_STEALTH)
    +                    allow = false;
    +
    +        if (!allow)
    +            return false;
    +    }
    +
        // Aura added by spell can`t trogger from self (prevent drop charges/do triggers)
        // But except periodic triggers (can triggered from self)
        if(procSpell && procSpell->Id == spellProto->Id && !(spellProto->procFlags & PROC_FLAG_ON_TAKE_PERIODIC))
    
    

  11. Talent Cut to the Chase refresh Slice and Dice only to current duration and should refresh to duration of 5cp

    diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp
    index a164d83..6845347 100644
    --- a/src/game/UnitAuraProcHandler.cpp
    +++ b/src/game/UnitAuraProcHandler.cpp
    @@ -1647,6 +1647,10 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
                        if (spellProto->SpellFamilyName == SPELLFAMILY_ROGUE &&
                            (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000040000)))
                        {
    +                        int32 duration = GetSpellMaxDuration(spellProto);
    +                        if(GetTypeId() == TYPEID_PLAYER)
    +                            static_cast<Player*>(this)->ApplySpellMod(spellProto->Id, SPELLMOD_DURATION, duration);
    +                        (*itr)->SetAuraMaxDuration(duration);
                            (*itr)->GetHolder()->RefreshHolder();
                            return SPELL_AURA_PROC_OK;
                        }
    
    

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