100 Commits
Author SHA1 Message Date
Machiavelli 70c6828f83 Merge pull request #11464 from Dehravor/ticket-memory-leak
Core/Tickets: Fix memory leak when malformed CMSG_GMTICKET_CREATE is received
2014-01-19 15:09:25 -08:00
Machiavelli 68af9376f6 Core/Calendar: Add documentation regarding fix in previous commit 2014-01-18 14:00:19 +01:00
Machiavelli ca6fd8aad2 Merge pull request #11462 from Dehravor/add-event-memleaks
Core/Calendar: Fix memory leaks due to BytebufferException thrown
2014-01-18 04:57:29 -08:00
Machiavelli e2376fcb72 Merge pull request #11397 from Dehravor/guild-view-offinote
Core/Guild: Don't allow players to view officer notes without proper rights
2014-01-17 03:47:01 -08:00
Machiavelli b845e6af2b Merge pull request #10989 from Elron103/pullrequests2
Core/Tickets: Fix crash in TicketMgr::ResetTickets()
2013-10-19 09:31:47 -07:00
Machiavelli 2e15f78305 Merge pull request #10801 from jackpoz/account_password_crashfix
Core/Commands: Fix NULL dereference crash in .account password
2013-09-13 12:09:26 -07:00
Machiavelli bd8d0cfbce Fix build 2013-09-12 16:42:22 +01:00
Machiavelli e8675dd4ed Scripts/Blood Furnace: Fix possible compile errors on old VS versions 2013-09-07 15:17:56 +01:00
Machiavelli 287dc307bc Merge pull request #10724 from jackpoz/guild_disband_leak
Core/Guild: Fix memory leak on Guild disband
2013-09-07 05:07:28 -07:00
Machiavelli 577c9457e3 Update DBCStructure.h 2013-09-06 13:55:57 +01:00
Machiavelli 2fc6385dba Core/Vehicles: Add vehicle_seat_flag_unk18 (0x20000) to seat.IsUsableByOverride
Exact definition still needs to be researched
2013-09-06 13:30:53 +01:00
Machiavelli eab035eca6 Revert e6761ea2aa 2013-08-31 21:25:53 +01:00
Machiavelli e6761ea2aa Core/NetworkIO: Fix memory leak
Packet headers not being correctly deallocated.
2013-08-31 18:56:58 +01:00
Machiavelli 4b5c4ab12a Core/CharacterHandler: Some more rules for CMSG_CHAR_ENUM allowance
Thanks to @TakenBacon for heads up
2013-08-30 21:52:59 +01:00
Machiavelli e3f27a36fe Core/Creatures: Fix base stats calculations for some cases.
i.e. health_mod of 0.001 resulting in hp of 0 instead of 1
2013-08-30 20:59:29 +01:00
Machiavelli 213998e2d7 Core/NetworkIO: Allow CMSG_CHAR_ENUM after char creation and char deletion
Perhaps these calls could be better placed but it's a matter of trial
and error to see what is most effective.
2013-08-30 00:05:57 +01:00
Machiavelli 9346695129 Core: Few fixes for previous commit. 2013-08-29 21:55:29 +01:00
Machiavelli 59b4c34924 Core/NetworkIO: Generic packet spam solution
Currently regulates the usage of CMSG_CHAR_ENUM only, but can be easily
extended to detect inappropriate network behaviour by using
AntiDOS.AllowOpcode in WorldSession's handlers.
2013-08-29 16:46:28 +01:00
Machiavelli 39ccd4a460 Merge pull request #10624 from jackpoz/instancesavemgr
Core/Instances: Fix mutex released after being deleted
2013-08-25 12:14:50 -07:00
Machiavelli 783021a8cb Fix non-pch compile 2013-08-13 14:47:45 +02:00
Machiavelli 93226005c6 Scripts/Akama: Uninitialized variable 2013-07-11 13:45:51 +02:00
Machiavelli 94a13f6b50 Core/Player: Fix honor after duel exploit
Closes #9852
2013-05-24 13:55:04 +03:00
Machiavelli 7cab6d308a Core/Vehicles: Make RemovePendingEventsForSeat iterating crashsafe 2013-02-23 15:25:47 +01:00
Machiavelli b91c33dca5 Core/Vehicles: Fix a crash in VehicleJoinEvent::Execute
Crash would happen if multiple events were scheduled for the same seat.
Fixes #9255
2013-02-23 15:12:39 +01:00
Machiavelli 5143804014 Core/Vehicles: Also remove mount auras for passengers not in charm seat
May fix related crashes:
Ref #9256 #9255
2013-02-21 14:43:31 +01:00
Machiavelli 6b63a98ab0 Core/SmartAI: Prevent recursive EnterEvadeMode call
Ref #8679
2013-02-19 16:35:26 +01:00
Machiavelli 1c745dfe16 Core/Vehicles: Fix a few issues
- Fix position desync issue
Closes #9073
- Fix a crash related to passenger's EventProcessor, thanks to Shauren
- Fix crash related to charminfo
- Make compiler happier about certain things
2013-02-18 16:19:16 +01:00
Machiavelli cc8d5a3aca Core/Vehicles: Prevent infinite loop in VehicleJoinEvent:Abort 2013-02-18 02:20:42 +01:00
Machiavelli 01fbbf3b93 Core/Vehicles: Refactor some parts of vehicle system
- Fix a few crashes:
Closes #9235
- Simplify and get rid of lots of redundant and silly code
- Optimisations in Unit::ChangeSeat
- More documentation
2013-02-18 00:39:58 +01:00
Machiavelli 0049e580eb Core/Auras: Restore part of 1845ab79 that was accidentally reverted 2013-02-17 14:48:14 +01:00
Machiavelli 6590cf4f9e Core/Vehicles: Fix another crash
Don't set Unit::m_vehicle until VehicleJoinEvent::Execute
2013-02-17 08:03:27 +01:00
Machiavelli 35fc90c684 Core/Vehicles: Fix another crash
Fixes #9225
2013-02-16 16:12:24 +01:00
Machiavelli 8bbcc2f37c Merge pull request #9214 from Aokromes/master
Scripts/Ulduar: Kologarn's gate should be open while in combat
2013-02-16 01:08:58 -08:00
Machiavelli 178134d86b Core/Vehicles: Fix crash introduced in my previous change 2013-02-16 09:51:46 +01:00
Machiavelli 60cef65b5c Core/Vehicle: Make the passenger join event asynchronous
Prevents a crash in the following scenario:
Player 1 enters vehicle X
Seat on vehicle X is taken by Player 2
Player 2 is removed from vehicle X
Vehicle X dismisses (but player 1 did not even finish AddPasssenger
call)

