Commit Graph

291 Commits

Author SHA1 Message Date
Shauren
9894f6b802 Core/Random: Changed random functions returning doubles to return floats
* They were all cast to float at use anyway
* Improves roll_chance_f performance (rand32() is now called internally by uniform_real_distribution once instead of twice)
2023-10-31 20:20:00 +01:00
Shauren
a3ef01f87b Core/GameObjects: Only start loot restock timer if loot contents were modified and ignore it for personal loot
Closes #29023
2023-07-03 00:17:17 +02:00
Shauren
0fb8765a66 Core/Items: Item bonus generation improvements
* Pass ItemContext to item creation wherever possible
* Support scaling item levels with m+ keystone levels (not used currently)
* Fixed item link validation when client sends it as default uninitialized bonus list with context only
* Support scaling items depending on current active season (seasons not implemented)
* Implemented content tuning redirection
2023-06-17 16:29:59 +02:00
Meji
06d0b16f15 Core/Creatures: Move creature difficulty specific data from creature_template table to creature_template_difficulty (#28931) 2023-05-29 00:01:23 +02:00
Shauren
16bc74667e Core: Update to 10.1 2023-05-04 17:00:52 +02:00
Shauren
7b31080258 Core/Misc: Modernize code a bit by replacing std::tie with either structured bindings or operator<=> 2023-04-06 17:46:58 +02: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
Shauren
2eea58f26e Core/Loot: Added loot slot check to Loot::LootItemInSlot (client sent-value)
Ref #28646
2023-01-02 19:48:54 +01:00
Shauren
e98e1283ea Core: Updated to 10.0.2 2022-12-04 15:13:20 +01:00
Shauren
010e6f7f49 Core/Loot: Implemented dungeon encounter personal loot
Closes #20066
2022-10-25 00:30:52 +02:00
Shauren
2c79ce6791 Core/Conditions: Add const to condition checking functions 2022-10-24 00:15:43 +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
641390dca2 Core/Loot: Initial support for personal loot in gameobjects (non-instanced content) 2022-10-16 15:33:39 +02:00
Shauren
9ce47e6809 Core/Loot: Prevent looting bosses by players that have already completed that encounter 2022-10-06 18:33:44 +02:00
Shauren
5a516fb654 Core/Loot: Send DungeonEncounter id in SMSG_ITEM_PUSH_RESULT 2022-10-04 00:19:38 +02:00
Shauren
cbf2064c62 Core/Loot: Refactored Player::SendLoot to accept Loot object directly 2022-09-18 18:24:57 +02:00
Shauren
8c20f620d7 Core/Loot: Move loot generation out of Player::SendLoot 2022-09-18 16:33:38 +02:00
Shauren
c00e2e4851 Core/Loot: Simplify loot containers
* Unify items and quest_items
* Drop PlayerQuestItems and PlayerNonQuestNonFFAConditionalItems
2022-09-17 20:58:24 +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
Shauren
9700b2a786 Core/Loot: Store method used at loot generation inside Loot object 2022-09-14 22:03:47 +02:00
Shauren
f19f32f2a4 Core/Loot: Store references to Loot objects directly in players loot view map instead of guids of world objects holding that loot 2022-09-14 20:49:38 +02:00
Shauren
e9d083a2ee Core/Loot: Set loot guid and type in Loot constructor 2022-09-11 18:21:01 +02:00
Shauren
74dbed1d0e Core/Loot: Updated LootType enum for 9.2.7 2022-09-01 21:31:56 +02:00
Shauren
7957e2d380 Core/Loot: Allocate Loot separately from objects 2022-09-01 20:07:58 +02:00
Shauren
ba251da7c3 Core/Loot: Removed unneccessary field from Loot class and pass it as parameter everywhere 2022-08-25 14:46:34 +02:00
Shauren
605b75f6c0 Core/Loot: Removed old auto looting code for currency token items 2022-08-25 14:45:44 +02:00
Shauren
a31e681944 Core/Spells: Rename SpellAttr0 to use official attribute names 2022-04-24 18:40:10 +02:00
Shauren
372c84e998 Core/Items: Implemented item effect trigger type 7 (On Looted) 2022-04-22 20:57:05 +02:00
robinsch
5f38fd2f2d Core/Item: Fixed another possible container exploit due to invalid loading of stored loot items in DB (#26795)
(cherry picked from commit 1b9ee95253)
2022-03-12 14:36:31 +01:00
jackpoz
b420ef8ea9 Core/Misc: Fix static analysis issues
(cherry picked from commit f127f95917)
2022-03-11 19:33:13 +01:00
robinsch
0910bca34c [Exploit/Dupe] Container item (#26689)
* Core/Item: Fixed possible dupe with container items containing non unique non stackable items

* Fixed build

* Update sql script and related base structure

Co-authored-by: jackpoz <giacomopoz@gmail.com>
(cherry picked from commit d1e913162e)
2022-03-11 19:03:12 +01:00
Giacomo Pozzoni
9d4c57074f Core/Loot: Allow master looter to see all quest items (#26584)
(cherry picked from commit 8d92f6f2b4)
2022-03-11 01:49:51 +01:00
Trond B. Krokli
5159a11241 Update LootMgr.cpp (#25849)
Typo correction for console & log output `>> Loaded reference loot templates in %u ms`

`refence` --> `reference`

(cherry picked from commit cf5f360299)
2022-03-05 23:51:04 +01:00
jackpoz
d06c93185a Core/Loot: Raise max number of loot items from 16 to 18
Fixes #23948

(cherry picked from commit 5491cb51a2)
2022-02-27 20:08:41 +01:00
Shauren
ad4f4bfab7 Core/Misc: Minor game include cleanup 2022-02-13 00:49:10 +01:00
Treeston
54fc62db52 Core/Misc: Convert leftover DatabaseTransactions-by-reference (pass them by value!)
(cherry picked from commit 6b8f3d0f94)
2022-02-05 19:56:31 +01:00
Treeston
9f97fdd31a Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327)
(cherry picked from commit 534a2388b7)
2022-02-04 00:27:14 +01:00
Giacomo Pozzoni
fda8a09766 Core/Misc: Replace boost::shared_mutex with std::shared_mutex (#24328)
* Core/Misc: Replace boost::shared_mutex with std::shared_mutex

* Remove std forward declarations

(cherry picked from commit 7032ee0bdb)
2022-01-23 21:51:47 +01:00
Giacomo Pozzoni
6ec933f281 Core/Logs: Log full guid instead of just low guid
(cherry picked from commit 468ecb7252)
2021-12-31 21:56:40 +01:00
ForesterDev
9124fd1f1f Core/Items: implement some helper methods for easier readability (#24113)
(cherry picked from commit 573ddf4d22)
2021-12-21 00:46:13 +01:00
jackpoz
d5d04a6c55 Core/Misc: Fix C++17 build errors
(cherry picked from commit 30823f9b79)
2021-12-18 22:51:50 +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 574a7c8d3d)
2021-12-14 23:04:29 +01:00
Wyrserth
ef4d4e3d98 Core/Loot: make Loot::AddItem() honor LootItem::AllowedForPlayer() so that items that cannot be looted don't prevent skinning. (#23408)
(cherry picked from commit a1b2aa97fc)
2021-12-11 14:12:53 +01:00
Wyrserth
7b346bcf8d Core/Loot: fix some issues with master loot and don't allow players to see soulbound recipes that they already learned in the loot window. (#23410)
(cherry picked from commit e6ad9b10cf)
2021-12-11 13:06:25 +01:00
Shauren
3bf6698116 Core/Misc: Fix appleclang 12 warnings 2021-10-01 11:18:29 +02:00
ariel-
3bc3b3eeeb Core/Globals: revert back to unordered_map for templates
Partial revert of commit b64c504314
See discussion on b64c504314

(cherry picked from commit b75ff7d4bf)
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 b64c504314)
2021-06-16 01:00:11 +02:00
Shauren
b9d63c2009 Core/Scripts: Remove deprecated overload of QuestReward without LootItemType argument 2021-05-16 21:56:06 +02:00
Aokromes
93552510ab Core/Logs: Fix more logs
the others have exit,so they continue to be error because they are critical

(cherry picked from commit b68484cfb0)
2021-01-21 22:30:40 +01:00
Shauren
cab4c87d2d Core/PacketIO: Updated most packet structures to 9.0.1 2020-12-08 18:16:41 +01:00