Jump to content

nos4r2zod

Members
  • Posts

    84
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by nos4r2zod

  1. Look more closely at the code; I said that the spell_bonus_data being used should not be that of the triggered spell 33778. if ( apply ) { if ( caster ) // prevent double apply bonuses if(m_target->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading()) m_modifier.m_amount = caster->SpellHealingBonus(m_target, GetSpellProto(), m_modifier.m_amount, [b]SPELL_DIRECT_DAMAGE[/b]); } This basically stores the direct_bonus in the m_modifier.m_amount of the HoT effect of the lifebloom, then m_target->CastCustomSpell(m_target, 33778, &[b]m_modifier.m_amount[/b], NULL, NULL, true, NULL, this, GetCasterGUID()); uses the already calculated bonus. Edit: The reason for this instead of just using 33778 is because 33778 is SPELL_DAMAGE_CLASS_NONE: it will not benefit from spell power by itself.
  2. Count the lines of context at the end of the patch. If there are three (default number), just add a new line without any spaces and try applying again. This is just a quirk of posting patches on forums, blank lines are not added. Patch applied fine for me.
  3. I looked in the dbc and found no basepoints value for the auras that proc Improved Stormstrike. I compiled it this way before 8260, and I compiled it afterwards just to make sure; the triggeredAmount is zero, and this patch will not work like this. Edit: Here is the general rule for whether triggerAmount can be used: 1) The proc aura will have basepoints. If this is the case, then when you look on wowhead, you will clearly see that it has data for value: Blessed Recovery, Nature's Guardian, Bloodthirst 2) The proc aura itself has no basepoints, but it is modified by another spell that increases the value: Leader of the Pack's health restore trigger (Effect 2), Improved Leader of the Pack For reference, here is Improved Stormstrike
  4. Does anyone know if the spell power coefficient is supposed to be multiplied per stack as well? (For anyone wondering, the spell_bonus_data being used is direct_bonus for the Lifebloom spell that is cast, not the triggered spell 33778)
  5. Fair enough. My initial thinking was that spells that didn't need increasing ppmRate could just not be added to spell_chain. But I suppose that contradicts how spell_chain is being used to make the other spell related tables more maintainable. I did try to filter spells (in dbc) with description containing the word "Rank" (since as you mention, these spells do say something like "More effective than Rank x-1"), and then looked through them to find these four spells that could use this extrapolation. I also looked through spells with procChance 100 (Am I correct in assuming all ppm spells have "100 procChance" in dbc? That is the case for all the spells currently in spell_proc_event) with a rank in the description (m_nameSubtext_lang) and an aura that could proc, and found only Vindication that used a ppm which didn't increase with rank. Well, one way this patch might be made less general (at least in the case of these 4 + 1 spells) would be to compare the id of the triggered spells for different ranks. All ranks of the first four spells will proc the same spell, whereas in the other case, Vindication will proc different spells for its two ranks. But still, it's a rather convoluted change for just these handful of cases. One final note: the second rank of Vindication has a higher ppmRate than the first rank: SELECT * FROM `spell_proc_event` WHERE `entry` IN (9452, 26016); Edit: something like this patch?
  6. The unit that calls Unit::HandleProcTriggerSpell is the unit with the aura, or the shaman. So target-> is not necessary. The flip side of putting it there though is that damage in that context is the amount of damage done by the attack; the Spell object for the triggered spell hasn't be created yet, and Spell::CalculateDamage hasn't been called yet (which is where you get damage = 20 in your case). That's why I point out that that's just my personal preference... as I'm not completely sure what MaNGOS would prefer.
  7. What bug does the patch fix? What features does the patch add? * Extrapolate ppmRate data for ranks in mSpellProcEventMap (calculate ppmRate for successive ranks using [ppmRate of first rank] * rank) * Delete a newly added hack for Maelstrom Weapon * Switch Killing Machine to ppm system and remove crit requirement for proc as per 3.0.8 changes * Small cleanup in tables: * Add spell chain data for Unbridled Wrath, Killing Machine, and Furious Attacks; delete higher ranks in spell_proc_event. * Delete ranks 2-4 for Shadow Embrace (not completely related to this patch, but not needed anymore) For which repository revision was the patch created? 8254 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. Don't think so, mostly just cleanup Who has been writing this patch? Please include either forum user names or email addresses. Myself I disagree with the Maelstrom Weapon check added in [8253]. I see that Unbridled Wrath would need to be handled the same way if it had spell_chain data, and I didn't find any procs that would be broken by this patch. Patch SQL Edit: It looks like Unbridled Wrath is 3ppm per rank, based on the most recent tests I could find
  8. Wouldn't have posted it if it didn't do what was advertised Shiv has EquippedItemInventoryTypeMask = 0, so it'll pass over this block completely: if(spellInfo->EquippedItemInventoryTypeMask != 0) // 0 == any inventory type { if((spellInfo->EquippedItemInventoryTypeMask & (1 << proto->InventoryType)) == 0) return false; // inventory type not present in mask }
  9. Improved Stormstrike returns 20% of base mana, not total mana. So GetCreateMana() or GetCreatePowers(power) should be used, not GetMaxPower. Out of personal preference, I would also place the custom basepoint calculation in the the proc aura, since other procs are handled that way: diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 9f37a13..448753e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6879,6 +6879,12 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB return false; break; } + // Improved Stormstrike + case 63375: + { + basepoints0 = int32(GetCreateMana() * 20 / 100); + break; + } } if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(trigger_spell_id))
  10. I like the idea, but this is making Druid's Starfall appear as a debuff. So you still might need to include part of the targeting check.
  11. What bug does the patch fix? What features does the patch add? This implements the script effect of Guarded by The Light that refreshes Divine Plea on the Paladin. For which repository revision was the patch created? 8248 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. Didn't find any Who has been writing this patch? Please include either forum user names or email addresses. Myself diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index bfa91b5..ec97e14 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5134,6 +5134,18 @@ void Spell::EffectScriptEffect(uint32 effIndex) } return; } + // (Paladin spell with SPELLFAMILY_WARLOCK) - Guarded by The Light + case 63521: + { + // Refresh Divine Plea on target (3 aura slots) + Unit::AuraMap& dpAuras = unitTarget->GetAuras(); + for(Unit::AuraMap::iterator itr = dpAuras.begin(); itr != dpAuras.end(); ++itr) + { + if((*itr).second->GetId() == 54428) + (*itr).second->RefreshAura(); + } + return; + } } break; } Some quick notes: * Oddly, this spell has SPELLFAMILY_WARLOCK even though it's a Paladin spell * Not sure if there's a cleaner way to find Divine Plea's auras (perhaps it could be added to SpellMgr's IsSingleTargetSpell (via the same hack as Judgements) and found using m_scAuras? I think that would be marginally faster)
  12. I still think that this not correct. weapon speed can be affected by auras And ppm expected to be still same (calculated base at current weapon attack rate)... This was intentional on my part, based on what I read a while ago here. But I am not sure if this applies the same way iit does item enchant procs as it does with procs from auras. The rest of the comments, I'll try to look into; thank you Edit: I see your point; and spell_threat table loading should do the same. I notice that are still ranks of Druid's Faerie Fire in that table, but it was reduced to one rank in 3.1.x. Edit2: Off topic, but is there even any plan to keep the spell_threat table? If so, this small patch turns the SQLStorage into a map so spell existence can be checked, and here are the entries that can be removed: DELETE FROM `spell_threat` WHERE `entry` IN (778,9749,9907,14274,15629,15630,15631,15632,17390,17391,17392,26993,27011); Edit3: Patch updated following Vladimir's 2nd, 3rd, and 4th comments. Will wait for more input on the first issue.
  13. I know a thread for this already exists on getmangos.ru, but unfortunately, I don't know any Russian, yet I wanted to make an update to the patches there. What bug does the patch fix? What features does the patch add? * Added a new SQL table, spell_proc_item_enchant, for "custom" ppmRates on Item Enchants that do not use auras. This allows us to fix the proc rate of Instant Poison, Wound Poison, Frostbrand Weapon, etc. * Changed GetPPMProcChance so that it actually returns a float value. * Implemented SPELLMOD_FREQUENCY_OF_SUCCESS (26). It functions the same as SPELLMOD_CHANCE_OF_SUCCESS, only 26 is used exclusively with PCT_MODIFIERs (This is for spells like Improved Poisons, Glyph of Seal of Command, and T8 Enhancement 4P Bonus) For which repository revision was the patch created? 8236 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. I didn't find any besides the topic on .ru Who has been writing this patch? Please include either forum user names or email addresses. Myself, based partly off of MaS0n's patch, which seems remotely inspired by thenecromancer's patch. I did the following differently: * I used the procced spell's id (instead of the enchant id) to lookup entries in the table, like MaS0n's and unlike thenecromancer's patches. This is because it allows me to... * Use spell_chain for looking up ranks of enchant spells. While adding spell_chain data seems like it adds bulk to this patch's SQL data, the spells also need spell_bonus_data, so less entries are needed for that. * Put MaS0n's "HandleReloadSpellProcItemEnchantCommand" in the CommandTable so it can be used as its own chat command. * Switched the GetAttackTime calls in CastItemCombatSpell to using the itemProto's Delay. This is a really miniscule issue, but after a couple of attack speed changing mods are applied, floating point errors leads to an inaccuracy of a few centiseconds. It's not like it's necessary to use GetAttackTime anyway, considering the itemProto needs to be declared regardless. Patch DROP TABLE IF EXISTS `spell_proc_item_enchant`; CREATE TABLE `spell_proc_item_enchant` ( `entry` mediumint unsigned NOT NULL, `ppmRate` float NOT NULL default '0', PRIMARY KEY (`entry`) ) ENGINE=MYISAM DEFAULT CHARSET=utf8; INSERT INTO `spell_proc_item_enchant` (`entry`, `ppmRate`) VALUES (8034, 9), -- Frostbrand Weapon (8680, 8.5714), -- Instant Poison (13218, 21.4286); -- Wound Poison DELETE FROM `spell_chain` WHERE `spell_id` IN (8034, 8037, 10458, 16352, 16353, 25501, 58797, 58798, 58799, 8680, 8685, 8689, 11335, 11336, 11337, 26890, 57964, 57965, 13218, 13222, 13223, 13224, 27189, 57974, 57975); INSERT INTO `spell_chain` (`spell_id`, `prev_spell`, `first_spell`, `rank`, `req_spell`) VALUES (8034,0,8034,1,0), -- Frostbrand Attack (8037,8034,8034,2,0), (10458,8037,8034,3,0), (16352,10458,8034,4,0), (16353,16352,8034,5,0), (25501,16353,8034,6,0), (58797,25501,8034,7,0), (58798,58797,8034,8,0), (58799,58798,8034,9,0), (8680,0,8680,1,0), -- Instant Poison (8685,8680,8680,2,0), (8689,8685,8680,3,0), (11335,8689,8680,4,0), (11336,11335,8680,5,0), (11337,11336,8680,6,0), (26890,11337,8680,7,0), (57964,26890,8680,8,0), (57965,57964,8680,9,0), (13218,0,13218,1,0), -- Wound Poison (13222,13218,13218,2,0), (13223,13222,13218,3,0), (13224,13223,13218,4,0), (27189,13224,13218,5,0), (57974,27189,13218,6,0), (57975,57974,13218,7,0);
  14. Ok, so I switched to using GetCasterGUID() instead of GetCaster()->GetGUID() to fix that null pointer (stupid mistake on my part). I also switched to using RemoveAurasByCasterSpell so one warrior's bleed effects expiring won't remove another's blood frenzy (whoever owns the debuff is still the last one who applied it). EDIT: Coding changes; no need to use UI64LIT for SpellFamilyFlags2 and no need to use GetCaster in HandleShapeshiftBoosts (instead, changed to IS_PLAYER_GUID(GetCasterGUID()) EDIT2 (7/26): Added Improved Devotion Aura Patch
  15. Still getting this problem after [8205] ( Really use trap GO charges and avoid casting in despawned state. ) But I won't go so far to say that is the best way to take care of this bug. Edit: Perhaps GameObject:: Delete() needs to SetLootState(GO_JUST_DEACTIVATED) instead of having it in the SpellEffect?
  16. What bug does the patch fix? What features does the patch add? Partially blocked attacks should still be allowed to trigger procs. One example of this is Hodir's Frozen Blows. It would almost be a non-issue if partial blocks would completely prevent the proc effect. For which repository revision was the patch created? 8232 Who has been writing this patch? Please include either forum user names or email addresses. Myself diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 39ba617..56ccca8 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1314,6 +1314,8 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da damageInfo->TargetState = VICTIMSTATE_BLOCKS; damageInfo->blocked_amount = damageInfo->damage; } + else + damageInfo->procEx|=PROC_EX_NORMAL_HIT; // Partial blocks can still cause attacker procs damageInfo->damage -= damageInfo->blocked_amount; damageInfo->cleanDamage += damageInfo->blocked_amount; break; Edit: update rev.
  17. This bug still exists after [8183] ( Some gameobject despawn related fixes ).
  18. What bug does the patch fix? What features does the patch add? The change to Rake's DoT ap coefficient in [8173] is incorrect. * The coefficient there applies per tick, so 0.06 (times the number of ticks) would give the correct 0.18 ap bonus to the total DoT done. * This coefficient was added in [7499], long after the switch to cllient 3.0.9 (rev. 7298), so the "change" in 3.0.2 was already considered. * I tested this with client just to be 100% sure, and now (without this patch) the DoT portion adds 0.54 * AP damage. For which repository revision was the patch created? 8175 Who has been writing this patch? Please include either forum user names or email addresses. Myself diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 44558e2..9acd2bd 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -4308,8 +4308,8 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real) // Rake if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000001000) && m_spellProto->Effect[2]==SPELL_EFFECT_ADD_COMBO_POINTS) { - // $AP*0.18 bonus per tick - m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 18 / 100); + // $AP*0.06 bonus per tick + m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100); return; } // Lacerate
  19. What you have for Light's Beacon is incorrect and will only work when the paladin casts Beacon of Light on himself, since caster->GetDummyAura will only check the paladin's auras. Instead, I think you have to iterate through the paladin's SingleCastAuras and find whom he casted the dummy spell on. Something like // Light's Beacon case 53651: { // pVictim is the person who has casted a heal. caster is the person who casted Beacon of Light. Unit* caster = triggeredByAura->GetCaster(); if (caster) { if(!pVictim || pVictim->GetGUID() != caster->GetGUID()) return false; // Find the Beacon of Light dummy aura Aura * dummy = NULL; AuraList& scAuras = caster->GetSingleCastAuras(); for(AuraList::const_iterator itr = scAuras.begin(); itr != scAuras.end(); ++itr) { if((*itr)->GetId() == 53563) { dummy = (*itr); break; } } if(dummy) { if(dummy->GetCasterGUID() == caster->GetGUID()) { // Nothing triggered when Beacon of Light is healed directly if (dummy->GetTarget()->GetGUID() == GetGUID()) return false; triggered_spell_id = 53652; basepoints0 = triggeredByAura->GetModifier()->m_amount*damage/100; target = dummy->GetTarget(); } } } break; } Edit: Also, can you explain why the target casts the aura on himself? if(apply) m_target->CastSpell(m_target,53651,true,NULL,this,GetCasterGUID()); My version didn't work when I tried it this way
  20. Instead of having the first check in CheckCast, why not @@ -5378,12 +5378,13 @@ bool Spell::IsAffectedByAura(Aura *aura) bool Spell::CheckTargetCreatureType(Unit* target) const { uint32 spellCreatureTargetMask = m_spellInfo->TargetCreatureType; - // Curse of Doom : not find another way to fix spell target check - if(m_spellInfo->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags == UI64LIT(0x0200000000)) + // Curse of Doom / Exorcism : not find another way to fix spell target check + if((m_spellInfo->SpellFamilyName==SPELLFAMILY_WARLOCK || m_spellInfo->SpellFamilyName==SPELLFAMILY_PALADIN) + && m_spellInfo->SpellFamilyFlags == UI64LIT(0x0200000000)) { // not allow cast at player if(target->GetTypeId()==TYPEID_PLAYER) return false; It's a nice coincidence that Curse of Doom and Exorcism have the same SpellFamilyFlags
  21. Well they shouldn't have coefficients in that table then, because the coefficients there don't add anything. Check where GetSpellBonusData is being called in the code; only in Unit::SpellDamageBonus and Unit::SpellHealingBonus. Aura::HandleSchoolAbsorb's hardcoded coefficients only call SpellBaseHealingBonus and SpellBaseDamageBonus because they aren't affected by buffs that modify healing percent, like wound poison or tree of life aura.
  22. Aura::HandleSchoolAbsorb doesn't use spell_bonus_data, and Power Word : Shield, Frost Ward, Fire Ward, ice Barrier, and Shadow Ward all use hard coded values.
  23. Sorry for off topic, but... How about just getting spell_bonus_data earlier and using that entry to override SPELL_DAMAGE_CLASS_NONE, like @@ -8272,12 +8272,15 @@ uint32 Unit::SpellCriticalHealingBonus(SpellEntry const *spellProto, uint32 dama return damage; } uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack) { + // Check for table values earlier so SPELL_DAMAGE_CLASS_NONE can be overridden + SpellBonusEntry const* bonus = spellmgr.GetSpellBonusData(spellProto->Id); + // No heal amount for this class spells - if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE) + if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE && !bonus) return healamount; // For totems get healing bonus from owner (statue isn't totem in fact) if( GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem() && ((Totem*)this)->GetTotemType()!=TOTEM_STATUE) if(Unit* owner = GetOwner()) @@ -8365,12 +8368,10 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint float SpellModSpellDamage = 100.0f; if(Player* modOwner = GetSpellModOwner()) modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_SPELL_BONUS_DAMAGE, SpellModSpellDamage); SpellModSpellDamage /= 100.0f; - // Check for table values - SpellBonusEntry const* bonus = spellmgr.GetSpellBonusData(spellProto->Id); if (bonus) { float coeff; if (damagetype == DOT) coeff = bonus->dot_damage * LvlPenalty * stack; That way, you can also fix healing stream totem's triggered effect and anything else that needs it without having to add another hack. Edit: Probably still need another work around to get it to crit though... Edit2: I've misunderstood how this aura works. Ignore this post
  24. What bug does the patch fix? What features does the patch add? This adds the respective coefficients for the triggered spells of Savage Defense and Sacred Shield. Also added a check in IsNoStackSpellDueToSpell to allow Frenzied Regeneration to stack with Savage Defense (they have the same icon). For which repository revision was the patch created? 8428 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. Didn't find any Who has been writing this patch? Please include either forum user names or email addresses. Myself Patch EDIT (7-14): Implemented charges for Savage Defense, should disappear after absorbing one hit. EDIT (8/28): Updated to 8428, dropping the code that was independently implemented already.
  25. Update. In short, added support for nonstacking spell power increase, crit %, healing % received, damage % taken reduction buffs, and haste auras. Only a few debuffs are implemented so far, but most just need to be checked into Aura::IsEffectStacking. * I made a better way to check if buffs stacks. First, I implemented a check to see if the aura is from the spell effect SPELL_EFFECT_APPLY_AREA_AURA_RAID, which applies auras that never stack. Then, I added a spell attr checks for SPELL_ATTR_EX6_UNK26, which appear to be used by almost all nonstacking buffs (and some healing spells that are affected by auras that at +%bonus healing power, like the spells affected by Empowered Rejuvenation). For example, all the player versions of blessing of might have this flag, On the other hand, this npc's blessing of might does not have this flag, and it will stack with related buffs. With this change, Rampage is the only buff that needs to be checked with a SpellIconId hack (oddly, it is the only spell with SPELL_ATTR_EX6_UNK30 and not SPELL_ATTR_EX6_UNK26). * Implemented stacking for SPELL_AURA_MOD_HEALING_PCT, instead of just using the largest value. So for example, the Paladin talent Divinity will now stack with Tree of Life aura (and Improved Devotion Aura, when that gets fixed). * Renamed SPELL_AURA_MOD_HASTE -> SPELL_AURA_MOD_MELEE_HASTE (Improved Icy Talons/Windfury no longer affect ranged weapons) and added a somewhat hackish implementation. Wasn't sure where the most unobtrusive place to plant the nonstacking value for this buff was, so I added two more elements to m_modAttackSpeedPct. A hackish result of this is the two "WeaponAttackTypes" that are used to select for these indexes. * Removed two checks to SPELL_AURA_MOD_CRIT_PERCENT_VERSUS in critical healing and damage calculations. No spell has that in 3.1.x, and this patch won't be backported to 0.12 anyway. * Removed checks for weapon classes from HandleModDamageDone. I'm pretty sure the auras that this applied to haven't been used since classic beta. (4354, 4443, 4464, 4493, 5361, 5427). Additionally, PLAYER_FIELD_MOD_DAMAGE_DONE_NEG should be an int32; changed calls to ___UInt32Value to ___Int32Value. * It seemed somewhat odd that UpdateSpellDamageAndHealingBonus was called when healing bonuses were applied, but not when damage bonuses were applied (granted that there are a lot less auras that only give one and not the other). So I changed it so that both would always call UpdateSpellDamageAndHealingBonus, and made UpdateSpellDamageAndHealingBonus take into consideration the value in PLAYER_FIELD_MOD_DAMAGE_DONE_NEG (which is changed by HandleModDamageDone prior to the call). I found no auras of SPELL_AURA_MOD_DAMAGE_DONE that had an EquippedItemInventoryTypeMask not equal to 0, so the additional check for wands is redundant in Unit::SpellBaseDamageBonus. Therefore, I changed that check to GetTotalAuraModifierByMiscMask. EDIT: Fixed a bug with drinks not changing mana regen on apply while decreasing it when unapplied. EDIT2: Part reverted the mana regen changes, and instead changed GetTotalAuraMultiplierByMiscValue and GetTotalAuraModifierByMiscValue to take care of the problem of nonstacking mana regen buffs.
×
×
  • 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