Commit Graph
1271 Commits
Author SHA1 Message Date
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
Aokromes 30cec73c61 Coding standards (#23514)
* Coding standards

* revert part

(cherry picked from commit fe744977c917957e112704ccd66e228b826b3f7a)
2021-12-13 00:42:17 +01:00
Shauren f61de627e5 Core/Commands: Fixed crash in .npc showloot 2021-12-12 19:19:29 +01:00
Treeston 35e55f1089 Core/Entities: Kick engagement logic upstairs to Unit (from ThreatManager), since all Units with AI need it (not just those with threat list). Fixes #17981.
(cherry picked from commit dbe3bbefe734f8824e8f07c302e256f0d446b974)
2021-12-12 00:31:15 +01:00
Wyrserth ae43820ca0 Core/Commands: implement commands to look up a map/item/quest name for a given id (#23416)
* Core/Commands: implement commands to look up a map/item/quest name for a given id.

* Add entry to updates table.

* Rename 9999_99_99_99_auth.sql to 2019_06_16_00_auth.sql

* Add missed change, thanks jackpoz!

* Update auth_database.sql

(cherry picked from commit ce3dcdcb1ad1887fb3a531aaea09482c12b5e4f3)
2021-12-11 14:12:54 +01:00
jackpoz 97249ff7b4 Core/Channel: Fix CRT Debug Assert triggered with invalid channel names
(cherry picked from commit f0bd90cc35098475b20e736cf98885c99c04be3d)
2021-12-08 23:43:19 +01:00
jackpoz c73fd0e6e3 Scripts/Commands: Add .debug asan commands
Add ".debug asan memoryleak" and ".debug asan outofbounds" commands to trigger Address Sanitizer warnings at runtime (or other dynamic analysis tools)

(cherry picked from commit 71d15ea25be3e86646faaa3266617a0b8177972f)
2021-12-02 00:39:20 +01:00
Jozef Dúc b717603a9b Core/Object: Range check (#23179)
* Should solve #23062. All credits to @xvwyh

* Remove unused variables

* Remove unused variable

* Cast int32 to uint32

* Remove G3D headers from core header file

* Change door distance

* Update GameObject.cpp

Add newline

* Update GameObject.h

Indentation

(cherry picked from commit 32e1de39a26628dcb64bc21ad415afb2ad938925)
2021-12-02 00:39:20 +01:00
ForesterDev a2c0f6d321 Scripts/Commands: add some missing checks for .guild create command (#23201)
* Core/Conditions: implement CONDITION_GAMEMASTER

* Scripts/Commands: add some missing checks for .guild create command

(cherry picked from commit ae8750716f63ddc41f21bb38ceafe949d7260f0e)
2021-12-02 00:39:20 +01:00
Gustavo 6aaf9aaf3b Core/Misc: Warning fixes (/W4) (#23149)
* Core/Misc: Warning fixes (/W4)

(cherry picked from commit 50f122de778bca324d0f4c81f1e8eb30b90a7314)
2021-11-26 11:18:15 +01:00
jackpoz 97401a2997 Core/Commands: Don't re-add active quests with ".quest add" command
(cherry picked from commit f17120cc784ee1f52a24424a78a64d71ad73b713)
2021-11-24 00:02:13 +01:00
TheWinchesters 47adf2e4c8 [3.3.5] Commands: lookup player shows which character is online (#23039)
* Show 'online' for every online player in lookup player commands

(cherry picked from commit a0056951f7e425341760ebf3a7770477ef7f4446)
2021-11-23 22:52:53 +01:00
jackpoz 3ddbf02dc7 Core/Misc: Fix issues reported by static analysis
Fix issues reported by Coverity Scan

(cherry picked from commit 2fda1572d214d0b114e0291106363f49c2d3179e)
2021-11-23 22:20:39 +01:00
Shauren dcd69240b6 Core/Commands: Fixed creature/gameobject move commands not updating which cell they belong to
Closes #22720

(cherry picked from commit ec1cfa36f4c286ad8037516460a4e99ea5d7a5ed)
2021-11-21 19:52:26 +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
Giacomo Pozzoni ff2cd4a032 Scripts/Commands: Fix crash caused by .set npc model (#22877)
* Scripts/Commands: Fix crash caused by .set npc model

Fix crash caused by .set npc model with invalid model id

(cherry picked from commit 20ea24bf5ccf165ce19139d1f7ec7c650719eb68)
2021-11-18 15:57:20 +01:00
Rochet2 afac2b1742 Add rotation to .gob info (#22723)
* Add rotation to .gob info

- Add rotation (yaw, pitch, roll) to .gob info command
- Replace LANG_SPAWNINFO_DISTANCEFROMPLAYER with LANG_SPAWNINFO_ROTATION
- Fix description of .distance to describe the command arguments (the more you know..)
- Fix .gob info guid targetting nearest gameobject instead of finding with given guid
- Reorder the info data slightly
- Print location and rotation data regardless of object found in world
- Add error messages for when object is not found by guid or entry

(cherry picked from commit 257ae44a20ed40469dd821845de8e27c0af838c7)
2021-11-15 21:49:37 +01:00
Treeston c977087d58 Core/Misc: Partial merge of 3.3.5-dbedit:
- Added SmartEnum.h for enum iteration, stringification, and more, courtesy of krabicezpapundeklu/smart_enum
- Moved a bunch of enums in SharedDefines.h to the new system
- Miscellaneous utility methods ported

Core/Util: Redesign SmartEnum to properly work for large
 enums (>64 entries) and play nice with IDEs (PR #22768)

(cherry picked from commit 338e8ba0fea8b4b15120c96fff15a6c4b1a52593)
(cherry picked from commit f7ca0877a3736000a6e3b4ed09ac5f08b4d8e3f0)
(cherry picked from commit 207093475a177e9fd29696e80fdd06a11324782d)
(cherry picked from commit ee68cf33921944fd3f8c188044906998cf10ff2a)
(cherry picked from commit c16d461e16f0704bb11040faff30953d33ba2188)
(cherry picked from commit f6b0d99e2c0bc22b44d6f3cfdae50cbba7d51de8)
(cherry picked from commit bc1f456125c1b6c90617a514152d69c40ce64886)
2021-11-15 21:34:03 +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
ForesterDev 4e66353854 Core/Commands: Fix quest remove error message (#22623)
(cherry picked from commit 82a1448705257db0b3edcffdc9a65008224bc371)
2021-11-14 20:52:18 +01:00
Shauren 9f2ccf9924 Core/Commands: Fixed crash in .go commands
Closes #22498

(cherry picked from commit b27a76969a2fdbf2e390f28478b9b8ccdb48e2bd)
2021-11-10 00:34:17 +01:00
Treeston 5ed891a0f0 Scripts/Commands: Add .debug dummy. It does nothing, which means you can make it do anything.
(cherry picked from commit 97ade1321b6d18393202a1448f2b042fc1ff0546)
2021-11-08 23:18:32 +01:00
Aokromes 3621482e44 kill some whitespaces
(cherry picked from commit cc49b7bb3024c6eb36d9bbbe7b151d7ae9ba91b7)
2021-10-26 23:55:38 +02:00
Treeston f91faa161c Core/ChatCommands: Implement achievement link parsing
(cherry picked from commit a4c666dc3d75d0c77fdeb52a6d2cd21100ba4588)
2021-10-25 15:06:41 +02:00
Treeston 33c8df9cf1 Scripts/Commands: Rewrite .account commands to new model
(cherry picked from commit c59388783a6009301548dae2c29e2a29c71aadf7)
2021-10-25 14:16:49 +02:00
Treeston 0c681b6509 Scripts/Commands: New argument parsing methodology (PR #22363)
- Detect the arguments accepted by the command handler
- Tokenize out those arguments automatically and feed them to the handler
- Unmatched rest of the string can be accepted by trailing char const* or CommandArgs*

(cherry picked from commit 66a87c4642d25f27ca24254cfeb0a0c4b21036b1)
2021-10-25 00:03:23 +02:00
Treeston f1ecb976ec Core/RBAC: Simplification part 1. Nobody needs different permissions for each type of .go command.
(cherry picked from commit 5843724debc3642434c055e5cf6f29a1eaf65358)
2021-10-23 22:31:27 +02:00
Treeston af8b4853da Scripts/Commands: Cleanup and trinity_string for .go instance. Hi shauren.
(cherry picked from commit 8e4f6777a28ac7b5d59ff1ff852e5184d877ff96)
2021-10-23 19:53:19 +02:00
Treeston 82ecd32d9c Scripts/Commands: New command ".go instance". Goes to an instance.
(cherry picked from commit 6a0870a9993f5a1016439644d4a9ab3fd89277e5)
2021-10-23 19:08:53 +02:00
Treeston dd239e8b0f Scripts/Commands: .npc info now includes react state info
(cherry picked from commit 2c030ed5e7dc809e384415716789e0a663352d16)
2021-10-23 14:33:21 +02:00
Treeston e4e8c1c59c Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans
(cherry picked from commit 042f5515e4f3e52b0d2e23d9b9e147041849ce12)
2021-10-22 23:47:51 +02:00
Seyden 8f097e4425 Core/Scripts: Implement script name reloading
* Authored by Seyden
* Co-authored by Naios
* We thank Shauren for your helpful feedback
2021-10-22 12:52:37 +02: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
Shauren 8a309542ce Scripts/Commands: Fix .quest complete to properly work with PvP kill quests 2021-10-19 23:46:09 +02:00
ModoX 68c2fc8ff5 Core/Characters: Made homebind location a WorldLocation (this implicitly adds orientation) (#27055) 2021-10-16 01:17:47 +02:00
Treeston ab5792a33a Scripts/Commands: Demangled typeinfo of f7466c2 for gcc/cmake
(cherry picked from commit f93cb448f1d8b8346dff13fffacfd3c9f85edde0)
2021-10-14 19:18:16 +02:00
Treeston c4458dd08e Scripts/Commands: .npc info and .gobj info now show runtime AI typenames in addition to AIName/ScriptName.
Trying to figure out what base AI type a given creature is using has annoyed me one too many times (hi there, e8f9068).

(cherry picked from commit f7466c28a5f2c2acd2669991cb3a666c997aafab)
2021-10-14 19:16:54 +02:00
Shauren 3fe9b0a296 Core/Conversations: Replace _participants with generic personal object implementation 2021-10-09 13:30:47 +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
ModoX 00dd4629bd Core/Scenes: Defined more flags and implemented FadeToBlackscreenOnCancel (#26975) 2021-10-05 22:36:22 +02:00
Shauren cbf1f2883a Core/Spells: Reduce number of CastSpell overloads to 1 2021-10-03 19:58:03 +02:00
Shauren 2d7af28e9f Core/Transports: Store information about continent transports 2021-10-02 19:59:56 +02:00
Shauren f6f2de76c7 Core/Commands: Remove the option to teleport to "startzone" with .unstuck command 2021-10-02 19:57:37 +02:00
Shauren a098137b59 Core/Commands: Lookup spell command fixes
* Crashfix
* Will now look at spell effects other than EFFECT_0 to find learned spell
2021-10-01 22:30:39 +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
jackpoz 330881518a Core/Quest: Fix crash caused by disabled quests
Fix crash happening when a disabled quest was added and rewarded (through a GM command). Disabled quests are not validated on startup and they can reference invalid spells.

(cherry picked from commit 5f6af8c6cbe7c5a622dd51a77e0d27db33c99118)
2021-09-26 16:21:11 +02:00
Treeston 9f06cb63d2 Core/Threat: My dictionary informs me that "fixtate" is not, in fact, a word. Corrected to "fixate".
fd33b1c follow-up

(cherry picked from commit 1d27f83bda1053578911f53b6231bcb96c9b7b1e)
2021-09-26 16:13:15 +02:00
Treeston 16eb5032ad Core/Threat: Re-add fixtate system. I am being told Netherspite needs it.
(cherry picked from commit fd33b1cd02a1c69fc78f47f079eadc43c331d054)
2021-09-26 16:12:33 +02:00