Commit Graph

447 Commits

Author SHA1 Message Date
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
Ascathor
e5553cfb78 Core/Command: Fix ban info order for .pinfo 2013-10-27 20:38:33 +01:00
jackpoz
daf5a4b5c3 Core/Chat Commands: Allow to add overlapping teles .
Allow to add overlapping teles like "abc" even if "abcde" already exists. This wasn't possible and a "Teleport already exists" error was thrown instead.
2013-10-25 21:50:52 +02:00
Vincent_Michael
9802c7b891 Scripts/Misc: Coding Style unification? (by Aokromes) 2013-10-22 20:24:05 +02:00
Ascathor
193f4ed868 Core/Command: Improve .group list to feature several notes and features to improve handling. 2013-10-17 14:58:37 +02:00
Shauren
59fd2520fc Core/Creatures: Removed remains of creature_transport table 2013-10-17 00:20:00 +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
Shauren
a368fae588 Core/Players: Fixed issues with incorrect targets being selected for spells 2013-10-03 17:07:25 +02:00
Spp
ad29676c27 Fix compile under linux and update auth db with latest changes 2013-09-29 14:15:58 +02:00
Spp
ea2fe0217d Core/RBAC: Simplify RBAC implementation
- Drop groups (roles than can have inherited roles) and roles (set of
  permissions)
- Permissions can now have inherited permissions (those act as roles)

RBAC DB structure is now limited to four tables
- rbac_permissions: Contains permissions and roles
- rbac_linked_permissions: Contains the relation between permissions and
  linked permissions (those permissions that have linked permissions are
  called roles)
- rbac_default_permissions: Contains the list of permissions to be granted
  to each security level [Added to maintain compatibility in an easy way]
- rbac_account_permissions: Contains the list of permissions granted or
  denied for a particular account.

NOTE: IF YOU ARE USING CUSTOM PERMISSIONS, ROLES OR GROUPS CHECK THE SQL
BEFORE APPLYING...
2013-09-29 13:19:05 +02:00
Spp
cfaea769bc Core/RBAC: Move RBAC code to namespace rbac 2013-09-27 13:35:45 +02: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
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
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
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
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
Spp
78363e11b5 Core/RBAC: Move titles and wp commands to RBAC (using individual permissions) 2013-09-10 15:26:48 +02:00
Spp
b10241876e Core/RBAC: Move ticket commands to RBAC (using individual permissions) 2013-09-10 15:13:08 +02:00
Spp
68ab10ccd4 Core/RBAC: Move tele commands to RBAC (using individual permissions) 2013-09-10 15:01:39 +02:00
Spp
abbc6b2760 Core/RBAC: Move server commands to RBAC (using individual permissions) 2013-09-10 14:57:01 +02:00
Spp
7183a355d2 Core/RBAC: Move reset commands to RBAC (using individual permissions) 2013-09-10 14:33:27 +02:00
Spp
1f95f0b0b8 Core/RBAC: Move reload command to RBAC (using individual permissions) 2013-09-10 14:25:07 +02:00
Spp
4f632ee3ff Core/RBAC: Move quest commands to RBAC (using individual permissions) 2013-09-10 13:57:30 +02:00
Spp
efa194a7ce Core/RBAC: Move npc commands to RBAC (using individual permissions) 2013-09-10 13:48:57 +02:00
Spp
04b313557e Core/RBAC: Move modify commands to RBAC (using individual permissions) 2013-09-10 13:28:32 +02:00
Spp
4d36ce7405 Core/RBAC: Move mmap commands to RBAC (using individual permissions) 2013-09-10 13:08:39 +02:00
Spp
1038446278 Core/RBAC: Move misc commands to RBAC (using individual permissions) 2013-09-10 12:59:25 +02:00
Spp
ec1e88d888 Core/RBAC: Move send commands to RBAC (using individual permissions) 2013-09-10 12:24:40 +02:00
Spp
83cb44d79f Core/RBAC: Move pet commands to RBAC (using individual permissions)
- Pet commands moved from cs_misc.cpp to own file
2013-09-10 12:07:03 +02:00
Spp
1eee42433b Core/RBAC: Move group commands to RBAC (using individual permissions)
- group commands moved from cs_misc.cpp to own file
- renamed groupsummon to "group summon"
2013-09-10 11:45:59 +02:00
jackpoz
9578b5f87a Core/Thread: Fix race condition converting time values to local time
Replace thread-unsafe localtime() http://www.cplusplus.com/reference/ctime/localtime/ with thread-safe portable ACE_OS::localtime_r() .

