Jump to content

darkstalker

Members
  • Posts

    717
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by darkstalker

  1. you can make this work with the spell_dbc patch (custom dbc entries)
  2. then just needs someone to start writing it
  3. We know that currently that on mangos hunter traps are visible, when they're supposed to be stealthed. For that purpose there is a rogue passive called Detect Traps, thats supposed to make traps visible for them. Reading the spell effects shows is has "Apply Aura: Stealth Detection (1) Value: 70", its a spell with SPELL_AURA_MOD_STEALTH_DETECT, EffectBasePoints0 = 69 and EffectMiscValue0 = 1. The problem here is that this stealth detection is being currently applied to unit detection, not traps (that don't even have stealth). The key here is the MiscValue, that seems to be some kind of stealth mask. Its the only stealth detection spell on the dbc with miscvalue != 0, so it suggest that this value means trap detection. A (hack?) fix for this problem would be something like: diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 46a15e5..d00b027 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8043,7 +8043,9 @@ bool Unit::isVisibleForOrDetect(Unit const* u, WorldObject const* viewPoint, boo //-Stealth Mod(positive like Master of Deception) and Stealth Detection(negative like paranoia) //based on wowwiki every 5 mod we have 1 more level diff in calculation - visibleDistance += (int32(u->GetTotalAuraModifier(SPELL_AURA_MOD_STEALTH_DETECT)) - stealthMod)/5.0f; + // spell 2836 (Detect Traps) not meant to enhace unit detection has MiscValue = 1, all others have 0 (stealth mask?) + int32 detectMod = u->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_STEALTH_DETECT, 0); + visibleDistance += (detectMod - stealthMod) / 5.0f; visibleDistance = visibleDistance > MAX_PLAYER_STEALTH_DETECT_RANGE ? MAX_PLAYER_STEALTH_DETECT_RANGE : visibleDistance; // recheck new distance to prevent this "extra bonus" to detection of players being added. Any toughts on this? maybe should implement stealth masks for future implementation of trap stealthing.
  4. thats the problem with canned distros, you get upper limits on program versions..
  5. a good idea is to add "-DNDEBUG" to your CFLAGS and CXXFLAGS if you don't want assert's to crash your server
  6. the first line has a typo, missing the "!" from that
  7. would be nice to see the amount of thanks the user has below the post count
  8. boost::any uses a technique called "type erasure", that consists on hiding the data type on a base class thats inherited by templates that hold the type info and real data
  9. a bit more cleaned up vehicles patch for 11119 http://pastebin.com/DyusLwUD
  10. the ProcDamageAndSpell call should be done before removing auras on death, otherwise non death persistent auras will never proc
  11. * What bug does the patch fix? What features does the patch add? Prevents abilities that are "usable while stunned" being usable while in non-stun effects like Cyclone or Sap. With this patch the usability while stunned is restricted only to stun auras with mechanic stun. * For which repository revision was the patch created? 11044 * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. no * Who has been writing this patch? Please include either forum user names or email addresses. darkstalker diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index ab4b0fc..267c104 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5575,8 +5575,25 @@ SpellCastResult Spell::CheckCasterAuras() const SpellCastResult prevented_reason = SPELL_CAST_OK; // Have to check if there is a stun aura. Otherwise will have problems with ghost aura apply while logging out uint32 unitflag = m_caster->GetUInt32Value(UNIT_FIELD_FLAGS); // Get unit state - if (unitflag & UNIT_FLAG_STUNNED && !(m_spellInfo->AttributesEx5 & SPELL_ATTR_EX5_USABLE_WHILE_STUNNED)) - prevented_reason = SPELL_FAILED_STUNNED; + if (unitflag & UNIT_FLAG_STUNNED) + { + // spell is usable while stunned, check if aura has mechanic stun + if (m_spellInfo->AttributesEx5 & SPELL_ATTR_EX5_USABLE_WHILE_STUNNED) + { + bool is_stun_mechanic = true; + Unit::AuraList const& stunAuras = m_caster->GetAurasByType(SPELL_AURA_MOD_STUN); + for (Unit::AuraList::const_iterator itr = stunAuras.begin(); itr != stunAuras.end(); ++itr) + if (!(*itr)->HasMechanic(MECHANIC_STUN)) + { + is_stun_mechanic = false; + break; + } + if (!is_stun_mechanic) + prevented_reason = SPELL_FAILED_STUNNED; + } + else + prevented_reason = SPELL_FAILED_STUNNED; + } else if (unitflag & UNIT_FLAG_CONFUSED && !(m_spellInfo->AttributesEx5 & SPELL_ATTR_EX5_USABLE_WHILE_CONFUSED)) prevented_reason = SPELL_FAILED_CONFUSED; else if (unitflag & UNIT_FLAG_FLEEING && !(m_spellInfo->AttributesEx5 & SPELL_ATTR_EX5_USABLE_WHILE_FEARED)) @@ -5625,7 +5642,7 @@ SpellCastResult Spell::CheckCasterAuras() const switch(aura->GetModifier()->m_auraname) { case SPELL_AURA_MOD_STUN: - if (!(m_spellInfo->AttributesEx5 & SPELL_ATTR_EX5_USABLE_WHILE_STUNNED)) + if (!(m_spellInfo->AttributesEx5 & SPELL_ATTR_EX5_USABLE_WHILE_STUNNED) || !aura->HasMechanic(MECHANIC_STUN)) return SPELL_FAILED_STUNNED; break; case SPELL_AURA_MOD_CONFUSE: diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 3e9151f..b8edc90 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -8014,6 +8014,12 @@ bool Aura::IsLastAuraOnHolder() return true; } +bool Aura::HasMechanic(uint32 mechanic) const +{ + return GetSpellProto()->Mechanic == mechanic || + GetSpellProto()->EffectMechanic[m_effIndex] == mechanic; +} + SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit *target, WorldObject *caster, Item *castItem) : m_target(target), m_castItemGuid(castItem ? castItem->GetObjectGuid() : ObjectGuid()), m_auraSlot(MAX_AURAS), m_auraFlags(AFLAG_NONE), m_auraLevel(1), m_procCharges(0), diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 9812dd2..5147d1c 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -436,6 +436,8 @@ class MANGOS_DLL_SPEC Aura SpellAuraHolder* const GetHolder() const { return m_spellAuraHolder; } bool IsLastAuraOnHolder(); + + bool HasMechanic(uint32 mechanic) const; protected: Aura(SpellEntry const* spellproto, SpellEffectIndex eff, int32 *currentBasePoints, SpellAuraHolder *holder, Unit *target, Unit *caster = NULL, Item* castItem = NULL);
  12. anyone has the link of the git branch with the new vehicle implementation?
  13. there are lots of spells with another triggered spell_id in basepoints, maybe needs a generic implementation?
  14. Flags for following probably is what's needed for Auriaya's sentries
  15. I thought this was done already by mangos, but seems i was wrong.
  16. Confirmed, it happens too if you shift "too fast". You enter a bugged state where you can't cast cat/bear or normal spells at all.
  17. try going inside src/realmd subdir and doing "make"
  18. if you properly use destructors only 1 delete call should be needed
  19. Current LoS functions don't consider terrain, and that's the biggest problem of confused movement, moving player below terrain level.
  20. The same needs to be done for FleeingMovementGenerator
×
×
  • 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