Commit Graph

113 Commits

Author SHA1 Message Date
Shauren
3260b94dd6 Core/Misc: Replace string to int conversion functions from Common.h with c++17 std::from_chars based ones Trinity::StringTo 2023-05-13 15:46: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
jackpoz
015b4e4578 Scripts/Commands: Fix ".wp show info" showing wrong event chance values
(cherry picked from commit b64ef1a39a)
2022-03-13 19:31:14 +01:00
Treeston
3fd2eb126c [3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463)
(cherry picked from commit 1eca51b417)
2022-02-27 20:08:41 +01:00
Shauren
d057e057d3 Core/Misc: Optimize ChatCommand includes (include only where neccessary) 2022-02-11 21:57:45 +01:00
ForesterDev
61cc88731c Scripts/Commands: update .wp commands to use orientation field from DB (PR #23566)
Closes #23330

(cherry picked from commit e71773140c)
2021-12-15 00:17:13 +01:00
Treeston
2532de6acb Entities/Unit: Nuke Map::ForceRespawn from orbit, with the following implications:
- .npc respawn no longer causes stupid things to happen (Fixes #23014)
- ::DeleteFromDB methods on Creature and GameObject rewritten to be as sensible as such a colossally stupid method can ever be. They're static now.
- .npc delete and .gobj delete ported to new argument handling, and rewritten as per above. They can no longer crash the server when used in instances, too. Yay for that.
- Adjusted various dusty cobwebbed hacks around the core (why does waypoint visualization use permanent spawns *shudder*) to still work too.

(cherry picked from commit 84b7b2e08e)
2021-12-14 22:42:22 +01:00
ccrs
bf12bae467 Core/Misc: waypoint movement
- Creature: update current waypoint to store nodeId and pathId
- MotionMaster: change variable type on GetMotionSlotType and GetMotionSlot to keep consistency and prevent errors (ASSERT is now no longer needed)
- UnitAI: add new waypoint hooks WaypointPathStarted and WaypointPathEnded
- SAI: handle WAYPOINT related events if creature is no escorting
* SMART_EVENT_WAYPOINT_RESUMED still not implemented for no escorting

TODO: the new hooks can save, now duplicated, logic on EscortAI and SAI

closes #20777
updates #20310
updates 21bd52cb99

(cherry picked from commit e10d7dd45c)
2021-01-29 19:23:53 +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
ccrs
97585597f0 Core/Movement: waypoint movement (#20121)
Following the work done in #19361 this is the cleanup and improvement of the related logic of waypoint management.

Ref 28050f3 #18020
(taking the good parts and ignoring the incomplete work)

(cherry picked from commit 7fff83d675)
2020-08-23 00:45:46 +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
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
738f37d3cf Core/Maps: Replaced spawnmask with difficulty list 2018-09-15 17:55:26 +02:00
Shauren
91be2332e2 Core/Entities: Phasing rewrite
* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
joschiwald
6226189a16 Core/Entities: Created factory methods to create new areatriggers, creatures and gameobjects 2018-01-27 23:02:46 +01:00
Shauren
bb718b5578 Core/Entities: Remove phasemask 2018-01-10 22:01:40 +01:00
joschiwald
5e3e4182c8 Core/Entities: Extended SpawnMask to 64 bit 2018-01-06 19:56:11 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Rochet2
211b564894 Scripts/Commands: Fix trinity_string usage and enhance commands 2017-07-22 09:22:17 +02:00
Shauren
b453e12423 Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
2017-06-04 01:00:45 +02:00
Shauren
f2039981e0 Core/Game: Include cleanup, part 3 2017-05-20 00:09:37 +02:00
Shauren
c5d3dd90be Core/Game: Include cleanup
* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
2017-05-18 23:53:25 +02:00
Rochet2
80cf4e3070 * Scripts/Commands: Fix guid usage and enhance commands
- Fix targeting gameobjects and creatures for .dist and .gps. The old code used DB guid to search from core generated guid lists.
- Fix some error messages saying 'no player found' even if creatures and gameobjects and players were searched
- Change atoi to atoul when receiving lowguids as string or other uint32 values
- Use ObjectGuid::LowType instead of uint32 for lowguid type
- Allow .gob info to take in gameobject guid link as well as entry link in addition to gameobject entry and update the documentation of the command
- Change .gob delete to post the spawnid (dbguid) instead of the ingame generated guid (which is basically never seen or used by the player in any other commands that I see)
- Allow spawntimesecs to be negative when spawning a gameobject
- Disable searching by ingame spawn id in commands. (it makes little sense for a user to provide a number which is then attempted to be used as DB guid and non DB guid when both could have a match)
- Update .gob turn documentation to tell about possibility to provide orientation in command
- Correct the types in .gob add command result trinity_string
- Correct the creature search for .npc del
- Change .event to .event info
- Add .go offset command
- Remove the .go command for empty string (no subcommand given) because it just used .go xyz
- Extend .gob info to show size, faction, flags and model dimensions
- Remove some unnecessary casts
- Document .wp show better (first and last were not documented)
- Insert spawnid to .wp show info error message
- Fix spawntime printing for .gobject target
- Fix guid targetting for .npc set movetype
- Fix query by spawnid for .wp show info
- Fix deleting of existing waypoints when twice doing the command .wp show on
- Fix deleting of existing waypoints when doing the command .wp show off
- Change wpguid column in DB and in core to uint32, which is what the spawnid type is in core and db.

Closes #18978
2017-03-11 12:29:37 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Shauren
911e81ed9e Warning fix
(cherry picked from commit 7fe5a77f5e)
2016-04-09 00:25:40 +02:00
Shauren
593bbb0c99 Core/Commands: Fixed a crash in .wp mod by @Magnifikator
Closes #16732

(cherry picked from commit 3d0b065135)
2016-04-09 00:23:38 +02:00
Shauren
d92cad6973 Core/Commands: Fixed incorrect use of GetGUID instead of GetSpawnId in waypoint commands
Updates #16732

(cherry picked from commit e73d5a7bf4)
2016-04-09 00:23:35 +02:00
jackpoz
700899e0e5 Core/Quest: Fix issues reported by static analysis
(cherry picked from commit f1f4005ad8)

# Conflicts:
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Entities/Unit/Unit.h
#	src/server/game/Handlers/GroupHandler.cpp
2016-01-15 20:27:04 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Shauren
2d942ddcc5 Core/Commands: Refactored chat command script hook, fixes a crash when building with gcc 5
Closes #15616
Closes #15740
2015-10-22 20:26:56 +02:00
Shauren
ca83e14f8b Core/Entities: Reworked guid scopes
* Added ObjectGuid traits to easily access whether guid type can be generated globally (ObjectMgr) or not
* This adds separate (per map) guid sequences depending on object type
* Ported map object container from cmangos/mangos-wotlk@a2d396eb0b
* Added type container visitor for TypeUnorderedMapContainer
* Implemented helper function to erase unique pairs from multimap containers
* Moved object storage of all objects except players and transports to map level
* Added containers linking database spawn id with creature/gameobject in world
* Renamed DBTableGuid to spawnId
* Added a separate spawn id sequence generator for creatures and gameobjects - this will be used in db tables
* Moved building SMSG_UPDATE_OBJECT - updatefields changes broadcast to map update
2015-04-28 21:19:46 +02:00
Rat
8f3a80c1cf Core/Phases: Ported new phasing system from 4.3.4 branch and fixed some map swap logic 2015-03-16 07:28:49 +01:00
Vincent-Michael
ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
Shauren
15fbb6f46f Core/Entites: Updated GUID format 2014-10-29 21:13:21 +01:00
Shauren
7afab9f783 Core/Entities: Updated HighGuid values 2014-10-27 12:03:35 +01:00
Shauren
9e1930959d Core/Entities: Changed object lowguid to uint64 2014-10-26 02:57:28 +02:00
Shauren
a97bd333fe Core/Entities: Removed Object::GetGUIDLow() 2014-10-23 00:29:16 +02:00
Shauren
71422dcd69 Core/Entities: Second part of removing GetGUIDLow() uses 2014-10-22 18:12:51 +02:00
Shauren
8e288dd673 Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Battlefield/Battlefield.h
	src/server/game/Battlegrounds/ArenaScore.h
	src/server/game/Battlegrounds/ArenaTeam.cpp
	src/server/game/Battlegrounds/ArenaTeam.h
	src/server/game/Battlegrounds/ArenaTeamMgr.cpp
	src/server/game/Battlegrounds/BattlegroundMgr.cpp
	src/server/game/Battlegrounds/BattlegroundMgr.h
	src/server/game/Battlegrounds/BattlegroundQueue.h
	src/server/game/Battlegrounds/BattlegroundScore.h
	src/server/game/Battlegrounds/Zones/BattlegroundAB.h
	src/server/game/Battlegrounds/Zones/BattlegroundAV.h
	src/server/game/Battlegrounds/Zones/BattlegroundEY.h
	src/server/game/Battlegrounds/Zones/BattlegroundIC.h
	src/server/game/Battlegrounds/Zones/BattlegroundSA.h
	src/server/game/Battlegrounds/Zones/BattlegroundWS.h
	src/server/game/DungeonFinding/LFG.h
	src/server/game/DungeonFinding/LFGMgr.cpp
	src/server/game/DungeonFinding/LFGMgr.h
	src/server/game/DungeonFinding/LFGQueue.cpp
	src/server/game/DungeonFinding/LFGQueue.h
	src/server/game/Entities/Corpse/Corpse.cpp
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Entities/Creature/GossipDef.cpp
	src/server/game/Entities/Creature/GossipDef.h
	src/server/game/Entities/Creature/TemporarySummon.cpp
	src/server/game/Entities/DynamicObject/DynamicObject.cpp
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Object/Object.h
	src/server/game/Entities/Object/ObjectDefines.h
	src/server/game/Entities/Object/Updates/UpdateData.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Entities/Unit/Unit.h
	src/server/game/Globals/ObjectAccessor.cpp
	src/server/game/Globals/ObjectAccessor.h
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Groups/Group.cpp
	src/server/game/Groups/Group.h
	src/server/game/Guilds/Guild.cpp
	src/server/game/Guilds/Guild.h
	src/server/game/Handlers/AuctionHouseHandler.cpp
	src/server/game/Handlers/BattleGroundHandler.cpp
	src/server/game/Handlers/CalendarHandler.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Handlers/GroupHandler.cpp
	src/server/game/Handlers/GuildHandler.cpp
	src/server/game/Handlers/ItemHandler.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/NPCHandler.cpp
	src/server/game/Handlers/PetHandler.cpp
	src/server/game/Handlers/QueryHandler.cpp
	src/server/game/Handlers/QuestHandler.cpp
	src/server/game/Handlers/TradeHandler.cpp
	src/server/game/Handlers/VehicleHandler.cpp
	src/server/game/Movement/Spline/MoveSplineInit.cpp
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSession.h
	src/server/game/Spells/Spell.cpp
	src/server/scripts/Commands/cs_debug.cpp
	src/server/scripts/Commands/cs_gm.cpp
	src/server/scripts/Commands/cs_misc.cpp
	src/server/scripts/Commands/cs_modify.cpp
	src/server/scripts/Commands/cs_reset.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
	src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
	src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp
	src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
	src/server/scripts/Kalimdor/zone_azshara.cpp
	src/server/scripts/Kalimdor/zone_durotar.cpp
	src/server/scripts/Kalimdor/zone_moonglade.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
	src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
	src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
	src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
	src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
	src/server/scripts/Spells/spell_dk.cpp
	src/server/scripts/Spells/spell_generic.cpp
	src/server/shared/Packets/ByteBuffer.h
2014-09-20 11:05:30 +02:00
Shauren
7d1d55124c Merge branch 'ObjectGuid' of https://github.com/TrinityCore/TrinityCore
Conflicts:
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Scripting/MapScripts.cpp
	src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
	src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
	src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
	src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
	src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
	src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
	src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
	src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
	src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
	src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
	src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
	src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
	src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
	src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
2014-09-16 21:50:01 +02:00
Shauren
a0e50ea35f Core/Entities: Use ObjectGuid class in game project 2014-09-14 16:14:12 +02:00
Vincent-Michael
ca3961f987 Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Entities/Unit/Unit.h
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/scripts/Commands/cs_wp.cpp
	src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
2014-09-13 22:38:25 +02:00
joschiwald
59baaeec48 Core/Chat: cleanup MonsterText methods 2014-09-13 20:41:31 +02:00
Vincent-Michael
55eafa247d Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/authserver/Server/AuthSession.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Server/WorldSocket.h
2014-07-27 12:09:32 +02:00
Subv
a03c879565 Core/PreparedStatements: Fixed a change I missed in the World prepared statements for waypoints. 2014-07-25 20:18:43 -05:00
Vincent-Michael
13ff07f121 Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Battlegrounds/ArenaScore.h
	src/server/game/Battlegrounds/Battleground.cpp
	src/server/game/Battlegrounds/Battleground.h
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Pet/Pet.cpp
	src/server/scripts/Commands/cs_wp.cpp
2014-07-14 21:01:55 +02:00
Vincent-Michael
6dba04c0cc Scripts/Commands: Fix warnings vs2014 ctp (no support) 2014-07-14 10:53:49 +02:00