Helgrind log:
 Possible data race during read of size 4 at 0x6F183C0 by thread #1
 Locks held: none
  at 0x14E72E3: World::InitDailyQuestResetTime() (World.cpp:2772)
  by 0x14E3A01: World::SetInitialWorldSettings() (World.cpp:1790)
  by 0x101122A: Master::Run() (Master.cpp:164)
  by 0x101740C: main (Main.cpp:142)

 This conflicts with a previous write of size 4 by thread #2
 Locks held: none
  at 0x6C2D3BA: __tzfile_compute (tzfile.c:797)
  by 0x6C2D036: __tz_convert (tzset.c:627)
  by 0x164146C: LogMessage::getTimeStr(long) (Appender.cpp:23)
  by 0x1641550: LogMessage::getTimeStr() (Appender.cpp:31)
  by 0x1641722: Appender::write(LogMessage&) (Appender.cpp:80)
  by 0x1633FCE: Logger::write(LogMessage&) (Logger.cpp:83)
  by 0x16433D8: LogOperation::call() (LogOperation.cpp:29)
  by 0x16428A4: LogWorker::svc() (LogWorker.cpp:45)
2013-09-07 14:37:54 +02: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
xjose93
35ef163703 Core/Commands: Fix .debug send opcode freeze if file dont exists. 2013-09-06 15:31:22 +02:00
Shauren
fe8252b2e2 Scripts/Commands: Check if creature entry is valid before attempting to spawn (fixes unneccessary error in logs) 2013-09-06 14:32:30 +02:00
jackpoz
9ce70fb3c9 Core/Guild: Fix memory leak on Guild disband
Fix memory leak when disbanding a Guild, removed from GuildMgr but never deleted. Due to the different ways of how Guild::Disband() and Guild::DeleteMember() are called, each call to these methods has a different way to delete the Guild if empty/invalid.

Valgrind log:
 2,127 (240 direct, 1,887 indirect) bytes in 1 blocks are definitely lost in loss record 54 of 81
  at operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by guild_commandscript::HandleGuildCreateCommand(ChatHandler*, char const*) (cs_guild.cpp:91)
  by ChatHandler::ExecuteCommandInTable(ChatCommand*, char const*, std::string const&) (Chat.cpp:339)
  by ChatHandler::ExecuteCommandInTable(ChatCommand*, char const*, std::string const&) (Chat.cpp:320)
  by ChatHandler::ParseCommands(char const*) (Chat.cpp:466)
  by WorldSession::HandleMessagechatOpcode(WorldPacket&) (ChatHandler.cpp:217)
  by WorldSession::Update(unsigned int, PacketFilter&) (WorldSession.cpp:317)
  by World::UpdateSessions(unsigned int) (World.cpp:2632)
  by World::Update(unsigned int) (World.cpp:1989)
  by WorldRunnable::run() (WorldRunnable.cpp:60)
  by ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
  by ACE_OS_Thread_Adapter::invoke() (in /usr/lib/libACE-6.0.3.so)
2013-09-05 22:10:46 +02:00
Sebastian Valle
07d793b94b Core/Misc: Fixed some more issues found by static code analysis tools. 2013-09-03 17:31:02 -05:00
Nay
9b92bc9409 Core: Fix compile with PCH enabled and warnings
Few corrections to worldserver.conf
2013-09-02 16:18:55 +01:00
Nay
28f9317698 Core/RBAC: Move cast and characters commands to RBAC (using individual permissions) 2013-09-02 13:25:07 +01:00
Spp
f68471f142 Core/RBAC: Move message commands to RBAC (using individual permissions) 2013-09-02 13:01:50 +02:00
Spp
2d508387e5 Core/Commands: Move lookup commands to RBAC (using individual permissions) 2013-09-02 12:54:51 +02:00
Spp
eb73684952 Core/RBAC: Move list commands to RBAC (using individual permissions) 2013-09-02 12:25:32 +02:00
Spp
4219f45c85 Core/RBAC: Move lfg commands to RBAC (using individual permissions) 2013-09-02 12:17:46 +02:00
Spp
c0dfdeab1c Core/RBAC: Move learn commands to RBAC (using individual permissions) 2013-09-02 12:12:20 +02:00
Spp
2625e78f80 Core/RBAC: Move instance commands to RBAC (using individual permissions) 2013-09-02 11:58:14 +02:00
Spp
08ef6bd9f8 Core/RBAC: Move honor commands to RBAC (using individual permissions) 2013-09-02 11:53:22 +02:00
Spp
11233dbd73 Core/RBAC: Move guild commands to RBAC (using individual permissions) 2013-09-02 11:45:36 +02:00