Commit Graph

243 Commits

Author SHA1 Message Date
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
Spp
d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
xjose93
eb7f0adcb5 Core/Maps: Add mapname when a player is binded to other save. 2013-04-27 01:10:10 +02:00
Nefarion
49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
Nay
03f97f75ec Core/Startup: Write current and expected maps version when there's a version mismatch 2013-02-19 01:16:24 +00:00
Spp
61979f8591 Scripts/Player: Add OnMapChanged to PlayerScripts (after map changed)
Core/Dungeon Finder: Use OnMapChanged script to cast/remove Luck of the draw
- Also move code to force party update to LfgPlayerScript
- Remove some obsolete Lfg code after recent commits
2013-02-04 16:52:43 +01:00
Spp
9bdfc87774 Core/Dungeon Finder: Use lfg namespace to encapsulate all LFG classes, structs and enums 2013-02-04 04:43:50 +01:00
Spp
f753c989f2 Core/Dungeon Finder: Simplify Spell Luck of the draw code
Core/Dungeon Finder: Partial recode of "group list" using existing Lfg functions
2013-02-04 04:43:49 +01:00
Spp
c4e4cb1b5c Core/Misc: Remove using directive from header files (It will eventually lead to name collisions) 2013-01-30 09:06:19 +01:00