Commit Graph
541 Commits
Author SHA1 Message Date
ariel- b3c8d78fa2 Core/Spell: fix SendSpellMiss requiring caster Unit 2022-09-12 09:15:16 +02:00
ariel- c889b81f2c Core/Spell: fix target checks
- Aura will be applied at last moment possible (after damage) to prevent regressions on #18395
- Partial revert of 9b38a6352c0fe2499de54fd769aa1c721a410bda as it wasnt handling correctly checks without spells
2022-09-12 09:15:15 +02:00
ariel- b6fac86b71 Core/Spells: rework part 5: GameObject casting 2022-09-12 09:15:14 +02:00
Ovahlord fc0dc939ba fixed nopch build and some warnings 2022-06-19 21:19:26 +02:00
Ovahlord 8312130d34 Core/Transports: corrected a few more mistakes when reverting and porting transport changes 2022-06-18 22:06:44 +02:00
Shauren 25465699f7 Core/GameObjects: Transport (type 11) improvements
* Fully synchronize serverside animation progress with client
* Implemented updating passenger positions on elevators
* Removed visibility hack for elevators that always forced CreateObject packet to be sent to client
2022-06-18 21:36:17 +02:00
Shauren 2b7b0b0db1 Core/Scripts: Begin unifying triggering gameevents (not the game_event db stuff) 2022-06-18 19:05:57 +02:00
Seyden d56acc88ef Core/Creatures: Add summoned creatures to summoners transport 2022-06-18 18:56:05 +02:00
Ovahlord 6e9ec1a4bf Core/Transports: undo all custom transport changes as preparation for cherry picks 2022-06-18 18:37:14 +02:00
Chaouki Dhib 17c4d8f6d9 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 a1f2f30c145f6ad9c4baeffeff32618e71ff537c)
2022-02-16 04:49:24 +01:00
Ovah 135e8833d7 Core/Objects: added a missing member initialization which sometimes resulted in objects being invisible clientside
How did CI not notice that?
2022-02-02 17:33:07 +01:00
Shauren f2b4f2208e Core/Objects: ported master branch handling for properly destroying objects via out of range and destroy object opcode
# Conflicts:
#	src/server/game/Entities/Creature/Creature.cpp
2022-02-02 16:24:42 +01:00
ariel- af98e8516c Core/Auras: reworked multiplicative AuraEffects calculation 2021-11-28 12:14:05 +01:00
Ovahlord 8ac7e71690 Core/Spells: implement summon properties parameter types based on the leaked enumerated strings values
Summon spells can now be commanded to interpret their basepoints depending on the parameter type that has been assigned to the summon properties dbc record Id

