Commit Graph
344 Commits
Author SHA1 Message Date
Shauren 25c0aaa83f Core/Players: Allow teleporting to a specific instance id 2022-05-14 20:40:24 +02:00
kvolk2git 299db7af1a Update cs_misc.cpp (#27418)
(cherry picked from commit 8ac63c7952bf74066abbbe981b5168bc02ad3efb)
2022-03-24 14:01:15 +01:00
kvolk2git e799c4e003 add item xxxxx show to who was added item (#27020)
Co-authored-by: Aokromes <[email protected]>
(cherry picked from commit 822b32b64bbea2640f68edd9d110f8379c4a3c42)
2022-03-20 19:44:19 +01:00
Giacomo Pozzoni a4b1cda2c0 Script/Commands: Allow to specify the target player in .additem command (#26997)
* Script/Commands: Allow to specify the target player in .additem command

New syntax: .additem <required item id> <optional item count> <optional player name>
Close #25875

* Move target player to new command ".additem to <player> <item> <count>"

(cherry picked from commit bebf1876ab506851a56e1619444e57d0f0b4b128)
2022-03-19 23:00:41 +01:00
Aokromes a7e90650fe Scripts/Misc: Remove 2 logs, they are handled by gm logs
(cherry picked from commit a462daa01c6b966821fadbd64b881020067cf6bd)
2022-03-19 22:54:49 +01:00
Carbenium 7b2ff1c1fc Scripts/Commands: Convert misc command table to new system
(cherry picked from commit 6b9afac82f18f88a7a981f16e970f1b65647f25b)
2022-03-11 14:08:17 +01:00
Gildor 7d01ad8b8f Scripts/Commands: Minor improvements in .pinfo and .unban character commands (#26586)
* Scripts/Commands: Minor improvements in .pinfo and .unban character commands

(cherry picked from commit 5446209b89146fdbe01627e806f7beddd6ae5de8)
2022-03-11 11:33:37 +01:00
Treeston b5f3a6fd80 Core/Maps: All RespawnInfo* handed to outside code are now RespawnInfo const*, to signify that outside code has zero business changing these.
(cherry picked from commit 803dc789e42ea2298a8bd1822849b6f2df82efe6)
2022-03-05 17:12:23 +01:00
jackpoz 13bf0e71b9 Scripts/Commands: Include map min height in ".gps" command
(cherry picked from commit 9994459bd197d5555cfa16ab3d35d9c362a563fd)
2022-03-05 17:01:36 +01:00
Treeston 106c9b7541 Scripts/Commands: Rename .additemset to .additem set to avoid ambiguity
(cherry picked from commit e11b466897752eb400428eafd05c7dbf08c562bf)
2022-02-27 21:03:20 +01:00
Treeston 46d4e2fa83 1eca51b follow-up, nuke command.permission from orbit; it was only duplicating data already stored in the core.
(cherry picked from commit 991dc8e050777b5e33ff22b008ab2125bae22437)
2022-02-27 20:59:19 +01:00
Treeston 3fd2eb126c [3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463)
(cherry picked from commit 1eca51b417678b9a48b28552925d5694105f82bb)
2022-02-27 20:08:41 +01:00
Shauren d057e057d3 Core/Misc: Optimize ChatCommand includes (include only where neccessary) 2022-02-11 21:57:45 +01:00
Treeston 7d0586812a Core/Misc: Fix some static analysis warnings exposed after 6b8f3d0.
(cherry picked from commit 59be657ca267667b3cbeb1f34d47df0382e97f53)
2022-02-05 23:05:14 +01:00
Treeston 013c9b2cb7 Core/ChatCommands: make ExactSequence more readable
(cherry picked from commit feaaa595cae735bb6093b24a88562c27b2723cfe)
2022-02-05 21:29:53 +01:00
Peter Keresztes Schmidt bdd4ccbd78 Core/ChatCommands: Drop PlayerIdentifier's cast operators which could return nullptr (PR #25431)
(cherry picked from commit 8985fc4046e9a9b43d873e4d7b89a71afb910517)
2022-02-05 21:25:23 +01:00
Treeston 42be7836df Chat/Commands: Eradicate ChatHandler::extractOptFirstArg
(cherry picked from commit 4f636b80e4942c4c9c4811496d1c1b77f767378d)
2022-02-05 16:21:54 +01:00
Treeston a65e7e0213 Scripts/Commands: Fix a crash in .help - closes #25360
(cherry picked from commit 944f49d61355926e0d9e5c2d16eb4ad1af03d13c)
2022-02-04 21:21:40 +01:00
Treeston 9f97fdd31a Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327)
(cherry picked from commit 534a2388b7c662c8796aabb1ec8cb424879799b6)
2022-02-04 00:27:14 +01:00
Peter Keresztes Schmidt 1a6564f42f Scripts/Commands: Convert argument parsing of some misc commands to new system (#25308)
* Core/Shared: Make WeatherType smart

* Scripts/Commands: Convert argument parsing of some misc commands to new system

(cherry picked from commit 5bab0e43c627c949bb5fb1d7fd014855c6c02b8e)
2022-02-04 00:27:12 +01:00
Giacomo Pozzoni 864d775280 Core/Misc: Fix static analysis issues (#25194)
(cherry picked from commit 07fd84b679fd6958b7e669a96c78783875e1b949)
2022-01-26 14:06:40 +01:00
Peter Keresztes Schmidt 1e1679a1f7 Core/DataStores: Port refactors from Update DBC field names to generated ones (#24999)
(cherry picked from commit c92950b3e1f6366d85d707365a8ad2caddafeecc)
2022-01-23 00:06:16 +01:00
ForesterDev 9d38eeec7e Core/Player: add helper methods for PLAYER_FLAGS_DEVELOPER (#24511)
* Core/Player: add helper methods for PLAYER_FLAGS_DEVELOPER. Update .dev command to new command model

* Rename _player -> player

(cherry picked from commit 8128bb97dbf4b5ba7cb0b624ce7cf7428d7bdc63)
2022-01-01 23:18:04 +01:00
jackpoz 68d947d42f Core/Log: Log all character kicks to "network.kick" category
(cherry picked from commit 31018c36527755166d8a297ac9e6c98a66f014ae)
2022-01-01 12:56:24 +01:00
jackpoz ecdc387df2 Core/Misc: Remove whitespace at the end of lines
(cherry picked from commit caae3886d24adf0a5fc95454bb1c45477057bde4)
2022-01-01 01:00:26 +01:00
Matan ShukryandShauren 8fabe5a3aa Core/Phasing: Implemented db spawns in personal phases (#26345)
Co-authored-by: Shauren <[email protected]>
2021-12-28 13:24:10 +01:00
ForesterDev 69f7686050 Core/Server: correct timestamp format for shutdown/restart notification broadcasts (#24181)
* Core/SmartScripts: implement SMART_ACTION_OVERRIDE_LIGHT and SMART_ACTION_OVERRIDE_WEATHER

* Core/Server: correct timestamp format for shutdown/restart notification broadcasts

* remove unexpected changes

* move enum from Common to Util

* Use enum class instead of enum

* Fix width for seconds 0 to 9

(cherry picked from commit 69231581e4f2d78384d3efe6f613be1b78e9d40f)
2021-12-22 01:25:24 +01:00
Michael 72e61625bc additional output for additem command (#24006)
* additional output for additem command

when removing items with additem:

if the user provides an amount too large of a negative amount, the command will now output the amount of items that could not be destroyed.

* renamed sql file to hopefully avoid conflicts

* added clarification to failure string

* changed unneeded else if condition to else

* code style; braces

* Update and rename 9999_99_99_99_world.sql to 2019_12_28_01_world.sql

(cherry picked from commit 6b19f4a0ab1f77ea969a080a6eea0379baf9f8df)
2021-12-19 15:46:20 +01:00
Shauren 8f3904f8fd Core/Map: Kill zoneId from RespawnInfo, all it did was significantly slow down startup to make one gm command faster
(cherry picked from commit 3a4216fd979eb2a7667b0861a770e9af4f242eab)
2021-12-18 20:57:38 +01:00
Treeston eee950cdd7 Core/Misc: Various dynspawn cleanup and refactors split off from pooling rewrite:
- Map::RemoveRespawnTime(SpawnObjectType, LowType, doRespawn) split into Map::Respawn and Map::RemoveRespawnTime, without the extra boolean
- Map::RemoveRespawnTime(RespawnInfo*) merged into Map::DeleteRespawnInfo(RespawnInfo*) and is now private
- Map::DeleteRespawnInfo(void) renamed to Map::UnloadAllRespawnInfos to properly describe what it does
- Map::ProcessRespawns now actually saves the delayed respawn time to DB if the respawn was delayed
- Map::AddRespawnInfo now takes const reference, and returns success as a boolean
- Map::AddRespawnInfo no longer offers an unused "replace" parameter
- Map::DeleteRespawnInfo no longer offers a variety of unused private overloads
- Map::SaveRespawnTime no longer offers a tantalizing writeDB parameter. Parameter is now called "startup" to properly describe what it does.
- Map::SaveRespawnInfoDB now takes RespawnInfo reference instead of all the various fields. Still public because compatibility mode. QQ.
- Map::GetWorldObjectBySpawnId sanitized
- Map::GetXRespawnTime methods sanitized to all go through Map::GetRespawnTime

(cherry picked from commit d60082ae866d77a12a9e6d09dfce27fc1cb5df90)
2021-12-16 01:33:09 +01:00
Treeston 2532de6acb Entities/Unit: Nuke Map::ForceRespawn from orbit, with the following implications:
- .npc respawn no longer causes stupid things to happen (Fixes #23014)
- ::DeleteFromDB methods on Creature and GameObject rewritten to be as sensible as such a colossally stupid method can ever be. They're static now.
- .npc delete and .gobj delete ported to new argument handling, and rewritten as per above. They can no longer crash the server when used in instances, too. Yay for that.
- Adjusted various dusty cobwebbed hacks around the core (why does waypoint visualization use permanent spawns *shudder*) to still work too.

(cherry picked from commit 84b7b2e08ea55575cbe62d795383d4a5341ffd4d)
2021-12-14 22:42:22 +01:00
ForesterDev 27886c7f5d Core/Player: add helper methods GetNativeGender/SetNativeGender/SetGender (#23520)
* Core/Player: add helper methods GetNativeGender/SetNativeGender/SetGender and fix some cases, where we should get player gender, instead of modified by display gender

* fix merge

* Add virtual methods for Unit class

(cherry picked from commit b47bb59e2a3e42aff3793517ef94f51678b54905)
2021-12-13 00:42:20 +01:00
ccrs 4e6c59dca7 Core/Unit: rename several getters to follow codestyle
uint8 GetLevel()
        uint8 GetLevelForTarget(WorldObject const* /*target*/)
        void SetLevel(uint8 lvl)
        uint8 GetRace()
        uint32 GetRaceMask()
        uint8 GetClass()
        uint32 GetClassMask()
        uint8 GetGender()

(cherry picked from commit 5c09ff51f7015b775def8d5cc1f678eaef37200f)
2021-12-13 00:42:20 +01:00
ccrs 1c5287032a Core/Movement: correct logic wrongly ported in 2a84562dc8
I'm referencing line 97 from ChaseMovementGenerator.
That commit introduced a modification in this use case:
- Chasing target is not my current victim, I should stop moving till it is my victim again
Changed To:
- Chasing target is not my current vicitm, I should stop chasing
My correction:
- I dont care about the relation of my current victim and my chasing target, I'm commanded to chase, something will tell me to stop chasing
--> Most likely: evade, new attackstart, etc.

the rest are just minor changes

(cherry picked from commit 9080e7863c28df7dc1c2af321964776e7b59e41a)
2021-11-21 14:17:23 +01:00
ForesterDev e58d737a93 Core/Commands: fix .appear command provide wrong undermap position (#22624)
(cherry picked from commit 1e99f98327189c00e9e5e552d332120f12d38f03)
2021-11-14 20:52:50 +01:00
Shauren cf4ec52d39 Core/Commands: Fixed .damage command to work with spell schools caused by bad strtok usage
Closes #22280

(cherry picked from commit bc3da555fea74fba6902bd0d2dfda773116c196a)
2021-10-21 00:18:13 +02:00
Treeston abaf5d8068 Scritpts/Commands: Fix area name display if no area present. Closes #21727.
(cherry picked from commit 2a50f9202bc36faf2b8b48cf52f2f86d974a4544)
2021-10-21 00:17:59 +02:00
ModoX 68c2fc8ff5 Core/Characters: Made homebind location a WorldLocation (this implicitly adds orientation) (#27055) 2021-10-16 01:17:47 +02:00
Shauren f6f2de76c7 Core/Commands: Remove the option to teleport to "startzone" with .unstuck command 2021-10-02 19:57:37 +02:00
ccrs 426f9f2f92 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).

(cherry picked from commit 982643cd96790ffc54e7a3e507469649f3b074d2)
2021-09-28 00:15:13 +02:00
ccrs 4793b073ee Core/Misc: movement header cleanup
(cherry picked from commit f9914caefc59f36ab7583432442a26b29124b7f1)
2021-09-26 01:22:17 +02:00
Treeston 1493920495 Core/Movement: Replace old TargetedMovementGenerator into ChaseMovementGenerator and FollowMovementGenerator, full rewrite for both.
- Chase to angle is now functional. Pets use this to chase behind the target. Closes #19925.
- Chase to arbitrary range interval works. Not used anywhere, but you can technically make hunter-like mobs.
- Pets now follow the hunter cleanly and without stutter stepping. Also fix some other things. Closes #8924.

(cherry picked from commit 2a84562dc85516f432bb1e5de9add23c28b26ce4)
2021-09-24 23:37:43 +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
ariel- f3548d45d0 Core/Spells: rework part 3: spells only handle at most one UnitAura and one DynObjAura during its lifetime
Closes #15088

(cherry picked from commit e8d5aa56cc48572d81e1898b7b4ff10cfa6d1957)
2021-08-28 15:59:11 +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
ariel- 3bc3b3eeeb Core/Globals: revert back to unordered_map for templates
Partial revert of commit b64c5043140dc7b7908e259e441de16cc0261320
See discussion on https://github.com/TrinityCore/TrinityCore/commit/b64c5043140dc7b7908e259e441de16cc0261320

(cherry picked from commit b75ff7d4bf13fb4778843c99521223becc096ca0)
2021-06-16 01:29:25 +02:00
ariel- 21556667c1 Core/Globals: throw some RAII into ObjectMgr, and load templates into vectors
Ref #14274

(cherry picked from commit b64c5043140dc7b7908e259e441de16cc0261320)
2021-06-16 01:00:11 +02:00
ariel- fccf1a8c62 Core/Auras: removed caster dependency from core
- Decoupled Unit logic: split of spell critical chance into done (caster bonuses) and taken (target bonuses), this allows to precalculate caster bonuses on aura apply and then check victim's auras on damage/healing calc
- Made static a bunch of methods (they no longer have this pointer because they are now called from periodic handlers which may or may not have an active caster in world)
- Simplified all AuraEffect bonuses into AuraEffect::_amount, no more duplicated code
- Critical chance and whether or not caster is player owned unit (for resilience calcs) is now saved one level upper, on Aura itself (it's impossible as of 3.3.5 to have different effects with different critical chances)
- Minor cleanup of SPELL_DAMAGE_CLASS_NONE and Arcane Potency (#18813) crit handling

Closes #19876

(cherry picked from commit cb9e72e521d3cc415dd15bf6912c87f89e41b92a)
2021-06-13 00:59:13 +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
Treeston 8b7728f82e Core/Map: New Map::ForceRespawn to override objections and force a respawn (equivalent to force = true). Use this to fix various GM commands.
Scripts/Valithria: Fix an issue that could get the encounter stuck in an unloaded state.

(cherry picked from commit 3bb33e3108c65ba8a1c35b934526562aa542b63b)
2021-05-16 21:56:06 +02:00