Commit Graph

1022 Commits

Author SHA1 Message Date
Ovah
fb0d2ed2b9 Core/Spells: implement SMSG_MOUNT_RESULT and use it for transformed mounting cases (#24404) 2020-04-24 19:00:19 +02:00
Chaouki Dhib
5d076cfe29 Core/Spells: fix wrong distance calculations in AoE spells [Needs testing] (#16290)
Core/Spells: Fix wrong distance calculations in AoE spells.
Pull request #16290 by chaodhib.
God bless, finally.

(cherry picked from commit a1f2f30c14)
2020-04-24 17:18:49 +02:00
Shauren
7ef9acd765 Warning fix 2020-04-19 11:59:37 +02:00
Shauren
b702401978 Core/Items: Check required level to use items including any bonuses that modify it 2020-04-19 01:18:17 +02:00
Shauren
3b6e5a87d8 Core/Spells: Fixed Spell::CheckCast for targeting items trade with lockpicking 2020-04-11 11:51:12 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
d934824421 Core/Items: Implement azerite empowered items 2019-12-05 00:12:35 +01:00
Shauren
1238583312 Core/Spells: Fixed value of aura effects for stat mod auras applied by items 2019-11-30 12:11:29 +01:00
Shauren
ad774a8e0e Core/Spells: Make missing spell/aura effect handler assignments a compile time error instead of runtime crash 2019-11-21 14:36:16 +01:00
Shauren
fa0dc88c23 Core/Spells: Fixed crash in delayed DEST spells 2019-09-01 11:52:09 +02:00
Shauren
04ab611111 Core/Spells: Fixed calling spellhit script hooks on launch when spell hits both caster and target with different effects 2019-08-31 11:11:23 +02:00
Traesh
c924840ce7 Core/Spells: Implement SpellMisc::LaunchDelay 2019-08-31 11:11:23 +02:00
xinef1
a0a6b155e2 Core/Spells: Fixed some enchantments checks and fixed serious logic flaw in create item effect check (#19123)
(cherrypicked from 8c80e2b6b7)
2019-08-17 20:04:14 +02:00
xinef1
60663d1374 Ensure that all actions are compared to fixed point in time (ie. world update start) (#18910)
- Actions will not be dependent on processing moment
- Increased GameObjects cooldown resolution to milliseconds, fixes arming time of traps to be exactly one second and not something from range (1000, 1999)
- Created GameTime namespace and UpdateTime class and moved there some code out of world

(cherrypicked from 7567cafec8)
2019-08-17 20:04:14 +02:00
xinef1
a32d5cfa17 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

(cherrypicked from b0ae5fadd1)
2019-08-17 20:04:14 +02:00
xinef1
fb5c07ffe8 Fixed setting and unsetting of m_spellModTakingSpell (#19116)
- A problem when a different spell tries to overwrite existing ModTakingSpell should no longer happen

(cherrypicked from e261754c9c)
2019-07-21 21:06:54 +02:00
xinef1
89f728cd5b Core/Misc: Fixed player corpse looting, added player corpse loot and some more (#19122)
* Fixed corpse looting in wintergrasp
Added corpse loot for wintergrasp quests and To the Looter Go the Spoils (1166) achievement
Don't generate money for loot if no loot mode is available
Simplified few things

(cherrypicked from 2412886ef6)
2019-07-21 21:06:54 +02:00
Gerhood
7e83cce81f Core/Spells: implement Mad/Crazy Alchemist's potions
(cherrypicked frombab59b28faad262dc5d9873ca7c0856477ec4d66)
2019-07-21 21:06:54 +02:00
xinef1
3f7fe6f8a5 Core/Spells: Remade trajectory target selection (#19048)
* Remade trajectory target selection
* Added possibility to apply conditions to trajectory spells
* Properly recalculate delay time if CMSG_UPDATE_PROJECTILE_POSITION is received

(cherrypicked from c6060dd0c5)
2019-06-15 18:41:09 +02:00
xinef1
b711f0bcae Core/Spells: Added SPELL_FAILED_NOTHING_TO_STEAL error (#19036)
Corrected Dispel check in sanctuary area
Added root check for SPELL_EFFECT_JUMP and SPELL_EFFECT_JUMP_DEST

(cherrypicked from 3c605ba614)
2019-06-15 18:41:09 +02:00
xinef1
8d6d00dc15 Core/Spells: Corrected execution time calculation for dst targets (#19039)
(cherrypicked from c1ca852e16)
2019-06-15 18:41:09 +02:00
ariel-
2b0c73960b 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

(cherrypicked from 3544577e48)
(cherrypicked from 53eb6ec616)
2019-06-15 18:41:09 +02:00
Shauren
455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
Shauren
31fda79556 Core/PacketIO: Updated packet structures to 8.1.5 2019-06-08 17:03:15 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Quadralqt
ba44e1a8db Core/Spells: Update AOE Damage Cap (#22871) 2018-12-17 16:43:42 +01:00
Shauren
f94deace76 Merge branch 'bfa' 2018-12-09 14:45:03 +01:00
xinef1
2b20cb5a64 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 (#18969)
(cherry-picked from 66dc97bb27)
2018-12-09 14:18:42 +01:00
ariel-
63fa69d39f Core/Spell: consider spells with no targets for the purpose of finish procs
Closes #18799

(cherry-picked from c3474f57bc)
2018-12-09 14:18:42 +01:00
HelloKitty
46c69df3a7 Core/Vmaps: Stop M2s from occluding for spellcast LoS
Closes #18528

(cherry-picked from 01d715eaef)
2018-12-09 14:18:42 +01:00
Shauren
83bc1cbe64 Core/Spells: Improved spell value calculation - variance will not be applied to spells with forced basepoints from CastCustomSpell 2018-12-07 18:26:26 +01:00
Shauren
fc211291fc Core/Spells: Implemented new spell target 150 - TARGET_UNIT_OWN_CRITTER 2018-09-26 23:08:22 +02:00
ariel-
87ed45d912 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.

(cherry picked from commit ee6d1d02c0)
2018-04-29 18:38:51 +02:00
ariel-
76831d16be Core/Spell: implemented dispel reflection
Closes #18323

(cherry picked from commit f0772eea98)

# Conflicts:
#	src/server/game/Spells/Spell.cpp
#	src/server/game/Spells/Spell.h
#	src/server/game/Spells/SpellEffects.cpp
2018-04-21 13:52:37 +02:00
Ovah
1aa42e97a8 Core/AI: Added CreatureAI hook that is getting triggered when a spell cast has been successfully finished. (#21774) 2018-04-12 21:26:45 +03:00
Shauren
bea7faa8f9 Core/Entities: Take terrain swaps into account when calculating LoS/height/area 2018-03-25 19:28:36 +03:00
Shauren
91be2332e2 Core/Entities: Phasing rewrite
* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
Shauren
2e47bceafd Core/Spells: Fixed crash with m_delayMoment calculation for reflected spells 2018-03-20 23:52:52 +01:00
Shauren
111d205a6a Core/Spells: Check both main and offhand weapons if spell attributes require that (see Stormstrike)
* This restores the check probably unintentionally dropped in 14c2b2d6cd
* Build fix

(cherry picked from commit 3d3d0492ab)
2018-03-18 00:19:48 +01:00
ariel-
c519992c1a Core/Spells: add some missing breaks
(cherry picked from commit f3cbcae102)
2018-03-18 00:19:47 +01:00
ariel-
be4670250d Core/Spell: added some helpers to SpellInfo to reduce code duplication
(cherry picked from commit 14c2b2d6cd)
2018-03-18 00:19:46 +01:00
xinef1
429fac7cb6 Core/Spell: Fixed bug where spell could fail to hit a target properly even if all conditions were met (#18596)
(cherry picked from commit 464d3ad5d0)
2018-03-18 00:19:45 +01:00
ariel-
18b4e5d4bd Core/Spell: reverted stun aura handling
Partial revert of 50a3ce5703

Closes #18487
Closes #18490
Closes #18497

(cherry picked from commit 27fb5fc16d)
2018-03-18 00:19:42 +01:00
Shauren
007b5a68c5 Core/DataStores: Fixed db2 structures after 7.3.5 2018-03-12 23:11:49 +01:00
ariel-
8da5e22e01 Core/Spell: fix for hitmask being ignored in finish phase procs
(cherry picked from commit a7e136f9e3)
2018-03-12 16:39:44 +01:00
ariel-
f20e53c138 Core/Entities: Replace existing GetAuraEffectsByType + iteration uses with proper helper functions
(cherry picked from commit 3a52ad8d38)
2018-03-12 16:39:39 +01:00
ariel-
f07a746321 Core/Spell: improved immunity logic for dispels
(cherry picked from commit 01d272d6cb)
2018-03-12 16:39:37 +01:00
ariel-
8864a03802 Core/Spell: Undefined SPELL_ATTR7_USABLE_IN_STUN_FEAR_CONFUSION attr for now
- Some function renames
- Used in some client checks but not 100% sure of its usage (eg in CGUnit_C::CheckAndReportSpellInhibitFlags but not in  Spell_C::IsUsableAction)
Closes #18366
(cherry picked from commit 77a08ad73c)
2018-03-12 16:39:35 +01:00
ariel-
ec5d778e10 Core/Spells: fix a pretty edge case of creatures being put in combat by evaded spells
(cherry picked from commit 343419ab99)
2018-03-12 10:32:01 +01:00
Shauren
75603fe1a0 Core/DataStores: Updated db2 structures to 7.3.5.25996 2018-02-18 16:33:50 +01:00