Commit Graph

371 Commits

Author SHA1 Message Date
joschiwald
7a67d816d9 Core/Battleground:
* added a possibility to reload battleground templates
* cleaned up the template structure
* use mapids from BattlemasterList.dbc to calculate random bg
2014-07-09 16:43:56 +02:00
Vincent-Michael
27f2855248 Core: Fix warnings and kill again whitespace ... 2014-06-26 22:50:06 +02:00
Subv
8c944f1456 Core/Loot: Make the pickpocket loot refill every 10 minutes by default on the NPCs after they have been pickpocketed.
Configurable by Creature.PickPocketRefillDelay
Closes #935
2014-06-24 22:13:59 -05:00
Ascathor
6949735098 Core/Misc:
* Fix some codestyle, fix some typos

* Change CMakeLists for: Custom (can be uncommented), Events, World
** Custom is theoretically unchanged. You can, however, uncomment the glob_recurse that initializes every file within. This might be easier for beginners.

* Introducing the IP Based Action Log System:
** On several different actions, e.g. Login, Character Login, etc., a new entry is added
** Can be logged on and off in worldserver config
*** Disabled by default to prevent increased log db size for unknowing users.

* Add a new row to account table called 'last_attempt_ip'
** Lists the last ip trying to connect to the account

* Add a new type of HookScripts: AccountScript
** Includes: OnAccountLogin, OnFailedAccountLogin, OnEmailChange, OnFailedChange, OnPasswordChange, OnFailedPasswordChange

* Added new Hook to PlayerScripts: OnFailedPlayerDelete

* Added new variables to PlayerScripts: OnPlayerDelete
2014-06-13 16:25:11 +02:00
Dehravor
cbd36d5a4e Core/Misc: Remove remaining COMPILER_HAS_CPP11_SUPPORT related macros 2014-05-01 11:19:32 +02:00
Dehravor
24ae6a6802 Core/Misc: Remove obsolete C++11 backward compatibility macros
OVERRIDE, FINAL, DELETE_MEMBER
2014-04-29 16:35:11 +02:00
joschiwald
742f32f15a Core/Texts: Implemented loading BroadcastTexts 2014-04-22 17:57:23 +02:00
Shauren
0f5632c70e Core/Misc: Fixed some -Weffc++ warnings 2014-04-20 16:48:35 +02:00
joschiwald
8b8aaa06fc Core/ChatLog: handle chatlog options with extended logging system 2014-04-08 22:52:05 +02:00
joschiwald
3a40d8a887 Core/Player: delete queststatus (weekly/monthly/seasonal) on deleting character thx @Expecto
- also rename some prepared statements

Closes #11658
2014-03-02 00:00:39 +01:00
joschiwald
b72273014f Core/DB/Achievements:
- fixed arena season title achievements and rewards
- added mailtemplate support for `achievement_reward` table
- fixed typo in GetBattleMasterBG which causes achievement reward mail expire in 1 day

Ref #8777
2014-02-10 00:14:29 +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
Discover-
9d85d0d928 Core/Misc: Fix compile.
Forgot to save file
2014-01-21 10:01:32 +01:00
Discover-
32070669f4 Core/Weather: Weather updates are now sent to all players in the zone instead of the first player it finds in the zone and all players nearby.
Thanks to @Nawuko, @Magnifikator and @Shauren

Closes #11380
Fixes #11370
2014-01-21 09:44:48 +01:00
Zabustak
101cad1f28 Show Kick, Mute and Ban in world 2014-01-17 12:23:36 +01:00
mthsena
0b5728f8a7 Core&Conf: Small cosmetic fixes
Closes #11392

