Commit Graph

916 Commits

Author SHA1 Message Date
Ryan
a289acff81 Core/Spells: Fix SPELL_AURA_FIXATE 2017-05-28 20:14:31 +01:00
Ryan
1442984686 Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4 2017-05-28 19:10:00 +01:00
treeston
e361682377 Quickfix a bug introduced by 2f19d97 which prevented GTAoE from being cast. 2017-05-28 03:18:35 +02:00
ariel-
8082b3165e Core/Spell: abort channeling if no valid targets are found after searching
Closes #17624
2017-05-28 03:11:57 +02:00
Ryan
20726edec2 Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4 2017-05-19 23:49:46 +01:00
Aokromes
0fbcdca05e Core/Collision: Replaced phasemask with proper phases in GameObject c…
…ollision calculation
2017-05-06 01:55:17 +02:00
roc13x
02e174d7e9 Cleanup 2017-05-05 00:10:25 +01:00
roc13x
c2fd775e5d Add missing changes
Core compiles now
2017-05-04 05:24:21 +01:00
ariel-
07a182f1d3 Core/Spell: register spell mod owner properly on spell cast
- This fixes pets and totems getting mods from owner
2017-05-04 05:04:19 +01:00
ariel-
091100f795 Core/Spell: check aura positivity per effect on spell hit
- Fixes applying DR to positive effects, and changing duration of whole aura

Closes #19447
2017-05-04 05:01:17 +01:00
xinef1
ae4b91bcf6 Fixed setting and unsetting of m_spellModTakingSpell 2017-05-04 04:32:26 +01:00
roc13x
557f714a10 Fix spell dst execution time 2017-05-04 04:26:51 +01:00
Gerhood
0e1cc63055 Core/Spells: implement Mad/Crazy Alchemist's potions 2017-05-04 04:17:24 +01:00
ariel-
1f6fa54465 Core/Spell: build fix 2017-05-04 04:14:12 +01:00
ariel-
3ccdf57f4a Core/Spell: unified handling of SPELL_ATTR5_USABLE_WHILE_* attributes
Allowed mechanic mask is calculated on startup and auras checked against those mechanics
Closes #18798
2017-05-04 04:13:49 +01:00
ariel-
921efdc1fa Core/Spell: consider spells with no targets for the purpose of finish procs
Closes #18799
2017-05-04 04:10:22 +01:00
ariel-
69625f32fe Core/Spell: kill old charge restoring system. Mods are fully handled by proc system now.
- Fixes an edge case of spell failing due to out of range and re-adding charges to an existing aura.
2017-05-04 04:00:58 +01:00
ariel-
0814834492 Core/Spell: reverted stun aura handling
Partial revert of 50a3ce5703