Fixes #4271
2013-02-16 02:11:42 +01:00
Machiavelli 771598b67a Core/Handlers: Missing returns after KickPlayer() call 2013-02-14 16:12:58 +01:00
Machiavelli 1093abb1ad Core/Handlers: Prevent some cheating in CharacterHandler
Prevents factionchanging and char customising of characters that do not
belong to the current account.
2013-02-14 16:07:36 +01:00
Machiavelli 877a7e9968 Core/Handlers: Fix a crash in HandleCharFactionOrRaceChange
Ensure there's always valid character name data present, even for
characters that were manually inserted into the database, by adding
character name data on char enum if needed.
2013-02-14 15:43:26 +01:00
Machiavelli 8befbdcc56 Core/LFG: Fix a crash
Fix a crash in case a player is recognized as in a LFG dungeon, but without a valid group
2013-02-14 15:01:33 +01:00
Machiavelli 203cf7cbf0 Core/RA: Addition to previous crashfix
To make sure it also works for sessions that use more than 1 command
before closing.
2013-02-14 13:30:51 +01:00
Machiavelli b4be224004 Core/RA: Fix a possible crash
Caused when RASocket::handle_close (event-driven) would delete the underlying object before RASocket::commandFinished callback was executed for that object. Dereferencing freed pointers is bad.
2013-02-14 11:57:43 +01:00
Machiavelli 61495d18a3 Core/Log: Fix crash due to uninitialized variable 2013-01-25 21:40:21 +01:00
Machiavelli fd967ba4c6 Tools/mmaps_generator: Multithreading optimisations. Should save some time generating mmaps. 2013-01-24 01:20:25 +01:00
Machiavelli 0f8a8a3270 Merge branch 'HEAD' of [email protected]:TrinityCore/TrinityCore.git 2013-01-24 01:13:21 +01:00
Machiavelli 1c0239ea98 Core/DBLayer: Drop support for MySQL versions <5.1
Both server and client libraries must be up to date in order to run TC.
2013-01-23 22:56:56 +01:00
Machiavelli 39c2d892f3 Core/Log: Allow configuring a maximum file size for a log file. If the file size is about to be exceeded, the core will create a new file titled <oldname>_.log and start outputting there. 2013-01-23 17:48:17 +01:00
Machiavelli b52346522e Core/Vehicles: Add some internal checks in vehicle code to prevent crashable behaviour caused by scripts or other areas of the core. 2013-01-05 15:40:36 +01:00
Machiavelli 9f32cd44e4 Update src/server/game/Achievements/AchievementMgr.cpp
Prevent achievement completion log spam.
2013-01-04 18:37:15 +01:00
Machiavelli 0782e0b851 Update src/server/game/Achievements/AchievementMgr.cpp
Core/Achievements: Add player name and guid to CompletedAchievement log
2013-01-03 14:55:49 +01:00
Machiavelli 1efd2f9e33 Merge pull request #7715 from e000/master
Core/Player: Fix wrong check in 7a8652c
2012-09-10 01:14:05 -07:00
Machiavelli cfb53dbf42 Merge pull request #6885 from Chaplain/clean
Core/Misc: Code-style + some const methods.
2012-06-22 05:31:04 -07:00
Machiavelli acee199e78 Merge pull request #6895 from Xees/master
Core/Player: Modify GetItemByEntry to include Currency.
2012-06-22 05:28:49 -07:00
Machiavelli 4daafd0c93 Forgot to stage SQL from my previous commit. (.hover command) 2012-04-12 13:30:43 +02:00
Machiavelli 74b5b3bd8e Core/Commands: Remove recently defunct .hover command. All this spell did before hoverheight changes was .cast/.unaura spell 11010. And since we do not have .autoattack, .steadyshot, .heroicstrike, .shootwand etc. either, there's no place for this command in the core (there never was). 2012-04-12 12:04:04 +02:00
Machiavelli c38820c3bd Scripts/Twin Valkyr: Fix a crash in spell_powering_up_SpellScript. Author: Vincent-Michael 2012-04-11 22:35:23 +03:00
Machiavelli 9d6c8add0e Fix non-PCH build and GitExtensions screwup from last changeset 2012-04-08 18:58:42 +02:00
Machiavelli bc96df1aae Core/Shared: Move container functions to shared project under Trinity::Container namespace. Also implement RandomResizeList which takes a predicate function as parameter.
Core/ScriptedAI: Extend SummonList::DoAction to take a predicate function as parameter and allow specifying a maximum number of units to be selected.
2012-04-08 17:40:05 +02:00
Machiavelli e636531da3 Core/Movement: Fix pushback issues and client freeze. 2012-04-08 17:03:44 +02:00
Machiavelli e95d614f52 Core/Misc: Prevent calling ACE_Task_Base::wait() on an invalid handle. WorldSocketMgr::Wait is already called in WorldRunnable post-service hook 2012-03-28 12:50:02 +02:00
Machiavelli cc0448a017 Core/Battleground/SOTA: Initialize uninitialized variables.
Fixes:

