Commit Graph
100 Commits
Author SHA1 Message Date
Peter Keresztes Schmidt 5086f1bfdc Scripts/Northrend: Use std::chrono::duration overloads of EventMap (#25021)
Contributes to #25012

(cherry picked from commit 29779db58b19384518706299e6e48be0d04eac65)
2022-01-23 15:46:37 +01:00
Peter Keresztes Schmidt c56f99a1d4 Scripts/Trial of the Crusader: Use std::chrono::duration overloads of EventMap (#25020)
Contributes to #25012

(cherry picked from commit a2b2dc7ad0b22bf0f89dfc26dd7eb33fe7bcacfb)
2022-01-23 15:41:42 +01:00
Peter Keresztes Schmidt 111521d3c9 Scripts/EasternKingdoms: Use std::chrono::duration overloads of EventMap (#25019)
Contributes to #25012

(cherry picked from commit 5ef576d223db0ac019bd803a07976cdc549a26ac)
2022-01-23 15:41:30 +01:00
Peter Keresztes Schmidt 41dab047ed Scripts/Blackrock Mountain: Use std::chrono::duration overloads of EventMap (#25018)
Contributes to #25012

(cherry picked from commit ac27c922d1ac0cbae98e98a3f560484dece75604)
2022-01-23 15:39:28 +01:00
Peter Keresztes Schmidt 8fb60c4d19 Scripts/Kalimdor: Use std::chrono::duration overloads of EventMap (#25016)
Contributes to #25012

(cherry picked from commit 90d5e7e1e82f1f196fb78844f7cad81fc228877c)
2022-01-23 15:38:35 +01:00
Peter Keresztes Schmidt c76f6e0879 Core/Battlegrounds: Use std::chrono::duration overloads of EventMap (#25015)
Contributes to #25012

(cherry picked from commit e372f9badb252f67abc29236e715bcce7fe1155d)
2022-01-23 15:36:37 +01:00
Peter Keresztes Schmidt 365ae6ff25 Fix some compiler warnings reported by GCC (#25007)
* Core/AI: Remove unneeded null checks

GetMap() can never return NULL.

Fixes additionally -Wunused-variable warnings
reported by GCC.

* Core/GameObject: Fix a -Wunused-variable warning reported by GCC

* Core/Player: Fix a -Wunused-variable warning reported by GCC

* Scritps/CavernsOfTime: Fix -Wimplicit-fallthrough warnings reported by GCC

* Scritps/CavernsOfTime: Fix a -Wmaybe-uninitialized warning reported by GCC

Warning:

/home/peterke/DEV/TrinityCore/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp: In member function ‘virtual void npc_arthas_stratholme::npc_arthas_stratholmeAI::UpdateAI(uint32)’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp:1119:58: warning: ‘emote’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1119 |                                 (*it)->HandleEmoteCommand(emote);
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

* Scritps/PitOfSaron: Fix -Wunused-variable warnings reported by GCC

* Scritps/EyeOfEternity: Fix a -Wclass-memaccess warning reported by GCC

Warning:

/home/peterke/DEV/TrinityCore/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp: In member function ‘virtual void boss_malygos::boss_malygosAI::UpdateAI(uint32)’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp:950:81: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class ObjectGuid’; use assignment or value-initialization instead [-Wclass-memaccess]
  950 |                             memset(_surgeTargetGUID, 0, sizeof(_surgeTargetGUID));
      |

* Scritps/CoilfangReservoir: Fix a -Wclass-memaccess warning reported by GCC

Warning:

/home/peterke/DEV/TrinityCore/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp: In member function ‘void boss_leotheras_the_blind::boss_leotheras_the_blindAI::Initialize()’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp:220:55: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class ObjectGuid’; use assignment or value-initialization instead [-Wclass-memaccess]
  220 |             memset(InnderDemon, 0, sizeof(InnderDemon));
      |                                                       ^

* Scritps/Naxx: Fix a -Wimplicit-fallthrough warning reported by GCC

For discussion see https://github.com/TrinityCore/TrinityCore/pull/25007

(cherry picked from commit 10be49bdfe6bd1f4d8e0eaf3a1b4354c5a57a2a9)
2022-01-23 00:16:31 +01:00
Peter Keresztes Schmidt 1e1679a1f7 Core/DataStores: Port refactors from Update DBC field names to generated ones (#24999)
(cherry picked from commit c92950b3e1f6366d85d707365a8ad2caddafeecc)
2022-01-23 00:06:16 +01:00
Carbenium 366a514462 Core/Battlefield: Move SendInitWorldStatesTo to Battlefield class
(cherry picked from commit 488b91ab8307e2d84cc010be488aad693dba34c8)
2022-01-07 00:25:36 +01:00
Carbenium 81a3c135a7 Scripts/Battlefield: Move npc_wg_give_promotion_credit script to BattlefieldWG
The script references BattlefieldWG, which is not exported in dynamic builds.
Move the script, so it is in the same library.

(cherry picked from commit c40b897d369cf45696ca626fdf48bf51226a73a8)
2022-01-07 00:22:38 +01:00
Carbenium 49523a74a4 Battlefields: Move BF scripts out of game
This commit introduces the usual script interface
for battlefields.

(cherry picked from commit f7faf20254a120a90b8ee8eb55a284a6351aabc3)
2022-01-07 00:20:57 +01:00
Carbenium ca62d93481 Core/Misc: Move WorldState enum to SharedDefines
Move WG battlefield world states to the global enum

(cherry picked from commit 22c12e7123d76ea584ea8542be3feea57069e997)
2022-01-06 23:50:34 +01:00
Carbenium 60b48ad046 Core/Misc: Create new enum for AreaIds
Move Wintergrasp BF related values there

(cherry picked from commit 6a8c12587eef47722f6c845f477e0ca66e9ccd1e)
2022-01-06 23:42:15 +01:00
Peter Keresztes Schmidt c4098897a8 game/AI: Convert SelectAggroTarget to enum class (#24818)
* game/AI: Convert SelectAggroTarget to enum class

* game/AI: Rename SelectAggroTarget to SelectTargetMethod

(cherry picked from commit 418c3b1fd50664aad035bd975a65281e82ba2dea)
2022-01-06 21:53:27 +01:00
Carbenium 4e44bc6ea2 Core: Fix non-PCH build
(cherry picked from commit 45cb8c90e925580be41393e7647067d27a3e75c7)
2020-08-23 17:57:07 +02:00
Carbenium 692ec8e7c1 Core/SAI: Apply include cleanups to cherry-picked changes 2020-07-16 22:00:30 +02:00
Carbenium f27b7ba285 Core/Player: Reserve TELE_TO_TRANSPORT_TELEPORT used in 3.3.5 2020-07-16 21:47:27 +02:00
Carbenium 9969d6e194 Fix non-PCH build
(cherry picked from commit 05025d79f3cb34fa135cb820badeef32883f7eb4)
2020-06-24 14:35:10 +02:00
Peter Keresztes Schmidt bab5fd87a3 Core/Misc: Replace Trinity::make_unique with std (#24869) 2020-06-23 08:54:12 +02:00
Carbenium f387673aa3 CMake: Use target_precompile_headers instead of cotire with CMake >= 3.16.0 2020-06-16 09:29:31 +02:00
Carbenium 18ad767226 CMake: Remove guards around CMP0043 and CMP0054
We require CMake >= 3.8 which includes the policies.
CMP0043 OLD behaviour is still required by cotire.
2020-06-16 09:29:31 +02:00
Carbenium abff505a6e common: Add a missing include guard 2020-06-15 00:22:12 +02:00
Carbenium 1258800add Core/Entities: Add a missing include 2020-06-14 14:08:24 +02:00
Carbenium c6bc131b36 Add cmake-build-* directories to .gitignore since these are the default build locations for CLion 2016-11-30 21:29:10 +01:00
Carbenium 060256000b Tools/Mapextractor: Fix a vector subscript out of range debug assertion 2016-07-26 01:14:16 +02:00
Carbenium 73779d09e9 Add CLion files to gitignore 2016-06-21 21:13:32 +02:00
Carbenium d8d594d2bd IssueTemplate: Fix some engrish
Thanks tkrokli for the suggestion
2016-05-18 21:18:37 +02:00
Carbenium 2e3686b7e7 Core/Util: Add a missing include
(cherry picked from commit 1038df8d5b522e1e959528c3b7c17c01a88e7759)
2016-04-02 14:33:25 +02:00
Carbenium 541c125c2c Codestyle 2016-02-11 00:56:39 +01:00
Carbenium bf186ec26d Core/PacketIO: Updated and enabled SMSG_FISH_ESCAPED 2016-02-11 00:24:33 +01:00
Carbenium 0113b0f625 Core/PacketIO: Updated and enabled SMSG_FISH_NOT_HOOKED 2016-02-10 15:34:38 +01:00
Carbenium f8de1ab354 Core/PacketIO: Updated and enabled SMSG_CHAT_RESTRICTED 2016-02-10 00:01:45 +01:00
Carbenium b9f1dffa14 Core/PacketIO: Updated and enabled SMSG_CHAT_PLAYER_AMBIGUOUS 2016-02-08 22:34:20 +01:00
Carbenium f5ccb7b474 Core/PacketIO: Updated and enabled SMSG_SET_PLAYER_DECLINED_NAMES_RESULT 2016-02-07 21:02:35 +01:00
Carbenium 3bdde71a97 Core/PacketIO: Updated and enabled SMSG_NOTIFY_MISSILE_TRAJECTORY_COLLISION 2016-02-06 23:05:55 +01:00
Carbenium d3c556bc40 Core/PacketIO: Enable SMSG_SPELL_MISS_LOG and SMSG_UPDATE_LAST_INSTANCE 2016-02-05 01:18:55 +01:00
Carbenium 8e8f51848c Core/PacketIO: Enable SMSG_GM_TICKET_SYSTEM_STATUS, SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, SMSG_PLAY_SCENE and SMSG_QUERY_ITEM_TEXT_RESPONSE 2016-02-05 01:04:59 +01:00
Carbenium 75598953fb Core/PacketIO: Enable SMSG_CORPSE_TRANSPORT_QUERY 2016-02-05 00:47:58 +01:00
Carbenium f1685b97d9 Core/PacketIO: Enable SMSG_AREA_TRIGGER_NO_CORPSE 2016-02-04 01:33:05 +01:00
Carbenium b0d8357d14 Warning fix 2016-02-04 01:11:37 +01:00
Carbenium 93b552685b Core/PacketIO: Updated CMSG_WARDEN_DATA
Note: No packet handling changes made whatsoever.

...and ninja-fix a missing break from previous commit.
2016-02-03 23:28:54 +01:00
Carbenium 15bfabaa0a Core/PacketIO: Updated CMSG_COMPLAINT 2016-02-03 22:53:48 +01:00
Carbenium ff9ac9f9b0 Core/PacketIO: Use Vector3 instead of Position since orientation isn't included (MissileTrajectoryCollision and UpdateMissileTrajectory) 2016-02-03 17:14:15 +01:00
Carbenium ca967f4374 Core/PacketIO: Updated CMSG_VOICE_SESSION_ENABLE and CMSG_SET_ACTIVE_VOICE_CHANNEL for further usage 2016-02-03 16:47:24 +01:00
Carbenium 6715a91907 Core/PacketIO: Updated and enabled CMSG_UPDATE_MISSILE_TRAJECTORY 2016-02-03 15:10:58 +01:00
Carbenium f269335bb2 Core/PacketIO: 305b99e065 follow-up 2016-02-03 01:48:02 +01:00
Carbenium 305b99e065 Core/PacketIO: Updated and enabled CMSG_MISSILE_TRAJECTORY_COLLISION 2016-02-03 01:25:25 +01:00
Carbenium 3fa86e7931 Core/PacketIO: Updated and enabled CMSG_SET_TAXI_BENCHMARK_MODE 2016-02-03 00:20:07 +01:00
Carbenium 3ea1cfc4d0 Core/PacketIO: Updated and enabled CMSG_SET_PLAYER_DECLINED_NAMES 2016-02-02 23:19:37 +01:00
Carbenium aa5c947555 Core/PacketIO: Updated and enabled CMSG_SET_PARTY_ASSIGNMENT 2016-02-02 20:55:48 +01:00
Carbenium 20a6b54bb6 Core/PacketIO: Updated and enabled CMSG_REQUEST_STABLED_PETS 2016-02-02 20:10:33 +01:00
Carbenium a130300b86 Core/PacketIO: Updated and enabled CMSG_REQUEST_RATED_BATTLEFIELD_INFO 2016-02-02 19:51:19 +01:00
Carbenium 46addc21cd Core/PacketIO: Updated and enabled CMSG_REQUEST_PVP_REWARDS 2016-02-02 18:30:34 +01:00
Carbenium fd162fb604 Core/PacketIO: Add CMSG_REQUEST_PET_INFO packet class for further usage 2016-02-02 18:04:36 +01:00
Carbenium ea3cfa9146 Core/PacketIO: Initialize some vars 2016-02-02 17:30:19 +01:00
Carbenium 229322d4d8 Core/PacketIO: Updated and enabled CMSG_PUSH_QUEST_TO_PARTY 2016-02-02 17:18:47 +01:00
Carbenium 1f8268c89c Core/PacketIO: Updated and enabled CMSG_PET_SPELL_AUTOCAST 2016-02-02 16:38:36 +01:00
Carbenium dea718e4ed Core/PacketIO: Updated and enabled CMSG_PET_STOP_ATTACK 2016-02-02 01:56:51 +01:00
Carbenium 5b313bf74d Core/PacketIO: Updated and enabled CMSG_PET_CANCEL_AURA 2016-02-02 01:38:29 +01:00
Carbenium 0b76381283 Core/PacketIO: Updated and enabled CMSG_PET_ABANDON 2016-02-02 01:18:27 +01:00
Carbenium 391992ed80 Core/PacketIO: Updated and enabled CMSG_ITEM_PURCHASE_REFUND 2016-02-02 01:06:44 +01:00
Carbenium 6fbfc61de1 Core/PacketIO: Updated and enabled CMSG_DISMISS_CRITTER 2016-02-01 20:14:10 +01:00
Carbenium 3ec79c96c3 Merge pull request #16428 from Carbenium/mmap-memleak
Collision/MMap: Fix a memleak reported by valgrind
2016-01-30 20:44:49 +01:00
Carbenium 32e8b6506f Collision/MMap: Fix a memleak reported by valgrind
Tiles which are owned by the mesh should have the DT_TILE_FREE_DATA flag to ensure
deallocation on removal from the mesh.

Log:
==23516== 6,181,976 bytes in 6 blocks are definitely lost in loss record 15 of 15
==23516==    at 0x4C298A0: operator new[](unsigned long) (vg_replace_malloc.c:389)
==23516==    by 0x2052660: dtCustomAlloc(int, dtAllocHint) (Memory.h:11)
==23516==    by 0x29D7FDA: dtAlloc(int, dtAllocHint) (DetourAlloc.cpp:43)
==23516==    by 0x230AA70: MMAP::MMapManager::loadMap(std::string const&, unsigned int, int, int) (MMapManager.cpp:166)
==23516==    by 0x1DD585B: Map::LoadMMap(int, int) (Map.cpp:125)
==23516==    by 0x1DD7266: Map::LoadMapAndVMap(int, int) (Map.cpp:200)
==23516==    by 0x1DD93C6: Map::EnsureGridCreated_i(CoordPair<64u> const&) (Map.cpp:453)
==23516==    by 0x1DD9129: Map::EnsureGridCreated(CoordPair<64u> const&) (Map.cpp:429)
==23516==    by 0x1DED100: Map::GetGrid(float, float) (Map.cpp:2200)
==23516==    by 0x1DE0F4C: Map::GetAreaFlag(float, float, float, bool*) const (Map.cpp:2349)
==23516==    by 0x198521B: Map::GetZoneId(float, float, float) const (Map.h:353)
==23516==    by 0x197CFF0: WorldObject::GetZoneId() const (Object.cpp:1277)

Phase tiles aren't managed by detour so they shouldn't be free'd automatically on removal.
See MMapManager::UnloadPhaseTile
2016-01-30 20:40:54 +01:00
Carbenium 5918140146 DB: Add missing DELETE statement (2016_01_22_00_world) 2016-01-26 09:20:16 +01:00
Carbenium d3be63d0c8 Fix some linebreaks in 2016_01_22_00_world.sql 2016-01-22 19:37:22 +01:00
Carbenium 575d5f5ff8 Core/PacketIO: CMSG_BATTLEMASTER_JOIN_ARENA 2016-01-20 23:01:12 +01:00
Carbenium 0b0b014fad Script/Naxxramas: Fix a -Winconsistent-missing-override warning reported by clang 3.6
(cherry picked from commit f01ef901efab7f5b705948880c79eaf23061791e)
2016-01-15 19:45:24 +01:00
Carbenium c7e58e4db1 Tools/MapExtractor: Fix a warning reported by gcc 4.9
/var/lib/jenkins/jobs/tc_335_release_gcc49/workspace/src/tools/map_extractor/System.cpp:113:25: error: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result [-Werror=unused-result]
             chdir("../");

*NO reextraction of dbcs/maps needed*
Binary compatibility is ensured

(cherry picked from commit f0c7061f0b6dbd739f98dd91ad471395343fa836)

Conflicts:
	src/tools/map_extractor/CMakeLists.txt
	src/tools/map_extractor/System.cpp
	src/tools/map_extractor/loadlib.cpp
	src/tools/map_extractor/loadlib/loadlib.h
	src/tools/map_extractor/mpq_libmpq04.h
2015-12-13 09:47:20 +01:00
Carbenium c0c4ed7135 Misc: Fix some warnings reported by GCC 4.9 2015-11-28 01:02:13 +01:00
Carbenium 823d50421b Dep/SFMT: Add diff fordd55e41c8158fe1f60e120b0b89469d4112158d2
(cherry picked from commit d4608c8168e547581319386114e70e6ac953a97a)
2015-11-26 23:54:26 +01:00
Carbenium 260005a7e7 Dep/SFMT: Fix a strict-aliasing warning reported by GCC 4.9
(cherry picked from commit dd55e41c8158fe1f60e120b0b89469d4112158d2)
2015-11-26 23:54:25 +01:00
Carbenium e4bdaa0110 Merge pull request #15889 from Zedron/6.x
Core/MMaps: Fixed mmap loading after recent format change
2015-11-25 00:46:52 +01:00
Carbenium 0ffc89999e Fix build after recent cherry-picks 2015-11-23 10:32:28 +01:00
Carbenium 94b22d98be Merge pull request #15835 from ariel-/entry
Creature Addon should be updated when entry is changed.
(cherry picked from commit 52692c3f9d09dc781add9cfee043d6f6ec80291a)
2015-11-23 10:11:58 +01:00
Carbenium 0064fc2336 Core/Player: Update some function declarations 2015-11-16 03:09:28 +01:00
Carbenium 98dd4d732a Core/Player: Improve log messages 2015-11-16 01:45:53 +01:00
Carbenium b705ebeb7f Core/Player:
* sprinkle some consts
* replace some C-style casts by static_cast
* replace NULL by nullptr
2015-11-16 01:15:14 +01:00
Carbenium a1df148182 Missed change 2015-11-14 16:27:51 +01:00
Carbenium e8ea7b5ede Core/Player: Fix wrong format specifier in a log message
(introduced in 230e820898)
2015-11-14 16:17:07 +01:00
Carbenium 230e820898 Core/Creature: Remove duplicate call to LoadCreatureAddons in Creature::Create
* Add error log for duplicated aura entries in creature_(template_)addon

(cherry picked from commit c5f635b6896abaa3b9a2242c63c61a37fc60bf80)

Conflicts:
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Globals/ObjectMgr.cpp
2015-11-14 04:22:42 +01:00
Carbenium 4e76974ce5 Core/Player: Move KillRewarder to its own file 2015-11-14 03:01:02 +01:00
Carbenium 17a5f51a29 Fix non-PCH build 2015-11-13 14:17:01 +01:00
Carbenium 2d7d6f505c Core/Player: Move TradeData to its own file 2015-11-13 10:23:33 +01:00
Carbenium e8108b518b Tools/ConnectionPatcher: Fix signature patching on OSX
Closes #15003
2015-11-11 23:15:30 +01:00
Carbenium 7eb314fcd1 Core/Player: Improve a log message 2015-11-10 00:06:03 +01:00
Carbenium 4ea7e707f7 Core/ObjectMgr: Disable not linked graveyard error log for zoneId == 0
(cherry picked from commit 52394eb93cab93e1edc930e8a0af7572b15b2b06)

Conflicts:
	src/server/game/Globals/ObjectMgr.cpp
2015-11-09 23:51:41 +01:00
Carbenium 271390753d TDB 6.03 - 2015/11/08 2015-11-08 02:20:45 +01:00
Carbenium 3dde44cf64 DB: Add missing change to char base after 39d29edf93 2015-11-08 00:39:33 +01:00
Carbenium 752474e2ae Rename SQL files 2015-11-07 03:45:00 +01:00
Carbenium 74d7627778 Merge pull request #15720 from Tonghost/3.3.5
Core/Items: Fix a trading spoof exploit.
(cherry picked from commit 12ae32a9b629b5c473e76f73cc85ef4daf506a64)

Conflicts:
	src/server/game/Entities/Item/Item.cpp
2015-11-07 01:02:11 +01:00
Carbenium e06bc72da7 DB/Creature: Fix spawns/pathing in AQ40
By malcrom
2015-10-14 02:30:12 +02:00
Carbenium 62afdf0978 Merge pull request #15645 from Zedron/6.x
Core/Conditions: Fixed a typo
2015-10-01 09:18:57 +02:00
Carbenium 512c2ab83c Merge pull request #15538 from pete318/combat_bug
Combat with distant creatures (Mk II)
(cherry picked from commit a40d855337bd29f55d898fb5213af92abd5b43a1)
2015-09-25 00:22:05 +02:00
Carbenium 5147c70c35 Core: Fix build 2015-09-24 23:57:13 +02:00
Carbenium e4c97f6652 Merge pull request #15312 from StormBytePP/6.x_merge_common_and_move_database_out_of_shared
Core/Build: Merge common library and move database out of shared
2015-08-21 17:54:47 +02:00
Carbenium 172293acee Tools/ConnectionPatcher: Fix downloading BNet modules on linux
Closes #15315
2015-08-21 00:01:35 +02:00
Carbenium 6ad5182471 tabsss... 2015-07-19 18:30:40 +02:00
Carbenium 006d95cb9a DB/Vendors: Adjust size of PlayerConditionID in npc_vendor to INT(10) UNSIGNED since it is a db2 index 2015-07-19 18:25:55 +02:00
Carbenium 64ab572fec DB/Vendors: Add PlayerConditionID and IgnoreFiltering fields to npc_vendor 2015-07-19 17:57:23 +02:00