Commit Graph
527 Commits
Author SHA1 Message Date
Jeremy 4fcc4a3300 Core/Movement: Fix some undermap issues with random movement/fear/blink (#22937)
* Core/Movement:
- Only move to point if there is a path that is not a shortcut (which will make the unit move through terrain)
- Added new function to check if there is a vmap floor without search distance
- Units that can fly, are underground but far above the vmap floor will stay underground (bronze drakes in tanaris)
- Don't remove PATHFIND_SHORTCUT from path type in some cases

* Core/Object: Ignore UpdateAllowedPositionZ for flying units.

- This will make flying units go through mountains instead of going to the top and back to the bottom to reach you.

* Core/Object: Revert some changes and let MovePositionToFirstCollision deal with a position without ground

* Missing groundZ change for objects on transport

* use CanFly instead of IsFlying

(cherry picked from commit 9fcbd8f15d249070aabc25d48df86681e8ec3d11)
2021-11-26 22:43:48 +01:00
Ovah d5daa2ad49 Core/Objects: use the actual collision height of players and creatures to get more accurate liquid status results (#23070)
(cherry picked from commit b9e9ccf93c63c3b27d7a6f9eced0beb4e14af40e)
2021-11-26 22:24:07 +01:00
Shauren 7a413ae543 Core/Spells: Fixed spells using MovePositionToFirstCollision for selecting target position getting Z coord offset by caster or target collision height (depending on spell target type)
(cherry picked from commit d63d15c505708d175c52d87afc76cbe4ac59497b)
2021-11-23 23:16:49 +01:00
Aokromes c5720e37c1 Core/Entities: Add categories to 2 logs
Closes #22922

(cherry picked from commit 578c796625859656b788565378250f783a348b09)
2021-11-23 22:28:38 +01:00
Shauren f24e16a460 Core/Spells: Fixed crash with some gameobject spell casters
(cherry picked from commit 755133d8609c424c49be4bbe3bb4ec1ed02195f8)
2021-11-18 23:03:14 +01:00
Giacomo Pozzoni d5c41d23e6 Core/Misc: Log more information in asserts (#22783)
* Core/Misc: Log more information in asserts

Add a new function GetDebugInfos() to types that could trigger an ASSERT() to easily include more useful information in crashlogs.
This is an initial commit that requires many more commits to implement the new GetDebugInfos() function in all required types.
If the type doesn't have the function, the global default one is picked which doesn't log anything.

* Core/Misc: Fix dynamic build

Add missing attribute for dynamic build

* Core/Misc: Fix gcc/clang build

* Core/Misc: Rename GetDebugInfos() to GetDebugInfo()

* Core/Misc: Fix FormatAssertionMessage() adding an extra '\0'

* Core/Misc: Add GetDebugInfo support to Unit

* Core/Misc: Add GetDebugInfo support to Creature

* Core/Misc: Add more info to GetDebugInfo for Creature

* Core/Misc: Add GetDebugInfo support to GameObject

* Core/Misc: Add GetDebugInfo support to Player

* Core/Misc: Add more GetDebugInfo info

* Core/Misc: Add GetDebugInfo support to Item

* Core/Misc: Add GetDebugInfo support to Bag

* Core/Misc: Add GetDebugInfo support to Transport

* Core/Misc: Add GetDebugInfo support to TempSummon, Minion, Guardian, Pet

* Core/Misc: Add GetDebugInfo support to Map, InstanceMap

* Core/Misc: Add GetDebugInfo support to Spell

* Core/Misc: Fix build warning

* Core/Misc: Add GetDebugInfo support to Aura

* Core/Misc: Add GetDebugInfo support to UnitAI

(cherry picked from commit 9a924fb9d557434c5a2e4020c80db6e6bfe466ad)
2021-11-16 20:36:58 +01:00
Meji a832435b97 Core/Spells: Implemented SummonPropertiesFlags: UseSummonerFaction & IgnoreSummonerPhase (#27273) 2021-11-16 11:51:05 +01:00
Ovah 234a680d3a Core/Objects: properly use UPDATETYPE_CREATE_OBJECT2 when creating brand new objects in all cases. Closes #22419 (#22816)
(cherry picked from commit fb1d568fbaedb2198ee6a39aac669533d8924c82)
2021-11-15 23:42:22 +01:00
Treeston 7c062db94b Core/Player: Clean up duel related code. Fix a check for abusive client behavior, sanitize pointer usage, code style. Closes #22374.
(cherry picked from commit 003cc56d70c9b07f4484cb82484091ab4013895a)
2021-11-08 23:49:15 +01:00
Shauren 5c8a058120 Core/PacketIO: 9.1.5 updatefields and SMSG_UPDATE_OBJECT structure 2021-11-04 21:47:03 +01:00
Shauren b13e9f9d61 Core/Misc: Fixed clang 13 warnings, gcc 11 build errors and nopch build 2021-10-25 00:05:05 +02:00
Treeston 8760b7322e Core/Spells: Clean up some assist checks (no behavior change)
(cherry picked from commit 83ee145736a39ac1ce8305947f188aeaa13c7b04)
2021-10-23 14:49:43 +02:00
Treeston d81a74bc98 Core/Spells: Fix an incorrect check that was exempting negative spells from _IMMUNE_TO_x checks. Closes #21929.
(cherry picked from commit 75e7404bba8c68e534ae3216787e424c4f0cb337)
2021-10-23 14:46:53 +02:00
Meji 11cc5c0d3b Core/BattlePets: Misc fixes (#27057)
* Rename WorldPackets::BattlePet::BattlePet::CollarID to WorldPackets::BattlePet::BattlePet::DisplayID
* Use the DisplayID field to store the model of the battle pet. If the species has BattlePetSpeciesFlags::RandomDisplay, nothing is stored. Otherwise a random model is chosen from those available
* Stored DisplayID in ITEM_MODIFIER_BATTLE_PET_DISPLAY_ID when caging the battle pet (previously the CreatureID was being stored)
* Modified SendPlaySpellVisual function to allow sending Target and TargetPosition at the same time
* Added SpellVisual when uncaging
2021-10-16 12:15:03 +02:00
Shauren d7302ffd14 Core/Scenes: Implemented spell created SceneObjects 2021-10-11 12:59:19 +02:00
killerwife de326d789e Core/Unit: Name and implement UNIT_FLAG_NON_ATTACKABLE_2 (PR #22087)
(cherry picked from commit 16f524ff2537646417d1150ef3bdab8e4cc8a2b1)
2021-10-07 21:25:57 +02:00
Shauren 6d93f0a5f7 Core/Scenes: Delay scenes sent when not in world until adding to map 2021-10-05 15:10:33 +02:00
Shauren cbf1f2883a Core/Spells: Reduce number of CastSpell overloads to 1 2021-10-03 19:58:03 +02:00
Shauren 555b2d40ec Core/Spells: Send OriginalCastId in SMSG_SPELL_START and SMSG_SPELL_GO for triggered spells in 'game' project 2021-10-03 16:36:39 +02:00
Shauren 2d7af28e9f Core/Transports: Store information about continent transports 2021-10-02 19:59:56 +02:00
Treeston f1ac141f25 Core/Unit: UNIT_FLAG renames
[UNIT_FLAG_PLAYER_CONTROLLED -> UNIT_FLAG_POSSESSED]
[UNIT_FLAG_PVP_ATTACKABLE -> UNIT_FLAG_PLAYER_CONTROLLED]
Signed off by: Shauren, Warlockbugs.

(cherry picked from commit 081eab3cf5a5ec42917b2a7eaebf816fb36da423)
2021-09-26 16:07:09 +02:00
Shauren 453b59de57 Core/Maps: Adjusted logic in GetFullTerrainStatusForPosition to closer match what the client does regarding being inside WMOs
Closes #21625
Closes #21624
Closes #21516

(cherry picked from commit b9c6bbb51df0ed10f74617482740fedb91ff5366)
2021-09-25 01:04:21 +02:00
Keader 69663cc94f Core/Spells: Fix UNIT_CREATED_BY_SPELL in SPELL_EFFECT_SUMMON (#21756)
(cherry picked from commit 309738dc3e08f572fad661e96f149a017011758c)
2021-09-23 23:50:13 +02:00
Treeston fc05aba0d4 crash fix follow-up
(cherry picked from commit 6939f4eb7b023a6b2f8940ab12484523e1904860)
2021-09-23 22:28:48 +02:00
Treeston f69d12504c Core/Object: Bump hover delta handling on nearpoints downstack into GetNearPoint2D (from movement generators); functionality should be unchanged
(cherry picked from commit ebc96af6bb784819ba8824ac390864ae9ba12351)
2021-09-23 22:28:06 +02:00
Treeston bc89e1cdb0 Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
(cherry picked from commit 4692e10ca2ffed5ba2a0336e9c93962b0fad9eaa)
2021-09-23 22:21:29 +02:00
Treeston bf958da148 Core/Position: code style cleanup of position.h; no change in functionality.
(cherry picked from commit fb39980c52cdb28b9de43356ee37470c7fd6797c)
2021-09-23 21:31:15 +02:00
Shauren ee73948a64 Core/AreaTriggers: Rename spell_areatrigger* tables to areatrigger_create_properties* according to last MiscValue research for areatrigger effects
* Move areatrigger_template.DataX to areatrigger_create_properties.ShapeDataX
2021-09-16 22:22:14 +02:00
Traesh c60cb7bab1 Core/AreaTrigger Switch polygon vertices from Template to SpellMisc (#26827) 2021-09-12 17:50:13 +02:00
ariel- cfe69470a8 Core/Entities: don't skip immunity checks for positive spells
Closes #21626

(cherry picked from commit 9e0a343f729eb7e172c447dccb066f4f236aa11e)
2021-09-06 21:15:01 +02:00
ariel- 339a2acac8 Core/Entities: fix creatures ignoring immune flags. Closes #21578 for real
(cherry picked from commit 02f1399fde008d3cc40ed80cb859764fba15eeff)
2021-09-06 15:15:33 +02:00
ariel- 60ff73eeba Core/Spell: fix SendSpellMiss requiring caster Unit
(cherry picked from commit 7f947646f9d51b53b5297bfdddbada09500c53d3)
2021-09-05 22:48:28 +02:00
ariel- a2ea26816e 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

Closes #21578
Closes #21579
Closes #21581

(cherry picked from commit d6b9f148a772d07b9353a0db95a6f05c9c848a63)
2021-09-05 22:43:48 +02:00
Shauren 8a4e1119ac Core/Spells: Unify spell effect access api in both branches 2021-09-04 15:13:15 +02:00
ariel- 962f6d7988 Core/Spells: rework part 5: GameObject casting
Closes #21330
Closes #18885
Ref #18752

(cherry picked from commit 45c5e1b9d63796d168339a44f63418f220cf2403)
2021-08-28 15:59:11 +02:00
Shauren 2e2b298618 Core/Movement: Fixed creature hover
Closes #15177

(cherry picked from commit 2baa81065ba27f0a6d278a8dd8a79b7c831e0a2b)
2021-08-24 12:44:38 +02:00
Treeston e47e95b6dc Core/VMap: Add outdoor state to Map::GetFullTerrainStatusForPosition. Add WorldObject::IsOutdoors, basic member access.
Ref #21479.

(cherry picked from commit e79c595b695ea5f35b8324efbb7741ccb102bce9)
2021-08-08 21:21:34 +02:00
Wyreth 8713a62328 Core/Entities: remove grid-wide visibility from setActive and implement another method for it (#20725)
(cherry picked from commit 56874b44f0625f80442ea906f487e3253bdd16eb)
2021-08-08 21:21:34 +02:00
Jeremy 69edf282fa Partial: Core/Entities: Reduce the probability of units dropping under the map (#21322)
Reduce the probabilty of going under the map

(cherry picked from commit 9e0faace9a5114fc2324c2c601ba943272e0d6ff)

Revert "Core/Entities: Reduce the probability of units dropping under the map (#21322)"

(cherry picked from commit 2dadbda24ac1c2e6ff3dad650c7e25f4b3322342)
2021-08-08 21:21:34 +02:00
Killyana 4b6e76a5ef Core/SAI: Add an action_param3 to "summon gob" to control when the object will despawn
0 - For despawn when creature dies or time runs out
1 - For despawn after time
Closes #11601

(cherry picked from commit ca4f1e334a98cbd810168b24714c46201079fc5a)
2021-06-22 12:51:28 +02:00
Shauren 6ecfe58cae Core/Maps & Extractors: Move copypasted map file headers into a single shared file and replace #defines with enums 2021-05-29 21:21:37 +02:00
Shauren fb66575d38 Core/Grids: Move packet sending functionality out of MessageDistDeliverer and into separate, customizable class and unify LocalizedPacketDo, LocalizedPacketListDo as generic localizable action 2021-05-01 20:16:10 +02:00
Shauren 3a37a2e0d7 Core/Grids: Allow customizing packets sent with MessageDistDeliverer and MessageDistDelivererToHostile depending on receiver
* Switch combat log sending to that implementation
2021-04-30 00:08:07 +02:00
Jeremy 446fc391f0 Core/Entities: Fix some weird movement due to los issues (#21125)
* Core/Entities: Fix some weird movement due to los issues
- Made LoS check use collisionHeight instead of midsection. Value was too low.
- Gnomes will now have a breath bar more quickly than for example a tauren.
- Changes have been made to checking for ground z as well, some tweeking might be needed but removed most of the scattered +2.0f/+0.5f/we
* Add 0.05f to isInAir check in Creature::UpdateMovementFlags

(cherry picked from commit e42903ec16f4849b71bc8736e3151a1e11d3cd25)
2021-04-15 05:53:27 +02:00
Shauren f2202869f7 Core/PacketIO: Updated packet structures to 9.0.5 2021-04-09 20:57:47 +02:00
Shauren 2398c1e23c Core/Spells: Implemented SUMMON_PROP_FLAG_PERSONAL_GROUP_SPAWN 2021-03-28 20:22:05 +02:00
Shauren 33b3ebcae6 Core/Objects: Pass privateObjectOwner guid directly to SummonCreature functions 2021-03-28 20:22:05 +02:00
Shauren f21270b987 Core/Objects: Refactor private object checks into separate function 2021-03-28 20:22:05 +02:00
Matan Shukry 1082a6645e Core/Objects: Move personal summon handling from TemporarySummon/GameObject to WorldObject and check it using dedicated guid field 2021-03-28 20:22:05 +02:00
Gustavo 044110d423 Core/Entities: add extra use of UPDATETYPE_CREATE_OBJECT2 (#20955)
(cherry picked from commit 51c4196acf9d670601c0bba999498c8e7bb863dd)
2021-03-15 20:17:31 +01:00