Commit Graph

9657 Commits

Author SHA1 Message Date
Vincent-Michael
f2dff3da38 Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
2013-09-22 15:31:21 +02:00
jackpoz
9579d0a3e7 Scripts/ScarletEnclave: Fix uninitialized values in Highlord Darion Mograine
Reset() has if checks on values that are initialized after them so it's required to initialize these fields in the constructor.

Valgrind log:
 Conditional jump or move depends on uninitialised value(s)
  by 0x11CF472: HashMapHolder<Creature>::Find(unsigned long) (ObjectAccessor.h:67)
  by 0x11CE36F: Creature* ObjectAccessor::GetObjectInWorld<Creature>(unsigned long, Creature*) (ObjectAccessor.h:114)
  by 0x1257C13: Creature* ObjectAccessor::GetObjectInMap<Creature>(unsigned long, Map*, Creature*) (ObjectAccessor.h:135)
  by 0x12E64F1: Map::GetCreature(unsigned long) (Map.cpp:2767)
  by 0x10AF4DE: Unit::GetCreature(WorldObject&, unsigned long) (Unit.cpp:13021)
  by 0x16F8F81: npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::Reset() (chapter5.cpp:386)
  by 0x16F8D36: npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::npc_highlord_darion_mograineAI(Creature*) (chapter5.cpp:314)
  by 0x16F8CD6: npc_highlord_darion_mograine::GetAI(Creature*) const (chapter5.cpp:307)
  by 0x132AF6C: ScriptMgr::GetCreatureAI(Creature*) (ScriptMgr.cpp:796)
  by 0x1441D45: FactorySelector::selectAI(Creature*) (CreatureAISelector.cpp:41)
2013-09-21 22:36:23 +02:00
jackpoz
af63c8783e Core/Guild: Fix withdraw money from bank overflowing int32 limit
Clamp amount of money withdrawn from bank to MAX_MONEY_AMOUNT to avoid int32 overflow which would remove money from Player instead of adding it.
2013-09-21 19:44:15 +02:00
jackpoz
9c336cc32e Core/DB: Make a26a24a consistent with Trinity code style
Change DatabaseWorkerPool<T>::DirectExecute() to handle PreparedStatement disposal in the same way of DatabaseWorkerPool<T>::Query() , thanks Joschiwald for patch.
2013-09-21 17:45:46 +02:00
jackpoz
a26a24adf1 Core/AccountMgr: Fix memory leak on account creation
Fix .account create command not deleting a MySql PreparedStatement .

Valgrind log:
 254 (40 direct, 214 indirect) bytes in 1 blocks are definitely lost in loss record 6 of 8
  at 0x4C24DFA: operator new(unsigned long) (vg_replace_malloc.c:261)
  by 0x998EC2: DatabaseWorkerPool<LoginDatabaseConnection>::GetPreparedStatement(unsigned int) (DatabaseWorkerPool.h:437)
  by 0x99599B: AccountMgr::CreateAccount(std::string, std::string, std::string) (AccountMgr.cpp:49)
  by 0xF3ABAC: account_commandscript::HandleAccountCreateCommand(ChatHandler*, char const*)
2013-09-21 14:55:08 +02:00
Discover-
69b0a009c4 Core/SAI: Make SMART_ACTION_RANDOM_MOVE also work with SMART_TARGET_NONE and non-creature targets (if a non-creature target_type is specified and no creature target was found, the action is fired at the source)
Ref. #7431
2013-09-21 11:21:29 +02:00
jackpoz
6f9851ec13 Core/PathGenerator: Fix conditional jump on uninitialized value
Fix conditional jump on uninitialized value in PathGenerator::GetNavTerrain() by checking the result of getLiquidStatus() before accessing the LiquidData, uninitialized in case there's no water at all.

