Jump to content

popovk

Members
  • Posts

    18
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by popovk

  1. Updated for 9995 sql part : delete from spell_proc_event where entry in (48492, 48494, 48495); insert into spell_proc_event () VALUES (48492, 0, 7, 524288, 0, 2048, 16384, 0, 0, 0, 0), (48494, 0, 7, 524288, 0, 2048, 16384, 0, 0, 0, 0), (48495, 0, 7, 524288, 0, 2048, 16384, 0, 0, 0, 0); mangos part : diff --git "a/9995\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" "b/9995_mod\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" index be54aa6..b2cd114 100644 --- "a/9995\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" +++ "b/9995_mod\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" @@ -4759,6 +4759,19 @@ void Aura::HandlePeriodicEnergize(bool apply, bool Real) } } + if (!apply && !loading) + { + switch (GetId()) + { + case 5229: // Druid Bear Enrage + if (m_target->HasAura(51185)) // King of the Jungle - infinite duration + m_target->RemoveAurasDueToSpell(51185); + break; + default: + break; + } + } + m_isPeriodic = apply; } diff --git "a/9995\\\\mangos\\\\src\\\\game\\\\Unit.cpp" "b/9995_mod\\\\mangos\\\\src\\\\game\\\\Unit.cpp" index ddf3e35..9f0a2a0 100644 --- "a/9995\\\\mangos\\\\src\\\\game\\\\Unit.cpp" +++ "b/9995_mod\\\\mangos\\\\src\\\\game\\\\Unit.cpp" @@ -6099,6 +6099,32 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 32747; break; } + // King of the Jungle (Bear and Cat) + case 48492: // Rank 1 + case 48494: // Rank 2 + case 48495: // Rank 3 + { + if (!procSpell) + return false; + // Enrage (bear) - single rank - bear miscvalue == 126 + if (procSpell->Id == 5229 && triggeredByAura->GetMiscValue() == 126) + { + // note : the remove part is done in spellAuras/HandlePeriodicEnergize as RemoveAurasDueToSpell + basepoints[0] = triggerAmount; + triggered_spell_id = 51185; + target = this; + break; + } + // Tiger Fury (cat) - all ranks - cat miscvalue != 126 + if (procSpell->SpellFamilyFlags2 & 0x00000800 && triggeredByAura->GetMiscValue() != 126) + { + basepoints[0] = triggerAmount; + triggered_spell_id = 51178; + target = this; + break; + } + break; + } // Glyph of Rejuvenation case 54754: {
  2. I've updated the code in post #36 for a crash fix. Happens sometimes in outdoor zone since some patchs when wearing one of those tabard and farming reputation giving mobs for the record, it's the "pVictim->GetMap()->IsDungeon()" on the "if (HasAura(57818))" line
  3. The idea for an additional column is interesting, it would only require db support instead of code+db in case of a new aura. And you're right about having championning in Cataclysm, the system by itself is very nice and completly in the current way blizzard are handling their game. It would be very surprising from them not keeping this. What could be expected is having different championning auras depending of the extension, thus differents ids (and restrictions).
  4. I do understand perfectly, Ceris. Thing is, eNeRGy original patch check for a mob giving vanguard + horde expedition reputation. The version I did from his doesn't care about the reputation type. Thus allowing without any support some special case like the violet hold where the default reputation you gain here on offi is kirin tor. The counterpart of this more blizzlike version is that without the dungeons level+map restrictions, those tabards work anywhere, even non wotlk areas. And if you want it to be integrated into mangos main code, it needs to be blizzlike.
  5. Updated for 9203 sql part : delete from spell_proc_event where entry in (48492, 48494, 48495); insert into spell_proc_event () VALUES (48492, 0, 7, 524288, 0, 2048, 16384, 0, 0, 0, 0), (48494, 0, 7, 524288, 0, 2048, 16384, 0, 0, 0, 0), (48495, 0, 7, 524288, 0, 2048, 16384, 0, 0, 0, 0); diff --git "a/src\\\\game\\\\SpellAuras.cpp" "b/src\\\\game\\\\SpellAuras.cpp" index 30f2d93..6fd3437 100644 --- "a/src\\\\game\\\\SpellAuras.cpp" +++ "b/src\\\\game\\\\SpellAuras.cpp" @@ -4575,7 +4575,18 @@ void Aura::HandlePeriodicEnergize(bool apply, bool Real) break; } } - + if (!apply && !loading) + { + switch (GetId()) + { + case 5229: // Druid Bear Enrage + if (m_target->HasAura(51185)) // King of the Jungle self Enrage bonus with infinite duration + m_target->RemoveAurasDueToSpell(51185); + break; + default: + break; + } + } m_isPeriodic = apply; } diff --git "a/src\\\\game\\\\Unit.cpp" "b/src\\\\game\\\\Unit.cpp" index b79f4bb..8079ce2 100644 --- "a/src\\\\game\\\\Unit.cpp" +++ "b/src\\\\game\\\\Unit.cpp" @@ -5840,7 +5840,33 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 54755; break; } - } + // King of the Jungle (Bear and Cat) + case 48492: // Rank 1 + case 48494: // Rank 2 + case 48495: // Rank 3 + { + if (!procSpell) + return false; + // Enrage (bear) - single rank - the aura for the bear form from the 2 existing kotj auras has a miscValue == 126 + if (procSpell->Id == 5229 && triggeredByAura->GetMiscValue() == 126) + { + // note : the remove part is done in spellAuras/HandlePeriodicEnergize as RemoveAurasDueToSpell + basepoints0 = triggerAmount; + triggered_spell_id = 51185; + target = this; + break; + } + // Tiger Fury (cat) - all ranks - the aura for the cat form from the 2 existing kotj auras has a miscValue != 126 + if (procSpell->SpellFamilyFlags2 & 0x00000800 && triggeredByAura->GetMiscValue() != 126) + { + basepoints0 = triggerAmount; + triggered_spell_id = 51178; + target = this; + break; + } + break; + } + } // Eclipse if (dummySpell->SpellIconID == 2856) { Followed your advice, Sarjuuk. It's working perfectly, just needed to implement the !apply part
  6. depends, blizzlike functionnality restrict it to wotlk dungeons in heroic mode, or lv80 dungeons in normal mode. Without the restrictions, you could use one of those tabard to farm mobs giving a reputation bonus anywhere
  7. Updated for 9203. Remember, it's restricted to dungeons only. Author : eNeRGy, Kolh, Popovk diff --git "a\\\\src\\\\game\\\\Player.cpp" "b\\\\src\\\\game\\\\Player.cpp" index ed9e795..2c6c09b 100644 --- "a\\\\src\\\\game\\\\Player.cpp" +++ "b\\\\src\\\\game\\\\Player.cpp" @@ -5972,11 +5972,38 @@ void Player::RewardReputation(Unit *pVictim, float rate) if(!Rep) return; + uint32 Repfaction1 = Rep->repfaction1; + uint32 Repfaction2 = Rep->repfaction2; + uint32 tabardFactionID = 0; + + // Championning tabard reputation system + // aura 57818 is a hidden aura common to northrend tabards allowing championning. + if(pVictim->GetMap()->IsDungeon() && HasAura(57818)) + { + InstanceTemplate const* mInstance = sObjectMgr.GetInstanceTemplate(pVictim->GetMapId()); + MapEntry const* StoredMap = sMapStore.LookupEntry(pVictim->GetMapId()); + + // only for expansion 2 map (wotlk), and : min level >= lv75 or dungeon only heroic mod + // entering a lv80 designed instance require a min level>=75. note : min level != suggested level + if ( StoredMap->Expansion() == 2 && ( mInstance->levelMin >= 75 || pVictim->GetMap()->GetDifficulty() == DUNGEON_DIFFICULTY_HEROIC ) ) + { + if( Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_TABARD ) ) + { + if ( tabardFactionID = pItem->GetProto()->RequiredReputationFaction ) + { + Repfaction1 = tabardFactionID; + Repfaction2 = tabardFactionID; + } + } + } + } + + if(Rep->repfaction1 && (!Rep->team_dependent || GetTeam()==ALLIANCE)) { - int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue1, Rep->repfaction1, false); + int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue1, Repfaction1, false); donerep1 = int32(donerep1*rate); - FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(Rep->repfaction1); + FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(Repfaction1); uint32 current_reputation_rank1 = GetReputationMgr().GetRank(factionEntry1); if (factionEntry1 && current_reputation_rank1 <= Rep->reputation_max_cap1) GetReputationMgr().ModifyReputation(factionEntry1, donerep1); @@ -5992,9 +6019,9 @@ void Player::RewardReputation(Unit *pVictim, float rate) if(Rep->repfaction2 && (!Rep->team_dependent || GetTeam()==HORDE)) { - int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue2, Rep->repfaction2, false); + int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue2, Repfaction2, false); donerep2 = int32(donerep2*rate); - FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(Rep->repfaction2); + FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(Repfaction2); uint32 current_reputation_rank2 = GetReputationMgr().GetRank(factionEntry2); if (factionEntry2 && current_reputation_rank2 <= Rep->reputation_max_cap2) GetReputationMgr().ModifyReputation(factionEntry2, donerep2);
  8. In this case, how is to be considerated the second bonus of the hospitality spell, casted by the talisman ?
  9. Maybe with checking those spells (linky) ? 67801 seems adding another part of the buff, wouldn't be the first time a spell has additionnal sub spells doing all the real work.
  10. I checked the bleeding spell who don't have the mechanic bleed flag in the spells descriptions : they have it, through their bleed debuff as a secondary effect. In the end, MECHANIC_BLEED is to be used for all of them, and the aura isn't known by the client.
  11. Which one, AURA_STATE_MECHANIC_BLEED ? Well, any physical bleed should add this state, and they all have differents icons. But after seeing the comments on Hunger for Blood (link) requiring the same mechanics, maybe mechanic_bleed isn't required : one of the comment at the end list all bleeds allowing the talent to work, and some of them do not have the mechanic bleed information. But all of them are periodic damage, physical type.
  12. Maybe there's a way, your idea sounds on the right track. Using a counter would get more efficient if such glyphs would be more frequents, anyway : After looking in the code, it seems the aura apply time is set only when the aura is applied, and aura duration has the real duration value (ex for rupture : 3 cp then duration = 12 s, if 8 cp, then it's 16 s). Assuming aura apply time isn't updated when the aura remaning time is updated (doesn't seem, but I may have overlook it) here's the essai : note : not usable as is, C++ is still new for me +// Extend remaining Aura duration + if((targetFlags1 || targetFlags2) && unitTarget) + { + Unit::AuraMap const& auras = unitTarget->GetAuras(); + for(Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) + { + // Only extend expected Auras (SpellFamily is checked through CasterGUID) + if(targetFlags1 && !(itr->second->GetSpellProto()->SpellFamilyFlags & targetFlags1)) + continue; + + if(targetFlags2 && !(itr->second->GetSpellProto()->SpellFamilyFlags2 & targetFlags2)) + continue; + + // Aura must be owned by Caster + if(itr->second->GetCaster()->GetGUID() != m_caster->GetGUID()) + continue; + + // Use fixed amount [3], if one of the corresponding Spells is cast directly.. (read: would cause crash otherwise) + int extendAmount = m_triggeredByAuraSpell ? m_triggeredByAuraSpell->EffectBasePoints[0] * IN_MILISECONDS : 3 * IN_MILISECONDS ; + + // check the time difference between the current remaning duration and the remaning duration at cast before any extend + time_t AuraRemaningTimeInitial = time(NULL) - itr->second=>GetAuraApplyTime() + int32 AuraRemaningTimeDiff = itr->second=>GetAuraDuration() - int32 AuraRemaningTimeInitial + + // now, if the real remaning time difference is greater than the extendAmount, then the aura has already been changed at least once. + if ( ( AuraRemaningTimeDiff > extendAmount ) && ( (AuraRemaningTimeDiff / extendAmount) > 3 ) ) + continue; // 3 extends maximum are allowed + + itr->second->SetAuraDuration(itr->second->GetAuraDuration() + addtime); + itr->second->SendAuraUpdate(false); + } + }
  13. What happens to scripted spells like those used by the glyphs, when one is casted multiples times to the same target ? I don't know, just asking. As they don't seem to be auras, so if they dissappear immediatly, it's not doable without a counter somewhere. If they are handled like cumulatives auras, in this case, EffectScriptEffect should fire only when one is applied. In this function, apply just one extend only if the total number of aura is less or equal to 3. Each extend is applied with successives EffectScriptEffect calls, so only when each aura is applied. Just an idea
  14. I'm still wondering about where the enrage +dmg% bonus remove should be placed. It's an aura with infinite duration, and clears out when enrage does (as of shapeshifting or when enrage expires). Problem is, the current limit for attached boost is 3 and bear's enrage is already full, so it can't be handled automatically, it must explicitly declared
  15. Roudhouse kick with a fix I made some cleaning, but the original code was working fine. Here's an updated version, currently working. Repository : 8734 sql part : delete from spell_proc_event where entry in (48492, 48494, 48495); insert into spell_proc_event () VALUES (48492, 0, 7, 524288, 0, 2048, 16384, 0, 0, 0, 0), (48494, 0, 7, 524288, 0, 2048, 16384, 0, 0, 0, 0), (48495, 0, 7, 524288, 0, 2048, 16384, 0, 0, 0, 0); code patch : diff --git "a/8734\\\\mangos\\\\src\\\\game\\\\unit.cpp" "b/8734_mod\\\\mangos\\\\src\\\\game\\\\unit.cpp" index a282c96..6ef5f4e 100644 --- "a/8734\\\\mangos\\\\src\\\\game\\\\unit.cpp" +++ "b/8734_mod\\\\mangos\\\\src\\\\game\\\\unit.cpp" @@ -5571,6 +5571,34 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 32747; break; } + // King of the Jungle (Bear and Cat) + case 48492: // Rank 1 + case 48494: // Rank 2 + case 48495: // Rank 3 + { + if (!procSpell) + return false; + + // Enrage (bear) - single rank - the aura for the bear form from the 2 existing kotj auras has a miscValue == 126 + if (procSpell->Id == 5229 && triggeredByAura->GetMiscValue() == 126) + { + // note : given the infinite duration and the enrage spell already having 3 modifiers, the remove is done in spellAuras/_RemoveAura + basepoints0 = triggerAmount; + triggered_spell_id = 51185; + target = this; + break; + } + + // Tiger Fury (cat) - all ranks - the aura for the cat form from the 2 existing kotj auras has a miscValue != 126 + if (procSpell->SpellFamilyFlags2 & 0x00000800 && triggeredByAura->GetMiscValue() != 126) + { + basepoints0 = triggerAmount; + triggered_spell_id = 51178; + target = this; + break; + } + break; + } } // Eclipse if (dummySpell->SpellIconID == 2856) diff --git "a/8734\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" "b/8734_mod\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" index 582946a..7509e80 100644 --- "a/8734\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" +++ "b/8734_mod\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" @@ -1089,6 +1089,10 @@ bool Aura::_RemoveAura() // except same aura replace case if(m_removeMode!=AURA_REMOVE_BY_STACK) CleanupTriggeredSpells(); + + // King of the Jungle talent - triggered but not attached to enrage bear spell (5229). Need a 4th trigger slot to be cleared properly. + if (m_spellProto->Id == 5229 ) + m_target->RemoveAurasDueToSpell(51185); Unit* caster = GetCaster(); I'm not really happy with the explicit RemoveAurasDueToSpell(51185), but I didn't find a working and clean way to attach the damage buff to the enrage aura
  16. There aren't many flight spells. Anyway, edited to reflect this.
  17. What bug does the patch fix? What features does the patch add? previously, Swift Flight Form was using the aura handler 208, it has been changed to 206. The patch fix the lack of support for the aura handler 206. For which repository revision was the patch created? 8734 - 0.15 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. none that I'm aware of Who has been writing this patch? Please include either forum user names or email addresses. myself diff --git "a/8734\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" "b/8734_mod\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" index 582946a..7850884 100644 --- "a/8734\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" +++ "b/8734_mod\\\\mangos\\\\src\\\\game\\\\SpellAuras.cpp" @@ -256,7 +256,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNoImmediateEffect, //203 SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE implemented in Unit::CalculateMeleeDamage and Unit::SpellCriticalDamageBonus &Aura::HandleNoImmediateEffect, //204 SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE implemented in Unit::CalculateMeleeDamage and Unit::SpellCriticalDamageBonus &Aura::HandleNoImmediateEffect, //205 SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_DAMAGE implemented in Unit::SpellCriticalDamageBonus - &Aura::HandleNULL, //206 SPELL_AURA_MOD_SPEED_MOUNTED + &Aura::HandleAuraModIncreaseFlightSpeed, //206 SPELL_AURA_MOD_SPEED_MOUNTED &Aura::HandleAuraModIncreaseFlightSpeed, //207 SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED &Aura::HandleAuraModIncreaseFlightSpeed, //208 SPELL_AURA_MOD_SPEED_FLIGHT, used only in spell: Flight Form (Passive) &Aura::HandleAuraModIncreaseFlightSpeed, //209 SPELL_AURA_MOD_FLIGHT_SPEED_ALWAYS
  18. Tinkered on this for a little while, ended with this after some research (8584 version) diff --git "a\\src\\\\game\\\\Player.cpp" "b\\\\src\\\\game\\\\Player.cpp" index bae8ce3..6b52469 100644 --- "a\\\\src\\\\game\\\\Player.cpp" +++ "b\\\\src\\\\game\\\\Player.cpp" @@ -5878,11 +5878,39 @@ void Player::RewardReputation(Unit *pVictim, float rate) if(!Rep) return; + uint32 Repfaction1 = Rep->repfaction1; + uint32 Repfaction2 = Rep->repfaction2; + uint32 tabardFactionID = 0; + + // Championning tabard reputation system + // aura 57818 is a hidden aura common to northrend tabards allowing championning. + if(HasAura(57818)) + { + InstanceTemplate const* mInstance = objmgr.GetInstanceTemplate(pVictim->GetMapId()); + MapEntry const* StoredMap = sMapStore.LookupEntry(pVictim->GetMapId()); + + // only for expansion 2 map (wotlk), and : heroic mode or a min level >= lv75 + // entering a lv80 designed instance require a min level>=75. note : min level != suggested level + if (StoredMap->Expansion() == 2 && ( mInstance->levelMin >= 75 || pVictim->GetMap()->IsHeroic() ) ) + { + Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_TABARD ); + if(pItem) + { + tabardFactionID = pItem->GetProto()->RequiredReputationFaction; + if (tabardFactionID) + { + Repfaction1 = tabardFactionID; + Repfaction2 = tabardFactionID; + } + } + } + } + if(Rep->repfaction1 && (!Rep->team_dependent || GetTeam()==ALLIANCE)) { - int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue1, Rep->repfaction1, false); + int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue1, Repfaction1, false); donerep1 = int32(donerep1*rate); - FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(Rep->repfaction1); + FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(Repfaction1); uint32 current_reputation_rank1 = GetReputationMgr().GetRank(factionEntry1); if (factionEntry1 && current_reputation_rank1 <= Rep->reputation_max_cap1) GetReputationMgr().ModifyReputation(factionEntry1, donerep1); @@ -5898,9 +5926,9 @@ void Player::RewardReputation(Unit *pVictim, float rate) if(Rep->repfaction2 && (!Rep->team_dependent || GetTeam()==HORDE)) { - int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue2, Rep->repfaction2, false); + int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue2, Repfaction2, false); donerep2 = int32(donerep2*rate); - FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(Rep->repfaction2); + FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(Repfaction2); uint32 current_reputation_rank2 = GetReputationMgr().GetRank(factionEntry2); if (factionEntry2 && current_reputation_rank2 <= Rep->reputation_max_cap2) GetReputationMgr().ModifyReputation(factionEntry2, donerep2); It allows setting any reputation for each dungeon (as example, violet hold give kirin tor reputation), and works with normal dungeons designed for lv80 as they require a lv 75 minimum level to enter. Which is different than the suggested minimum level for the instance, usually at min level+2 Thanks to eNeRGy and kohl for their work, helped me a lot understanding what was doable with mangos
×
×
  • 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