* implemented SummonCreatureExtraArgs to reduce the amount of arguments in Map::SummonCreature
2021-08-15 10:35:02 +02:00
Shauren f3e0650886 Core/PacketIO: Reduce size of SMSG_UPDATE_OBJECT by trimming trailing zeros in values updatemask 2021-04-25 17:22:58 +02:00
Shauren 0f02c6a699 Core/Spells: Implemented SUMMON_PROP_FLAG_PERSONAL_GROUP_SPAWN 2021-03-29 20:56:00 +02:00
Shauren ddb50c2e3d Core/Objects: Pass privateObjectOwner guid directly to SummonCreature functions 2021-03-29 20:52:32 +02:00
Shauren 3ab52418ef Core/Objects: Refactor private object checks into separate function 2021-03-29 20:47:38 +02:00
Matan Shukry 434bc017c2 Core/Objects: Move personal summon handling from TemporarySummon/GameObject to WorldObject and check it using dedicated guid field 2021-03-29 20:45:13 +02:00
Giacomo Pozzoni c12531b023 Core/Maps: Use a fixed offset instead of full collision height when retrieving floor Z 2021-02-21 20:26:21 +01:00
Ovahlord 0299fa4fe1 Core/Misc: replace boost::optional with std::optional 2021-02-19 14:07:43 +01:00
Matan Shukry 73efb99005 Core/Conditions: CONDITION_NEAR_CREATURE will exclude personal spawns that aren't the target's owner (#26102)
# Conflicts:
#	src/server/game/Grids/Notifiers/GridNotifiers.h
2021-02-19 13:04:08 +01:00
Matan Shukry abae5e4596 Core/Spells: Implemented summoning a personal gameobject effect (#25917)
# Conflicts:
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/GameObject/GameObject.h
#	src/server/game/Miscellaneous/SharedDefines.h
#	src/server/game/Spells/SpellInfo.cpp
2021-02-19 13:01:10 +01:00
Ovahlord c3831d30e5 Core/Packets: converted SMSG_PARTY_MEMBER_STATE and SMSG_PARTY_MEMBER_FULL_STATE to packet class
* handle GROUP_UPDATE_FLAG_PHASE when changing phases
* define and implement GROUP_UPDATE_FLAG_WMO_GROUP_ID
2021-01-09 16:42:53 +01:00
Giacomo Pozzoni 8bbe17c684 Core/Creature: Ignore combat reach when looking for assisting creatures 2020-09-24 00:37:11 +02:00
Giacomo Pozzoni 6a8ecc3ee3 Core/Misc: Fix issues reported by static analysis (#25351)
* Core/Misc: Fix issues reported by static analysis

* Core/Vmaps: Code cleanup after e777161888
# Conflicts:
#	src/common/Collision/DynamicTree.cpp
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/World/World.cpp
2020-08-29 13:49:21 +02:00
Ovahlord 47ac0004c2 Core/Packets: converted SMSG_DESTROY_OBJECT to packet class 2020-08-23 23:09:34 +02:00
Treeston ec04d3b2cd [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2020-07-22 13:43:23 +02:00
Ovahlord 0820ce3367 Core/Objects: corrected a bit setting condition in SMSG_UPDATE_OBJECT 2020-06-29 17:17:56 +02:00
Ovahlord 4a25282f51 Core/Objects: logic fixup for d91fa5023e 2020-05-16 17:33:34 +02:00
Ovahlord d91fa5023e Core/Objects: fixed random destination selection for spells casted by flying units
* the path generator will now check for realtime movement flags instead of movement template data for units
2020-05-16 17:15:19 +02:00
Giacomo Pozzoni e3bab35d5e Core/MMAPs: Adjust walkable climb and fix a lot of mmap raycast issues (#24539)
* Core/MMAPs: Adjust walkable climb

Adjust walkable climb as recast using walkableClimb also to find the poly from a position, giving priority to polys that are below the position but closer than walkableClimb.

* Temporarily disable static collision (the whole check should be removed)

* Core/Spells: removed deprecated mmap path check for TARGET_DEST_CASTER_FRONT_LEAP

* Core/Objects: allow flying units to use the helper as well (flying units casting radius based spells)

* Code refactor

* Handle raycasts that end in a point with no height in the mmap mesh as PATHFIND_NOPATH

* Walk back a bit from raycast hitpoints as sometime the 2D result point is outside of the polygons due to floating point errors.

* Remove whitespace

* Revert 4a197ba22a as a raycast point path should have the Z retrieved with getPolyHeight(). Raycast will only return a 2-point path with Start and Hitpoint/End

* Cleanup PathGenerator raycast case

* Fix PathGenerator raycast broken if start and end are on same poly.
Fix PathGenerator raycast broken if no wall is hit.
Remove unused case of using raycast with an existing previous path (can be added back properly if needed).
Remove forcing poly length to 2 when we actually have already the right number.

* Use closestPointOnPolyBoundary on the second try of finding a point on poly for raycast.
Note that in this case the mesh height is not used which might cause issues. The poly boundary height will be used instead.

* Handle cases where getPolyHeight() fails because the point is on polygon border (and caused by floating point imprecision)

* Add far from poly flags

* Set PATHFIND_INCOMPLETE in raycast case if startFarFromPoly or endFarFromPoly

* Fix blink close to walls with no valid polygon behind the wall

* Require to re-extract mmaps

Co-authored-by: Ovah <dreadkiller@gmx.de>
# Conflicts:
#	src/server/game/Entities/Object/Object.cpp
2020-05-16 13:45:57 +02:00
Ovahlord a2cea3ce08 Core/Movement: converted CMSG_MOVE_SET_COLLISION_HEIGHT_ACK and SMSG_MOVE_UPDATE_COLLISION_HEIGHT to packet class
* added new MovementInfo helpers for easy access to all packet related data
2020-05-10 01:31:53 +02:00
Ovahlord c3fd5d2037 Core/Objects: do not block collision detection for flying units 2020-05-02 19:01:15 +02:00
Ovahlord 1ad8451ae2 Core/Objects: use the static vmap check in MovePositionToFirstCollision for all path results to avoid falling below wmo surfaces when the mmap path returns unreliable data
# Conflicts:
#	src/server/game/Entities/Object/Object.cpp
2020-05-02 01:12:20 +02:00
Ovah 1a85f82edd Core/Objects: further improvements for MovePositionToFirstCollision (#24523)
* Core/Objects: further improvements for MovePositionToFirstCollision

* the PathGenerator will now normalize incomplete destinations as well
* normalize destination positions before launching detour raycasts to get better direction data
* exclude unwanted pathfinding results from further use to avoid unintended behaivior

* Core/PathFinding: Split PATHFIND_FARFROMPOLY into PATHFIND_FARFROMPOLY_START and PATHFIND_FARFROMPOLY_END for start and end position

Handle PATHFIND_FARFROMPOLY_END as valid in MovePositionToFirstCollision

Co-authored-by: jackpoz <giacomopoz@gmail.com>
# Conflicts:
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/Movement/PathGenerator.h
2020-05-01 14:51:38 +02:00
Ovahlord a3662d9a74 Core/Objects: improve MovePositionToFirstCollision results 2020-04-29 23:56:47 +02:00
Ovahlord e7ba484fcf Core/Units: reworked creature power regeneration handling
* players and creatures now share the same power regeneration regeneration function
* UpdatePowerRegeneration is now virtual and handles creature and player specific formulas individually
* handle update field flag UF_FLAG_UNIT_ALL to handle UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER and UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER for creatures as well
2020-04-27 14:20:33 +02:00
Ovahlord 902d373de5 Core/Objects: 153546acba followup 2020-04-26 21:00:57 +02:00
Ovahlord b653f2f819 Core/Units: ported power type updates from master branch 2020-04-22 03:13:02 +02:00
Ovahlord d30c811d9e Core/Creatures: reworked tempoary summon creation
* all stats and values will now be set before summons are getting added to map
* cleaned up summon spell effect handler to reduce duplicade code
* summoner guids will no longer be set for every minion and correctly handle assigning creator guids instead. These values will serve as fallback guid if there is no summoner guid
* friendly tempsummons will now inherit the guild data of their player and pass them on to further allied summons. This fixes guild specific visuals for creatures such as Guild Battle Standards and Guild Heralds.

Todo: check for regressions
2020-04-22 00:20:18 +02:00
Shauren cb6ce1302b Core/Misc: Defined new summon properties titles 2020-04-07 18:33:13 +02:00
Ovahlord b5bdf61e5f Core/Packets: converted SMSG_DURABILITY_DAMAGE_DEATH, SMSG_PLAY_ONE_SHOT_ANIM_KIT, SMSG_SET_AI_ANIM_KIT, SMSG_SET_MOVEMENT_ANIM_KIT and SMSG_SET_MELEE_ANIM_KIT to packet class 2020-04-07 16:29:30 +02:00
Ovahlord 113202ea48 Core/Packets: converted SMSG_PLAY_MUSIC to packet class and corrected packet structure 2020-04-07 15:59:33 +02:00
Ovahlord d31f19265d Core/Objects:
* store liquid status lookups from UpdatePositionData in a member and draw liquid status information from it instead of doing extra vmap lookups. This also fixes collision height based liquid status states which was leading to false positive movement speed selection for creatures
* remove redundant IsUnderWater helper override from player class as our object based liquid status also considers collision height
2020-04-05 20:41:15 +02:00
Ovahlord 9bf01799f0 Core/Packets: converted SMSG_PLAY_SOUND and SMSG_PLAY_OBJECT_SOUND to packet class and corrected packet structure of
SMSG_PLAY_OBJECT_SOUND
2020-04-05 19:28:49 +02:00
Ovahlord 9bfe43a88a Core/Entities: remove PhaseMask
* database fields and values will remain until they have been converted to their according phase IDs
2020-03-29 04:05:43 +02:00
Shauren 9ad9398f04 Core/PacketIO: Fixed SMSG_UPDATE_OBJECT packets going missing for new items
Closes #16906
2020-03-19 20:45:57 +01:00
Ovahlord 4bc9c07407 Core/Objects: MovePositionToFirstCollision will now always use detour raycasts to get the first collision point 2020-02-20 21:49:18 +01:00
Ovahlord e0a1c5fa1a Core/Objects: use detour raycasts for unit based MovePositionToFirstCollision calls 2020-02-08 23:33:02 +01:00