Signed-off-by: DDuarte <dnpd.dd@gmail.com>
2014-01-12 00:07:29 +00:00
Dehravor
619f42c1b0 Core/Entities: Implement SMSG_INVALIDATE_PLAYER 2014-01-11 18:22:56 +01:00
joschiwald
a60ba240b7 Core/Entities: add some log messages in CheckCreatureTemplate
* Happy Error Spam
2014-01-06 20:30:11 +01:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Shauren
107af52853 Core/Chat: Refactored building chat packets
* Moved everything into one specialized method instead of being scattered all over the place
* Allow localizing creature names in chat messages (when using $N)
* Send SMSG_GM_MESSAGECHAT for gm messages
2013-12-23 14:23:49 +01:00
jackpoz
ca6b9df261 Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values.
2013-12-14 19:36:43 +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
Vincent_Michael
6e13263c7a Core/AI: Good bye, Good bye my beloved EventAI system :( 2013-12-01 01:27:08 +01:00
jackpoz
ff20596933 Core/World: Remove unused code
Remove unused code added in f20b25d1c9
2013-11-29 22:37:31 +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
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
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
Spp
cfaea769bc Core/RBAC: Move RBAC code to namespace rbac 2013-09-27 13:35:45 +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
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
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
Aokromes
80516db48c Core/Battlegrounds: Allow random BG winner/loser rewards to be configurable
Signed-off-by: Machiavelli <machiavelli.trinity@gmail.com>
2013-09-07 13:32:04 +01:00
Ascathor
722a6c143a Core/Account: Make account password change security variable and various changes
Settings within worldserver.conf:

Three settings for secruity level:
0 - None - No change to current system
1 - Email - Always requires the email entered on registration for confirming.
2 - RBAC - Groups applied with the RBAC role always require the email entered on registration for confirming.

RBAC default to every group. Changed some logs to make it more clear what is going on at all.

Emails may now no longer exceed 64 chars. Current email is used as regmail.

On account creation, two emails are saved. Registration email and normal email. Normal email is relevant afterwards. Registration email can be changed by console ONLY.

Includes new commands and changes to existing ones:
.account fulfills several new functions:
* Still prints GM Level.
* If account has permission, it displays the current email. This is not defaulted to any group.
* Security level is displayed. Also displays if user has RBAC perm if RBAC security mode is selected
.account email allows user to change email with sufficient confirmation
.account set sec email allows higher sec with higher sec than account to change the normal email. Registrationemail remains untouched here.
.account set sec regmail allows console to change registration email.
.pinfo now displays the registration and normal mail.

Also fixes .learn all crafts.
Closes #10558
2013-09-01 21:21:16 +02:00
jackpoz
e1e1067d17 Core/Thread: Fix race condition in FreezeDetectorRunnable
Fix race condition by replacing a static volatile uint32 with proper atomic thread-safe ACE_Atomic_Op<ACE_Thread_Mutex, uint32>, incremented in WorldRunnable::run() at each world loop and read in FreezeDetectorRunnable::run().

Helgrind log:
 Possible data race during read of size 4 at 0x2400D54 by thread #12
 Locks held: none
    at 0x100FEA6: FreezeDetectorRunnable::run() (Master.cpp:106)
    by 0x1637892: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
    by 0x518F555: ACE_OS_Thread_Adapter::invoke() (OS_Thread_Adapter.cpp:103)
    by 0x4C2B5AD: mythread_wrapper (hg_intercepts.c:219)
    by 0x61DAB4F: start_thread (pthread_create.c:304)
    by 0x6C69A7C: clone (clone.S:112)

 This conflicts with a previous write of size 4 by thread #9
 Locks held: none
    at 0x100C23E: WorldRunnable::run() (WorldRunnable.cpp:55)
    by 0x1637892: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
    by 0x518F555: ACE_OS_Thread_Adapter::invoke() (OS_Thread_Adapter.cpp:103)
    by 0x4C2B5AD: mythread_wrapper (hg_intercepts.c:219)
    by 0x61DAB4F: start_thread (pthread_create.c:304)
    by 0x6C69A7C: clone (clone.S:112)
2013-09-01 18:49:49 +02: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
Nay
58e6503eef Core/Settings: Fix build in non cpp11 compilers
std::string back() was only introduced in C++11, a pity..
2013-08-24 15:45:19 +01:00
Nay
cc3055f344 Core/Settings: Fix a crash if worldserver.conf DataDir setting is empty 2013-08-24 14:30:17 +01:00
Nay
a71fcee27d DB/Schema: Rename _questrelation tables to _queststarter and _involvedrelation to _questender, for creature and gameobject 2013-08-06 00:04:29 +01:00
joschiwald
00f3b01ea7 Core/Spells: operate spell correction on SpellInfo store instead of dbc (picked from 77b85b2ea0) 2013-07-24 00:06:21 +02:00
Shauren
779a59e7e2 Core/Config: Refactored ConfigMgr
* Loading initial configuration files is now separate from loading any additional custom configs
2013-07-15 17:31:44 +02:00
corbi
e185713464 Stats Limits 2013-06-05 10:34:05 +03:00
joschiwald
3e108f0680 DB/Autobroadcast: Update correct db struktur and auth base 2013-06-02 19:41:27 +02:00
Shauren
7da33b6bce Core/Misc: Another batch of fixes for issues found by static analysis 2013-05-19 11:15:54 +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
Ascathor
1c2d617c18 Core/Player: CharDelete.Heroic.MinLevel as seperated unlink requirement for Heroic classes
Also added documentation for GetCharacterNameData
2013-04-28 00:04:55 +02:00
xjose93
d7e9d1bafb Core/World: Improvements in Autobroadcast system (dropped from world database and moved to auth database, added realmid and weight columns) 2013-04-25 22:54:20 +02:00
Ascathor
100a632a62 Clearify the guild limitation message on world server initation (3.3.5a withdrawal cap; 4.3.4 withdrawal and guild rep cap) 2013-04-09 21:27:27 +02:00
Nefarion
49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
Spp
377cfdb560 Core/RBAC: Fix multiple permissions and remove multiple config options that are currently implementes by RBAC
- Remove config options: CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT, CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL, CONFIG_GM_LOG_TRADE, CONFIG_ALLOW_TWO_SIDE_ACCOUNTS, CONFIG_ALLOW_TWO_SIDE_WHO_LIST, CONFIG_ALLOW_GM_FRIEND, CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND, CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL
- Fix RBAC_PERM_SKIP_CHECK_CHAT_SPAM (Was checking spam for those that had the permission)
- Only check RBAC_PERM_TWO_SIDE_INTERACTION_CHAT for sender of whispers (Restores GM being able to whisper players)
- Only check RBAC_PERM_TWO_SIDE_INTERACTION_MAIL for sender
- Fix .ticket assign <Player>, with last RBAC change it was changed by mistake from Player to Account
2013-03-08 13:15:25 +01:00