==8111== Conditional jump or move depends on uninitialised value(s)
==8111==    at 0x12B542C: BattlegroundSA::FillInitialWorldStates(WorldPacket&) (BattlegroundSA.cpp:421)
==8111==    by 0xF93CD9: Player::SendInitWorldStates(unsigned int, unsigned int) (Player.cpp:9664)'

And similar.
2012-03-28 13:17:45 +03:00
Machiavelli 91228d2711 Core/Player: Similarly initialize m_SeasonalQuestChanged
Fixes:

==8111== Conditional jump or move depends on uninitialised value(s)
==8111==    at 0xFB7C42: Player::_SaveSeasonalQuestStatus(Trinity::AutoPtr<Transaction, ACE_Thread_Mutex>&) (Player.cpp:19375)
==8111==    by 0xFB56BA: Player::SaveToDB(bool) (Player.cpp:18898)
2012-03-28 13:07:37 +03:00
Machiavelli c3db19b80b Core/Player: Initialize m_WeeklyQuestChanged
Fixes:

==8111== Conditional jump or move depends on uninitialised value(s)
==8111==    at 0xFB7AD2: Player::_SaveWeeklyQuestStatus(Trinity::AutoPtr<Transaction, ACE_Thread_Mutex>&) (Player.cpp:19352)
2012-03-28 13:06:02 +03:00
Machiavelli 79a782f143 Core/Misc: Make World::m_stopEvent thread-safe. Note that the 'virtual' keyword in C/C++ is pretty useless for multithreading 2012-03-27 13:19:27 +02:00
Machiavelli 1ee7196ec0 Core/DB Layer: Fix helgrind errors on some concurrent access to resultset auto pointers.
Example:
==8753== Possible data race during read of size 8 at 0x2e803e60 by thread #8
==8753==    at 0xDD0FFC: PreparedResultSet::operator[](unsigned int) const (QueryResult.h:83)
==8753==    by 0x131D82D: WorldSession::HandleCharEnum(Trinity::AutoPtr<PreparedResultSet, ACE_Null_Mutex>) (CharacterHandler.cpp:217)
==8753==    by 0x118F8C3: WorldSession::ProcessQueryCallbacks() (WorldSession.cpp:1087)
{..}
==8753==  Address 0x2e803e60 is 0 bytes inside a block of size 16 alloc'd
==8753==    at 0x4C28B75: operator new(unsigned long) (vg_replace_malloc.c:261)
==8753==    by 0x137D515: __gnu_cxx::new_allocator<Field*>::allocate(unsigned long, void const*) (new_allocator.h:92)
==8753==    by 0x137D378: std::_Vector_base<Field*, std::allocator<Field*> >::_M_allocate(unsigned long) (in /home/aokromes/bin/bin/worldserver)
==8753==    by 0x137CEC6: std::vector<Field*, std::allocator<Field*> >::_M_fill_insert(__gnu_cxx::__normal_iterator<Field**, std::vector<Field*, std::allocator<Field*> > >, unsigned long, Field* const&) (vector.tcc:416)
==8753==    by 0x137CB27: std::vector<Field*, std::allocator<Field*> >::insert(__gnu_cxx::__normal_iterator<Field**, std::vector<Field*, std::allocator<Field*> > >, unsigned long, Field* const&) (stl_vector.h:944)
==8753==    by 0x137C964: std::vector<Field*, std::allocator<Field*> >::resize(unsigned long, Field*) (stl_vector.h:632)
==8753==    by 0x137BFCA: PreparedResultSet::PreparedResultSet(st_mysql_stmt*, st_mysql_res*, unsigned long, unsigned int) (QueryResult.cpp:98)
==8753==    by 0x137A12B: MySQLConnection::Query(PreparedStatement*) (MySQLConnection.cpp:493)
==8753==    by 0x137F663: PreparedStatementTask::Execute() (PreparedStatement.cpp:412)