Valgrind log:
 Conditional jump or move depends on uninitialised value(s)
  at : PathGenerator::GetNavTerrain(float, float, float) (PathGenerator.cpp:553)
  by : PathGenerator::UpdateFilter() (PathGenerator.cpp:542)
  by : PathGenerator::CreateFilter() (PathGenerator.cpp:530)
  by : PathGenerator::PathGenerator(Unit const*) (PathGenerator.cpp:46)
  by : Spell::Spell(Unit*, SpellInfo const*, TriggerCastFlags, unsigned long, bool) (Spell.cpp:493)
  by : Unit::CastSpell(SpellCastTargets const&, SpellInfo const*, CustomSpellValues const*, TriggerCastFlags, Item*, AuraEffect const*, unsigned long) (Unit.cpp:846)
  by : Unit::CastSpell(Unit*, SpellInfo const*, TriggerCastFlags, Item*, AuraEffect const*, unsigned long) (Unit.cpp:882)
  by : Unit::CastSpell(Unit*, unsigned int, TriggerCastFlags, Item*, AuraEffect const*, unsigned long) (Unit.cpp:870)
  by : Unit::CastSpell(Unit*, unsigned int, bool, Item*, AuraEffect const*, unsigned long) (Unit.cpp:858)
  by : Player::SendInitialPacketsAfterAddToMap() (Player.cpp:22580)
  by : WorldSession::HandleMoveWorldportAckOpcode() (MovementHandler.cpp:121)
  by : WorldSession::HandleMoveWorldportAckOpcode(WorldPacket&) (MovementHandler.cpp:37)
2013-09-21 10:58:21 +02:00
raczman
1ae6538ea6 Merge pull request #10827 from jackpoz/restore_warnings
Shared/Build: Restore disabled warnings on Visual Studio
2013-09-20 16:08:26 -07:00
Warpten
fb997c5f41 Core/Spells: Since patch 4.3.0 Vampiric Touch's backlash effect does not have any diminishing return. 2013-09-19 17:42:36 +02:00
Warpten
7f3240677a Core/Units: Fixed Moonkin forms for Trolls and Worgens, as well as epic Flight forms.
Also (hack?)fixed Glyph of Arctic Wolf.
2013-09-19 17:39:09 +02:00
Warpten
74d15fdea8 Core/Spells: Since patch 4.0.1 Hunter's Mark is limited to a 30 seconds duration in PvP. 2013-09-19 17:16:19 +02:00
Warpten
5fb9023517 Core/Spells: Do not bypass target checks when handling SPELL_AURA_ADD_TARGET_TRIGGER.
Fixes ie. Chilblains being applied to the DK on login.
2013-09-19 17:10:43 +02:00
Warpten
3deecf1da2 Core/Players: Implemented actionbar dropdown menus. 2013-09-19 13:16:43 +02:00
Vincent-Michael
eab10cc6ae Core/Achievement: Fix warning 2013-09-18 23:47:35 +02:00
zorix
ff274cda0b Core/Script:
Added missing NULL pointer check
2013-09-18 23:31:41 +02:00
Vincent-Michael
8af46f1c57 Core: Fix non pch build 2013-09-18 23:15:25 +02:00
joschiwald
05e72b4906 Core/Achievements: Implemented ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE 2013-09-18 22:55:10 +02:00
zorix
cac1968ab7 Core/Auras:
Fix removing auras when player reset talents or changing/leaving shapeshift

