Commit Graph

1325 Commits

Author SHA1 Message Date
Shauren
08316552b5 Core/Threading: Clarified comment on ProducerConsumerQueue::WaitAndPop 2015-07-15 16:51:12 +02:00
Shauren
228b932925 Core/Players: Fixed power slot ordering 2015-07-12 00:41:56 +02:00
Shauren
da3247d5bb Core/Players: Fixed glyph slots 2015-07-11 00:11:16 +02:00
Carbenium
c7d49ab910 Core/Support: Drop parts of the support system since Blizz switched to a browser based ticket system 2015-07-08 16:24:50 +02:00
Shauren
776e4411c0 Core/DataStores: Dropped a silly build 12880 check in db2 loader (it's a cataclysm beta build) 2015-07-08 10:25:50 +02:00
Shauren
dea6c0b122 Core/DataStores: Updated dbc/db2 structures to 6.2.0 2015-07-07 12:13:14 +02:00
Shauren
b08b3b93e2 Core/DataStores: Removed CreatureSpellData.dbc, it is not used anymore 2015-07-04 19:47:58 +02:00
MitchesD
f22c2c3f30 Core/DataStores: moved GameTables to separate method and load them from DB2 2015-07-04 13:56:49 +02:00
Naios
0df90fa4a4 Core/Updater: Fix mysql cli password prompt when password is empty.
* ref: http://community.trinitycore.org/topic/11510-world-server-bug-enter-password-to-update/

(cherry picked from commit 4335611010)
2015-06-30 23:46:25 +02:00
Naios
a16d3e8eec Core/Utilities: Fix callback invokation when there are no tasks present.
* thx @joschiwald for noticing.

(cherry picked from commit 836ec5a6e6)
2015-06-30 23:46:09 +02:00
jackpoz
edc2476e84 Core/CrashHandler: Make crashhandler tread-safe
Handle only 1 exception in the whole process lifetime and create only 1 crash report.

(cherry picked from commit 1a5051a9c3)
2015-06-26 02:59:27 +01:00
Naios
881ebccdc4 Core/Utilities: TaskScheduler: add a task validator and on update success callback.
* makes it possible to block tasks if there is an active spellcast.
* requested by @joschiwald

(cherry picked from commit 3d95aba2b3)
2015-06-21 18:20:12 +02:00
Naios
5e47ae7e73 Core/Updater: Fix a wrong formatter introduced in 0d095109ee
* thanks @Aokromes for noticing

(cherry picked from commit bd661b58fd)
2015-06-21 18:17:00 +02:00
Shauren
f6bc87fe5d Core/Threading: Fixed possible data races after making auth queries async by moving their processing to boost::asio::io_service::run threads 2015-06-21 02:13:08 +02:00
Naios
0d095109ee Core/Updater: Add some info about the count of applied updates.
* some minor improvements
* add a log message when database updates are disabled.

(cherry picked from commit a5b3862bc1)
2015-06-20 15:18:31 +02:00
Shauren
0e49eefe85 Core/DBLayer: Sprinkle some async magic on worldserver auth/session load process
* Implemented base for loading account wide data
2015-06-20 00:59:31 +02:00
Shauren
dc53dad8a4 Core/Misc: Warning fixes 2015-06-13 14:04:10 +02:00
DJScias
3f58ad3060 Core/DBLayer: Correct Battle.net CheckPassword
- Async would lock and crash the server
- This fixes !bnet set password and !bnet password
2015-06-12 11:35:58 +02:00
Naios
df80f1900d Core/Shared: Hide the internal shared_ptr of the TaskContext
* use . operator instead of -> to access the TaskContext now.
* Add TaskContext::IsExpired to check whether the owner has expired.

(cherry picked from commit 151a0f5c5e)
2015-06-03 18:37:41 +02:00
jackpoz
8cbdb7aa36 Core/CrashHandler: Log STACK_OVERFLOW crashes
Try to log STACK_OVERFLOW crashes by allocating log buffer on the heap which should still be in a valid state with a stack overflow exception.
This will probably still not produce a complete crash report with details about all stackframes.

(cherry picked from commit ec4b08e3cf)
2015-06-01 00:53:21 +01:00
Naios
9a999556ec Shared/Util: Introduce a task scheduler which schedules task with c++11 techniques.
* Use std::function as callback (methods, lamdas & std::bind).
* Uses std::chrono::duration as duration type (Milliseconds, Seconds...)
  - With c++11 user defined literals we could just write "11s" for example (MSVS 2015, gcc & clang).
* Provides a lot of overloads for easier usage:
  - Static durations or random durations between min and max.
  - Named (with group ids - group id 0 is possible) or anonymous tasks.
  - Asynchronous tasks.
* Is adapted to the current needs of scripting:
  - Repeat tasks through the TaskContext
  - Schedule new tasks from the context.
  - Provides access to the times repeat counter of a task,
    this will help to schedule multi step events (dialogs for example).

See https://gist.github.com/Naios/6d143538abdc3d32fd2b for usage examples.

(cherry picked from commit da77a90aa9)
2015-05-31 20:31:29 +02:00
MitchesD
0cf0209741 Merge pull request #14782 from doctaweeks/fixes-for-6.x
Minor fixes for 6.x
2015-05-30 19:34:25 +02:00
DJScias
709b77f9e8 Core/DBLayer: proper 6x account unban
- Thanks @Shauren
- Unbanning accounts in 6x should set unbandate = now
(UNIX_TIMESTAMP() instead of NOW() due to unbandate being an int, not a timestamp)
- 'Active' updates remain so the "account is not banned" checks continue functioning
2015-05-30 03:06:59 +02:00
glkrlos
c1bd3282f8 Core/Updater: Fix issues when connecting through unix sockets.
* closes #14766
* closes #14759

Signed-off-by: Naios <naios-dev@live.de>
2015-05-28 18:28:04 +02:00
Daniel M. Weeks
b6e926fa2f Remove unnecessary semicolons 2015-05-27 21:16:06 -04:00
Shauren
b3a754cd7b Core/Garrisons: Implemented follower class/spec abilities and saving them to database 2015-05-22 00:17:48 +02:00
et65
c6ab951025 Core/PacketsIO: Implemented or updated most of party related packets.
Packets updated or implemented :
- SMSG_INSTANCE_INFO : updated

- CMSG_SAVE_CUF_PROFILES : updated
- SMSG_LOAD_CUF_PROFILES : updated

- SMSG_PARTY_COMMAND_RESULT : updated

- CMSG_PARTY_INVITE : updated
- SMSG_PARTY_INVITE : updated
- CMSG_PARTY_INVITE_RESPONSE : updated
- CMSG_PARTY_UNINVITE : updated
- SMSG_GROUP_UNINVITE : updated
- CMSG_LEAVE_GROUP : updated
- SMSG_GROUP_DECLINE : updated

- SMSG_GROUP_DESTROYED : updated

- CMSG_MINIMAP_PING : updated
- SMSG_MINIMAP_PING : updated

- CMSG_CONVERT_RAID : updated
- CMSG_SET_EVERYONE_IS_ASSISTANT

- CMSG_DO_READY_CHECK : updated
- CMSG_READY_CHECK_RESPONSE : updated
- SMSG_READY_CHECK_COMPLETED : updated
- SMSG_READY_CHECK_RESPONSE : updated
- SMSG_READY_CHECK_STARTED : updated

- CMSG_REQUEST_PARTY_JOIN_UPDATES : implemented (source : sniffs)
- CMSG_REQUEST_PARTY_MEMBER_STATE : updated
- SMSG_PARTY_MEMBER_STATE : updated
- SMSG_PARTY_UPDATE : updated

- CMSG_REQUEST_RAID_INFO : updated

- CMSG_INITIATE_ROLE_POLL : updated
- SMSG_ROLE_POLL_INFORM : updated
- CMSG_SET_ROLE : updated
- SMSG_ROLE_CHANGED_INFORM : updated

- CMSG_CHANGE_SUB_GROUP : updated
- CMSG_SWAP_SUB_GROUPS : implemented

- CMSG_SET_ASSISTANT_LEADER : updated
- CMSG_SET_PARTY_LEADER : updated
- SMSG_GROUP_NEW_LEADER : updated

- CMSG_CLEAR_RAID_MARKER : implemented
- SMSG_RAID_MARKERS_CHANGED : implemented

- CMSG_UPDATE_RAID_TARGET : updated
- SMSG_SEND_RAID_TARGET_UPDATE_ALL : updated
- SMSG_SEND_RAID_TARGET_UPDATE_SINGLE : updated

- CMSG_OPT_OUT_OF_LOOT : updated
- CMSG_SET_LOOT_METHOD : updated

About group update flags:
- Not sure they are use for now.
- Pets now have their group update flags.
- Pets'power is no send to client anymore.
- Changes about them are inspired from SMSG_PARTY_MEMBER_STATS parsing of WowPacketParser, but it seems this packet is not use anymore.

CHAT_MSG_RAID has been fixed.

About Ready check:
- Correctly implemented this function.
- An update function has been added to Group class, and to GroupMgr class in order to manage the ready check expiration (when 35 seconds were gone, players who have not answered must be reported as AFK)

About Raid markers:
- Old spell effect SPELL_EFFECT_SUMMON_OBJECT_SLOT3 has been renamed to SPELL_EFFECT_CHANGE_RAID_MARKER and implemented. I'm sure about that because raid markers spells are the only spells that have this effect type.

Source: WowPacketParser, and sniffs from official.
2015-05-19 13:10:29 +02:00
Shauren
92bfa759fa Core/Garrisons: Initial work on garrison followers 2015-05-17 18:06:28 +02:00
Shauren
5b725db033 Core/Garrisons: Basics for garrisons 2015-05-08 00:03:15 +02:00
Shauren
e4abbc0926 Core/Networking: Fixed possible msvc debug assertions in vector 2015-05-02 00:02:57 +02:00
Shauren
ca83e14f8b Core/Entities: Reworked guid scopes
* Added ObjectGuid traits to easily access whether guid type can be generated globally (ObjectMgr) or not
* This adds separate (per map) guid sequences depending on object type
* Ported map object container from cmangos/mangos-wotlk@a2d396eb0b
* Added type container visitor for TypeUnorderedMapContainer
* Implemented helper function to erase unique pairs from multimap containers
* Moved object storage of all objects except players and transports to map level
* Added containers linking database spawn id with creature/gameobject in world
* Renamed DBTableGuid to spawnId
* Added a separate spawn id sequence generator for creatures and gameobjects - this will be used in db tables
* Moved building SMSG_UPDATE_OBJECT - updatefields changes broadcast to map update
2015-04-28 21:19:46 +02:00
Naios
d37ecf796e Core/Misc: Use boost::in_place() to initialize optionals.
* Improves commit 800d5d8939
* Thanks @Shauren for this great suggestion.
2015-04-27 17:01:30 +02:00
Shauren
675a2fcd3b Core/Util: Fixed flag128 and removed flag96 - previously if flag128 and flag96 were used in together the result was always a bool instead of expected flag result due to implicit boolean conversion 2015-04-27 00:33:27 +02:00
Naios
800d5d8939 Core/Misc: Replace tc's optional with boost::optional.
* benefits from empty optimization (objects are only constructed if needed).
* supports r-value references (move semantics) (boost >= 1.56.0).
* preparation for c++14/17's std::optional and std::none_t.
* add move constructor to CompactArray.
2015-04-26 23:45:52 +02:00
Naios
26f9b3b988 Core/Log: Fix newlines when using dynamic log names
* thanks @Aokromes for reporting
* also removes an unnecessary std::move

(cherry picked from commit 2592528741)
2015-04-24 19:47:22 +02:00
Shauren
59e9bcf0bf Core/Socket: Removed unused synchronous read method 2015-04-24 00:10:04 +02:00
Carbenium
bba6eb8d3d Core/Player: Added character templates
* Characters with predefined levels can be created
* Avaiable factions and classes can be configured
* Valid values for `factionGroup` in table `character_template_class` are 3 (Alliance) or 5 (Horde)
* Added new permission RBAC_PERM_USE_CHARACTER_TEMPLATES - has to be set, to allow the usage of the templates

Closes #13952
2015-04-21 00:52:21 +02:00
Shauren
0c3231a239 Removed unused include 2015-04-20 18:53:08 +02:00
Shauren
4c7c2abf03 Core/Misc: Removed gcc specific packing pragma syntax - only unsupported (now) versions required it 2015-04-20 01:54:18 +02:00
Shauren
4703169116 Core/PacketIO: Updated and enabled more battleground packets 2015-04-18 00:04:56 +02:00
Daniel M. Weeks
f48b86fd8a Add missing newline 2015-04-15 19:20:48 +02:00
Daniel M. Weeks
27923b8d8f Remove unnecessary semicolons 2015-04-15 19:20:13 +02:00
Daniel M. Weeks
62ff887236 Fix documentation 2015-04-15 19:20:04 +02:00
Daniel M. Weeks
6484885600 Prevent collisions in GCC attribute definitions 2015-04-15 19:19:54 +02:00
Shauren
d9e941dde3 Core/Quests: Added research results about last field in QuestPackageItem.db2 2015-04-14 01:12:20 +02:00
Rat
e567541273 Core/Quests: fixed quest rewarding
* ItemSpec.dbc still needs some research to handle all cases correctly
2015-04-13 22:25:35 +02:00
Shauren
98f0e496c9 Core/Battle.net: Ensure email is always uppercase 2015-04-12 13:51:12 +02:00
Shauren
ff101cd100 Core/Battle.net: Query optimizations part2 - made all queries asynchronous 2015-04-11 18:58:13 +02:00
Shauren
685a310103 Core/Battle.net: Query optimizations part1 - reduced the amount of queries during authentication 2015-04-11 16:25:21 +02:00
Shauren
5659db6f03 Core/Bnet: Fixed crash on shutdown happening when there were still players connected 2015-04-11 01:55:45 +02:00