Commit Graph

20574 Commits

Author SHA1 Message Date
jackpoz
fdc71114ef Merge pull request #11580 from Dehravor/warden
Core/Warden: Fix crash

Fix NULL dereference crash in case Warden is disabled (in configs or on Mac OS X platform) and client sends a CMSG_WARDEN_DATA opcode
2014-02-08 11:55:50 +01:00
jackpoz
592b57a251 Shared/Logs: Code cleanup
Remove unneeded check added in 89af6097f3
2014-02-08 11:35:25 +01:00
Dehravor
12cafcf96b Core/Warden: Fix crash 2014-02-08 09:33:51 +01:00
jackpoz
89af6097f3 Shared/Logs: Make AppenderFile more thread-safe
In case of dynamic file names don't store the FILE* handle in a shared class variable but keep it only at function scope.

Valgrind log:
  at _IO_un_link (genops.c:69)
  by fclose@@GLIBC_2.2.5 (iofclose.c:55)
  by AppenderFile::CloseFile() (AppenderFile.cpp:94)
  by AppenderFile::_write(LogMessage const&) (AppenderFile.cpp:66)
  by Appender::write(LogMessage&) (Appender.cpp:102)
  by Logger::write(LogMessage&) const (Logger.cpp:63)
  by Log::write(LogMessage*) (Log.cpp:279)
  by Log::vlog(std::string const&, LogLevel, char const*, __va_list_tag*) (Log.cpp:267)
  by Log::outMessage(std::string const&, LogLevel, char const*, ...) (Log.h:129)
Address 0x2a1bd2d0 is 0 bytes inside a block of size 568 free'd
  at free (vg_replace_malloc.c:468)
  by fclose@@GLIBC_2.2.5 (iofclose.c:85)
  by AppenderFile::CloseFile() (AppenderFile.cpp:94)
  by AppenderFile::_write(LogMessage const&) (AppenderFile.cpp:66)
  by Appender::write(LogMessage&) (Appender.cpp:102)
  by Logger::write(LogMessage&) const (Logger.cpp:63)
  by Log::write(LogMessage*) (Log.cpp:279)
  by Log::vlog(std::string const&, LogLevel, char const*, __va_list_tag*) (Log.cpp:267)
  by Log::outMessage(std::string const&, LogLevel, char const*, ...) (Log.h:129)