Close #10763
Close #10809
2013-09-18 18:09:29 +02:00
Vincent-Michael
e740332c0b Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4 2013-09-15 23:20:13 +02:00
jackpoz
0a6db17125 Shared/Build: Restore disabled warnings on Visual Studio
Restore 2 disabled warnings, 1 already disabled in CMake with the WITH_WARNINGS flag set to False and the other disabled by default as stated in VS documentation http://msdn.microsoft.com/en-us/library/aa984150.aspx
2013-09-15 19:23:35 +02:00
Nay
0177d1c4d4 Merge pull request #10822 from jackpoz/collisions_nullterm_string
Tools/VMAP: Fix not null terminated string
2013-09-15 07:01:58 -07:00
Nay
478ec28e6d Merge pull request #10823 from jackpoz/icewall_overflow
Scripts/HoR: Fix possible array overflow
2013-09-15 06:58:24 -07:00
Nay
99f5a6c3d6 Core/BGs: Fix a TC_LOG_ERROR call 2013-09-15 14:57:12 +01:00
jackpoz
6477f8c453 Scripts/HoR: Fix possible array overflow
Fix possible array overflow reported by coverity, issue id 1062436 .
2013-09-15 14:12:54 +02:00
jackpoz
a5134971cb Tools/VMAP: Fix not null terminated string
Fix not null terminated string in vmap assembler tool, fix coverity issue id 1010351 .
2013-09-15 13:38:54 +02:00
Nay
b72fd4c209 Merge pull request #10819 from Ascathor/master
Core/Misc: Fixed some more issues found by static code analysis tools.
2013-09-15 04:31:29 -07:00
Ascathor
4782cc4650 Core/Misc: Fixed some more issues found by static code analysis tools. 2013-09-15 13:17:37 +02:00
raczman
aaff97db51 Merge pull request #10821 from jackpoz/blood_tap_overflow
Core/Spell: Fix Blood Tap array overflow
2013-09-15 03:37:49 -07:00
jackpoz
d0b42ee4ec Core/Spell: Fix Blood Tap array overflow
Fix Blood Tap spellid 45529 accessing the 7th element of a size 6 array.
Coverity issue id 1023095.
2013-09-15 12:31:48 +02:00
Vincent-Michael
85e49d0d14 Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/worldserver/worldserver.conf.dist
2013-09-13 23:21:50 +02:00
Jorge
f0cd684cd1 Merge pull request #10800 from jackpoz/log_race_condition
Core/Logs: Fix race condition in Log
2013-09-13 12:22:31 -07:00
jackpoz
6581d7db85 Core/Commands: Fix NULL dereference crash in .account password
Fix NULL dereference crash in .account password added in bd8d0cfbce
Fixes #10791
2013-09-13 20:57:53 +02:00
jackpoz
1b3575ba77 Core/Logs: Fix race condition in Log
Fix race condition in Log by using atomic operators.

Helgrind log:
 Possible data race during read of size 8 at 0x7379D98 by thread #1
 Locks held: none
  at 0x15AE9C7: AppenderFile::_write(LogMessage const&) (AppenderFile.cpp:59)
  by 0x15ADFF8: Appender::write(LogMessage&) (Appender.cpp:106)
  by 0x159F14E: Logger::write(LogMessage&) (Logger.cpp:83)
  by 0x15A215B: Log::write(LogMessage*) (Log.cpp:290)
  by 0x15A200F: Log::vlog(LogFilterType, LogLevel, char const*, __va_list_tag*) (Log.cpp:272)
  by 0x15A2682: Log::outInfo(LogFilterType, char const*, ...) (Log.cpp:364)
  by 0xF7DA28: Master::Run() (Master.cpp:296)
  by 0xF835E8: main (Main.cpp:142)

 This conflicts with a previous write of size 8 by thread #10
 Locks held: none
  at 0x15AE9D7: AppenderFile::_write(LogMessage const&) (AppenderFile.cpp:59)
  by 0x15ADFF8: Appender::write(LogMessage&) (Appender.cpp:106)
  by 0x159F14E: Logger::write(LogMessage&) (Logger.cpp:83)
  by 0x15A215B: Log::write(LogMessage*) (Log.cpp:290)
  by 0x15A200F: Log::vlog(LogFilterType, LogLevel, char const*, __va_list_tag*) (Log.cpp:272)
  by 0x15A2682: Log::outInfo(LogFilterType, char const*, ...) (Log.cpp:364)
  by 0xF7EC1F: FreezeDetectorRunnable::run() (Master.cpp:98)
  by 0x15A5B3E: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)

 Address 0x7379D98 is 88 bytes inside a block of size 96 alloc'd
  at 0x4C2C857: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
  by 0x15A0FE3: Log::CreateAppenderFromConfig(char const*) (Log.cpp:150)
  by 0x15A1AED: Log::ReadAppendersFromConfig() (Log.cpp:244)
  by 0x15A31B4: Log::LoadFromConfig() (Log.cpp:469)
  by 0x15A053B: Log::Log() (Log.cpp:35)
  by 0xF75CD1: ACE_Singleton<Log, ACE_Thread_Mutex>::ACE_Singleton() (Singleton.inl:13)
  by 0xF754A4: ACE_Singleton<Log, ACE_Thread_Mutex>::instance() (Singleton.cpp:91)
  by 0xF8351A: main (Main.cpp:135)
