Commit Graph
2482 Commits
Author SHA1 Message Date
NoName 61f3d51143 Core/Movement: Implement MoveSplineFlag::Enter_Cycle (#24049)
by xvwyh

(cherry picked from commit 40542f01e3fec0bff2c6e5eadbe20e58f19b0fd8)
2021-12-22 14:33:58 +01:00
Giacomo Pozzoni 562c567b1e Core/Calendar: Add some additional validation when creating events (#23797)
* Core/Calendar: Add some additional validation when creating events

Allow only 30 player events and 100 guild events to be created.
Don't allow to create guild events if player is not in guild.
Send some more error messages to the client (not blizzlike errors but better than nothing).

* Core/Calendar: Add some additional validation/checks

Add guild id check in GetPlayerEvents().
Change error message in HandleCalendarCopyEvent() to be the same as in HandleCalendarAddEvent() when creating an event in the past.

* Core/Calendar: Add some additional validation/checks

Reduce the number of CMSG_CALENDAR_ADD_EVENT packets a seconds allowed from 10 to 3.

* Core/Calendar: Add some additional validation/checks

Implement 5 seconds cooldown between the creation of calendar events

* Core/Calendar: Add some additional validation/checks

Don't allow to copy events of a different player/guild

* Core/Calendar: Implement automatic deletion of old events

Implement automatic deletion of events older than 1 month (30 days).
Fix debug assertion triggered when deleting a character with calendar events.
Avoid double std::set lookup when deleting events when deleting a character.

NB: The whole CalendarMgr/CalendarHandler code should be checked line by line for bugs/crashes/exploits.
(cherry picked from commit fb059722fdb18a94d47b3f44a5b2d7f183bf5a29)
2021-12-18 22:19:05 +01:00
Artamedes 00ba5df52b Core/Handlers: Handle CMSG_REQUEST_PET_INFO - this fixes when you /reload and the pet bar disappears (#23762)
(cherry picked from commit 6ebe1afeeccb847702c12e522bddaa7b5694dc38)
2021-12-18 21:35:41 +01:00
Giacomo Pozzoni 92fc09b1b5 3.3.5 Don't allow to summon dead hunter pets (#23271)
* Core/Player: Add support to SMSG_PET_TAME_FAILURE

* Core/Pet: Don't summon dead pets when using "Call pet"

(cherry picked from commit a0f8ce14e9a7aeceea035a733625cc695909a5bd)
2021-12-17 23:56:51 +01:00
Shauren e8b3dda4a0 Core/BattlePets: Wrap battle pet related code in a separate namespace 2021-12-17 14:23:43 +01:00
Aokromes 3ad5bc1e15 Core/Misc: More coding standards (#23519)
* Core/Misc: More coding standards

* revert part

* "void  " or more to "void "

* fix? reject

* remove more double whitespaces

* remove more double whitespaces

* more standards

* more coding standards

* More standards

* more coding

* more coding standards

* more coding standards

* And more standards

(cherry picked from commit 574a7c8d3d5f5a5660295deb70e905cf4dd756c4)
2021-12-14 23:04:29 +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
Wyrserth cc141e9bad Core/Group: implement automatic party/raid leader change when the leader has been offline for two minutes (#23398)
* Core/Group: implement automatic party/raid leader change when the leader has been offline for two minutes.

* Add #23396 to make testing easier.

* Prioritize assistants in raids.

* Fix dumb mistake and apply suggested change, thanks VincentVanclef and jackpoz!

(cherry picked from commit e906a2fe7d71fc17de9f7ea4778970beb3f9265e)
2021-12-11 13:06:25 +01:00
Shauren e2de5000ac Core/Movement: Defined movement force type enum 2021-12-08 19:02:02 +01:00
Shauren 6ebd4eb202 Core/Misc: Fixed dynamic build 2021-12-06 10:24:29 +01:00
Chaouki Dhib c19a4db1c1 Core/Movement: Add time synchronisation (#18189)
(cherry picked from commit 975f1e364a6a68be2beca261a64ea8aecc16f6f6)
2021-11-30 22:11:36 +01:00
Shauren 684cd9d968 Core/Movement: Implement initializing parabolic splines using jump gravity instead of max parabolic height 2021-11-27 21:56:00 +01:00
MejiandShauren 93c668ac50 Core/BattlePets: Implemented BattlePetSpeciesFlags::NotAccountWide (#27303)
Co-authored-by: Shauren <[email protected]>
2021-11-25 20:55:12 +01:00
Chaouki Dhib 4507a02ada Core/Movement: Implement move time skipped handler (#22994)
* Implement CMSG_MOVE_TIME_SKIPPED handler and move it to MovementHandler.cpp

* Add better error handling

* Update MovementHandler.cpp

(cherry picked from commit f9ed72e351ecdafe77da2036d9fd68e46da2f3ab)
2021-11-23 21:18:07 +01:00
Shauren c28ffca616 Core/Misc: Port style changes from d8819147b023f318c0ca2c42da4d05e4f9551cce 2021-11-21 20:15:35 +01:00
MejiandShauren 8614690e27 Core/BattlePets: Implemented battle pet name query packet (#27294)
Co-authored-by: Shauren <[email protected]>
2021-11-20 19:06:14 +01:00
Shauren 8cc6520b89 Core/Spells: SpellHistory updates
* Add duration override argument to StartCooldown (for cooldowns sent to client)
* Research new SMSG_SPELL_COOLDOWN flags
* Send interrupt school lockouts with newly defined SPELL_COOLDOWN_FLAG_LOSS_OF_CONTROL_UI
* Fixed packet structure of SMSG_MODIFY_COOLDOWN
* std::chorno-ification
2021-11-20 00:28:48 +01:00
MejiandShauren 895367e69f Core/BattlePets: Journal lock improvements (#27178)
Co-authored-by: Shauren <[email protected]>
2021-11-19 15:37:21 +01:00
Shauren 9be92e218c Core/PacketIO: Fixed SMSG_BATTLE_PET_ERROR structure 2021-11-16 20:54:15 +01:00
Shauren b981606575 Core/PacketIO: Fixed SMSG_LEVEL_UP_INFO structure 2021-11-16 15:53:40 +01:00
Shauren 14b8d7d839 Core/PacketIO: Implemented splash screen opcodes 2021-11-12 21:53:40 +01:00
Shauren bd2d8875a1 Core/PacketIO: Rename new 9.1.5 opcodes 2021-11-11 12:36:01 +01:00
Treeston 5fe69351b0 Core/Chat: Some hyperlink follow-ups:
* Ignore messages containing invalid links again instead of trying to sanitize them. Closes #22451.
* No longer filter messages on the addon channel. Closes #22450.

(cherry picked from commit e858706270c3059acf6915e7cf655eed0f7e88bb)
2018-09-18 01:28:57 +02: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 3917c2ad01 Core/Misc: Send saved client settings instantly after login, not only after entering world 2021-11-06 18:33:44 +01:00
Shauren 82c2365782 Core/Misc: 9.1.5 enum updates 2021-11-05 00:14:48 +01:00
Shauren 5c8a058120 Core/PacketIO: 9.1.5 updatefields and SMSG_UPDATE_OBJECT structure 2021-11-04 21:47:03 +01:00
Shauren 792721ad64 Core/PacketIO: Updated remaining packet structures to 9.1.5 2021-11-02 22:54:15 +01:00
Shauren 74eb6814a1 Core/PacketIO: Updated CMSG_UPDATE_MISSILE_TRAJECTORY to 9.1.5 2021-11-02 22:53:56 +01:00
Shauren aae288e049 Core/PacketIO: Rename DepositGuildBankItem to AutoGuildBankItem to match enum name 2021-11-02 22:53:06 +01:00
Shauren 966ae04f02 Core/PacketIO: Updated account data packets to 9.1.5 2021-11-02 22:52:28 +01:00
Shauren 9630c1b1e5 Core/PacketIO: Updated SMSG_FEATURE_SYSTEM_STATUS to 9.1.5 2021-11-02 22:51:38 +01:00
Shauren 122fe7549d Core/PacketIO: Updated SMSG_QUEST_PUSH_RESPONSE to 9.1.5 2021-11-02 22:51:05 +01:00
Shauren 78e627e413 Core/DataStores: Updated hotfix packet structures to 9.1.5 2021-11-02 22:50:05 +01:00
Shauren 98b95fb264 Core/PacketIO: Updated opcodes to 9.1.5 2021-11-02 22:49:20 +01:00
Shauren edc94e8ae8 Core/GuildFinder: Remove as preparation for 9.1.5 2021-11-02 18:14:49 +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
jackpoz b6f28a7ebc Core/Packets: Reduce memory footprint of cached queries (#22297)
Ensure only the minimum required memory is used by caching query packets by calling shrink_to_fit()

(cherry picked from commit deabd4ab453ee8cf1f515bdb32bf9cf9de7f0591)
2021-10-22 23:15:27 +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
ModoX 68c2fc8ff5 Core/Characters: Made homebind location a WorldLocation (this implicitly adds orientation) (#27055) 2021-10-16 01:17:47 +02:00
Meji 82b3a409db Core/BattlePets: Store declined names (#27025) 2021-10-16 00:48:54 +02:00
Treeston 3418a33a87 Misc: Pass std::chrono types by value everywhere.
(cherry picked from commit 2ef9d301f0869b443122e2ba543af054c5b0e53c)
2021-10-14 19:39:42 +02:00
Shauren 49eb3cf8fe Core/Spells: Implemented SPELL_EFFECT_TELEPORT_WITH_SPELL_VISUAL_KIT_LOADING_SCREEN 2021-10-13 11:49:30 +02:00
ModoX 6d9ce8e8ba Core/PacketIO: Implemented CMSG_CONVERSATION_LINE_STARTED (#27036)
* Added OnConversationLineStarted hook to ConversationScripts
* Added example for Defender of Azeroth conversation
2021-10-12 00:16:20 +02:00
Meji 5c287929b2 Core/Gossip: Update GossipOptionIcon enum (#26906) 2021-10-03 16:24:07 +02:00
Meji de4eaa0de9 Core/BattlePets: Misc fixes (#26964)
* Define BattlePetSpeciesFlags enum class.
* Define BattlePetDbFlags enum class.
* Added check to prevent the pet from being caged if its species has flag BattlePetSpeciesFlags::NotTradable.
* Added check to prevent the pet from being caged if it's in battle pet slots.
* Added check to prevent the pet from being caged if its health is below maximum health.
* Only add pet if the species has flag BattlePetSpeciesFlags::WellKnown.
* Added function to check flag BattlePetSpeciesFlags::LegacyAccountUnique to avoid learning copies of unique pets.
* Implemented CMSG_BATTLE_PET_CLEAR_FANFARE.
2021-09-29 22:26:25 +02:00
Shauren 52de393f10 Core/Players: Greatly simplifiy fdb2b90685ebc3852740c424170101a196c29ebb
(cherry picked from commit 9617778336556cd9b19c77e037fb64344021d9cc)
2021-09-25 15:36:50 +02:00
Shauren 47630708f0 Core/Players: Prevent creating characters with duplicate name by reserving name early in the process
Closes #21656
Closes #21809

(cherry picked from commit fdb2b90685ebc3852740c424170101a196c29ebb)
2021-09-25 15:34:20 +02:00
Shauren bc2c76a5b8 Core/Spells: Refactor building SMSG_SPELL_EXECUTE_LOG to not create 192 empty vectors on every spell cast 2021-08-28 18:30:45 +02:00