209 Commits

Author SHA1 Message Date
Meji
c575b397c5 Core/GameEvents: Added holiday/event world state field (#31284)
Closes #30622
2025-09-23 15:48:58 +02:00
Shauren
3b8f64831a Core/Events: Replace remaining packed time calculations with WowTime class 2025-09-08 00:23:01 +02:00
Shauren
5de252ae84 Core/Misc: Move large functions out of header files 2025-07-13 13:40:31 +02:00
Shauren
7657a289d7 Core/Misc: Kill copy/move constructors for singleton classes 2025-06-10 13:12:33 +02:00
Shauren
7cafeb46b3 Core/Creatures: Don't require creature.modelid to be one of linked creature_template models 2023-11-26 00:20:13 +01:00
Shauren
41a20b1e40 Core/Achievements: Fixed achievement criteria StartEvent and FailEvent
* Criteria using StartEvent cannot be updated without that event triggering first (not only for timed achievements)
* Implemented most StartEvent and FailEvent types
* Fixed saving criteria removed by RemoveCriteriaProgress
2023-09-25 00:53:56 +02:00
Shauren
43584b4d1d Core/Misc: Fixed doxygen docs being attached to wrong fields 2023-08-27 01:58:50 +02:00
Jeremy
0ede6c1556 Core/Battlegrounds: Rework queues (#29200)
* No more copies of Battleground classes
* FreesSlotQueues now have as key the MapId instead of queue id
* Random queues can now popup already busy specific battelgrounds (queues are NOT merged)
* Removed Holiday handling, this should already be handled in BattlegroundMgr::IsBGWeekend
2023-08-26 14:03:42 +02:00
Meji
d015711fbb Core/SAI: Implemented new source type SMART_SCRIPT_TYPE_EVENT (3) (#28816) 2023-07-09 11:59:35 +02:00
Meji
81ea6f54d9 Core/Creatures: Compute CombatReach and BoundingRadius using DisplayScale (#28863) 2023-03-30 18:54:27 +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
21940405e0 Core/Battlegrounds: Made Battleground inherit ZoneScript
Closes #28480
2022-12-20 01:03:58 +01:00
Shauren
fbe0b8efeb Core/Maps: Removed MapInstanced - no longer neccessary for grid data reference counting (moved to TerrainInfo) 2022-07-24 18:56:40 +02:00
Shauren
020166649d Core/WorldStates: Migrate battleground HolidayWorldState to new system 2022-07-11 16:15:07 +02:00
Shauren
49ad0d2d49 Core/Quests: Reset seasonal quests based on saved completion time and intended holiday start time 2022-07-03 23:44:48 +02:00
Shauren
306022054b Revert "Core/Event: prevent seasonal quests from resetting at server restart (#17455)"
This reverts commit 6a8ca9b0bf.
2022-07-03 22:22:45 +02:00
Shauren
94d829c84f Core/Pools: Implemented pooling for instances 2022-06-11 14:04:56 +02:00
Shauren
6ca0f99ccf Core/GameEventMgr: Spawn creatures and gameobjects in all active instances when event starts 2022-06-09 23:03:42 +02:00
Shauren
22edf79c70 Core/Achievements: Implemented GameEvent related criteria types 73 and 93 2022-04-24 13:59:51 +02:00
Shauren
111fc6ac6f Core/Battlegrounds: Replace manual criteria timer starts in battlegrounds with new GameEvents api 2022-04-24 12:09:10 +02:00
Shauren
41a04a0c49 Core/Scripts: Begin unifying triggering gameevents (not the game_event db stuff) 2022-04-24 00:16:13 +02:00
Shauren
4eba978670 Core/Misc: Rename SetXXXFlags updatefield functions to ReplaceAllXXXFlags 2022-03-26 18:59:44 +01:00
Treeston
9f97fdd31a Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327)
(cherry picked from commit 534a2388b7)
2022-02-04 00:27:14 +01:00
Ovahlord
7a5529eb58 Core/Events: refactored battleground holiday assignments.
Instead of going with shitty bitmasks we now accept plain battleground ids
 instead

(cherry picked from commit 8a82403400)
2022-01-21 22:09:06 +01:00
jackpoz
7eff81f9db Core/Pools: Fix crash on startup
(cherry picked from commit 9cde3ffd14)
2022-01-01 14:34:20 +01:00
Matan Shukry
8fabe5a3aa Core/Phasing: Implemented db spawns in personal phases (#26345)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2021-12-28 13:24:10 +01:00
Treeston
94a79bac7a Core/Misc: Some refactoring, #23603 prep: (#23676)
- Split SpawnMetadata off from SpawnData
- No longer allocate Creature/Gameobject objects in ObjectGridLoader just to check their typeid and delete them afterwards

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 9304e496cb)
2021-12-21 15:16:26 +01:00
Treeston
51fbda4223 Core/Pooling: Quest pooling rewrite: (PR#23627)
- Split quest pooling from PoolMgr (into QuestPoolMgr)
- Proper saving/restoring on server restart
- No more hacking into sObjectMgr to insert/remove available quests

(cherry picked from commit a5e73e41c0)
2021-12-18 15:28:45 +01:00
jackpoz
dad86f5bce Core/GameEvent: Fix OnGameEvent() hook not being called on Creature/GameObject spawned by the event itself
Hook broken since it was added in 1b2c413933

(cherry picked from commit d9ae19d974)
2021-12-17 22:48:01 +01:00
Giacomo Pozzoni
4e7727d575 3.3.5 game event respawn (#23391)
* Core/GameEvent: Remove respawn times of Creature and GameObjects when starting/stopping an event

* Add checks for pool

* Remove the check for pools

(cherry picked from commit 678f3dd687)
2021-12-11 13:06:13 +01:00
r00ty-tc
4c996bdf8b Core/GameEventMgr: Log error if loading GO/Creature into event that is part of pool - Only warn, still load the GO/Creature - These should be added to game_event_pool by pool ID instead
(cherry picked from commit 8bb88657f8)
2021-11-26 22:06:18 +01: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 042f5515e4)
2021-10-22 23:47:51 +02:00
ariel-
5714e89ccf Core/Events: update holiday code and remove misleading log (event date is the one from game_event)
- add siign to DBC struct member CalendarFilterType as it was being used as such
- kill localtime usage as it's deprecated

Closes #18542

(cherry picked from commit 5b4287e683)
2021-06-22 13:19:03 +02:00
jackpoz
e17e4e6f07 Core/Misc: Replace time(NULL) with GameTime::GetGameTime()
(cherry picked from commit 12701cb0c6)

 Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/AuctionHouse/AuctionHouseMgr.cpp
	src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp
	src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp
	src/server/game/Battlefield/Battlefield.cpp
	src/server/game/Battlefield/Zones/BattlefieldWG.cpp
	src/server/game/Battlegrounds/BattlegroundMgr.cpp
	src/server/game/Calendar/CalendarMgr.h
	src/server/game/DungeonFinding/LFGQueue.cpp
	src/server/game/Entities/Corpse/Corpse.cpp
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Entities/Item/Item.cpp
	src/server/game/Entities/Pet/Pet.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Grids/ObjectGridLoader.cpp
	src/server/game/Guilds/Guild.cpp
	src/server/game/Handlers/AuctionHouseHandler.cpp
	src/server/game/Handlers/BattlefieldHandler.cpp
	src/server/game/Handlers/CalendarHandler.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Handlers/LFGHandler.cpp
	src/server/game/Handlers/MailHandler.cpp
	src/server/game/Handlers/MiscHandler.cpp
	src/server/game/Handlers/MovementHandler.cpp
	src/server/game/Handlers/PetHandler.cpp
	src/server/game/Handlers/QueryHandler.cpp
	src/server/game/Handlers/TicketHandler.cpp
	src/server/game/Instances/InstanceSaveMgr.cpp
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Spells/Auras/SpellAuras.cpp
	src/server/game/Tickets/TicketMgr.cpp
	src/server/game/Tickets/TicketMgr.h
	src/server/game/World/World.cpp
	src/server/scripts/Commands/cs_gobject.cpp
	src/server/scripts/Commands/cs_instance.cpp
	src/server/scripts/Commands/cs_list.cpp
	src/server/scripts/Northrend/zone_wintergrasp.cpp
	src/server/scripts/Spells/spell_item.cpp
2021-04-15 05:53:27 +02:00
ariel-
f97e4ad1f4 Core/Globals: validate creature_template mingold and maxgold fields
(cherry picked from commit 5798fda0a0)
2021-04-15 05:53:27 +02:00
Shauren
d29dd1eeb5 Core/Misc: Change all unix time columns in character database to bigint (signed) 2021-04-05 23:47:05 +02:00
ariel-
88ae43fa51 Core/Misc: minor typo and codestyle fixes
- Replace NULL uses in new code with nullptr
- Fix wrong (accumulated) load time log when loading calendar invites
- Make Creature::CanRegenerateHealth const as its just a getter
- Mark OnlyOnceAreaTriggerScript::OnTrigger as final in case someone wants to override that (you are supposed to use protected _OnTrigger hook)

(cherry picked from commit 78a1c687a2)
2021-03-15 20:17:31 +01:00
jackpoz
a01d397c3d Core/Misc: Fix static analysis issues
Fix static analysis issues reported by 3rd party tools

(cherry picked from commit 24e82fe83d)
2021-02-25 18:50:55 +01:00
jackpoz
668a3ad643 Core/Misc: Fix static analysis issues
Fix coverity id 1382860

(cherry picked from commit 19e99478a7)
2021-02-25 18:50:55 +01:00
jackpoz
a68ab3241a Core/Misc: Fix static analysis issues
(cherry picked from commit 7e73f5f1ed)
2021-02-06 21:41:51 +01: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
Gerhood
4024df122a Calendar/GameEvents: Store + send holiday data (#20117)
Close: #16845
(cherry picked from commit 951fa46fe9)
2021-01-21 22:30:40 +01:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
r00ty-tc
03b125e6d1 Dynamic Creature/Go spawning:
- True blizzlike creature spawn/respawn behavior - new creature = new object
 - Toggleable spawn groups (with C++/SAI/command options to use them)
 - Custom feature: dynamic spawn rate scaling. Accelerates respawn rate based on players in the zone.
 - Backward compatibility mode (set via group and for summons)
   to support creatures/gos that currently don't work well with this
   (this should be removed once the exceptions are fixed)

Fixes and closes #2858
Tags #8661 as fixable.
Fixes and closes #13787
Fixes #15222.

(cherry picked from commit 59db2eeea0)
2020-08-22 12:59:57 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Shauren
4c173e4b7b Core/Maps: Use FindMap instead of CreateBaseMap in places where the intent was to check for a existing map (and a loaded grid on that map) 2020-07-18 00:57:16 +02:00
ariel-
6604849716 Core/Scripts: unified scripted gossip/quest api
- Changed self-accessor on GameObjectAI to "me", like UnitAI
- Moved all related functions to AI, now Unit and GameObject have the same function names with identical behaviour
- Remove "OnUpdate" from CreatureScript/GameObjectScript, was never used and we already have AI Update method
- Quest methods no longer return a bool, the return value was used to call the AI version if the ScriptMgr one returned false
- Implemented GameObjectAI::Destroyed hook (was never called), implemented Damaged method
- Rename OnStateChanged to OnLootStateChanged to reflect when it's really called, and created a new hook OnStateChanged that only gets called on GOState change
- Since the functions are now only getting called from AI, made GetAI methods full virtual. (CanSpawn method is anyways going to be used on creatures with AI)

(cherry picked from commit f913f3bb89)
2020-05-03 03:04:32 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
f6e2b8cdc1 Core/DBLayer: Prevent committing transactions started on a different database 2019-07-27 10:52:33 +02:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00