2014-02-07 23:35:03 +01:00
jackpoz
672e06a951 Shared/Logs: Add workaround for "w" flag used with dynamic name files
Ignore "w" flag and always use "a" for log files with dynamic name since the file handle is created at every log line and "w" would delete any other logged line from previous _write() calls.
The best solution would be to overwrite only at first call and append at any other call.
2014-02-07 22:23:24 +01:00
Vincent_Michael
79e30bbda4 Revert "DB/Misc: A lucky bag random fixes"
This reverts commit 3fcb1bf091.
2014-02-07 18:43:16 +01:00
Vincent_Michael
b76e2db32e SQL: Maybe I'll have more luck :( 2014-02-07 17:32:38 +01:00
Vincent_Michael
3fcb1bf091 DB/Misc: A lucky bag random fixes 2014-02-07 17:10:59 +01:00
joschiwald
b9074f3491 Core/Achievements: rename some AchievementCriteriaDataTypes to keep consistent 2014-02-06 23:28:51 +01:00
jackpoz
84e73448f2 Core/Spells: Possible crash fix
Get Unit target with the proper method instead of retrieving Object target and then casting it to Unit, possible dereferencing NULL.
Updates #11560
2014-02-06 22:11:06 +01:00
jackpoz
20a1f4d28e Core/CrashHandler: Add more informations about locals
Handle SymTagData with inner type of SymTagPointerType.
Increase buffer sizes to avoid buffer overflows.
Avoid infinite loops by logging the children of each type only once.
Avoid too deep nesting by adding a max nesting level.
Print the address for arrays instead of just the name.
2014-02-06 22:07:12 +01:00
joschiwald
b000fdca70 Core/Entities: allow interaction with gameobject questgivers if player can take or return quests
Closes #11269
Closes #8898
Closes #10204
Closes #11410
Closes #7053
Closes #6189
Closes #9474
2014-02-06 21:23:18 +01:00
Aokromes
59e14b2b9b DB/Gameobject: Fix Dire Pool
Closes #9893
2014-02-06 15:08:08 +01:00
Gacko
1b2e4d8110 Remove whitespaces from previous commit 2014-02-05 17:49:04 +01:00
Gacko
d0c9970be0 Authserver / Worldserver: Fix warnings about unused variables 2014-02-05 17:33:28 +01:00
Shauren
0d51fd55a1 Core/Auras: Implemented SPELL_AURA_MOD_COOLDOWN
Closes #9671
2014-02-05 13:00:42 +01:00
Discover-
30924211a3 Merge pull request #11568 from Rochet2/VendorChecks
Core: Add rest of checks from SendListInventory to BuyItemFromVendorSlot
2014-02-05 10:18:02 +01:00
Discover-
72ed06ddfd Core/Achievements: Use ACE_OS::localtime_r instead of localtime in my previous commit for thread safety.
Thanks to @Shauren
2014-02-05 10:15:43 +01:00
Discover-
f29463cf66 Core/Achievements: Implement criteria type ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN and criteria requirements ACHIEVEMENT_CRITERIA_REQUIRE_NTH_BIRTHDAY and ACHIEVEMENT_CRITERIA_REQUIRE_KNOWN_TITLE. Fixes anniversary achievements.
By @Schmoozerd
2014-02-05 09:34:12 +01:00
Aokromes
a2022d6f6d DB/SAI: Fix Dire Maul entrance levers
Updates #6298
2014-02-04 14:56:28 +01:00
Rochet2
49593361e3 Core: Add rest of checks from SendListInventory to BuyItemFromVendorSlot 2014-02-04 15:49:58 +02:00
Aokromes
0e2c86f078 Rename 2014_01_21_world_access_requirement.sql to 2014_02_04_00_world_access_requirement.sql 2014-02-04 13:26:41 +01:00
Aokromes
988c2894a3 Merge pull request #11095 from gerripeach/pull_request3
Core/LFG: Minimum item level in Wotlk heroic dungeons
2014-02-04 04:18:34 -08:00
Shauren
d006f4b734 Core/Spells: Fixed AoE damage reduction auras, original patch by @Unholychick 2014-02-04 11:31:13 +01:00
Shauren
996e9115ac Core/Groups: Fixed UnitIsPartyLeader lua function 2014-02-04 10:57:32 +01:00
joschiwald
f1bfd43c58 Core/Misc: remove error log, which returns false positives 2014-02-02 16:15:07 +01:00
Discover-
e59f3f7333 Core/Chat: Fix a new issue caused by c0224dd7ca which would trigger false positives for CHAT_MSG_AFK and CHAT_MSG_DND. 2014-02-02 15:13:53 +01:00
jackpoz
8f29fb9aee Core/Spell: Handle SPELL_AURA_FORCE_REACTION missing cases
Always check forced reputation ranks before any other faction check to get the reaction between 2 units.
Fixes #5790
2014-02-01 21:21:47 +01:00
joschiwald
11b48569c8 Core/Spells: fix crash when loading custom spell attr with invalid spellid 2014-02-01 19:23:20 +01:00
w1sht0l1v3
2df3fe3a00 Core/Scripts: Fix quest The Totem of Kar'dash alliance version.
Remove some hungarian notation for horde side version.

