Commit Graph

107 Commits

Author SHA1 Message Date
Yunfan Li c167fef89c Merge branch 'master' into Playerbot 2025-07-15 20:34:44 +08:00
Seamthesis 9d6c7ad7ea fix(Core/Group): incorrect parameter type in RegisterGroupId (#22448)
Co-authored-by: Rykles <219719782+Seamthesis@users.noreply.github.com>
2025-07-11 15:54:42 +02:00
Yunfan Li 58fd50651d Merge branch 'master' into Playerbot 2025-05-09 22:07:43 +08:00
Benjamin Jackson 52799d76f6 refactor(Core): Add definition file for area table entries. (#22054) 2025-05-09 15:48:02 +02:00
Yunfan Li 565019ed27 Merge branch 'master' into Playerbot 2025-03-14 21:37:02 +08:00
sudlud 2e9b40e21a fix(Core/Group): fix group loot for quest items (#21683)
Co-authored-by: EricksOliveira <ericksoliveira258@gmail.com>
2025-03-10 22:48:04 +01:00
Yunfan Li 7d431dc796 Merge branch 'master' into Playerbot 2025-02-19 22:29:36 +08:00
Exitare 98ceb1c067 fix(Core/PlayerScript) Align player script function names (#21020)
Co-authored-by: sudlud <sudlud@users.noreply.github.com>
2025-02-16 14:59:41 +01:00
Yunfan Li abd9b4ebb8 Merge branch 'master' into Playerbot 2024-10-30 21:43:42 +08:00
Francesco Borzì 2c344fc127 refactor(src/server/game/*): remove unused imports (big part 2) (#20311) 2024-10-27 05:06:14 +01:00
Yunfan Li 66c55bc450 Merge branch 'master' into Playerbot 2024-09-22 21:56:15 +08:00
Kitzunu 386aea03ee chore(Core/Misc): Some cleanup (#19970)
* remove weird blanks

* update if

* ) ) to ))

* missed some ) )

* now switch

* .
2024-09-21 19:34:31 +02:00
skelUA a196f7f28a fix(Core/Loot) fix bug with loot (#19882)
Try to fix bug with loot
2024-09-19 15:11:31 +02:00
Yunfan Li 414805e692 Merge branch 'master' into Playerbot 2024-09-04 23:46:34 +08:00
Kitzunu 5d31b9f98f refactor(Core/Item): Add helpers (#19828) 2024-08-31 19:38:50 -03:00
Yunfan Li 1f54cb14fa Merge branch 'master' into Playerbot 2024-07-07 13:33:14 +08:00
Kitzunu 8745ac9c2e fix(Core/Loot): implement automatic pass in group loot for items that… (#19272)
* fix(Core/Loot): implement automatic pass in group loot for items that cannot be looted

* cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/00fdf6e99a2516095889e13d4638efa049782ce5)

* closes https://github.com/chromiecraft/chromiecraft/issues/4523

Co-Authored-By: Wyrserth <43747507+Wyrserth@users.noreply.github.com>

* whoopise

---------

Co-authored-by: Wyrserth <43747507+Wyrserth@users.noreply.github.com>
2024-07-04 14:21:00 -03:00
thomasjteachey fa8680746e fix(Core/Arena): Check to see if other members in your arena team are queued or in a r… (#18808)
* Check to see if other members in your arena team are queued or in a rated arena already and, if so, do not allow queue to go through

* Accidentally put team party check inside the for loop

* some basic logic efficiency changes

* minor syntax issue
2024-07-04 08:42:36 -03:00
Yunfan Li d74a6dd960 Merge branch 'master' into Playerbot 2024-03-31 12:44:21 +08:00
Anton Popovichenko 73340b94e3 feat(Core/Compression): Move packets compression from map to network thread (#18602)
* feat(Code/Compression): Move packets compression from map to network thread.

* Code style fix

* Remove unicode letter
2024-03-28 08:57:29 -03:00
Yunfan Li 5699c97d8c Merge branch 'master' into Playerbot 2024-02-11 23:45:22 +08:00
Nathan Handley df33a57b78 feat(Core/Unit): New helper IsClass and script hook OnPlayerIsClass (#18243)
* Class Comparison Logic Encapsulation - Parity

* Add Context to IsClass

* Add Unit IsClass script hook

* Replace additional getClass with IsClass

* Update CanUseItem to replace getClass with IsClass

* Add separate context for pet vs ability

* Change Create to Init since not all referenced contexts are creation

* Align spacing in ClassContext

* Drop context on LFGManager max power

* Update IsClass context that wraps around Missle Barrage

* Rename context for swapping weapons

* Be more specific than CLASS_CONTEXT_TALENT

* Remove duplicate context

* Moved IsClass Hook to Player

* Removed unused parameter in virtual base function

* Added maybe_unused to IsClass virtual in order to compile

To match the override signature, the virtual base needs to include the parameter in question, so using [maybe_unused] to signal to the compiler to allow it

* Remove extra blank line

* Add ABILITY_REACTIVE context

* Add context for PET_CHARM

* Remove explicit nullopt check per review

* Code Readability - Change if to if else in pet

Due to the return pattern, this doesn't change functionality in any way

* Add OnPlayer to disambiguate

---------

Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
2024-02-10 12:25:00 -03:00
Yunfan Li 7915f79d04 Merge branch 'master' into Playerbot 2023-12-12 20:52:42 +08:00
Winfidonarleyan eb1ecc38a5 feat(Core/Scripting): move all script objects to separated files (#17860)
* feat(Core/Scripts): move all script objects to separated files

* Apply 5bfeabde81

* try gcc build

* again
2023-12-02 21:13:20 +01:00
Kitzunu f440a7479f fix(Core/Groups): Create the group at first invite (#17869)
* cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/132538db1dfb3c495294eeb5acfead59dea02b5c)
* cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/250e8d998bca7f239e2393b6d002441f70d4daf0)
* part https://github.com/azerothcore/azerothcore-wotlk/issues/11070

Co-authored-by: Treeston <14020072+Treeston@users.noreply.github.com>
2023-11-26 20:34:45 +01:00
Winfidonarleyan e90d7a2f92 chore(Core/Misc): sort includes (#17776)
* chore(Cleanup): sort includes

* fix build

* fix build again
2023-11-18 17:51:26 +01:00
KJack e18bfae91c Feat (Core) Add CustomData to Groups (#17628)
* Add CustomData to Groups

* A one-line change and it STILL failed the first check run!
2023-11-08 19:18:58 +01:00
郑佩茹 03b3f9d051 Merge branch 'master' into Playerbot
# Conflicts:
#	src/server/game/World/World.h
2023-02-09 12:40:25 -07:00
UltraNix 9ce8b8cf29 fix(Core/Players): Fixed sending power regen update to nearby players. (#14043) 2023-01-28 11:03:56 +01:00
Kitzunu 4870b14b1f refactor(Core/Object): getLevel() -> GetLevel() (#14122)
* refactor(Core/Object): getLevel() -> GetLevel()

* fix build and sneak some doxygen in

* codeSTLE

* codestyle
2022-12-31 17:39:23 +01:00
Axel Cocat 7fa0aeeca7 feat(Core/Group): add GetGroupType() (#14411) 2022-12-29 14:45:49 +01:00
ZhengPeiRu21 80c608df4f Merge branch 'azerothcore:master' into Playerbot 2022-10-02 10:46:28 -06:00
M'Dic 967f8ce6d6 update (core): Startup console capitalizations (#13195) 2022-10-01 13:09:34 -04:00
ZhengPeiRu21 4c6c80d880 Merge branch 'azerothcore:master' into Playerbot 2022-09-22 15:18:27 -06:00
UltraNix bd536a039d fix(Core/Battlegrounds): MinLevel and MaxLevel from `battelground… (#12880)
fix(Core/Battlegrounds): `MinLevel` and `MaxLevel` from `battelground_template` should be taken into account while joining bg queue.

Fixes #6781
2022-09-21 13:17:38 -04:00
郑佩茹 32c6babdb7 Merge branch 'master' into Playerbot
# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Entities/Player/Player.h
#	src/server/game/Entities/Unit/Unit.h
2022-08-16 16:13:26 -06:00
Nefertumm 63f52ab751 fix(Core): Crashfix on loot roll (#12605) 2022-08-01 16:06:45 -03:00
郑佩茹 6ad65508af Merge branch 'master' into Playerbot
# Conflicts:
#	src/server/game/Entities/Creature/Creature.cpp
#	src/server/game/Entities/Creature/Creature.h
#	src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
2022-07-27 09:11:50 -06:00
AnchyDev dcbf224392 feat(Core): Add OnGroupRollRewardItem hook. (#12538)
Added OnGroupRollRewardItem hook.
2022-07-26 21:08:41 -03:00
郑佩茹 a44c241430 Merge branch 'master' into Playerbot
# Conflicts:
#	src/server/apps/worldserver/worldserver.conf.dist
#	src/server/game/Battlegrounds/Battleground.h
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/World/World.cpp
2022-07-13 10:31:30 -06:00
Skjalf 32ba21d029 feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook (#12316)
* feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook

* reverse logic
2022-07-09 00:10:04 -03:00
郑佩茹 98c22aa96d Merge branch 'master' of https://github.com/ZhengPeiRu21/azerothcore-wotlk into Playerbot 2022-06-21 13:23:18 -06:00
Kitzunu 73bd2b446c fix(Core/Groups): Level restriction on allowing raid groups (#12110) 2022-06-21 13:18:03 -03:00
郑佩茹 b314b3a711 Merge branch 'master' into Playerbot 2022-05-31 09:11:39 -06:00
天鹿 40a5eef152 refactor(Core/Instances): Update CHAR_DELETE_INSTANCE_SAVED_DATA (#11866)
* Update InstanceSaveMgr.cpp

* Update Group.cpp

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.h

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.h

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.h

* Update InstanceSaveMgr.cpp

* Update Group.cpp

* Update PlayerMisc.cpp

* Update InstanceSaveMgr.h

* Update Group.cpp

* Update PlayerMisc.cpp

* Update Group.cpp

* Update Group.cpp

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.h

* Update Group.h

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.cpp
2022-05-30 15:27:50 -03:00
郑佩茹 650e71728a Merge branch 'master' into Playerbot
# Conflicts:
#	src/server/game/Entities/Unit/Unit.cpp
2022-05-25 08:51:01 -06:00
Hanabi a6a2ca8ef7 feat(Core/GameObjects): Instance gameobject save data implementation (#11113)
* fix(Core): Save gameobject state on instances

Currently, azerothcore doesn't save gameobject states on instances.
Whenever there's a re-start or crash, the instance's gameobjects and
their states aren't saved, producing un-wanted behaviours and blocking instances at times.

Implemented CRUD for new table `instance_saved_data` that holds the states of gameobjects.

- When worldserver launches and gameobjects are loaded, this will check
  if this object's state exists on the DB and sets the previous state.
- On instance deletion (reset) these states are also removed based on
  the instance ID.
- Whenever a gameobject state changes inside a dungeon or raid, we save
  on the database the set state.

* Select query to synchronous and used FindMap()

* loading gameobject states on create

* reseting instance saved data

* missing reset methods and on create state

* database structure

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/Player/PlayerMisc.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Groups/Group.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* codestyle

* table changes

* table style

* codestyle

* table changes for columns

* data sanitization

* todo:

- Finish loading db data into the containers
- Using containers to find data
- How to get data from ObjectMGR inside Gameobject?

* loading on start up and db changes

* Removing unused data structure

* Uninitialised integer

* Whitespace

* clean-up and hooks to save states on memory

* Codestyle MySQL deprecated backticks

* i dont understand codefactor

* build

* Update data/sql/updates/pending_db_world/rev_1643395587559675400.sql

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Globals/ObjectMgr.h

Co-authored-by: Kargatum <dowlandtop@yandex.com>

* review changes

* unecessary removal

* pushback instead of emplace

* wrong database update

* Update ObjectMgr.cpp

* missing check

* removing entry from the PR

* missing removals

* last delete

* build

* aha! Found the culprit for the sudden assert errors

* type safety, save only important gameobjects

* static cast to unsigned short

* Update data/sql/updates/pending_db_characters/rev_1643629468629316100.sql

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* type changes

* queries fix

* fix build

* enabling which gameobjects to save on the database

* deadmines iron clad door

* Adjustment to gameobject onj create state and instances:

- Gnomeregan doors and Grubbis boss state
- Deadmines missing doors
- Stratholme gameobjects state saved

* forgot emi blastfuse change to despawn

* Leaving group logic

* codestyle

* fixing merge issues

* prevent bad behaviour

* brain meltdown

* Update data/sql/updates/pending_db_characters/rev_1643629468629316100.sql

* Update data/sql/updates/pending_db_world/rev_1649359139539727000.sql

Co-authored-by: Claudiodfc <54484196+claudiodfc@users.noreply.github.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Kargatum <dowlandtop@yandex.com>
Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
2022-05-24 10:33:45 -03:00
ZhengPeiRu21 a1985ddbeb Merge branch 'azerothcore:master' into Playerbot 2022-04-11 08:40:56 -06:00
UltraNix 3d4f9d6a18 fix(Core): Crashfix. (#11346)
Fixes #11281
2022-04-11 11:16:34 -03:00
ZhengPeiRu21 2cb590a48b Merge branch 'azerothcore:master' into Playerbot 2022-04-07 08:55:50 -06:00