Commit Graph

97 Commits

Author SHA1 Message Date
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 (00fdf6e99a)

* 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 (132538db1d)
* cherry-pick commit (250e8d998b)
* 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
Kitzunu
b709a22ddc feat(Core/Players): PlayerFlag helpers (#11294)
* feat(Core/Players): PlayerFlag helpers

* Update Player.h

* fix build
2022-04-05 18:53:50 +02:00
郑佩茹
db71f4739c Fix corrupt item cache crashes, bot whispers, trade crashes 2022-03-22 10:51:50 -06:00
Kargatum
78bdc89881 feat(Core/Battleground): rework bg queue system (#10817) 2022-03-15 14:36:49 -03:00
Bogir[rus]
75439773d0 fix and bringing to a unified style warnings of server loading logs to be more visible at server startup (#10970) 2022-03-12 04:57:26 -03:00
UltraNix
9d12652c3e fix(Core/Misc): Remove from LFG/batleground queues when teleported to battleground/LFG dungeon. (#10740)
Players cannot queue up for battleground during LFG dungeon.
Players cannot queue up for LFG dungeon during battleground/arena match.
Fixes #10635
2022-02-20 12:33:04 -03:00
Kitzunu
455899dc75 fix(Core/Misc): Change const to be after type name (#10591) 2022-02-14 16:05:45 -03:00
Kitzunu
ead906c58f refactor(Core/Packets): Rewrite MSG_RANDOM_ROLL to new packet class (#10590)
* refactor(Core/Packets): Rewrite MSG_RANDOM_ROLL

* cherry-pick commit (c0f516caee)

Co-Authored-By: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
Co-Authored-By: DJScias <439655+DJScias@users.noreply.github.com>

* handle crash check in DoRandomRoll()

* Update MiscPackets.h

* Update Player.h

Co-authored-by: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
Co-authored-by: DJScias <439655+DJScias@users.noreply.github.com>
2022-02-11 10:30:49 +01:00
Kargatum
de13bf426e feat(Core/DBLayer): replace char const* to std::string_view (#10211)
* feat(Core/DBLayer): replace `char const*` to `std::string_view`

* CString

* 1

* chore(Core/Misc): code cleanup

* cl

* db fix

* fmt style sql

* to fmt

* py

* del old

* 1

* 2

* 3

* 1

* 1
2022-02-05 00:37:11 +01:00
Kargatum
5969df4e30 refactor(Core/Logging): switch to fmt style for LOG_ (#10366)
* feat(Core/Common): add support fmt style for ASSERT and ABORT

* correct CheckCompactArrayMaskOverflow

* 1

* Update src/server/game/Spells/Spell.cpp

* rework logging

* add fmt replace logs

* logging

* FMT_LOG_

* settings

* fix startup

* 1

* 2

* 3

* 4

* 5

* fmt::print

* to fmt
2022-01-27 16:44:41 +01:00
Kargatum
8b7df23f06 feat(Core/Time): Implement saparated manager for game time (#8630) 2022-01-24 17:55:00 +07:00