Have a feeling this is a false positive, though. Nevertheless good to get rid of.
2012-03-27 13:33:02 +03:00
Machiavelli 88d81d27cf Core/DB Layer: - Fix "Thread #1 unlocked a not-locked lock at 0x6D56E90" helgrind error (thanks to Aokromes for logs). Cause was unlocking MySQL connection on shutdown, but concurrent access at this point is not required.
- Remove redundant locking in PingOperation. Since these are delayed to async threads with their own MySQL connection, no concurrent access here either.
- Codestyle cleanup
- Documentation refining
2012-03-27 11:50:03 +02:00
Machiavelli f18946a72e DB/Creature Template: Some updates, mostly HoverHeight and InhabitType. Thanks to KingPin for re-parsing ~5GB of sniffs. 2012-03-26 15:38:52 +02:00
Machiavelli e960016dc4 Partial revert of "Core/DB Layer: Fix a memory leak.", mysql library related stuff. Original memory leak fix is still in place. 2012-03-26 13:33:47 +02:00
Machiavelli 70ee37f3b4 Core/DB Layer: Fix a memory leak for synchronously executed prepared statements. 2012-03-26 08:58:21 +02:00
Machiavelli 43048afc7e Core/DB Layer: Fix a memory leak. 2012-03-26 08:29:41 +02:00
Machiavelli 3f61bd0a26 Core/DB Layer: Make SQLTransaction AutoPtr thread safe (valgrind caught a race condition) 2012-03-26 02:56:43 +03:00
Machiavelli fa1d3f305b Core/Misc: Implement Trinity::Auto_Ptr. Ditches ACE_Refcounted_AutoPtr (we strongly suspect it does NOT clean up the underlying pointer properly). Underlying type is now ACE_Strong_Bound_Ptr 2012-03-25 21:21:23 +02:00
Machiavelli eda06321b9 Update src/server/shared/Database/Field.h 2012-03-25 14:11:24 +03:00
Machiavelli 87176c84d3 Core/DBLayer: Refine field type checks in Field::GetXXX methods. Should give us logs of wrong GetXXX calls for a certain type without having to dig trough valgrind logs. 2012-03-25 14:10:06 +03:00
Machiavelli 2ba4c5fa68 Core/TicketMgr: Remove a memory leak in RemoveTicket. Spotted by Subv 2012-03-25 13:09:43 +03:00
Machiavelli 0eb3ffca41 Core/DB Layer: Fix a memory leak. Author: raczman (yes, you read correctly) 2012-03-24 19:24:36 +01:00
Machiavelli 58caee1595 Merge pull request #5858 from w1sht0l1v3/AK
Scripts/Ahn'kahet/Prince Taldaram:
Fix movement after shield drops.(no more LoS issues)
Update boss texts and move them to creature_text.
Add proper sounds to text.
Add condition for a visual spell.
Add usage of different Embrace of the Vampyr spell based on difficulty.
2012-03-24 04:31:11 -07:00
Machiavelli a2818cc442 Merge pull request #5837 from w1sht0l1v3/AK
Scripts/Ahn'kahet/Prince Taldaram: Fix Conjure Flame Sphere visual casting.
2012-03-22 12:11:19 -07:00
Machiavelli d521d75fae Merge pull request #5825 from w1sht0l1v3/ToCr
Scripts/ToCr/Val'kyr Twins: Fix orb targeting.
2012-03-21 13:25:42 -07:00
Machiavelli e4ee3788e7 Scripts/ToC/Anub'Arak: Prevent spells (Leeching Swarm in particular) being interrupted by other spells. 2012-03-21 12:42:45 +01:00
Machiavelli 5acbd35411 Core/Movement: Update MOVEMENTFLAG_MASK_MOVING, thanks to idostyle 2012-03-18 13:22:36 +01:00
Machiavelli 2b1ba4cd78 Core/Movement: Compute current position in spline::Launch with Z offset. Fixes e.g. hovering creatures height increasing every time player interacts with it. 2012-03-18 13:18:43 +01:00
Machiavelli 48799f3376 Core/Units: Fix movementflag apply for flying/hovering creatures on respawn 2012-03-18 11:35:33 +01:00
Machiavelli 41cc704bf8 Core/Movement:
- Don't abort relocation if movementflag restrictions were violated. There might be lag between client and server and even different parts of the core that made this approach improper.
- MOVEMENTFLAG_ROOT cannot be used in conjunction with MOVEMENTFLAG_MASK_MOVING, but it's a valid flag to receive from client.
- Fix falling to ground when unapplying fly/waterwalk aura. NOTE: This is a client-side initiated fall, in the future this should be initiated and updated by the server. (Working on it)
- Rename MOVEMENTFLAG_FALLING to MOVEMENTFLAG_FALLING_FAR
- Rename MOVEMENTFLAG_JUMPING to MOVEMENTFLAG_FALLING

