Commit Graph
718 Commits
Author SHA1 Message Date
Meji 562f65f3f8 Core/Creatures: Compute the level from ContentTuning (#28871) 2023-03-31 01:01:35 +02:00
Meji 81ea6f54d9 Core/Creatures: Compute CombatReach and BoundingRadius using DisplayScale (#28863) 2023-03-30 18:54:27 +02:00
Meji cc57c9dad5 Core/Creatures: Improved movement interruption while casting spells (#28845) 2023-03-24 12:27:01 +01:00
Shauren 512f5138d4 Core/Creatures: Use togglable CREATURE_STATIC_FLAG_4_TREAT_AS_RAID_UNIT_FOR_HELPFUL_SPELLS instead of equivalent flag from creature_template.type_flag 2023-03-17 23:02:47 +01:00
Shauren 6e309ed17f Core/Creatures: Allow flagging creatures to not clear their tap list when evading 2023-03-15 19:42:58 +01:00
Shauren eb93afffc0 Core/Creatures: Allow toggling creature default root state 2023-03-13 14:52:11 +01:00
Shauren 155cf58236 Core/Creatures: Allow scripts to change creature loot id (must be done before death) 2023-03-13 00:09:18 +01:00
Shauren 91e7401e64 Core/Creatures: Allow turning off experience gain from creatures by scripts 2023-03-12 13:20:25 +01:00
Shauren 0956873613 Core/Creatures: Allow overriding default gossip menu id 2023-03-12 00:13:49 +01:00
Shauren 6bcbc786e5 Core/Creatures: Wrap all creature static flags in a structure 2023-03-11 13:45:16 +01:00
Shauren 379b1ec6ae Core/Creatures: Added fields for static flags to creature class for future use 2023-03-10 21:50:01 +01:00
Shauren 689d3a667a Core/Creatures: Allow overriding non-gossip based trainer ids for creatures 2023-03-10 19:09:48 +01:00
Shauren 3df16c12b7 Core/Scripts: Move EvadeReason outside of CreatureAI class 2023-01-19 21:23:06 +01:00
Ovahlord 4119f69b21 Core/Creatures: Split creature_addon and creature_template_addon's byte columns into seperate ones (#28562)
* Instead of dumping raw byte values into these fields, we now only allow setting values which should be accessible to database devs. The remaining byte values should be handled by core internals and spells (pet talents and shapeshifting for example)

(cherry picked from commit 6f835c233f7605d74926a2a3058634c9de478617)
2023-01-12 22:55:19 +01:00
ModoX 25c7656ffd Core/Creatures: Restore IsMovementPreventedByCasting logic for casting units (non-channeled)
* this partly reverts e2ed3e23f8
2023-01-09 23:15:21 +01:00
Meji e2ed3e23f8 Core/Creatures: Fix IsMovementPreventedByCasting logic (#28551) 2023-01-09 23:08:22 +01:00
Shauren d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
SeydenandShauren 61c51b76c0 Core/Creatures: Implement StringId for Creatures, a custom identifier to make finding specific creatures in script easier (#28500)
Allows targeting specific spawns without hardcoding guids or find a bunch of different creatures with a single search

Co-authored-by: Shauren <[email protected]>
2022-12-27 16:39:05 +01:00
Meji 263ce0cd30 Core/Creatures: Never enable gravity for creatures that can only fly (#28411) 2022-12-17 23:48:04 +01:00
ModoX e275c39586 Core/Items: Dropped deprecated ItemFlag2 ITEM_FLAG2_DONT_IGNORE_BUY_PRICE (#28382) 2022-12-17 17:53:37 +01:00
Shauren de7c03c838 Core/Spells: Extended mechanic mask to uint64 2022-12-04 15:07:36 +01:00
Shauren 879c0cccfc Core/GameObjects: Implemented per player gameobject state and visibility for looted non-consumable chests 2022-10-21 22:11:00 +02:00
Shauren 133334a902 Core/Loot: Implemented personal loot and tag sharing for non-boss loot 2022-10-17 23:11:46 +02:00
Shauren 3ef5079fee Core/Loot: Move loot rolls from Group to Loot
* Partial port of cmangos/mangos-wotlk@ffdf9a05d6
2022-09-16 16:58:03 +02:00
Meji 8660655de0 Core/Creatures: Don't remove hovering from creatures that can fly (#28217) 2022-09-07 14:48:44 +02:00
Shauren 66b03acc47 Core/Auras: Improve aura interactions with immunities on spell effect level
* Effects that target is immune to will be suppressed instead of completely removed

Closes #28096

(cherry picked from commit 3306a4d06cc557967c23adcc60c2e3257811b324)
2022-09-05 22:23:03 +02:00
Shauren 7957e2d380 Core/Loot: Allocate Loot separately from objects 2022-09-01 20:07:58 +02:00
Shauren 94d829c84f Core/Pools: Implemented pooling for instances 2022-06-11 14:04:56 +02:00
Jinnaix 45bbbd5acd correctly apply npc pvp flags (#27974)
(cherry picked from commit 2237926cec890d12849b0c8af14ada6dd6c7e6aa)
2022-06-10 19:22:08 +02:00
Shauren 630b60eb0d 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-05-25 22:14:32 +02:00
Shauren a4fba9b3c4 Core/Creatures: Only use scaling data when it was actually loaded for the creature, not always if it just exists in db
Closes #27954
2022-05-15 22:10:18 +02:00
Shauren 538fa8e97f Core/Spells: Cleanup movement checks in spells - use correct interrupt flags 2022-05-07 23:31:55 +02:00
Shauren 738f285432 Core/Spells: Rename SpellAttr5 to use official attribute names
* Implemented SPELL_ATTR8_HASTE_AFFECTS_DURATION
2022-05-02 01:11:38 +02:00
Shauren 8d16a79dea Core/Spells: Rename SpellAttr4 to use official attribute names
* Corrected implementation of SPELL_ATTR4_CLASS_TRIGGER_ONLY_ON_TARGET
* Implemented SPELL_ATTR4_NO_HELPFUL_THREAT
* Implemented SPELL_ATTR4_NO_PARTIAL_IMMUNITY
* Implemented SPELL_ATTR4_ALLOW_PROC_WHILE_SITTING
* Implemented SPELL_ATTR4_USE_FACING_FROM_SPELL
* Implemented SPELL_ATTR4_BOUNCY_CHAIN_MISSILES
* Implemented SPELL_ATTR4_AURA_NEVER_BOUNCES
* Implemented SPELL_ATTR4_AURA_BOUNCE_FAILS_SPELL
* Implemented SPELL_ATTR4_AURA_IS_BUFF
* Implemented SPELL_ATTR5_MELEE_CHAIN_TARGETING

* Implemented SpellEffectAttributes::ChainFromInitialTarget
2022-05-01 20:01:13 +02:00
Shauren b47185cabf Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlag 2022-03-27 18:14:47 +02:00
Shauren 4eba978670 Core/Misc: Rename SetXXXFlags updatefield functions to ReplaceAllXXXFlags 2022-03-26 18:59:44 +01:00
Shauren 1d9ed7fb46 Core/Creatures: Refactor ObjectMgr::ChooseCreatureFlags to allow selecting only 1 flag field
(cherry picked from commit e4430cd2bedf2079961bd1a30ba9f5f1de93af82)
2022-03-21 00:07:29 +01:00
offl ad0ebedd9b Core/Misc: Rename UNIT_FLAG_SWIMMING to UNIT_FLAG_CAN_SWIM
Ref #26912

(cherry picked from commit e4a82ee97ad99f751216af47c88f29ff118d771b)
2022-03-15 23:47:31 +01:00
offl c4906ce60b Core/Misc: Rename UNIT_FLAG_NOT_SELECTABLE to UNIT_FLAG_UNINTERACTIBLE (#26913)
(cherry picked from commit c4741a131a0a28b69c228d3637beab7090e5f1e3)
2022-03-15 23:03:26 +01:00
offl 53d19b09f4 Core/Creature: rename CREATURE_FLAG_EXTRA_IGNORE_COMBAT into CREATURE_FLAG_EXTRA_CANNOT_ENTER_COMBAT (#26762)
Co-authored-by: offl <[email protected]>
(cherry picked from commit 06b554c36e8f196667e0a72820b37b9dc25bdde0)
2022-03-11 21:20:04 +01:00
Giacomo Pozzoni 9c3dc31a37 Core/Pools: Fix pools with 1 member never spawning anything anymore (#26620)
* Core/Pools: Fix pools with 1 member never spawning anything anymore

Attempts to fix a 6 years old bug and never fixed by the original author.

* Remove respawn times from db once a respawn has been handled

* Allow to specify if Despawn1Object() should save or not the respawn time. We don't need to do that when respawning an object.

* Apply the same fix to GameObjects too

(cherry picked from commit c8ca48823d45dadb042a80637eff954483dd5328)
2022-03-11 13:39:15 +01:00
jackpoz d0fe16b787 Core/Misc: Fix issues reported by static analysis
(cherry picked from commit 33dace231c5a169375523ffa89a2cc3fa48737bd)
2022-03-11 11:48:18 +01:00
Edder 4dbacb6985 Core/Vehicle: Setting home position of creature passenger on AtEngage (#26482)
Co-authored-by: Edder <[email protected]>
(cherry picked from commit fb88a1409ff60343edb0c539d406a961724fcc4e)
2022-03-09 14:55:40 +01:00
Edder 8202dc28c2 Core/Quest: Threat From Above (#26468)
* [Quest] Threat From Above #26355

* [Quest] Threat From Above TrinityCore#26355

* Core/Quest: Threat From Above #26468 - modified sql according to guidelines; added override keyword

* Rename 2021_04_24_00_world.sql to 2021_04_25_00_world.sql

Co-authored-by: Edder <[email protected]>
Co-authored-by: Giacomo Pozzoni <[email protected]>
(cherry picked from commit 3e407c7d1c79cc94bf932880ee0eb68058d139fd)
2022-03-09 00:42:48 +01:00
offl baa374a76b Core/Creature: Create & use CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH (#26448)
Co-authored-by: offl <[email protected]>
(cherry picked from commit 642796f3f2c66c596358d7376125c99599e73b67)
2022-03-08 22:54:32 +01:00
offl e72264cfbd Core/Misc: Define / rename attributes and flags (#26315)
Co-authored-by: Trond B. Krokli <[email protected]>
(cherry picked from commit e6d9d9ead99aba4bfbd0b6389cb7a88827fe40d7)
2022-03-07 23:35:21 +01:00
Giacomo Pozzoni a4a3e2e759 Core/Creature: Allow to skip Rate.Corpse.Decay.Looted when calling SetCorpseDelay() (#25989)
Add a second parameter to SetCorpseDelay() that specifies if Rate.Corpse.Decay.Looted setting should be ignored, false by default (aka don't ignore by default).
Add a second parameter to SMART_ACTION_SET_CORPSE_DELAY to specify if Rate.Corpse.Decay.Looted should be included, false by default (aka ignore by default).

(cherry picked from commit d5fc86af8b22fed5b054e51349eb3ab47b06b784)
2022-03-06 18:59:38 +01:00
Giacomo Pozzoni 5180abfb19 Core/Creature: Add new db field InteractionPauseTimer (#25880)
* Core/Creature: Add new db field InteractionPauseTimer

Add new db field InteractionPauseTimer to allow to define different interaction pause timers for each creature (the previous system was a global setting in worldserver.conf Creature.MovingStopTimeForPlayer)

* Set all columns in creature_template_movement as optional (can be NULL, default NULL). Fill only the columns that should override the default C++ value

* Use the InteractionPauseTimer value throughout the code instead of Creature.MovingStopTimeForPlayer

* Handle InteractionPauseTimer set to 0 as "don't stop at all"

* Implement InteractionPauseTimer in creature_movement_override

creature_movement_override allows NULL values, in which case the values from creature_template_movement will be used for those columns that are NULL, falling back to default C++ values if creature_template_movement has NULL values too (or no rows for the creature)

* Read default InteractionPauseTimer from worldserver.conf

* Rename 2021_99_99_99_world.sql to 2021_01_22_00_world.sql

(cherry picked from commit a22bc236ebc038c723774e5b38cd93e814ccc43d)
2022-03-06 00:56:46 +01:00
Giacomo Pozzoni 6b242eee13 Core/Unit: Fix movement hiccups in water (#24020)
* Core/Unit: Allow to define Units which can enter water but cannot swim

Allow to define Units which can enter water but cannot swim, i.e. crabs walking at the bottom of a sea.

* Add UNIT_FLAG_SWIMMING to creatures when entering combat

* Fix charmed creatures not entering water

* Always allow Creatures controlled by players to enter water

* Add swimming flag when possessing a unit and remove it properly at the end, even if the creature engaged combat before and after.
When adding/removing UNIT_FLAG_SWIMMING manually calling Creature::RefreshSwimmingFlag(true) might be required.

(cherry picked from commit fc1a0d936888395f114028af3337e7d674e0a43c)
2022-03-05 23:04:24 +01:00
Kargatum 373ed8f46b Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf

(cherry picked from commit a32b6b8ac4c81128a56b282f20837fb085bdd9e7)
2022-03-05 20:07:57 +01:00