Commit Graph
251 Commits
Author SHA1 Message Date
Shauren 67f9d916cb Build: Fixed game & collision depending on each other for linking 2014-10-09 23:01:31 +02:00
Shauren b781a4dc33 Core/Logging: Replaced direct calls to GetCounter() in logs with ToString() 2014-10-08 17:59:27 +02:00
Shocker 80f77977f1 Core/Grids: Replace some magic numbers with constants
(P.S.: That's why! @cs_misc.cpp)
2014-09-19 18:03:49 +03:00
DDuarte cefcde9ba9 Core/Misc: Multiple static analysis issues fixed (small optimizations and clear code) 2014-09-19 03:30:02 +01:00
Shauren 878073d516 Core/Logging: Fixed incorrect usage of guid in logs 2014-09-16 20:47:08 +02:00
Shauren a0e50ea35f Core/Entities: Use ObjectGuid class in game project 2014-09-14 16:14:12 +02:00
Shocker 549ac332d5 Core/Maps: Don't use EnsureGridCreated_i() for base map in Map::LoadMap, use EnsureGridCreated() which is thread safe because although the LoadMap() call probably came from a thread safe EnsureGridCreated() call from the current map instance, multiple map instances can load grids for the same base map in the same time, and each of them has it's own mutex, therefore we should rely on the basemap's mutex 2014-08-26 14:19:19 +03:00
jackpoz 7fe7f30521 Core/Misc: Fix some -Wconversion warnings 2014-08-23 19:56:41 +02:00
DDuarte df3b08d140 Core/Server: Use nullptr instead of 0 where pointers are expected 2014-08-09 21:32:26 +01:00
Shauren 6f272ea5b7 Core/Network: Optimized packet sending by removing unneccessary memory copying 2014-07-27 17:46:46 +02:00
Shauren 7532864264 Buildsystem/MSVC: Warning fixes
C4800 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4127 conditional expression is constant
2014-07-17 15:42:57 +02:00
leak 013e3f4c0c Merge branch 'master' of github.com:TrinityCore/TrinityCore into boost 2014-07-06 20:07:52 +02:00
jackpoz 0f8c1d4a47 Core/Maps: Don't load vmaps/mmaps if disabled in configs
Don't try to load vmaps/mmaps if they are disabled in the configs.
Fixes #12392
2014-07-06 18:27:32 +02:00
Subv 0db743c4ff Merge branch 'master' of github.com:TrinityCore/TrinityCore into boost
Conflicts:
	src/server/authserver/Server/AuthSession.cpp
	src/server/game/Server/WorldSession.h
	src/server/shared/Packets/ByteBuffer.cpp
	src/server/shared/Utilities/Util.h
2014-06-23 16:35:54 -05:00
Shauren 5804372042 Core/Transports: Fixed crash happening during teleporting transports
Closes #11793
2014-06-13 11:16:17 +02:00
leak ee4a3b9d59 Replaced mutex related code in Common.h 2014-06-08 15:30:57 +02:00
Trisjdc 18868f5cbd Core/Maps: Allow logging players to enter in instances that have an encounter in progress 2014-06-03 00:57:36 +01:00
MitchesD 8e7cf15dd1 Scripts/HallsOfReflection: Major changes
* corrections to Intro Event (Falric, Marwyn etc.)
* fixed issues with Frostsworn General
* improved the whole Wrath of the Lich King event
* implemented outro gunship
* optimalization code and cleanup and fixed some typos
* Big thanks to @joschiwald, he is author too ;-)
2014-05-10 21:37:33 +02:00
joschiwald 211d56d633 Core/BG/SA:
* replaced some trinity_string with broadcasttexts
* basic implementation of phasing in SA
* spawn some triggers in SA (fixes dest position of teleport pads)
* added text getter to broadcasttext struct
* some cleanup in destructable go event notification
2014-04-26 03:40:30 +02:00
Shauren b949d0b982 Core/Misc: Defined a few fields in Map.dbc and rewritten InstanceMap::GetMaxPlayers to match what the client does to determine max players 2014-03-30 15:42:05 +02:00
Shauren 550cbcad96 Core/Transports: Enabled LoS on transports 2014-03-23 00:23:30 +01:00
Shauren 3c16c63293 Core/Transports: Fixed crashes happening when a transport was despawned with players/dynamicobjects on it 2014-03-22 19:44:54 +01:00
Shauren 529cabea68 Core/Map: Save weather, light and music overrides in map to send them to players logging in 2014-03-22 19:40:36 +01:00
Shauren 69fb9642a3 Fixed build with TRINITY_DEBUG 2014-03-16 21:22:31 +01:00
Shauren f0f4a620fb Core/Transports: Added support for DynamicObjects on transports 2014-03-16 20:00:09 +01:00
jackpoz 1f170c99ef Core/Instances: Fix Instance binding
Fix players not being bound to instance if the group was disbanded before killing any boss.
Fixes #437
2014-01-03 18:56:11 +01:00
Vincent_Michael 20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Shauren 29acf99ea6 Core/Transports: Fixed new spawned transports not being visible for players already present on map 2013-12-28 12:44:22 +01:00
jackpoz e255d1d376 Core/Transports: Fix possible crash
Fix a crash happening when deleting an instance with transports. This case doesn't appear in current sources but could have happened in ICC and HoR.
2013-12-25 23:11:22 +01:00
jackpoz dd4a774c4c Core/Transports: Fix memory leak on shutdown
Fix world transports not being deleted on shutdown.
2013-12-15 18:51:34 +01:00
jackpoz 1c0903e286 Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values. Most of them are false positives, always initialized before being accessed, while some of them are real issues spotted by valgrind too.
2013-12-14 18:41:26 +01:00
jackpoz c03f066bf2 Core/Build: Fix build when WITH_COREDEBUG CMake flag is selected 2013-11-11 21:55:52 +01:00
Spp 94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00
Shauren 39175ac680 Core/Transports
* Fixed fall damage on transports while teleporting
* Fixed packets not being received by owner if sent by a controlled minion
* Fixed an issue when a teleporting transport would attempt to reload its creature passengers on old map