2013-09-13 19:59:50 +02:00
Machiavelli
bd8d0cfbce Fix build 2013-09-12 16:42:22 +01:00
Nay
4df862dd4c Merge pull request #10792 from Ascathor/master
Core/Command: Fixing .account password to no longer crash
2013-09-12 07:50:07 -07:00
Ascathor
8c596b97bf Core/Command: Fixing .account password to no longer crash
And add some comments to it.
2013-09-12 16:39:41 +02:00
Aokromes
783e28e874 Core/Groups: Allow to configure the way in which instance reset message is sent, to the whole party (not blizzlike) or not.
Signed-off-by: Machiavelli <machiavelli.trinity@gmail.com>
2013-09-12 10:19:05 +01:00
Vincent-Michael
974bf5c427 Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/Accounts/RBAC.h
	src/server/game/Battlegrounds/ArenaTeam.cpp
2013-09-11 22:35:45 +02:00
Nay
38f5c916cf Core: Fix non PCH build 2013-09-11 20:58:49 +01:00
Nay
e4ed64a6b7 Merge pull request #10782 from Ascathor/master
Core/Commands: Fixing some problems with .account email
2013-09-11 11:55:31 -07:00
Ascathor
3861ba5a25 Core/Commands: Fixing some problems with .account email 2013-09-11 20:54:04 +02:00
Nay
72d15086b2 Merge pull request #10776 from xjose93/ArenaTeamLogs
Core/ArenaTeam: Add teamnames to logs.
2013-09-11 11:52:51 -07:00
Nay
deb2fb7939 Merge pull request #10781 from jackpoz/create_pet_creaturetemplate
Scripts/Commands: Retrieve Creature template in HandlePetCreateCommand f...
2013-09-11 11:52:03 -07:00
Nay
9ca34c2e02 Merge pull request #10779 from jackpoz/murmur_unused_field
Scripts/Murmur: Remove unused field
2013-09-11 11:51:29 -07:00
Nay
38391cd774 Merge pull request #10737 from jackpoz/clock_fix
Core/Timer: Better handle system clock changes
2013-09-11 11:50:50 -07:00
Nay
baa159dbd4 Merge pull request #10736 from jackpoz/localtime_race_condition
Core/Thread: Fix race condition converting time values to local time
2013-09-11 11:50:18 -07:00
jackpoz
dfc8a092a6 Scripts/Commands: Retrieve Creature template in HandlePetCreateCommand from Creature itself
CreatureTemplate can be retrieved directly from the Creature itself instead of using ObjectMgr::GetCreatureTemplate(id) .
2013-09-11 20:31:50 +02:00
jackpoz
625e47e9d3 Scripts/Murmur: Remove unused field
Remove unused class field.
2013-09-11 20:00:29 +02:00
joschiwald
77f90c1c67 Scripts/Halion: refixed Twilight Cutter
Scripts/Garfrost: fixed forge jump
2013-09-11 17:07:29 +02:00
MitchesD
3420c70a47 Scripts/PitOfSaron: some changes
Closes #10740
2013-09-11 15:52:59 +02:00