Closes #11035
2014-02-01 19:07:48 +02:00
Vincent_Michael
822092ea15 DB/Creature: Fix warnings with creature_formations loading 2014-02-01 18:04:54 +01:00
Discover-
c0224dd7ca Core/Chat: Fix an exploit where it was possible to speak in universal language in say/yell/emote by sending CMSG_MESSAGECHAT using cheats. 2014-02-01 13:27:16 +01:00
Shauren
19172ee4c2 Build: Use override/final keywords for VS 2012 and newer. (VS 2013 still defines __cplusplus as 199711L) 2014-01-31 23:30:25 +01:00
jackpoz
b054275fb2 Shared/Logs: Fix crash in Console log output
Correctly handle the return value of vsnprintf() which returns -1 if the buffer is too small http://msdn.microsoft.com/en-us/library/1kt27hek.aspx . In this case just truncate the output.
This caused a crash on character delete if Logger.entities.player.dump was enabled and set to 3.
Fixes #11539
2014-01-31 22:11:49 +01:00
jackpoz
68d48ecbd1 Core/Arena: Fix arena season not always appearing to clients
Arena season sent to client with SMSG_INIT_WORLD_STATES opcode was not sent if Player was on a zone with id 0 on login. Initializing the zone id to -1 will always trigger UpdateZone() properly on login.
Fixes #10623
2014-01-31 20:47:47 +01:00
Duarte Duarte
83e0cc3b0c SQL: Update 2014_01_31_01_world_item_template.sql 2014-01-31 16:35:22 +00:00
Magnifikator
956fde1f0f DB/item_template: Set defaults of spellcharges_X to 0 instead of NULL
Closes #10748

Signed-off-by: Duarte Duarte <dnpd.dd@gmail.com>
2014-01-31 15:53:05 +00:00
Duarte Duarte
5666c7cc35 Core/Achievs: Rename a few unknown achievement criteria flags
Source tomrus88, Mangos
2014-01-31 15:43:24 +00:00
Duarte Duarte
ad26d2efc3 SQL: Fixed two issues with 2014_01_31_00_world_spell_custom_attr.sql
Engine should be MyISAM and not MRG_MyISAM
MySQL doesn't play nice with hex values so converted them to decimal

Closes #11537
2014-01-31 15:16:02 +00:00
Discover-
a242662ae6 Core/Spells: Fix DK Ghoul's damage after ad8eb434c0. I misread 'SpellScript::m_damage' for 'SpellScript::damage'.
By @joschiwald
2014-01-31 10:37:55 +01:00
Duarte Duarte
efeb54139e SQL: Update old .sql files to keep consistency with auth_database.sql
Also update characters_database.sql (generated by mysqldump)
2014-01-31 04:34:32 +00:00
Duarte Duarte
d749b72193 Core&DB/Spells: Move custom spell attributes from code to DB, spell_custom_attr table
`spell_custom_attr`
- `entry` uint PK
- `attributes` uint (enum SpellCustomAttributes of SpellInfo.h)
2014-01-31 04:32:03 +00:00
QAston
9495194bf2 Fix warnings introduced on littleendian in 2134cb610d
This fix prevents possible issues on bigendian machines. Don't use c style casts ppl, it's evul.
2014-01-30 23:43:37 +01:00
jackpoz
856e0933b5 Scripts/HoR: Fix log error
Fix "DoZoneInCombat called for creature that has empty threat list" error caused by DoZoneInCombat() called by IsSummonedBy() in a script before the Creature is allowed to enter combat.
2014-01-30 21:29:37 +01:00
jackpoz
378d27f9bc Core/Splines: Fix "velocity > 0.1f" error
Updates #6191.
2014-01-30 20:03:13 +01:00
Discover-
ad8eb434c0 Core/Misc: Missing changes and get rid of useless method in acd46085d1 2014-01-30 10:28:05 +01:00
joschiwald
acd46085d1 Core/Spells: drop last leftovers of hardcoded spell target selection and move it into spellscripts
Closes #1719
Closes #3186
2014-01-30 02:40:12 +01:00
Aokromes
747184a7c0 DB/Creature: Fix some factions
Updates #11501
2014-01-28 21:56:35 +01:00
Aokromes
1b48c7b977 DB/Creature: Fix some factions
Updates #11501
2014-01-28 08:09:20 +01:00
Aokromes
9433374f8d DB/Creature: Fix some factions
Updates #11501
2014-01-28 07:39:24 +01:00