Closes #11140
2013-11-02 13:22:14 +01:00
leguybrush 0a308144a8 Core/Code: Unify [more] codestyle for brackets: )\n{\n} to ) { }. 2013-10-28 14:36:07 -04:00
Ascathor 2607738990 Core/Code: Unify codestyle for brackets: {} to { }.
Also added missing copyright to some files.
2013-10-27 23:46:02 +01:00
Shauren f0794d7585 Core/Transports: Correct path generation for a few transports 2013-10-27 11:15:56 +01:00
Shauren 5259539a5f Core/Transports: Fixed crashes when instance with transports unloads
Closes #11056
2013-10-18 21:17:58 +02:00
Shauren 38b682d7a8 Core/Maps: Added gameobject case for AddObjectToSwitchList and fixed logic in RemoveAllObjectsInRemoveList 2013-10-18 20:12:36 +02:00
Vincent_Michael 77013aa081 Core: Fix warnings 2013-10-18 13:31:09 +02:00
Shauren 565dd4299c Build fix 2013-10-17 00:55:50 +02:00
Shauren ce55647c41 Core/Transports
* Rewritten path generation, now uses splines - timers are a lot more accurate now
* Implemented stopping transports
* Implemented spawning transports in instances
* Implemented spawning gameobjects as transport passengers
* Transport passengers are now stored in creature/gameobject table using gameobject_template.data6 from transport's template as map id
2013-10-16 18:37:29 +02:00
Ellie 1fae858645 Whitespace between string literals and user-defined literals is now mandatory for concatenation in C++11 2013-10-01 01:13:13 -07:00
Sebastian Valle 24f8b2b994 Core/Misc: Fixed some more issues found by code analysis tools. 2013-09-03 15:09:37 -05:00
jackpoz 2a47b602d7 Core/Aura: Fix SPELL_AURA_BIND_SIGHT invalid read
Mind Vision has Aura Effect SPELL_AURA_BIND_SIGHT which adds the target to a special Map container i_objectsToSwitch, used to switch grid containers for target Creatures of this Aura Effect.

