Jump to content

breakwater

Members
  • Posts

    166
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by breakwater

  1. You're solutions is better then mine, maybe you can remove the typo case 42005: // Bloodboil TODO: need to be 5 targets(players) furthest away from caster
  2. Hi all, Some spells effects the furthest away target from caster. An Example Bloodboil (Spell from Bloodboil ) Therefor I have write a new Sortstructur and implement the Spell Bloodboil right. I know that the structure TargetDistanceOrderFarAway looks equal to TargetDistanceOrder, but it has one little difference (behind the return is a "!"). I think a new TargetDistanceOrder structure is better then this way without this structure: only partial( no REAL Code) FillAreaTargets(temptargetUnitMap ....) for (temptargetUnitMap begin(); ... end; itr ++) targetUnitMap.push_front(*itr) targetUnitMap.resize(5) Maybe we can use this new TargetDistanceOrderFarAway for other spells. At the moment I don't know other spells. if the mangos team take this into master, maybe we can rename the "old" TargetDistanceOrder to TargetDistanceOrderNear (I think thats more readable) or something like this. OK and now the Code diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 30ba5c5..29b4fbe 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1756,6 +1756,19 @@ struct TargetDistanceOrder : public std::binary_function<const Unit, const Unit, } }; +// Helper for targets furthest away to the spell target +// The spell target is always first unless there is a target at _completely_ the same position (unbelievable case) +struct TargetDistanceOrderFarAway : public std::binary_function<const Unit, const Unit, bool> +{ + const Unit* MainTarget; + TargetDistanceOrderFarAway(const Unit* Target) : MainTarget(Target) {}; + // functor for operator "<" + bool operator()(const Unit* _Left, const Unit* _Right) const + { + return !MainTarget->GetDistanceOrder(_Left, _Right); + } +}; + void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& targetUnitMap) { float radius; @@ -1845,7 +1858,6 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& unMaxTargets = 4; break; case 30843: // Enfeeble TODO: exclude top threat target from target selection - case 42005: // Bloodboil TODO: need to be 5 targets(players) furthest away from caster case 55665: // Life Drain (h) case 58917: // Consume Minions case 64604: // Nature Bomb Freya @@ -2189,7 +2201,17 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& else { FillAreaTargets(targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE); - if (m_spellInfo->Id == 62240 || m_spellInfo->Id == 62920) + if (m_spellInfo->Id == 42005) // Bloodboil + { + if(!targetUnitMap.empty()) + { + // sort the targets, that the furthest away target is at first position + targetUnitMap.sort(TargetDistanceOrderFarAway(m_caster)); + // manually cuting, because the spell hits only the 5 furthest away targets + targetUnitMap.resize(5); + } + } + else if (m_spellInfo->Id == 62240 || m_spellInfo->Id == 62920) // Solar Flare { if (SpellAuraHolder *holder = m_caster->GetSpellAuraHolder(62239)) unMaxTargets = holder->GetStackAmount();
  3. I think that the ignore is right, because the spell tooltip say something like this. "Prevents mana regeneration from nearly all natural sources." In my opinion the potion drinking is allowed, only the effect will be ignore. The Tooltip doesn't say "Prevent takes potions" The two auras make you immun to all mana restore thinks: SpellEffects and Aura State. problem are spells, which should have a function which this aura, like 63337 (or some abilities from pala, hunter, shaman) the tested version looks good
  4. Hi, A double calculation from function "FillAreaTargets" I think this codelines are useless spell.cpp Line 2389++ case TARGET_CURRENT_ENEMY_COORDINATES: { Unit* currentTarget = m_targets.getUnitTarget(); if(currentTarget) { targetUnitMap.push_back(currentTarget); m_targets.setDestination(currentTarget->GetPositionX(), currentTarget->GetPositionY(), currentTarget->GetPositionZ()); - if(m_spellInfo->EffectImplicitTargetB[effIndex] == TARGET_ALL_ENEMY_IN_AREA_INSTANT) - FillAreaTargets(targetUnitMap, radius, PUSH_TARGET_CENTER, SPELL_TARGETS_AOE_DAMAGE); } break; } because in spell.cpp Line 636 + 637 settargetmap start with target 53 (TARGET_CURRENT_ENEMY_COORDINATES) and 16 (TARGET_ALL_ENEMY_IN_AREA_INSTANT) remember first function with target 53 (TARGET_CURRENT_ENEMY_COORDINATES) this function make the current target to Destination (look in the code above) the second function with target 16 (TARGET_ALL_ENEMY_IN_AREA_INSTANT) looks so case TARGET_ALL_ENEMY_IN_AREA_INSTANT: { // targets the ground, not the units in the area switch(m_spellInfo->Effect[effIndex]) { case SPELL_EFFECT_PERSISTENT_AREA_AURA: break; case SPELL_EFFECT_SUMMON: targetUnitMap.push_back(m_caster); break; default: FillAreaTargets(targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE); break; } break; } this function fill targetUnitMap with all targets around destination, remember destination is set to target destination. Therefor I think this function is useless I hope you unterstand me "crazy" way of logical. I have test some spells with this target Combination and in my opinion it's still works What is your opinion? I found the problem, when i start fixing the spell 63278 and the remove of target
  5. Ok Vladimir, I have write an apply and unapply(!apply), and the trigger spell write in SpellAuraHolder::HandleSpellSpecificBoosts The Code part diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 256ba23..bd9d560 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1438,7 +1438,7 @@ void Player::Update( uint32 update_diff, uint32 p_time ) if (isAlive()) { // if no longer casting, set regen power as soon as it is up. - if (!IsUnderLastManaUseEffect()) + if (!IsUnderLastManaUseEffect() && !HasAuraType(SPELL_AURA_STOP_NATURAL_MANA_REGEN)) SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER); if (!m_regenTimer) @@ -2178,6 +2178,8 @@ void Player::Regenerate(Powers power, uint32 diff) { case POWER_MANA: { + if (HasAuraType(SPELL_AURA_STOP_NATURAL_MANA_REGEN)) + break; bool recentCast = IsUnderLastManaUseEffect(); float ManaIncreaseRate = sWorld.getConfig(CONFIG_FLOAT_RATE_POWER_MANA); if (recentCast) diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index 5c6b3e5..0aaa715 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -329,7 +329,7 @@ enum AuraType SPELL_AURA_MOD_QUEST_XP_PCT = 291, SPELL_AURA_OPEN_STABLE = 292, SPELL_AURA_ADD_MECHANIC_ABILITIES = 293, - SPELL_AURA_294 = 294, + SPELL_AURA_STOP_NATURAL_MANA_REGEN = 294, SPELL_AURA_295 = 295, SPELL_AURA_296 = 296, SPELL_AURA_297 = 297, diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 99048e4..29a63b2 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -345,7 +345,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_QUEST_XP_PCT implemented in Player::GiveXP &Aura::HandleAuraOpenStable, //292 call stabled pet &Aura::HandleAuraAddMechanicAbilities, //293 SPELL_AURA_ADD_MECHANIC_ABILITIES replaces target's action bars with a predefined spellset - &Aura::HandleNULL, //294 2 spells, possible prevent mana regen + &Aura::HandleAuraStopNaturalManaRegen, //294 No natural mana regen implemented in Player:Regenerate &Aura::HandleUnused, //295 unused (3.2.2a) &Aura::HandleAuraSetVehicle, //296 SPELL_AURA_SET_VEHICLE_ID sets vehicle on target &Aura::HandleNULL, //297 1 spell (counter spell school?) @@ -9707,6 +9707,11 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply) caster->RemoveAurasDueToSpell(34027); return; } + case 62692: // Aura of Despair + { + spellId1 = 64848; + break; + } case 70867: // Soul of Blood Qween case 71473: case 71532: @@ -10778,3 +10783,19 @@ void Aura::HandleAuraFactionChange(bool apply, bool real) target->setFaction(newFaction); } + +void Aura::HandleAuraStopNaturalManaRegen(bool apply, bool real) +{ + if (!real) + return; + + Unit* target = GetTarget(); + + if (!target) + return; + + if (apply) + target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER); + else + target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER); +} diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 9fd9461..84545ed 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -374,6 +374,7 @@ class MANGOS_DLL_SPEC Aura void HandleAuraAddMechanicAbilities(bool apply, bool Real); void HandleAuraSetVehicle(bool apply, bool Real); void HandleAuraFactionChange(bool apply, bool real); + void HandleAuraStopNaturalManaRegen(bool apply, bool real); virtual ~Aura();
  6. i don't think so, because the two spells (Spell 62692 with triggerspell 64848) handel all the immun effects sameself. So I need no explicit implementation in Unit::IsImmuneToSpell. Maybe an exclusion for the energize spell 63337in bossfight. Of course we can use the handling for spell aura 294 for other spells, maybe in Cata. Therefor I have write this handling.
  7. * What bug does the patch fix? What features does the patch add? Implement the Aura 294 and the unique spell Spell 62692 with triggerspell 64848 * For which repository revision was the patch created? 11469 * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. i don't know * Who has been writing this patch? Please include either forum user names or email addresses. me i writed no codeline target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER); in Aurahandling 294, when aura is remove, because the player update function set this flag in player::update diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 256ba23..bd9d560 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1438,7 +1438,7 @@ void Player::Update( uint32 update_diff, uint32 p_time ) if (isAlive()) { // if no longer casting, set regen power as soon as it is up. - if (!IsUnderLastManaUseEffect()) + if (!IsUnderLastManaUseEffect() && !HasAuraType(SPELL_AURA_STOP_NATURAL_MANA_REGEN)) SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER); if (!m_regenTimer) @@ -2178,6 +2178,8 @@ void Player::Regenerate(Powers power, uint32 diff) { case POWER_MANA: { + if (HasAuraType(SPELL_AURA_STOP_NATURAL_MANA_REGEN)) + break; bool recentCast = IsUnderLastManaUseEffect(); float ManaIncreaseRate = sWorld.getConfig(CONFIG_FLOAT_RATE_POWER_MANA); if (recentCast) diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index 5c6b3e5..0aaa715 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -329,7 +329,7 @@ enum AuraType SPELL_AURA_MOD_QUEST_XP_PCT = 291, SPELL_AURA_OPEN_STABLE = 292, SPELL_AURA_ADD_MECHANIC_ABILITIES = 293, - SPELL_AURA_294 = 294, + SPELL_AURA_STOP_NATURAL_MANA_REGEN = 294, SPELL_AURA_295 = 295, SPELL_AURA_296 = 296, SPELL_AURA_297 = 297, diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 55cad1c..3adc8da 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -345,7 +345,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_QUEST_XP_PCT implemented in Player::GiveXP &Aura::HandleAuraOpenStable, //292 call stabled pet &Aura::HandleAuraAddMechanicAbilities, //293 SPELL_AURA_ADD_MECHANIC_ABILITIES replaces target's action bars with a predefined spellset - &Aura::HandleNULL, //294 2 spells, possible prevent mana regen + &Aura::HandleAuraStopNaturalManaRegen, //294 No natural mana regen implemented in Player:Regenerate &Aura::HandleUnused, //295 unused (3.2.2a) &Aura::HandleAuraSetVehicle, //296 SPELL_AURA_SET_VEHICLE_ID sets vehicle on target &Aura::HandleNULL, //297 1 spell (counter spell school?) @@ -10775,3 +10775,34 @@ void Aura::HandleAuraFactionChange(bool apply, bool real) target->setFaction(newFaction); } + +void Aura::HandleAuraStopNaturalManaRegen(bool apply, bool real) +{ + if (!real) + return; + + Unit* target = GetTarget(); + + if (!target) + return; + + Unit* caster = GetCaster(); + + if (!caster) + return; + + switch (GetId()) + { + case 62692: // Aura of Despair + if (apply) + { + target->CastSpell(target, 64848 , true, 0, 0, caster->GetObjectGuid()); + } + else + { + target->RemoveAurasDueToSpell(64848); + } + break; + } + target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER); +} diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 9fd9461..84545ed 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -374,6 +374,7 @@ class MANGOS_DLL_SPEC Aura void HandleAuraAddMechanicAbilities(bool apply, bool Real); void HandleAuraSetVehicle(bool apply, bool Real); void HandleAuraFactionChange(bool apply, bool real); + void HandleAuraStopNaturalManaRegen(bool apply, bool real); virtual ~Aura();
  8. It is better when lurker below has the aura 37429 or 42581 which trigger the spout spell 37433 or 42584 every 200ms the spell attack all targets in ~30°. You must also apply the Core addition for Knockback immunity while in water. Which this you doesn't need your uggly scriptpart. I hope i could help you. Sry for double post.
  9. if it is general, we can add a CodeLine in Spell::EffectKnockBack like this one diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index da1148d..a027d09 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -9645,6 +9645,9 @@ void Spell::EffectKnockBack(SpellEffectIndex eff_idx) if(!unitTarget) return; + if (unitTarget->IsInWater()) + return; + // Can't knockback rooted target if (unitTarget->hasUnitState(UNIT_STAT_ROOT)) return;
  10. Hi all, i want fix the spell Aura 294. Only one Spell 62692 has this Aura. This is a important spell from General Vezax (Ulduar). I have a solution for no mana reg on coreside, but on clientside the player gets mana from manareg. How I can "say" the client that the player has no manareg? Relatet Spell from 62692 is an extra effect triggered with spell 64848 my code part till now: diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 256ba23..cff540b 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -2157,8 +2157,11 @@ void Player::RegenerateAll(uint32 diff) } Regenerate(POWER_ENERGY, diff); - - Regenerate(POWER_MANA, diff); + + if (!HasAuraType(SPELL_AURA_STOP_NATURAL_MANA_REGEN)) + { + Regenerate(POWER_MANA, diff); + } if (getClass() == CLASS_DEATH_KNIGHT) Regenerate(POWER_RUNE, diff); diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index 5c6b3e5..0aaa715 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -329,7 +329,7 @@ enum AuraType SPELL_AURA_MOD_QUEST_XP_PCT = 291, SPELL_AURA_OPEN_STABLE = 292, SPELL_AURA_ADD_MECHANIC_ABILITIES = 293, - SPELL_AURA_294 = 294, + SPELL_AURA_STOP_NATURAL_MANA_REGEN = 294, SPELL_AURA_295 = 295, SPELL_AURA_296 = 296, SPELL_AURA_297 = 297, diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 55cad1c..ec437f2 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -345,7 +345,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_QUEST_XP_PCT implemented in Player::GiveXP &Aura::HandleAuraOpenStable, //292 call stabled pet &Aura::HandleAuraAddMechanicAbilities, //293 SPELL_AURA_ADD_MECHANIC_ABILITIES replaces target's action bars with a predefined spellset - &Aura::HandleNULL, //294 2 spells, possible prevent mana regen + &Aura::HandleAuraStopNaturalManaRegen, //294 No natural mana regen implemented in Player:Regenerate &Aura::HandleUnused, //295 unused (3.2.2a) &Aura::HandleAuraSetVehicle, //296 SPELL_AURA_SET_VEHICLE_ID sets vehicle on target &Aura::HandleNULL, //297 1 spell (counter spell school?) @@ -10775,3 +10775,33 @@ void Aura::HandleAuraFactionChange(bool apply, bool real) target->setFaction(newFaction); } + +void Aura::HandleAuraStopNaturalManaRegen(bool apply, bool real) +{ + if (!real) + return; + + Unit* target = GetTarget(); + + if (!target) + return; + + Unit* caster = GetCaster(); + + if (!caster) + return; + + switch (GetId()) + { + case 62692: // Aura of Despair + if (apply) + { + target->CastSpell(target, 64848 , true, 0, 0, caster->GetObjectGuid()); + } + else + { + target->RemoveAurasDueToSpell(64848); + } + break; + } +} diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 9fd9461..84545ed 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -374,6 +374,7 @@ class MANGOS_DLL_SPEC Aura void HandleAuraAddMechanicAbilities(bool apply, bool Real); void HandleAuraSetVehicle(bool apply, bool Real); void HandleAuraFactionChange(bool apply, bool real); + void HandleAuraStopNaturalManaRegen(bool apply, bool real); virtual ~Aura();
  11. This spell 37433 has a knockback effect. Can you post the spellid from your SPELL_SPOUT_FAKE?
  12. Hello, i think thats a question for scriptdev2 forum. The Mangos Core have many functions for all gameobject handling. The error is in your script. A good teleport system is in ulduar scripts. The best is, when you take a look in this scripts, maybe you can fix then the ICC teleporter. Pls remind the forum language is english and scripts support is in scriptdev2 forum. In German: hallo, ich denke deine frage wäre im scriptdev2 Forum besser gestellt. Der Core liefert in Bezug auf gameobjects fast alles. Es handelt sich nur noch um dein Script welches anscheinend fehlerhaft ist. Ein funktionierdes teleportersystem gibt es in diversen ulduar scripts. Am besten schaust du dir diese an um die teleporter in ICC funktionsfähig zu machen. Bitte denke daran, das die forumsprache englisch ist. Der deutsche Teil ist nur für dich, da du ja wohl mit englisch Probleme hast.(siehe deine threadbezeichnung) wenn du englisch so gut kannst wie hilft auch am Ende eines post sry, for my english, i know thats bad and sry for the German Part, but I hope that skyangel unterstand my post better.
  13. Can someone merge the git repo with mangos master? Thanks
  14. An other realy Problem is the unapply after the dead of caster. If Loatheb or an other is caster an this creature dies, the aggro reduce or increase is not unapply.
  15. I doesn't think thats a fix for my problem, because the unapply doesn't work. Because Loatheb (caster) is dead -> no unapply
  16. Hi, I have problems with this function and the Spell 29232 . This Spell is casting, if the Spore(Naxxramas-Loatheb) dies. This function check the caster and whether the caster is alive. Why we check the caster in this function? therefore this Spell doesn't work correct, because the caster (Spore) is dead. I hope someone can tell me why we check the caster. Maybe we can delete this code part, because it has no meaning. I have comment out this code part and this spell works very good. I can not check every spell with this aura effect, but i think, this make no problems. This patchfile with diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 4c5f511..fa6bbee 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -4966,10 +4966,10 @@ void Aura::HandleModThreat(bool apply, bool Real) if (!target->isAlive()) return; - Unit* caster = GetCaster(); + /*Unit* caster = GetCaster(); if (!caster || !caster->isAlive()) - return; + return;*/ int level_diff = 0; int multiplier = 0; Sry for my english
  17. I have this part in my code //Blood Corruption, Holy Vengeance, Righteous Vengeance if ((spellInfo_1->SpellIconID == 2292 && spellInfo_2->SpellIconID == 3025) || (spellInfo_2->SpellIconID == 2292 && spellInfo_1->SpellIconID == 3025)) return false; this code must be under(below) // Paladin Seals if (IsSealSpell(spellInfo_1) && IsSealSpell(spellInfo_2)) return true; in Function "bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) const" cpp-File: SpellMgr.cpp Sry that i have no Patchfile I hope this help
  18. Whereform do you know that Cloned is this specific Unit_Flag? Because I search a flag for Aura Id 294 (SPELL_AURA_STOP_MANA_REGEN) Sry for double Post
  19. you only need fix in database with this -- (63156) Decimation DELETE FROM spell_proc_event WHERE entry = 63156; INSERT INTO spell_proc_event VALUES (63156, 0x00, 0x05, 0x00000001, 0x00000001, 0x00000001, 0x000000C0, 0x000000C0, 0x000000C0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0); Source: https://github.com/bwsrv/spell_proc_event/blob/master/014_mangos_spell_proc_event.sql I hope someone add this part into mangos master repo. Now Decimation proc with shadowbolt, Soul Fire and Incinerate. This is not a fix for proc, if life is under 35%
  20. You have of course the fire elementar morph aura. Make .die or .unaura all with target yourself. This should help you
×
×
  • 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