Closes #5751
2012-03-17 20:36:12 +01:00
Machiavelli 5d25dc8926 Tools/VmapExtractor: Don't check registry for game folder on windows, just use relative "Data" dir, similar to linux. 2012-03-17 17:51:00 +01:00
Machiavelli 57a71c8dff Merge pull request #5763 from w1sht0l1v3/master
Core/Unit: Disable spline movement on death. 

Fixe respawning after ForceDespawn is called.

Closes #4518
2012-03-17 09:33:29 -07:00
Machiavelli 9bb04a23ad Merge pull request #5755 from GyxTom/master
Core/Script: Clean-Up in Scripts.
2012-03-17 04:02:41 -07:00
Machiavelli 87a121425c Update src/server/game/Server/WorldSession.cpp 2012-03-17 11:54:56 +01:00
Machiavelli 5d2d2a5ac7 Update src/server/game/Server/WorldSession.cpp 2012-03-17 11:54:21 +01:00
Machiavelli 80975faba2 Core/Movement: Add debug output to Worldsession::ReadMovementInfo to find out which movementflag restriction was violated. Please use this to give feedback. 2012-03-17 11:50:30 +01:00
Machiavelli cf5ed0a7b6 Core/Movement: Remove MOVEMENTFLAG_FLYING on fly aura unapply as well as _CAN_FLY 2012-03-16 23:41:43 +01:00
Machiavelli 85da463686 Core/Movement: Fix brackets in macro 2012-03-16 23:37:50 +01:00
Machiavelli 65453620e8 Core/Movement: Do not process server side relocation if reading movementinfo from client resulted in violations (= hacking). 2012-03-16 18:15:08 +01:00
Machiavelli cca93c7a22 Minor typo, major consequences. 2012-03-16 17:27:24 +01:00
Machiavelli df31af5b4f Core/Movement: Add server-side check for movementflag correction in previous commit. This effectively prevents (most if not all) flyhacking. 2012-03-16 17:21:15 +01:00
Machiavelli f8c04b1bc5 Core/Movement: Fix players still able to fly on SPELL_AURA_FLY and SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED unapply.
Closes #5731
2012-03-16 17:10:01 +01:00
Machiavelli 7d60290c2e Core/Units: Offset z coordinate only if MOVEMENTFLAG_HOVER is present, not MOVEMENTFLAG_DISABLE_GRAVITY.
(Remnant from an early incorrect version of my UNIT_FIELD_HOVERHEIGHT patch)
2012-03-15 10:16:08 +01:00
Machiavelli e17a9cfb85 Core/Movement: Add server side filters for MOVEMENTFLAG_WATERWALKING, _FALLING_SLOW and _HOVER depending on required aura types. Fixes exploiting when aura unapply packets (such as corrected in previous commit) are blocked/altered before reaching the client. 2012-03-15 10:12:43 +01:00
Machiavelli afaed98b7a Core/Movement: Send correct packet to client when unapplying hover, feather fall and water walking auras.
Closes #5704
2012-03-15 10:03:25 +01:00
Machiavelli a48216e122 Scripts/UP/Svala: Temp compile fix for Svala. Currently rewriting the entire script. 2012-03-12 08:41:13 +01:00
Machiavelli 8af0067016 Scripts/ICC/Lich King: Typo correction in unit_field_bytes_1 usage related to hover, introduced in previous commit (thankfully the only one). 2012-03-12 01:10:02 +01:00