Jump to content

qsa

Members
  • Posts

    289
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by qsa

  1. I don't sure I understand the question. All that change made it so both effect 41 and 42 will be handled using EffectJump() function. The logic behind it is pretty simple, as far as I see there is no difference in the data on those effects and EffectJump() can handle them both without further changes.
  2. It's sort of holiday(s), and I'm stuck home alone Don't worry, it wont last forever Besides, those are like 20 min each, nothing major.
  3. qsa

    [patch] Aura 259

    made a typo in patch : updated now.
  4. What bug does the patch fix? What features does the patch add? Show overheal from healing over time effects in combat log. For which repository revision was the patch created? 8542 Who has been writing this patch? Please include either forum user names or email addresses. Me diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index ff6d791..e7d0ab1 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6502,10 +6502,9 @@ void Aura::PeriodicTick() sLog.outDetail("PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId()); - SpellPeriodicAuraLogInfo pInfo(this, pdamage, 0, 0, 0, 0.0f, isCrit); - m_target->SendPeriodicAuraLog(&pInfo); - int32 gain = m_target->ModifyHealth(pdamage); + SpellPeriodicAuraLogInfo pInfo(this, pdamage, (pdamage - gain), 0, 0, 0.0f, isCrit); + m_target->SendPeriodicAuraLog(&pInfo); // add HoTs to amount healed in bgs if( pCaster->GetTypeId() == TYPEID_PLAYER )
  5. What bug does the patch fix? What features does the patch add? "Implementing" Spell effect 41 - SPELL_EFFECT_JUMP Just use same handler as Spell::EffectJump, // 42 SPELL_EFFECT_JUMP2 Can't see the difference - tested, it works pretty well. id spellname_0 51893 JumpUnittest 52043 JumpChargeUnitTest 52206 Leaping Face Maul 52328 Malleable Ooze 52631 Leaping Face Maul 53625 Heroic Leap 53679 Mograine's Charge 53705 Tirion's Charge 54272 Pounce 54468 Leaping Face Smash 54485 Magnetic Pull Alt 54487 Jump Attack 54507 Heroic Leap 54781 Frenzied Dive 55054 Varian Leap 55263 Harpy Dive 56113 Jump Attack 56729 Frenzied Leap 59008 Throat Rip 59790 Heartstrike 60642 Annihilate 61115 Belly Flop 64374 Savage Pounce 64478 Feral Pounce 64496 Feral Rush 64666 Savage Pounce 64669 Feral Pounce 64674 Feral Rush 64953 Jump Attack For which repository revision was the patch created? 8542 Who has been writing this patch? Please include either forum user names or email addresses. Me diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index be73189..f1e5919 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -98,7 +98,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]= &Spell::EffectDispel, // 38 SPELL_EFFECT_DISPEL &Spell::EffectUnused, // 39 SPELL_EFFECT_LANGUAGE &Spell::EffectDualWield, // 40 SPELL_EFFECT_DUAL_WIELD - &Spell::EffectUnused, // 41 SPELL_EFFECT_JUMP + &Spell::EffectJump, // 41 SPELL_EFFECT_JUMP &Spell::EffectJump, // 42 SPELL_EFFECT_JUMP2 &Spell::EffectTeleUnitsFaceCaster, // 43 SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER &Spell::EffectLearnSkill, // 44 SPELL_EFFECT_SKILL_STEP
  6. What bug does the patch fix? What features does the patch add? Implementing implicit target 36 TARGET_ALL_HOSTILE_UNITS_AROUND_CASTER(36) - 5 spells - "all enemies within .." id spellname_0 7969 Summon Nightmare Ectoplasm 10132 Sand Storms 10251 Biletoad Infection 11504 Walking Bomb Effect 16141 Exploding Cadaver For which repository revision was the patch created? 8542 Who has been writing this patch? Please include either forum user names or email addresses. Me diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index d8ac7fb..43d296d 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1032,6 +1032,7 @@ enum Targets TARGET_ALL_PARTY = 33, TARGET_ALL_PARTY_AROUND_CASTER_2 = 34, // used in Tranquility TARGET_SINGLE_PARTY = 35, + TARGET_ALL_HOSTILE_UNITS_AROUND_CASTER = 36, TARGET_AREAEFFECT_PARTY = 37, TARGET_SCRIPT = 38, TARGET_SELF_FISHING = 39, diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 3137f39..33cf379 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1661,6 +1661,9 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) m_targets.setDestination(caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ()); break; } + case TARGET_ALL_HOSTILE_UNITS_AROUND_CASTER: + FillAreaTargets(TagUnitMap, m_targets.m_destX, m_targets.m_destY, radius, PUSH_SELF_CENTER, SPELL_TARGETS_HOSTILE); + break; case TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER: // special target order if (m_spellInfo->Id==64904) // Hymn of Hope
  7. What bug does the patch fix? What features does the patch add? Implementing aura 281 SPELL_AURA_MOD_HONOR_GAIN id spellname_0 58553 Honorable 58554 Lok-Regar 58555 Great Honor 58556 Greater Honor 58557 Greatest Honor 58558 Lok-Narash! 58559 Lok'tar 58560 Lok'tar ogar! For which repository revision was the patch created? 8542 Who has been writing this patch? Please include either forum user names or email addresses. Me diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 63f6a34..0b94ec5 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -6071,6 +6071,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor) if (uVictim != NULL) { honor *= sWorld.getRate(RATE_HONOR); + honor *= (GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HONOR_GAIN) + 100.0f)/100.0f; if(groupsize > 1) honor /= groupsize; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index ff6d791..4716ebb 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -331,7 +331,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNULL, //278 SPELL_AURA_MOD_DISARM_RANGED disarm ranged weapon &Aura::HandleNULL, //279 visual effects? 58836 and 57507 &Aura::HandleModTargetArmorPct, //280 SPELL_AURA_MOD_TARGET_ARMOR_PCT - &Aura::HandleNULL, //281 SPELL_AURA_MOD_HONOR_GAIN + &Aura::HandleNoImmediateEffect, //281 SPELL_AURA_MOD_HONOR_GAIN implemented in Player::RewardHonor &Aura::HandleAuraIncreaseBaseHealthPercent, //282 SPELL_AURA_INCREASE_BASE_HEALTH_PERCENT &Aura::HandleNoImmediateEffect, //283 SPELL_AURA_MOD_HEALING_RECEIVED implemented in Unit::SpellHealingBonus &Aura::HandleUnused, //284 not used by any spells (3.08a)
  8. What bug does the patch fix? What features does the patch add? Implementing aura 259 - SPELL_AURA_MOD_PERIODIC_HEAL Currently used only in Shadow Embrace spell and ranks. For which repository revision was the patch created? 8542 Who has been writing this patch? Please include either forum user names or email addresses. Me diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index 602a305..0695384 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -301,7 +301,7 @@ enum AuraType SPELL_AURA_NO_REAGENT_USE = 256, SPELL_AURA_MOD_TARGET_RESIST_BY_SPELL_CLASS = 257, SPELL_AURA_258 = 258, - SPELL_AURA_259 = 259, + SPELL_AURA_MOD_PERIODIC_HEAL = 259, SPELL_AURA_SCREEN_EFFECT = 260, SPELL_AURA_PHASE = 261, SPELL_AURA_262 = 262, diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index ff6d791..b3f2d5e 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -309,7 +309,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleNoReagentUseAura, //256 SPELL_AURA_NO_REAGENT_USE Use SpellClassMask for spell select &Aura::HandleNULL, //257 SPELL_AURA_MOD_TARGET_RESIST_BY_SPELL_CLASS Use SpellClassMask for spell select &Aura::HandleNULL, //258 SPELL_AURA_MOD_SPELL_VISUAL - &Aura::HandleNULL, //259 corrupt healing over time spell + &Aura::HandleNoImmediateEffect, //259 SPELL_AURA_MOD_PERIODIC_HEAL implemented in Unit::SpellHealingBonus &Aura::HandleNoImmediateEffect, //260 SPELL_AURA_SCREEN_EFFECT (miscvalue = id in ScreenEffect.dbc) not required any code &Aura::HandlePhase, //261 SPELL_AURA_PHASE undetactable invisibility? implemented in Unit::isVisibleForOrDetect &Aura::HandleNULL, //262 diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 141e8b6..b0038ac 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8871,10 +8871,16 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint // Healing taken percent float minval = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT); + if (damagetype == DOT) + { + float minDotVal = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_PERIODIC_HEAL); + minval = (minDotVal < minval) ? minDotVal : minval; + } if(minval) TakenTotalMod *= (100.0f + minval) / 100.0f; float maxval = pVictim->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HEALING_PCT); + // can SPELL_AURA_MOD_PERIODIC_HEAL be positive? if(maxval) TakenTotalMod *= (100.0f + maxval) / 100.0f;
  9. What bug does the patch fix? What features does the patch add? Implementing aura 252 SPELL_AURA_MOD_HASTE_ALL Beside being used only as negative, I see no difference from aura 193. HandleModCombatSpeedPct() handles it just fine. id spellname_0 49723 Icy Touch 50349 Icy Touch 52372 Icy Touch 52592 Curse of Fatigue 52657 Temporal Vortex 55313 Icy Touch 55331 Icy Touch 58816 Temporal Vortex 59011 Icy Touch 59131 Icy Touch 59368 Curse of Fatigue 60952 Icy Touch 63118 Frost Bite 63563 Frost Bite For which repository revision was the patch created? 8542 Who has been writing this patch? Please include either forum user names or email addresses. Me diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index 602a305..4ee6646 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -294,7 +294,7 @@ enum AuraType SPELL_AURA_CONVERT_RUNE = 249, SPELL_AURA_MOD_INCREASE_HEALTH_2 = 250, SPELL_AURA_MOD_ENEMY_DODGE = 251, - SPELL_AURA_252 = 252, + SPELL_AURA_MOD_HASTE_ALL = 252, SPELL_AURA_MOD_BLOCK_CRIT_CHANCE = 253, SPELL_AURA_MOD_DISARM_SHIELD = 254, SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT = 255, diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index ff6d791..e73ccc4 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -302,7 +302,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleAuraConvertRune, //249 SPELL_AURA_CONVERT_RUNE &Aura::HandleAuraModIncreaseHealth, //250 SPELL_AURA_MOD_INCREASE_HEALTH_2 &Aura::HandleNULL, //251 SPELL_AURA_MOD_ENEMY_DODGE - &Aura::HandleNULL, //252 haste all? + &Aura::HandleModCombatSpeedPct, //252 SPELL_AURA_MOD_HASTE_ALL - used only in negative spells at the moment &Aura::HandleNULL, //253 SPELL_AURA_MOD_BLOCK_CRIT_CHANCE &Aura::HandleNULL, //254 SPELL_AURA_MOD_DISARM_SHIELD disarm Shield &Aura::HandleNoImmediateEffect, //255 SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT implemented in Unit::SpellDamageBonus
  10. What bug does the patch fix? What features does the patch add? Implementing implicit targets 64,66,67 TARGET_INFRONT_OF_VICTIM(64),TARGET_RIGHT_FROM_VICTIM(66),TARGET_LEFT_FROM_VICTIM(67) 15 spells overall id spellname_0 36577 Warp Storm 36602 Summon Thorny Growth 36603 Summon Thorny Growth 36847 Mirror Image 40944 Mirror Image 43424 Exploding Rune 43425 Exploding Rune 43554 Summon Ivy Growth 43555 Summon Ivy Growth 45639 Sidestep 47095 Summon Huntsman 47514 Summon Mole Machine 49028 Dancing Rune Weapon 54026 Place Seaforium Charge 56541 Jokkum Summon Note: CONTACT_DISTANCE is used for behind case and not the actual range since it is used in shadowstep and alike, porting you just little bit out of melee hit range. For which repository revision was the patch created? 8542 Who has been writing this patch? Please include either forum user names or email addresses. Me diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index d8ac7fb..f341a7d 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1052,7 +1052,10 @@ enum Targets TARGET_NARROW_FRONTAL_CONE = 60, TARGET_AREAEFFECT_PARTY_AND_CLASS = 61, TARGET_DUELVSPLAYER_COORDINATES = 63, + TARGET_INFRONT_OF_VICTIM = 64, TARGET_BEHIND_VICTIM = 65, // used in teleport behind spells, caster/target dependent from spell effect + TARGET_RIGHT_FROM_VICTIM = 66, + TARGET_LEFT_FROM_VICTIM = 67, TARGET_RANDOM_NEARBY_LOC = 72, // used in teleport onto nearby locations TARGET_RANDOM_CIRCUMFERENCE_POINT = 73, TARGET_DYNAMIC_OBJECT_COORDINATES = 76, diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 3137f39..4508027 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1992,7 +1992,10 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) sLog.outError( "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id ); break; } + case TARGET_INFRONT_OF_VICTIM: case TARGET_BEHIND_VICTIM: + case TARGET_RIGHT_FROM_VICTIM: + case TARGET_LEFT_FROM_VICTIM: { Unit *pTarget = NULL; @@ -2007,8 +2010,19 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) if(pTarget) { + float angle = 0.0f; + float dist = (radius && targetMode != TARGET_BEHIND_VICTIM) ? radius : CONTACT_DISTANCE; + + switch(targetMode) + { + case TARGET_INFRONT_OF_VICTIM: break; + case TARGET_BEHIND_VICTIM: angle = M_PI; break; + case TARGET_RIGHT_FROM_VICTIM: angle = -M_PI/2; break; + case TARGET_LEFT_FROM_VICTIM: angle = M_PI/2; break; + } + float _target_x, _target_y, _target_z; - pTarget->GetClosePoint(_target_x, _target_y, _target_z, m_caster->GetObjectSize(), CONTACT_DISTANCE, M_PI); + pTarget->GetClosePoint(_target_x, _target_y, _target_z, pTarget->GetObjectSize(), dist, angle); if(pTarget->IsWithinLOS(_target_x, _target_y, _target_z)) { TagUnitMap.push_back(m_caster);
  11. What bug does the patch fix? What features does the patch add? Implementing implicit target 54 TARGET_LARGE_FRONTAL_CONE(54) - 26 spells Thanks to wiping on Ancient Core Hound (19272) in old MC I actually know its degree id spellname_0 19272 Lava Breath 21333 Lava Breath 24820 Shadow Bolt Whirl 24821 Shadow Bolt Whirl 24822 Shadow Bolt Whirl 24823 Shadow Bolt Whirl 24835 Shadow Bolt Whirl 24836 Shadow Bolt Whirl 24837 Shadow Bolt Whirl 24838 Shadow Bolt Whirl 26102 Sand Blast 27993 Stomp 30815 Backward Lunge 36654 Fel Breath 38813 Fel Breath 38814 Lava Breath 39631 Shadow Bolt Whirl 39632 Shadow Bolt Whirl 39836 Horseshoe Swipe 50785 Energize Cores 54069 Energize Cores 56251 Energize Cores 59372 Energize Cores 61407 Energize Cores 62136 Energize Cores For which repository revision was the patch created? 8542 Who has been writing this patch? Please include either forum user names or email addresses. Me diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index d8ac7fb..ed60f0e 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1047,6 +1047,7 @@ enum Targets TARGET_DYNAMIC_OBJECT_RIGHT_SIDE = 50, TARGET_AREAEFFECT_CUSTOM_2 = 52, TARGET_CURRENT_ENEMY_COORDINATES = 53, // set unit coordinates as dest, only 16 target B imlemented + TARGET_LARGE_FRONTAL_CONE = 54, TARGET_ALL_RAID_AROUND_CASTER = 56, TARGET_SINGLE_FRIEND_2 = 57, TARGET_NARROW_FRONTAL_CONE = 60, diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 3137f39..df4f802 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1749,6 +1749,9 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) FillAreaTargets(TagUnitMap,m_caster->GetPositionX(), m_caster->GetPositionY(),radius,inFront ? PUSH_IN_FRONT : PUSH_IN_BACK,SPELL_TARGETS_AOE_DAMAGE); break; } + case TARGET_LARGE_FRONTAL_CONE: + FillAreaTargets(TagUnitMap,m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_90, SPELL_TARGETS_AOE_DAMAGE); + break; case TARGET_NARROW_FRONTAL_CONE: FillAreaTargets(TagUnitMap,m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_15, SPELL_TARGETS_AOE_DAMAGE); break; diff --git a/src/game/Spell.h b/src/game/Spell.h index b4c42b1..25d34c0 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -83,6 +83,7 @@ enum SpellCastFlags enum SpellNotifyPushType { PUSH_IN_FRONT, + PUSH_IN_FRONT_90, PUSH_IN_FRONT_30, PUSH_IN_FRONT_15, PUSH_IN_BACK, @@ -711,6 +712,10 @@ namespace MaNGOS if(i_spell.GetCaster()->isInFrontInMap((Unit*)(itr->getSource()), i_radius, 2*M_PI/3 )) i_data->push_back(itr->getSource()); break; + case PUSH_IN_FRONT_90: + if(i_spell.GetCaster()->isInFrontInMap((Unit*)(itr->getSource()), i_radius, M_PI/2 )) + i_data->push_back(itr->getSource()); + break; case PUSH_IN_FRONT_30: if(i_spell.GetCaster()->isInFrontInMap((Unit*)(itr->getSource()), i_radius, M_PI/6 )) i_data->push_back(itr->getSource());
  12. What bug does the patch fix? What features does the patch add? Implementing implicit target 40 TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT(40) - used in 192 spells - quest related mostly. Always used with spell effect Activate Object (86) or Dummy (3) If RequiresSpellFocus is set, it is our target. Else we need to use spell_script_target table. id spellname_0 7728 Summon Voidwalker 7729 Summon Succubus 8202 Sapta Sight 8674 Summon Succubus 8712 Summon Felhunter 8898 Sapta Sight 8899 Sapta Sight 8900 Sapta Sight 9221 Summon Voidwalker 9222 Summon Voidwalker 9223 Summon Succubus 9224 Summon Succubus 9735 Sapta Sight 11195 Blow Zul'Farrak Door 11440 Quest - Blow Pirate Ship 11757 Digging for Cobalt 11792 Opening Cage 12512 Kalaran Conjures Torch 12564 Summon Treasure Horde Visual 13727 Break Samophlange 15746 Hatch Rookery Egg 15958 Collect Rookery Egg 16054 Flames of the Black Flight 16447 Spawn Challenge to Urok 16556 Disturb Rookery Egg (FAST) 16558 Destroy Spear 16613 Displacing Temporal Rift 17016 Placing Beacon Torch 17671 Mortar Disturb 17675 Lava Trap 1 17676 Lava Trap 3 17677 Lava Trap 4 18655 Mortar Animate 19571 Destroy Ghost Magnet 19873 Destroy Egg 20037 Explode Orb Effect 21014 Anuniaq's Net 21127 Maraudon Portal 21885 Heal Vylestem Vine 21950 Recite Words of Celebras 23208 Exorcise Spirits 23328 Trigger Trap 23360 Trigger Trap2 24731 Fire Cannon 24734 Summon Templar Random 24744 Summon Templar 24756 Summon Templar 24758 Summon Templar 24760 Summon Templar 24763 Summon Duke Random 24765 Summon Duke 24768 Summon Duke 24770 Summon Duke 24772 Summon Duke 24784 Summon Royal Random 24786 Summon Royal 24788 Summon Royal 24789 Summon Royal 24790 Summon Royal 24871 Spore Cloud 24934 Summon RC Tank 24973 Clean Up Stink Bomb 25005 Summon RC Blimp 26063 Ouro Submerge Visual 26286 Small Red Rocket 26291 Small Blue Rocket 26292 Small Green Rocket 26293 Small Purple Rocket 26294 Small White Rocket 26295 Small Yellow Rocket 26304 Blue Firework Cluster 26325 Green Firework Cluster 26326 Purple Firework Cluster 26327 Red Firework Cluster 26328 White Firework Cluster 26329 Yellow Firework Cluster 26333 Large Blue Rocket 26334 Large Green Rocket 26335 Large Purple Rocket 26336 Large Red Rocket 26337 Large White Rocket 26338 Large Yellow Rocket 26373 Lunar Invitation 26488 Large Blue Firework Cluster 26490 Large Green Firework Cluster 26516 Large Purple Firework Cluster 26517 Large Red Firework Cluster 26518 Large White Firework Cluster 26519 Large Yellow Firework Cluster 26521 Lucky Lunar Rocket 27663 Holiday - Valentine, gift given 28278 Open Circle 28373 Communique, Necropolis-to-Proxies 29437 Toss Fuel on Bonfire (Activate object effect) 29534 Traces of Silithyst 29866 Cast Fishing Net 30098 Defile Uther's Tomb 31927 Living Fire 32439 Neutral Flag Taken (Horde) 32440 Neutral Flag Taken (Alliance) 33710 Disturb Infernaling Summoner (Portal Hound) 34516 Spread Hellfire Fire 36546 Boil Bleeding Hollow Blood 36639 Test Cauldron Bubble 38053 Tune Deathforge Infernal 38680 Magic Sucker Device Despawner, Buttress, Device 38729 Rod of Purification 40169 Simon Game START, red 40170 Simon Game START, blue 40171 Simon Game START, green 40172 Simon Game START, yellow 40176 Simon Game pre-game Begin, blue 40177 Simon Game pre-game Begin, green 40178 Simon Game pre-game Begin, red 40179 Simon Game pre-game Begin, yellow 40244 Simon Game - Visual - Button Push, Blue 40245 Simon Game - Visual - Button Push, Green 40246 Simon Game - Visual - Button Push, Red 40247 Simon Game - Visual - Button Push, Yellow 40283 Simon Game END, blue 40284 Simon Game END, green 40285 Simon Game END, red 40286 Simon Game END, yellow 40494 Simon Game, switched ON 40495 Simon Game, switched OFF 40499 Simon Game, switched ON, enable Off switch 40512 Simon Game, switched ON, disable Off switch 40632 Summon Gezzarak the Huntress 40640 Summon Karrog 40642 Summon Darkscreecher Akkarai 40644 Summon Vakkiz the Windrager 40957 Blade's Edge Terrace Demon Boss Summon 1 40959 Blade's Edge Terrace Demon Boss Summon 2 40960 Blade's Edge Terrace Demon Boss Summon 3 40961 Blade's Edge Terrace Demon Boss Summon 4 41004 Summon Terokk 41110 Simon Game pre-game Begin, yellow Large 41111 Simon Game pre-game Begin, red Large 41112 Simon Game pre-game Begin, green Large 41113 Simon Game pre-game Begin, blue Large 42178 Headless Horseman - Invisible Campfire, Remove 42287 Salvage Wreckage 42433 Smolderwing Fire Breath 42768 PattyMacDisturb 42868 Fire Cannon 43080 Quest - Howling Fjord - Guide Our Sights - FX Master 43994 Vrykul Harpoon DEBUG 44422 Scavenge 44498 Rocket Jump 44499 Iron Rune Construct Credit 01 44608 Rocket Jump 45119 Holiday - Valentine - Romantic Picnic Near Basket Check 45222 Zul'Aman Object Visual 45226 Banging the Gong 46085 Place Fake Fur 46201 Smash Mammoth Trap 46592 Summon Ahune Lieutenant 46610 Freeze 46638 Break Ice 46652 Open Brutallus Back Door 46903 Stamp Out Bonfire (Art Kit) 46904 Light Bonfire (Art Kit) 46936 Check Flag Cap 46937 Check Flag Cap 47674 Access Control Console 48347 Bombard the Ballistae: FX Master 48794 Cast Net 49022 trapdooropen 49030 trapdoorclose 50790 Summon Iron Dwarf 50791 Summon Iron Dwarf 50802 Summon Malformed Ooze 50803 Summon Malformed Ooze 50825 Summon Earthen Dwarf 50826 Summon Earthen Dwarf 52247 Target Crystal 52365 Split Teleport (Horde) (Boat 1) 52528 Split Teleport (Horde) (Boat 2) 53020 Horn of Fecundity 53464 Split Teleport (Alliance) (Boat 1) 53465 Split Teleport (Alliance) (Boat 2) 54040 [PH] Dalaran Lamp Lighter 54047 Light Lamp 56386 WMO Damaged Test 60535 Light Lamp 61488 Copy of Access Control Console 61524 Teleport the Stalker 61537 Teleport the Stalker 61699 Swipe Easter Egg 62731 PattyMac ActivateTransport 62943 Wind-Up Train Wrecker 63381 Goblin Chisel For which repository revision was the patch created? 8542 Who has been writing this patch? Please include either forum user names or email addresses. Me diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index d8ac7fb..cf941c0 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1035,6 +1035,7 @@ enum Targets TARGET_AREAEFFECT_PARTY = 37, TARGET_SCRIPT = 38, TARGET_SELF_FISHING = 39, + TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT= 40, TARGET_TOTEM_EARTH = 41, TARGET_TOTEM_WATER = 42, TARGET_TOTEM_AIR = 43, diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 3137f39..e450851 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -488,10 +488,13 @@ void Spell::FillTargetMap() if(m_spellInfo->Effect[i] == 0) continue; - // targets for TARGET_SCRIPT_COORDINATES (A) and TARGET_SCRIPT filled in Spell::CheckCast call + // targets for TARGET_SCRIPT_COORDINATES (A) and TARGET_SCRIPT + // and TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT (A) if no RequiresSpellFocus set + // filled in Spell::CheckCast call if( m_spellInfo->EffectImplicitTargetA[i] == TARGET_SCRIPT_COORDINATES || m_spellInfo->EffectImplicitTargetA[i] == TARGET_SCRIPT || - m_spellInfo->EffectImplicitTargetB[i] == TARGET_SCRIPT && m_spellInfo->EffectImplicitTargetA[i] != TARGET_SELF ) + (m_spellInfo->EffectImplicitTargetA[i] == TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT && !m_spellInfo->RequiresSpellFocus) || + (m_spellInfo->EffectImplicitTargetB[i] == TARGET_SCRIPT && m_spellInfo->EffectImplicitTargetA[i] != TARGET_SELF) ) continue; // TODO: find a way so this is not needed? @@ -1313,6 +1316,31 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) switch(targetMode) { + case TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT: + { + if(m_spellInfo->RequiresSpellFocus) + { + CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); + Cell cell(p); + cell.data.Part.reserved = ALL_DISTRICT; + + GameObject* goTarget = NULL; + MaNGOS::GameObjectFocusCheck go_check(m_caster, m_spellInfo->RequiresSpellFocus); + MaNGOS::GameObjectSearcher<MaNGOS::GameObjectFocusCheck> checker(m_caster, goTarget, go_check); + + TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker); + CellLock<GridReadGuard> cell_lock(cell, p); + Map& map = *m_caster->GetMap(); + cell_lock->Visit(cell_lock, object_checker, map, *m_caster, map.GetVisibilityDistance()); + + if(goTarget) + AddGOTarget(goTarget, effIndex); + } + else if(m_targets.getGOTarget()) + AddGOTarget(m_targets.getGOTarget(), effIndex); + + break; + } case TARGET_RANDOM_NEARBY_LOC: radius *= sqrt(rand_norm()); // Get a random point in circle. Use sqrt(rand) to correct distribution when converting polar to Cartesian coordinates. // no 'break' expected since we use code in case TARGET_RANDOM_CIRCUMFERENCE_POINT!!! @@ -1346,7 +1374,6 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) break; } - case TARGET_TOTEM_EARTH: case TARGET_TOTEM_WATER: case TARGET_TOTEM_AIR: @@ -4104,8 +4131,10 @@ SpellCastResult Spell::CheckCast(bool strict) if( m_spellInfo->EffectImplicitTargetA[j] == TARGET_SCRIPT || m_spellInfo->EffectImplicitTargetB[j] == TARGET_SCRIPT && m_spellInfo->EffectImplicitTargetA[j] != TARGET_SELF || m_spellInfo->EffectImplicitTargetA[j] == TARGET_SCRIPT_COORDINATES || - m_spellInfo->EffectImplicitTargetB[j] == TARGET_SCRIPT_COORDINATES ) + m_spellInfo->EffectImplicitTargetB[j] == TARGET_SCRIPT_COORDINATES || + m_spellInfo->EffectImplicitTargetA[j] == TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT ) { + SpellScriptTargetBounds bounds = spellmgr.GetSpellScriptTargetBounds(m_spellInfo->Id); if(bounds.first==bounds.second) sLog.outErrorDb("Spell (ID: %u) has effect EffectImplicitTargetA/EffectImplicitTargetB = TARGET_SCRIPT or TARGET_SCRIPT_COORDINATES, but does not have record in `spell_script_target`",m_spellInfo->Id); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 7bc2f86..7e7bb7d 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2125,7 +2125,9 @@ void SpellMgr::LoadSpellScriptTarget() if( spellProto->EffectImplicitTargetA[i]==TARGET_SCRIPT || spellProto->EffectImplicitTargetB[i]==TARGET_SCRIPT || spellProto->EffectImplicitTargetA[i]==TARGET_SCRIPT_COORDINATES || - spellProto->EffectImplicitTargetB[i]==TARGET_SCRIPT_COORDINATES ) + spellProto->EffectImplicitTargetB[i]==TARGET_SCRIPT_COORDINATES || + spellProto->EffectImplicitTargetA[i]==TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT || + spellProto->EffectImplicitTargetB[i]==TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT ) { targetfound = true; break; @@ -2133,7 +2135,7 @@ void SpellMgr::LoadSpellScriptTarget() } if(!targetfound) { - sLog.outErrorDb("Table `spell_script_target`: spellId %u listed for TargetEntry %u does not have any implicit target TARGET_SCRIPT(38) or TARGET_SCRIPT_COORDINATES (46).",spellId,targetEntry); + sLog.outErrorDb("Table `spell_script_target`: spellId %u listed for TargetEntry %u does not have any implicit target TARGET_SCRIPT(38) or TARGET_SCRIPT_COORDINATES (46) or TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT (40).",spellId,targetEntry); continue; }
  13. What bug does the patch fix? What features does the patch add? Implementing implicit target 60 TARGET_NARROW_FRONTAL_CONE (60) - 82 spells, some-sort of narrow cone effect (".. cone of water that douses .." , "..enemies in a cone in front of the caster every.." ) tested on : 49867,37459,46236,46158 id spellname_0 7769 Strafe Jotunheim Building 24933 Cannon 25029 Flamethrower 25030 Shoot Rocket 25145 Merithra's Wake 25149 Arygos's Vengeance 25150 Molten Rain 30418 Chess NPC: Get Adjacent Empty Square (DND) 30469 Nether Beam 32227 Karazhan - Chess NPC Action: Melee Attack: Footman 32228 Karazhan - Chess NPC Action: Melee Attack: Grunt 34154 Cannon 34583 Shoot 34646 Activate Kirin'Var Rune 36951 Shoot 37142 Karazhan - Chess NPC Action: Melee Attack: Conjured Water Elemental 37143 Karazhan - Chess NPC Action: Melee Attack: Conjured Water Elemental 37147 Karazhan - Chess NPC Action: Melee Attack: Human Cleric 37149 Karazhan - Chess NPC Action: Melee Attack: Human Conjurer 37150 Karazhan - Chess NPC Action: Melee Attack: King Llane 37220 Karazhan - Chess NPC Action: Melee Attack: Summoned Daemon 37337 Karazhan - Chess NPC Action: Melee Attack: Orc Necrolyte 37339 Karazhan - Chess NPC Action: Melee Attack: Orc Wolf 37345 Karazhan - Chess NPC Action: Melee Attack: Orc Warlock 37348 Karazhan - Chess NPC Action: Melee Attack: Warchief Blackhand 37406 Heroic Blow 37413 Vicious Strike 37453 Smash 37454 Bite 37459 Holy Lance 37461 Shadow Spear 37498 Stomp 37502 Howl 37918 Arcano-pince 37919 Arcano-dismantle 39583 Change Facing, Left 39686 Flamethrower 39692 Cannon 42143 Headless Horseman - Start Fire Target Test 42436 Drink! 42638 Headless Horseman - Conflagrate Target Test 43210 Target Rifle 43954 Retch! 44037 Tackle, find Target 44804 General Trigger 7 Cone 45761 Shoot Gun 45859 Renew 45968 Plane Spot Taken -> Potential Advance Message 45969 Plane Spot Available -> Potential Message 45970 Plane Check for Available 46158 D.E.H.T.A. Igniter 46236 Close Opening Visual 47563 Freezing Cloud 47593 Freezing Cloud 48623 Shoot Gun 48642 Launch Harpoon 49197 Ruby Arrow 49299 Racer Slam, find Target 49728 Fiery Harpoon 49860 BOTM - Belch Brew - Belch Visual 49862 Potent Stench 49867 BOTM - Vomit Brew - Vomit Visual 49870 Slimed! 50348 Flame Fury 50350 Flame Fury 55138 Frost Blast Find Loc (DND) 56570 Rapid-Fire Harpoon 57495 Deafening Roar 57828 Icecrown Airship - H - Attack - Forward Cannon Fire 57962 Icecrown Airship - A - Attack - 01 Target Check 58112 Icecrown Airship - H - Attack - 01 Target Check 61866 [PH] Squirt Gun 62466 Lightning Charge 62882 HAMMER! 62883 BACKHAND! 62888 COUNTER! 62973 Foam Sword Attack 62991 Bonked! 63317 Flame Breath 64021 Flame Breath 64619 Water Spray 65016 Flame Breath Achievement I'm not sure about the exact arc used, but based on the visuals it's about 15deg For which repository revision was the patch created? 8526 Who has been writing this patch? Please include either forum user names or email addresses. Me diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index bf03c45..f0b5b23 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1049,6 +1049,7 @@ enum Targets TARGET_CURRENT_ENEMY_COORDINATES = 53, // set unit coordinates as dest, only 16 target B imlemented TARGET_ALL_RAID_AROUND_CASTER = 56, TARGET_SINGLE_FRIEND_2 = 57, + TARGET_NARROW_FRONTAL_CONE = 60, TARGET_AREAEFFECT_PARTY_AND_CLASS = 61, TARGET_DUELVSPLAYER_COORDINATES = 63, TARGET_BEHIND_VICTIM = 65, // uses in teleport behind spells, caster/target dependent from spell effect diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 78215f9..06fa459 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1743,6 +1743,9 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) FillAreaTargets(TagUnitMap,m_caster->GetPositionX(), m_caster->GetPositionY(),radius,inFront ? PUSH_IN_FRONT : PUSH_IN_BACK,SPELL_TARGETS_AOE_DAMAGE); break; } + case TARGET_NARROW_FRONTAL_CONE: + FillAreaTargets(TagUnitMap,m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_15, SPELL_TARGETS_AOE_DAMAGE); + break; case TARGET_IN_FRONT_OF_CASTER_30: FillAreaTargets(TagUnitMap,m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_30, SPELL_TARGETS_AOE_DAMAGE); break; diff --git a/src/game/Spell.h b/src/game/Spell.h index c197c3e..b4c42b1 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -84,6 +84,7 @@ enum SpellNotifyPushType { PUSH_IN_FRONT, PUSH_IN_FRONT_30, + PUSH_IN_FRONT_15, PUSH_IN_BACK, PUSH_SELF_CENTER, PUSH_DEST_CENTER, @@ -714,6 +715,10 @@ namespace MaNGOS if(i_spell.GetCaster()->isInFrontInMap((Unit*)(itr->getSource()), i_radius, M_PI/6 )) i_data->push_back(itr->getSource()); break; + case PUSH_IN_FRONT_15: + if(i_spell.GetCaster()->isInFrontInMap((Unit*)(itr->getSource()), i_radius, M_PI/12 )) + i_data->push_back(itr->getSource()); + break; case PUSH_IN_BACK: if(i_spell.GetCaster()->isInBackInMap((Unit*)(itr->getSource()), i_radius, 2*M_PI/3 )) i_data->push_back(itr->getSource());
  14. It helps on version switches the most I guess, same as any other "missing data" related error. I mean debugging spells at the moment isn't too nice, alot of things can go wrong. Not that many un-implemented targets left after those additions. 4 - 4 npc spells 11 - 1 spell 29 - 20 spells 36 - 5 spells 40 - 193 spells - focus/specific game object Always used with spell effect Activate Object (86) If RequiresSpellFocus is set, it is our target. Else, it is either selected or, we need to use spell_script_target table. 54 - 26 spells 58 - 5 spells 59 - 5 spells, somesort of cone effect 60 - 82 spells, somesort of cone effect (".. cone of water that douses .." , "..enemies in a cone in front of the caster every.." ) 64 - 5 spells (Dancing Rune Weapon) front left? 66 - 3 spells 67 - 6 summons 68 - 1 spell 69 - 1 spell 70 - 1 spell 74 - 19 spells 75 - 9 spells 88 - 18 spells 91 - 17 spells 92 - 5 spells 94 - 10 spells - vehicle used by caster 95 - 2 spells - target's vehicle 96 - 1 spell 97 - 2 spells - vehicle passenger I'll play with those bit longer, maybe something comes out of it.
  15. It is loaded at startup, but it is assigned when creature created ( or summoned in our case ). Check Creature::AIM_Initialize() : FactorySelector::selectAI() : Script->GetAI(creature) :: well that GetAI is the pointer in your script and you do have the creature right there - a new copy just created. You can use it right now to make your snake trap or whatever ( assuming you're using this change) I have ebon gargoyle working just fine. There is no problem with creatures that can have only one type of ai sctipt ( as far as I know , heh ) If we're speaking technically, I'm more worried about the support needed to allow assigning petAI from scripts. At the moment its dug out using CreatureAICreator which I doubt accessible from the scripts. We have chain of ~10 posts talking about some minor option. Guess it should be moved into topic on its own. I know I should have spliten it to 3-4 different patches Which reminds me : anyone found any other problems?
  16. I made poor choice of words "co-exist" . It doesn't stack. Instead of assigning to i_AI (thou which all calls are made) petAI, it adds ScriptedAI. No petAI calls are made whatsoever. When I said " responsibility should be on script writer" I mean exactly this. When you register your script (inside the script itself - newscript->GetAI = &GetAI_whatever; - inside GetAI_whateve), you can always check if this creature is controlled or not. If it is, and you want your custom script to run, you return it, otherwise, you just return petAI. This way, you specify for every creature how to act in every situation. Both pet and whatever script you make inherited from ScriptedAI anyway. I mean, you can even return custom petAI script inherited from petAI itself. Possibilities here are limitless. Disallowing such freedom in the first place is shame in my opinion. Thats just my idea, If anyone has better, feel free to share. The only other thing i can think of is having another field in DB to have separate scripts for every case - just redundant. I really don't see the problem here. If I'm mistaken and someone can point me whats wrong I'll gladly adapt. If anyone who understands creature ai in general better would participate the "debate", that would be awesome. This is really good you bringing such points - that is the only way we can make better solutions. Thanks in advance.
  17. Actually I just made a little test, adding Gargoyle script to mage's water elemental. Well, it works pretty well to my surprise. They do co-exist. After all, script calls are just hooks. However there may be other problems with the idea. Like the tamed pet case. But I guess the responsibility should be on script writer. I mean, sure I can create situation inside my AI script that will totally ruin something. But at the moment there's no option at all adding complex scripts for guardians or/and pets. In general, those lines are not directly connected to main patch idea, just little auxiliary thing for related development. In any case, we need to find proper solution to this issue. If anyone have better idea, I'll be more than glad to hear it.
  18. While this can be bad place to post it, it is related to the topic. Found another case that fits exactly the same code. TARGET_RANDOM_NEARBY_LOC_1(73) - 170 spells tested on : 43447,62609, 43653, 65347, 54307 Can't see why it is different from TARGET_RANDOM_NEARBY_LOC, it just has much grater ranges. Thanks in advance. id spellname_0 29234 Summon Spore 31903 Doomfire Strike 36723 Phoenix 37099 Lament of the Highborne: Ribbon of Souls 37115 Felcano 37395 Shadow Rain 37398 Shadow Rain 37400 Shadow Rain 37404 Shadow Rain 37410 Shadow Rain 38724 Magic Sucker Device (Success Visual) 38755 Summon Spore Strider 38981 Blink 39113 Blue Smoke Spew 39149 Throw Frosty Bottle 39256 Dustin's Undead Dragon Visual1 39257 Dustin's Undead Dragon Visual2 39280 Hellfire - The Exorcism, Jules threatens 39307 The Exorcism, Flying Skull Despawn 39855 Summon Tear of Azzinoth 40152 ZingTemp 40188 Summon Doom Blossom 40403 Summon Maiev 40693 Cage Trap 40854 Akama Soul Retrieve 40855 Akama Soul Expel 42266 Random Circumference Point Poison 42267 Random Circumference Point Bone 42274 Random Circumference Point Bone 2 42279 Random Circumference Point Poison 42304 ZingTemp2 42412 Throw Chum 42431 Creature - Summon Netherwhelp 42453 Summon Dark Iron Attacker 42522 Brewfest - Throw Brewfest Mug Bounce 42552 Summon Pumpkin Missile 42622 Fire Bomb 42623 Fire Bomb 42624 Fire Bomb 42625 Fire Bomb 42626 Fire Bomb 42627 Fire Bomb 42784 Wrath of the Astromancer 43034 Headless Horseman - Wisp Escape Missile 43053 Vampire Soul Expel 43055 Vampire Soul Retrieve 43081 Random Circumference Point Cannon Part 01 43082 Random Circumference Point Cannon Part 02 43097 Summon All Players 43302 Lightning Totem 43436 Fire Nova Totem 43444 Explosive Trap 43447 Freezing Trap 43449 Snake Trap 43652 Electrical Overload Arc 43653 Electrical Arc 43654 Electrical Arc 43655 Electrical Arc 43656 Electrical Arc 43659 Electrical Arc 44194 Phoenix 44265 Summon Arcane Sphere 44322 Summon Pure Energy 44349 Rush 44854 TrajTest 45392 Summon Demonic Vapor 46969 Ribbon Pole Ground Flower 46992 Random Circumference Point Tree Trunk 46993 Random Circumference Point Tree Leaf 46994 Random Circumference Point Small Tree 47212 Summon Cub 47302 Summon Draknid Spiders 47309 Quest - Jormungar Explosion Summon Object 47387 Summon Iron Dwarf Attacker 47445 Unbarreled 47924 Quest - Jormungar Explosion Summon Object 47925 Quest - Jormungar Explosion Summon Object 48272 Let Them Not Rise!: Summon Rat 48351 Bombard the Ballistae: Ballista Bow 48352 Bombard the Ballistae: Ballista Frame 48353 Bombard the Ballistae: Ballista Missile 48354 Bombard the Ballistae: Ballista Wheel 49103 Summon Fetid Troll Corpse 49104 Summon Hulking Corpse 49105 Summon Risen Shadowcaster 49179 Summon Crystal Handler 49400 Summon Player Skeleton 49671 Summon Shadowfiend 49754 Watched 49950 BOTM - Jungle Brew - Jungle Madness Summon 50071 Summon Pumpkin Soldier Missile 50292 Imperial Eagle Flight Target 50648 Blink 50719 Conjure Snowflake 50770 Magic Pull 50829 Summon Warhorse 50998 Summon Sanguine Spirit 51017 Summon Arcane Beam 51050 Summon Dark Rune Shadowcaster 51051 Summon Iron Golem Custodian 51175 Summon Ley-Whelp 51224 Summon Raptor 51433 Summon Mindless Servant 51475 Summon Air Elemental 51507 Summon Shardling 51780 Summon Dark Rune Protector 52320 Hell Hath a Fury: Random Circumference Point Ice Chunk 52325 Explode Scourgewagon:Roller 52329 Explode Scourgewagon:Frame 52330 Explode Scourgewagon:Grill 52332 Explode Scourgewagon:Wheel 52405 Summon Molten Golem 52451 Summon Ghouls 52478 Summon Ghouls 52516 Burst at the Seams:Bone 52520 Explode Abomination:Meat 52523 Explode Abomination:Bloody Meat 52556 Summon Drostan 52560 Summon Blood of the Old God 52575 Fuel for the Fire:Troll Explosion 52578 Explode Troll:Meat 52580 Explode Troll:Bloody Meat 52611 Summon Skeletons 52612 Summon Skeletons 53336 Animate Bones 53521 Carrion Beetles 54296 Summon Argent Knight (Alliance) 54307 Summon Argent Knight (Horde) 54369 Summon Void Sentry 54455 Random Circumference Point Feather Brown 54456 Random Circumference Point Feather Red 54457 Random Circumference Point Feather Blue 54547 Summon Stormforged Raider 54623 Quest - Mammoth Explosion Summon Object 54627 Quest - Mammoth Explosion Summon Object 54628 Quest - Mammoth Explosion Summon Object 55047 Cold Hearted: Ice Shard Impact 56070 Summon Red Dragon Buddy 56134 Jump From Egg 56789 Summon Harpoon 56892 Drop Horn of Elemental Fury 58939 Summon Darion Morgraine 59086 Arc Weld 59933 Copy of Summon Minions 61055 Summon Bone Spiders 61056 Summon Bone Spiders 61240 Summon Wyrmrest Skytalon 62012 Summon Lonely Turkey 62067 Summon Faithful Mule 62076 Pack Mule 62609 Argent Squire 62642 Random Lightning Visual Arc Up Effect 62685 Summon Wave - 1 Mob 62686 Summon Wave - 3 Mob 62704 Elwynn Lamb 62746 Argent Gruntling 62807 Starlight 62823 Conjure Toasty Fire 62926 Summon Iron Dwarf Guardian 63081 Summon Saronite Vapors 63135 Summon Iron Dwarf Watcher 63385 Blow Apart Stone Block 63708 Summon Void Beast 63798 Summon Iron Vrykul 64133 Constrictor Tentacle 64139 Crusher Tentacle 64143 Corruptor Tentacle 64158 Immortal Guardian 64450 Summon Unleashed Dark Matter 65347 Proximity Mines diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index bf03c45..2fd4216 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1053,6 +1053,7 @@ enum Targets TARGET_DUELVSPLAYER_COORDINATES = 63, TARGET_BEHIND_VICTIM = 65, // uses in teleport behind spells, caster/target dependent from spell effect TARGET_RANDOM_NEARBY_LOC = 72, // uses in teleport onto nearby locations + TARGET_RANDOM_NEARBY_LOC_1 = 73, TARGET_DYNAMIC_OBJECT_COORDINATES = 76, TARGET_SINGLE_ENEMY = 77, TARGET_POINT_AT_NORTH = 78, // 78-85 possible _COORDINATES at radius with pi/4 step around target in unknown order, N? diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 78215f9..4c58b82 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1314,6 +1314,7 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) switch(targetMode) { case TARGET_RANDOM_NEARBY_LOC: + case TARGET_RANDOM_NEARBY_LOC_1: { float dest_x = m_caster->GetPositionX() + irand(-radius, radius); float dest_y = m_caster->GetPositionY() + irand(-radius, radius);
  19. target 86 tested on 37091,46342, 36446,42651 target 72 tested on 38139, 60322 As for you example.. hmm, I pretty sure it isn't working due to RequiresSpellFocus=1450 EDIT: tested -- you miss GO 185309 -- add it and that spell works like a charm. almost forgot - thanks for reviewing and adding. Take care.
  20. What bug does the patch fix? What features does the patch add? Implementing implicit target TARGET_RANDOM_NEARBY_LOC (72), TARGET_RANDOM_NEARBY_DEST(86) used combined in 279 spells. id spellname_0 25301 Angry Turkey 29809 Desecration Arm 30009 Summon Robot 30170 Summon Bone Skeletons 34674 Explosion 36446 Test Nearby Dest Random 36572 Wyatt Test 36572 36845 Summon Shadow Horror 36931 Summon 66% Illusion 36932 Summon 33% Illusion 37091 Rain of Bones 37141 Acid Geyser 38139 Summon Wave D Mob 38939 Inferno 39146 Throw Orange Juice Bottle 39147 Throw Tar Bottle 39148 Throw Blood Bottle 39154 Throw Acid Bottle 39155 Throw Grape Juice Bottle 39161 Drop Totem 39163 [DND]Rescue Wyvern 39166 Feathery Cyclone Burst 39538 ZapTemp 39620 Summon Ogre Ghost 39829 Light of the Naaru 40118 Volcanic Geyser 40234 OCW Auchindoun Summon Adventurer 40235 OCW Auchindoun Summon Portal 40324 Feathery Cyclone Burst 40338 Summon Eagle Add 40629 Acid Geyser 40649 Mortar Shot 40750 Ethereal Ring Cannon, The Bolt Bunny 40784 Summon Stun Trap 40869 Fatal Attraction 41089 Volley 41159 Summon Shadowfiends 41289 Ethereal Ring, Signal Flare 41441 Acid Geyser 41479 Vanish 41485 Deadly Poison 42388 Summon Scarlet Bud 42499 L70ETC Earthquake 42500 L70ETC Lightning Cloud 42501 L70ETC Rain of Fire 42651 Army of the Dead 42706 Cosmetic - Tiny Blue Fireball to Random Loc 42794 Holiday - Brewfest - Random Mug Fling 42827 Result: Split 43134 Hatch Spiderlings 43143 Halazzi Transform 43147 Feathery Cyclone Burst 43486 Summon Amani'shi Warriors 43487 Summon Amani Eagle 43962 Summon Amani'shi Hatcher 44040 Fumble 44387 Dragonflayer Ambush 44821 Ball Bounces off Player 44837 BLB - Port to Team B Side 44841 BLB - Port to Team A Side 44858 Snowball 44993 Capacitor Discharge 45208 Summon Lightning Bunny 45219 Shoot 45223 Shoot 45229 Shoot 45233 Shoot 45253 Summon Sky Lightning Bunny 45311 Volley Visual Pulse 45340 Summon Amani'shi Hatcher 45490 Egg Burst 45494 Army of the Dead 45503 Planting Seaforium Depth Charge 45531 Devouring Creep 45613 Necropolis Beam 45868 Chain Lightning 45891 Sinister Reflection Summon 45971 Ground Rockets 46019 Teleport: Spectral Realm 46020 Teleport: Normal Realm 46037 Summon Berserker 46038 Summon Fury Mage 46039 Summon Fury Mage 46040 Summon Berserker 46071 Summon Void Spawn 46143 Summon Minion Missile, Minion 2 46176 Summon Minion Missile, Higher 46229 Summon Blazing Infernal 46241 Summon Felguard Slayer 46306 Create Doomfire Shard 46342 Drop Crate 46359 Summon Ice Spear Bunny 46363 Beam Attack against Ahune 2 46382 Summon Minion Missile, Minion 3 46396 Ice Bombardment 46585 Raise Dead 46670 Transborea Monster 46827 Big Flame Dancer 46829 Ribbon Pole Firework and Flame Patch 46847 Ribbon Pole Firework 46849 Raelorasz' Flare 47303 Summon Anub'ar Invader 47304 Warsong Battle Standard 47320 Toss Boulder 2 47482 Leap 47919 Call Xink's Shredder 48715 Summon Smoldering Skeleton 48718 Summon Smoldering Construct 48731 Quarterflash's Homing Bot 48741 Planting Wintergarde Mine Bomb 49068 Summon Frigid Ghoul 49100 Army of the Dead 49304 Summon Frigid Necromancer 49327 Racer Slam, death scene: debris 49329 Summon Frigid Ghoul Attacker 49342 Frost Breath 49353 Racer Slam, death scene: car flip Get Dest 49743 Summon Ruby Flowers 49744 Summon Ruby Flowers 49745 Summon Ruby Flowers 49750 Honey Touched 49798 BOTM - Flowery Brew - Summon Flowers 49809 Minions of Thel'zan 49815 Mine 49900 Summon Infinite Assailant 49901 Summon Infinite Destroyer 49902 Summon Infinite Chrono-Magus 49905 Summon Infinite Timerender 50095 [DND] BOTM - Honey Brew - Rooted 50180 Summon Pink Elekk Guardian 50298 Boulder Miss 50560 Summon Conquest War Rider 50790 Summon Iron Dwarf 50791 Summon Iron Dwarf 50793 Summon Iron Trogg 50794 Summon Iron Dwarf 50802 Summon Malformed Ooze 50803 Summon Malformed Ooze 50825 Summon Earthen Dwarf 50826 Summon Earthen Dwarf 50934 L70ETC Earthquake SMALLER 51036 Summon Venture Co. Air Patrol 51186 Summon Goregek the Bristlepine Hunter 51188 Summon Dajik the Wasp Hunter 51189 Summon Zepik the Gorloc Hunter 51190 Summon Lafoo 51191 Summon Jaloot 51192 Summon Moodle 51371 Apple Falls to ground 51397 Dig Up Shining Crystal 51398 Dig Up Glinting Armor 51400 Dig Up Glowing Gem 51401 Dig Up Polished Platter 51402 Dig Up Sparkling Treasure 51435 Summon Skimmer 51441 Dig Up Sparkling Hare 51443 Dig Up Glinting Bug 51511 Toss Ice Boulder 51590 Toss Ice Boulder 51813 The Leaders at Jin'Alai: Summon the Treasure of Chulo the Mad 51814 The Leaders at Jin'Alai: Summon the Treasure of Gawanil 51815 The Leaders at Jin'Alai: Summon the Treasure of Kutube'sa 51942 Spear Throw 52059 Axe Throw 52064 Throw Bomb 52121 Blood Maggot 52150 Raise Dead 52232 Summon Alarmed Blightguard 52276 Summon Kartak 52333 Summon Soo-holu 52364 Teleport Defenders 52439 Summon Skittering Swarmer 52450 Summon Skittering Infector 52494 Capacitor Discharge 52616 Summon Drakkari Chieftain 52636 Time Shift 52664 Random Lightning Visual Effect 52746 Summon Spark 52832 Dalaran Flower Grow - Summon Flowers 52917 Dig Up Disgruntled Bug 52965 Spark Frenzy 53447 WotLK Prologue Frozen Shade, Summon 53525 Summon Frigid Bones 54258 Water Globule 54264 Water Globule 54265 Water Globule 54266 Water Globule 54267 Water Globule 54664 Vrykul Bowshot Missed 54686 WotLK - Frost Wyrm - Frost Blast 54751 Electromagnetic Discharge 54768 Summon Icefang 54969 Summon Constrictor 55028 Summon Freed Proto-Drake 55060 Summon Viper 55433 Summon Flower 55528 Summon Earthen 55859 Jormungar Spawn 55872 Orb of Flame 55881 Hurricane 55882 Orb of Storms 55886 Boulder 55888 Orb of Water 55938 Hungry Penguins 55946 Summon Whisker 55957 Ride Snorri 56243 Summon Iron Dwarf 56323 Spark Frenzy 56328 Random Lightning Visual Effect 56429 Summon Arcane Bomb 56510 Activate Mobile Databank 56915 Random Lightning Visual Effect 57583 Icecrown Airship - H - Attack - 03 Cannon Fire 57584 Summon Ruby Flowers 57597 Summon Dahlia's Tears 57697 Lava Strike 57945 Icecrown Airship - A - Attack - 03 Cannon Fire 58035 Summon Twilight Whelp 58689 Rock Shards 58692 Rock Shards 58826 Summon Sartharion Twilight Whelp 58867 Spirit Wolf Leap 60055 Summon Plague Drenched Ghoul 60056 Summon Rampaging Ghoul 60058 Summon Living Plague 60322 Scroll of Recall 60887 Summon Infinite Timerender 60978 Ominous Cloud 61084 Time Shift 61089 Zombie Horde 61097 Incarnation 61098 Zombie Horde 61108 Incarnation 61116 Copy of Incarnation 61149 Ember Shower 61383 Army of the Dead 61564 Summon Crystalline Tangler 61586 Lightning Marker Visual Effect 61727 Summon Baby Bunny 61739 Fan of Knives 61740 Fan of Knives 61741 Fan of Knives 61742 Fan of Knives 61743 Fan of Knives 61744 Fan of Knives 61745 Fan of Knives 61746 Fan of Knives 61884 Lightning Tendrils 62189 Summon Black Hole 62273 Rune of Summoning 62572 Lifebinder's Gift Trigger Missile 62582 Healthy Spore Summon - NW 62591 Creature - Healthy Spore Summon (NE) 62592 Creature - Healthy Spore Summon (SE) 62593 Creature - Healthy Spore Summon (SW) 62828 Recharge Robot 62831 Recharge Robot 62835 Recharge Robot 62870 Lifebinder's Gift Trigger Missile 62899 Summon Mole Machine 62916 Summon Razorscale Dwarf 62947 Freya's Ward 63019 Displace Roots 63257 Explosive Fishin' 63496 Explosive Fishin' 63497 Explosive Fishin' 63634 Summon Rubble 63736 cdubinfourteen 64040 Summon Angry Oak Spirit 64139 Crusher Tentacle 64143 Corruptor Tentacle 64158 Immortal Guardian 64397 Summon Swarming Guardian 64399 Pounce 64470 Summon Void Zone Visual 64563 Summon Flames Initial 64612 Self-Destruction 64769 Laser Barrage 64784 Random Lightning Visual Effect PS: if you're using this and my other patch with summon types, "army of the dead" should work now. For which repository revision was the patch created? 8526 Who has been writing this patch? Please include either forum user names or email addresses. Me Patch: diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 53948c7..e10fb1d 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1052,6 +1052,7 @@ enum Targets TARGET_AREAEFFECT_PARTY_AND_CLASS = 61, TARGET_DUELVSPLAYER_COORDINATES = 63, TARGET_BEHIND_VICTIM = 65, // uses in teleport behind spells, caster/target dependent from spell effect + TARGET_RANDOM_NEARBY_LOC = 72, // " ... onto nearby locations" TARGET_DYNAMIC_OBJECT_COORDINATES = 76, TARGET_SINGLE_ENEMY = 77, TARGET_POINT_AT_NORTH = 78, // 78-85 possible _COORDINATES at radius with pi/4 step around target in unknown order, N? @@ -1062,6 +1063,7 @@ enum Targets TARGET_POINT_AT_NW = 83, // from spell desc: "(NW)" TARGET_POINT_AT_SE = 84, // from spell desc: "(SE)" TARGET_POINT_AT_SW = 85, // from spell desc: "(SW)" + TARGET_RANDOM_NEARBY_DEST = 86, // "Test Nearby Dest Random" - random around selected destination TARGET_SELF2 = 87, TARGET_DIRECTLY_FORWARD = 89, TARGET_NONCOMBAT_PET = 90, diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index f7dc9fa..463c8b9 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1313,6 +1313,30 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) switch(targetMode) { + case TARGET_RANDOM_NEARBY_LOC: + { + float dest_x = m_caster->GetPositionX() + irand(-radius, radius); + float dest_y = m_caster->GetPositionY() + irand(-radius, radius); + float dest_z = m_caster->GetMap()->GetHeight(dest_x, dest_y, MAX_HEIGHT); + m_targets.setDestination(dest_x, dest_y, dest_z); + + TagUnitMap.push_back(m_caster); + break; + } + case TARGET_RANDOM_NEARBY_DEST: + { + float dest_x = m_targets.m_destX + irand(-radius, radius); + float dest_y = m_targets.m_destY + irand(-radius, radius); + float dest_z = m_caster->GetMap()->GetHeight(dest_x, dest_y, MAX_HEIGHT); + m_targets.setDestination(dest_x, dest_y, dest_z); + if (radius > 0.0f) + // caster included here? + FillAreaTargets(TagUnitMap, dest_x, dest_y, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE); + else + TagUnitMap.push_back(m_caster); + + break; + } case TARGET_TOTEM_EARTH: case TARGET_TOTEM_WATER: case TARGET_TOTEM_AIR: Take care.
  21. Not sure if it works now on default core, if not, targeting missing most likely, I'll add it later on.Its not directly related to this patch, but sure a step in that direction. true, it is bad idea for pets, but then you wont assign ai script to those either. But then again, adding scripts for some triggers, like for example doing some complex task on summoning, or being spell victim can be useful in some cases. This really needs some testing ( on pets - on guardians it works just lovely ), but im almost sure it can co-exist. " as Ralek gave me some nice info on the DBC" .. mind sharing it? since I used only the data we had in core, it simply wasn't used. Names guessed based on spells. But things like flags - just impossible to guess at the moment, I mean, there is like 1-2 spells with each flag. If you have those, please do share. Looking forward on more people testing it. Since as i said, I'm far, far away from testing all those new types. Some may be handled wrongly.
  22. What bug does the patch fix? What features does the patch add? - Use data stored in SummonProperties.dbc in order to summon creatures instead of hardcoded SUMMON_TYPE_XXX - Allow multiple guardians with same id ( used in spells like army of the dead, etc ) - Cleaning no longer needed ( EffectSummonDemon(), enums, etc ) - Allow modify duration in Spell::EffectSummon(), Spell::EffectSummonGuardian() While most of the patch is pretty much generic, I had to add few ugly exceptions. For example, while SUMMON_TYPE 121 is considered guardian it acts and contain fields like totem. Npc flags not yet supported for guardians. You cannot have more than one controlable pet - needed in force of nature, feral spirit. Overall, all SUMMON_TYPE that used to work, still do. To them added entire army of new types. I tested as much as I could, but its too much for someone to test ~3k spells alone. PSS; Feel free to comment. For which repository revision was the patch created? 8526 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. Likely, half SUMMON_TYPE are not supported. Who has been writing this patch? Please include either forum user names or email addresses. Me Patch: EDIT: http://paste2.org/p/448613
  23. Something as simple as attacked will do just fine I guess. Thanks in advance. diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 4bd0a31..02b64a0 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2185,6 +2178,7 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) } break; default: + sLog.outError( "SPELL: Unknown implicit target (%u) for spell ID %u", targetMode, m_spellInfo->Id ); break; } break;
  24. Cant say is "fixed" all of listed below, but there's one bug less with them at the moment PS: thanks for reviewing it so rapidly. PSS: Can error output be added in default case of that switch in SetTargetMap()? it will sure make handling missig types and debugging much easier. id spellname_0 21962 Force of Nature 21963 Force of Nature 24681 Summon Nightmare Illusions 24729 Summon Nightmare Illusions 24813 Seeping Fog 24814 Seeping Fog 24841 Summon Shade of Taerar 24842 Summon Shade of Taerar 25682 Summon Mana Fiend 25683 Summon Mana Fiend 28353 Raise Dead 29210 Blink 29211 Blink 29951 Blizzard 30684 Bleed Spice, Create cluster E (DND) 30685 Bleed Spice, Create cluster W (DND) 31981 Tainted Earthgrab Totem 32316 Summon Ethereal Wraith 32349 Summon Arcane Fiend 32353 Summon Arcane Fiend 32663 Summon Dark Vortex 32723 Summon Bonechewer Riding Wolf 33539 Summon Syth Frost Elemental 33540 Summon Syth Shadow Elemental 34067 Summon Worg 34247 Summon Lasher Beast 34368 Summon Riding Worg 34743 Summon Greater Sapling 34951 Summon Deathforge Felguard 35251 Summon Arcane Golem 35260 Summon Arcane Golem 35285 Summon Nether Wraith 35286 Summon Nether Wraith 35421 Summon Sporewind Frenzy 35422 Summon Sporewind Frenzy 35428 Summon Lasher Beast 35882 Summon Azurebeak 35968 Gravity Lapse 35974 Gravity Lapse 35975 Gravity Lapse 35981 Gravity Lapse 35985 Gravity Lapse 35989 Gravity Lapse 36477 Summon Mana Beast 36848 Mirror Image 37385 Spirit of Fire 37693 Force of Nature 37694 Force of Nature 39269 Summon Misha 39272 Summon Wrath Hound 39583 Change Facing, Left 39866 Summon Rizzle 39906 Summon Riding Warhound 40574 Picnic Umbrella 40698 Caged 40702 Caged 40781 Summon East Stun Rope 40782 Summon West Stun Rope 40797 Summon Cannon 40943 Mirror Image 41118 Summon Shadow Demon 41120 Summon Shadow Demon 41123 Summon Bronco 41175 Ashtongue Rogue 42035 Ashtongue Wave B 42181 Summon Amani'shi Sentries 42182 Summon Amani'shi Sentries 44219 Gravity Lapse 44223 Gravity Lapse 45093 Romantic Umbrella 45575 Magmoth Fire Totem 45756 Drop Warsong Land Mine 46002 Summon Dark Fiend 46006 Summon Dark Fiend 46154 Summon Pure Energy 46159 Summon Pure Energy 46657 Taunka'le Evacuee 46658 Taunka'le Evacuee 46972 Summon Summer Scorchling 47123 Summon Festival Scorchling 47404 Thor Modan Mole Machine (Alt) 47707 Summon Telestra Clone (Fire) 47709 Summon Telestra Clone (Frost) 47839 Warsong Land Mine 47955 Summon Crystal Spike 47957 Summon Crystal Spike 48587 Summon Avenging Spirit Summoner 48589 Summon Avenging Spirit Summoner 48631 Summon Ymirjar Warrior - W 48632 Summon Ymirjar Warrior - W 48633 Summon Ymirjar Harpooner - W 48634 Summon Ymirjar Harpooner - E 48635 Summon Ymirjar Witch Doctor - W 48636 Summon Ymirjar Witch Doctor - E 49114 Place Scourge Discombobulater 49859 Rune of Command 50584 Summon Frozen Spheres 50586 Summon Frozen Spheres 52123 Copy of Feral Spirit 52991 Duel Flag 55352 Summon Lo'Gosh 56080 Summon Nikita 56082 Summon Billie 57895 Dummy Gate 57899 Portal to the Valley of Echoes 57913 Summon Ghoul 58049 Summon Mason 58050 Summon Mason 58833 Mirror Image 58834 Mirror Image 62576 Blizzard 62602 Blizzard 63343 Focused Eyebeam Summon 63701 Focused Eyebeam Summon 2
  25. What bug does the patch fix? What features does the patch add? Implementing implicit target 49, 50 used in over 20 spells each, summons mostly. For which repository revision was the patch created? 8526 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. maybe, too lazy checking for all involved spells. Who has been writing this patch? Please include either forum user names or email addresses. Me Patch: http://github.com/abcxaos/mangos/commit/42789d75fcd6934dde35689f334e9fa5c74073b4 commit 42789d75fcd6934dde35689f334e9fa5c74073b4 Author: sixsixnine <[email protected]> Date: Wed Sep 23 21:46:52 2009 +0300 + Implementing implicit target 49, 50. Signed-off-by: sixsixnine <[email protected]> diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 185541c..a8bc3b1 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1041,8 +1041,10 @@ enum Targets TARGET_TOTEM_FIRE = 44, TARGET_CHAIN_HEAL = 45, TARGET_SCRIPT_COORDINATES = 46, - TARGET_DYNAMIC_OBJECT = 47, + TARGET_DYNAMIC_OBJECT_FRONT = 47, TARGET_SUMMON = 48, + TARGET_DYNAMIC_OBJECT_LEFT_SIDE = 49, + TARGET_DYNAMIC_OBJECT_RIGHT_SIDE = 50, TARGET_AREAEFFECT_CUSTOM_2 = 52, TARGET_CURRENT_ENEMY_COORDINATES = 53, // set unit coordinates as dest, only 16 target B imlemented TARGET_ALL_RAID_AROUND_CASTER = 56, diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index cceda46..e4eec28 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1421,7 +1421,6 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) case TARGET_TOTEM_FIRE: case TARGET_SELF: case TARGET_SELF2: - case TARGET_DYNAMIC_OBJECT: case TARGET_AREAEFFECT_CUSTOM_2: case TARGET_SUMMON: TagUnitMap.push_back(m_caster); @@ -2141,6 +2140,29 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap) if(DynamicObject* dynObj = m_caster->GetDynObject(m_triggeredByAuraSpell ? m_triggeredByAuraSpell->Id : m_spellInfo->Id)) m_targets.setDestination(dynObj->GetPositionX(), dynObj->GetPositionY(), dynObj->GetPositionZ()); break; + + case TARGET_DYNAMIC_OBJECT_FRONT: + case TARGET_DYNAMIC_OBJECT_LEFT_SIDE: + case TARGET_DYNAMIC_OBJECT_RIGHT_SIDE: + { + if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)) + { + float angle = m_caster->GetOrientation(); + switch(targetMode) + { + case TARGET_DYNAMIC_OBJECT_FRONT: break; + case TARGET_DYNAMIC_OBJECT_LEFT_SIDE: angle -= 3*M_PI/4; break; + case TARGET_DYNAMIC_OBJECT_RIGHT_SIDE: angle += 3*M_PI/4; break; + } + + float x,y; + m_caster->GetNearPoint2D(x,y,radius,angle); + m_targets.setDestination(x,y,m_caster->GetPositionZ()); + } + + TagUnitMap.push_back(m_caster); + break; + } case TARGET_POINT_AT_NORTH: case TARGET_POINT_AT_SOUTH: case TARGET_POINT_AT_EAST:
×
×
  • 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