Closes #18487
Closes #18490
Closes #18497
2017-05-04 03:47:21 +01:00
ariel-
be418d3671 Core/Spell: fix for hitmask being ignored in finish phase procs 2017-05-04 03:45:37 +01:00
ariel-
6e62130e96 Core/Spell: improved immunity logic for dispels 2017-05-04 03:26:54 +01:00
ariel-
307b736768 Core/Spell: Undefined SPELL_ATTR7_USABLE_IN_STUN_FEAR_CONFUSION attr for now 2017-05-04 03:18:14 +01:00
ariel-
c62077237d Core/Spell: restore old proc system behaviour on auras self proc. 2017-05-04 02:21:58 +01:00
ariel-
b7b69b88ba Core/Unit: damage immune improvements 2017-05-04 01:48:16 +01:00
ariel-
746cb97dce Core/Unit: don't use damage immunity to calculate hit result for the whole spell. Should be used only for damage 2017-05-04 01:45:58 +01:00
ariel-
b14b00da5c Core/ScriptMgr: use vector instead of list to contain Spell and Aura scripts and hooks 2017-05-04 01:41:35 +01:00
ariel-
c9101f6707 Core/Spells: workaround stealth interaction with Death and Decay and GameObject casts 2017-05-04 01:16:00 +01:00
ariel-
21ac6296be Core/Spells: moved handling of SPELL_ATTR0_CU_DONT_BREAK_STEALTH inside proc system.
Fixes additional issues with spells that shouldn't be breaking stealth and had this attribute
2017-05-04 01:01:24 +01:00
roc13x
d30237fb1e Core/Globals: compute aura diminishing return info at startup and cache it 2017-05-04 00:57:24 +01:00
ariel-
a7a024d1d6 Core/Auras: reset periodic aura timers by default. Except when aura comes from triggered spell 2017-05-03 23:51:47 +01:00
ariel-
51f26dfe51 Core/Spells: Implementation of QAston proc system 2017-05-03 20:08:08 +01:00
ccrs
748df97208 Core/Spell: move creature focus
bellow the possible interruptions
2017-04-28 12:57:16 +02:00
ariel-
c697a9de2e Core/Spell: don't make creature change orientation to 0 if channeling self 2017-04-25 13:31:11 +02:00
Aokromes
ae8dccad31 Core/Spell: fix creature focus with channeled spells
- Remove one not needed ReleaseFocus, this is done at finish already
2017-04-25 13:27:02 +02:00
Aokromes
adae2fec26 Ensure that all actions are compared to fixed point in time (ie. world update start) 2017-04-14 15:02:49 +02:00
xinef1
cddcf9f11e Core/Spells: Fixed some enchantments checks and fixed serious logic flaw in create item effect check (#19123) 2017-03-13 10:10:26 +01:00
xinef1
62111a8c4a Core/SmartAI: Various fixes and extensions for smart scripts: (#18673)
- Possible crashes fixed
- Memory leak fixed
- Implemented checking of vehicle conditions
- Extended eventphasemask to 12 bits (sql required to change DB field type)
- SMART_EVENT_GOSSIP_HELLO - added possibility to detect for gameobject reportUse call
- Renamed action SMART_ACTION_SET_FLY to SMART_ACTION_SET_DISABLE_GRAVITY (to reflect actual functionality)
- Added targetsLimit to action SMART_ACTION_CAST and SMART_ACTION_INVOKER_CAST to limit max amount of targets (selected randomly)
- Action SMART_ACTION_TALK corrected to always work as intended
- Properly call GroupEventHappens in action SMART_ACTION_CALL_GROUPEVENTHAPPENS if invoker was charmed or owned by the player
- Properly utilize followAngle in action SMART_ACTION_FOLLOW (db orientation should be in degrees), but keep backward compatibility
- Added action SMART_ACTION_SET_CAN_FLY (119) 0/1
- Added action SMART_ACTION_REMOVE_AURAS_BY_TYPE (120) AuraType, can be used to exit vehicle for example
- Added action SMART_ACTION_SET_SIGHT_DIST (121) sightDist
- Added action SMART_ACTION_FLEE (122) fleeTime
- Added action SMART_ACTION_ADD_THREAT (123) +threat, -threat
- Added action SMART_ACTION_LOAD_EQUIPMENT (124) equipmentId
- Added action SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT (125) minId, maxId
- Added action SMART_ACTION_REMOVE_ALL_GAMEOBJECTS (126), removes all owned gameobjects
- Added action SMART_ACTION_STOP_MOTION (127), stopMoving, movementExpired
- Extended target SMART_TARGET_HOSTILE_SECOND_AGGRO with following parameters maxdist, playerOnly, powerType + 1
- Extended target SMART_TARGET_HOSTILE_LAST_AGGRO with following parameters maxdist, playerOnly, powerType + 1
- Extended target SMART_TARGET_HOSTILE_RANDOM with following parameters maxdist, playerOnly, powerType + 1
- Extended target SMART_TARGET_HOSTILE_RANDOM_NOT_TOP with following parameters maxdist, playerOnly, powerType + 1
- Extended target SMART_TARGET_THREAT_LIST with maxdist
- Extended target SMART_TARGET_OWNER_OR_SUMMONER to be able to get charmer/owner of current owner
- Added new target SMART_TARGET_FARTHEST with maxDist, playerOnly, isInLos restrictions
- Added SpellHit hook to GameObjectAI and extended SmartGameObjectAI to call SMART_EVENT_SPELLHIT when gameobject is hit by spell
- Call GameObjectAI Reset hook on gameobject respawn (for ex. to reset one time events in smart scripts)
- Fixed some logic errors in code
- SmartAI Escorts properly despawn escortee if no players are in range
- Disable Evading while charming creature with SmartAI
- Don't call SMART_EVENT_RESPAWN for dead units before they actually respawn
- Don't call SMART_EVENT_RESPAWN for not spawned gameobjects
- Properly call SMART_EVENT_RESPAWN for gameobject respawn
- Allow action SMART_ACTION_SET_IN_COMBAT_WITH_ZONE to utilize targetlist
- Allow action SMART_ACTION_CALL_FOR_HELP to utilize targetList
- Allow action SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL to utilize targetList
- Allow action SMART_ACTION_SET_VISIBILITY to utilize targetList
- Allow action SMART_ACTION_SET_ACTIVE to utilize targetList
- Allow action SMART_ACTION_ATTACK_START to select random attack target instead of first on the list
- Allow gameobjects to summon gameobjects with action SMART_ACTION_SUMMON_GO
- Properly store action invokers for action SMART_ACTION_WP_START, if no player invokers are found, distance despawn check won't be used
- Allow action SMART_ACTION_WP_RESUME to compensate for the state the unit actually is in (eg. combat)
- Allow action SMART_ACTION_MOVE_TO_POS to select random of the avaiable targets, not only the first one.
- Allow action SMART_ACTION_MOVE_TO_POS to utilize x, y, z parameters as an offset to calculated coordinates
- Action SMART_ACTION_RESPAWN_TARGET should never modify respawntime of already spawned gameobjects, use dedicated function
- Properly delete ontime events created by SMART_ACTION_CREATE_TIMED_EVENT
- If action could not be started because conditions were not satisfied, do not recalculate the waittime to action repeattime, use smaller value to recheck more frequently
- Allow target SMART_TARGET_CLOSEST_PLAYER to be used by gameobjects
- Allow target SMART_TARGET_OWNER_OR_SUMMONER to be used by gameobjects
- Fixed SMART_EVENT_COUNTER_SET to be only called for the id that was incremented
- Changed the way counters work
- Protect PhaseInc from surpassing maximum phase
- Added loading checks for missing NON_REPEATABLE flag if no repeatmin, repeatmax is set
- Added spell validation for SMART_ACTION_CROSS_CAST
2017-02-19 09:10:29 +01:00
Aokromes
0f9c7106ce Core/Spells: Added very little tolerance level to completed casts to …
…ensure that spell cast at target standing at the max possible range is finished properly even if target moves a little
2017-02-01 15:23:16 +01:00
HelloKitty
927a73a7ef Core/Vmaps: Stop M2s from occluding for spellcast LoS
Closes #18528
2017-01-21 14:45:30 +01:00
Aokromes
b7432bc39a Compile fix try 2017-01-18 15:09:57 +01:00
ariel-
0c97c46361 Core/Spell: perform charmer check against player controlling unit. Fixes spellcasts while charmed 2017-01-18 14:19:11 +01:00
ariel-
f2ffa22ac7 Core/Spell: fix typo
Closes #18248
2017-01-18 14:18:53 +01:00
joschiwald
44fbd2d400 Ups... 2017-01-09 08:04:25 +01:00
joschiwald
a3ed1c303b Core/Spells: Fix wrong totem placement
- Addition to 37b2f590b6
2017-01-09 08:04:11 +01:00
Aokromes
719a317a67 Update copyright note for 2017 2017-01-02 07:26:38 +01:00
xinef1
2f43df388d Core/Spell: Fixed bug where spell could fail to hit a target properly even if all conditions were met (#18596) 2017-01-01 13:29:19 +01:00
ariel-
eb3a90a4e8 Core/Spell: implemented dispel reflection
Closes #18323
2016-12-16 19:24:01 +01:00
ariel-
bb8068febb Core/Spells: fix a pretty edge case of creatures being put in combat by evaded spells
Closes #18369
2016-12-06 11:07:15 +01:00
ariel-
009adc4324 Revert "Core/Spell: add EquipedItemClass/EquippedItemSubClass check to passive spell casts"
This reverts commit f188ff1ce4.

Was breaking Titan's Grip.
Spells are loaded before items, and they CAST the spell on the player.
When items are then loaded, Player::ApplyItemDependentAuras only has AddAura on it. Titan's Grip is an effect, no auras involved.

In turn reverting this commit will now allow Two-handed weapon specialization and similar from spells load. Which is the lesser of two evils.
2016-11-27 03:11:27 +01:00
ariel-
f348c015c0 Core/Spell: add EquipedItemClass/EquippedItemSubClass check to passive spell casts
- Was adding auras on login that didn't satisfy requirements (like Two-Handed Weapon Specialization)
2016-11-27 03:09:47 +01:00
Aokromes
d9e8c7a285 Core/Spell: Missing change, partialy revert change 2016-11-19 06:59:05 +01:00