When the target is a Creature, when the Creature is removed from world it's added to i_objectsToSwitch and then to i_objectsToRemove, iterated in this order in Map::RemoveAllObjectsInRemoveList() so the reference in i_objectsToSwitch is valid.
When the target is a Player, when the Player logs out it's added to i_objectsToSwitch but then Map::RemovePlayerFromMap() deletes the Player, leaving an invalid reference in i_objectsToSwitch.

Since the whole point of i_objectsToSwitch is to store Creatures and since the stored references are used only if the condition "GetTypeId() == TYPEID_UNIT" is verified, it's safe to add only objects of TYPEID_UNIT type to the container.

Valgrind log:
 Invalid read of size 4
   at 0xC52332: Object::GetTypeId() const (Object.h:140)
   by 0xF540D3: Map::RemoveAllObjectsInRemoveList() (Map.cpp:2136)
   by 0xF53CD2: Map::DelayedUpdate(unsigned int) (Map.cpp:2087)
   by 0xF639B1: MapManager::Update(unsigned int) (MapManager.cpp:292)
   by 0x107CB40: World::Update(unsigned int) (World.cpp:2025)
   by 0xBEB263: WorldRunnable::run() (WorldRunnable.cpp:60)
   by 0x1213792: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
   by 0x515EA35: ACE_OS_Thread_Adapter::invoke() (in /usr/lib/libACE-6.0.3.so)
   by 0x5F19F8D: start_thread (pthread_create.c:311)
   by 0x6A46E1C: clone (clone.S:113)
 Address 0x401eacac is 12 bytes inside a block of size 11,736 free'd
   at 0x4C2B59C: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0xD80239: Player::~Player() (Player.cpp:915)
   by 0xF4D5A2: void Map::DeleteFromWorld<Player>(Player*) (Map.cpp:319)
   by 0xF4EBBB: Map::RemovePlayerFromMap(Player*, bool) (Map.cpp:687)
   by 0xFCC18D: WorldSession::LogoutPlayer(bool) (WorldSession.cpp:531)
   by 0xF1EDD5: WorldSession::HandleLogoutRequestOpcode(WorldPacket&) (MiscHandler.cpp:403)
   by 0xFCAE37: WorldSession::Update(unsigned int, PacketFilter&) (WorldSession.cpp:312)
   by 0x107EBC6: World::UpdateSessions(unsigned int) (World.cpp:2615)
   by 0x107C94B: World::Update(unsigned int) (World.cpp:1978)
   by 0xBEB263: WorldRunnable::run() (WorldRunnable.cpp:60)
   by 0x1213792: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
   by 0x515EA35: ACE_OS_Thread_Adapter::invoke() (in /usr/lib/libACE-6.0.3.so)
2013-08-26 16:49:02 +02:00
Mihapro e00fc19779 Core/SmartScripts 2013-07-08 18:01:41 +02:00
Malcrom ec474a62e5 Core: More Function Renaming. 2013-06-11 21:25:12 -02:30
Malcrom 047608e7de Core/SAI: Add check so npc will not send text to pet. Also updated isPet() to IsPet(). 2013-06-11 18:39:51 -02:30
Shauren e21b94c25c Core/Maps: Fixed Map::IsInWater returning true at any height above water 2013-06-07 16:00:44 +02:00
Shauren 7d46703413 Core/Misc: Another batch of fixes for issues found by static analysis 2013-05-17 21:30:02 +02:00