Commit Graph

225 Commits

Author SHA1 Message Date
jackpoz
6611211d31 Core/Misc: Fix static analysis issues
(cherry picked from commit 65aeeafad3)
2020-04-28 13:43:40 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00
xinef1
ad4e63bae1 Core/Misc: Moved CharacterInfo out of world to separate class
Closes #19030

(cherrypicked from 59ce3d6c9b)
2019-07-21 21:06:54 +02:00
ariel-
b742c87222 Core: add some missing Player Name normalization on input data
(cherrypicked from 6f9e8b6c91)
2019-07-21 21:06:54 +02:00
xinef1
b485f3e673 Few small optimizations here and there (#18684)
Changes list:
- Added CharacterGuidByNameContainer which contains name -> guid unordered map (updated along CharacterInfo)
- Extended CharacterInfo structure with GuildId
- Extended CharacterInfo structure with ArenaTeamId[3], for all possible teams (2v2, 3v3, 5v5)
- Removed CHAR_SEL_GUID_BY_NAME and CHAR_SEL_CHAR_GUID_BY_NAME synchronous queries, name -> guid can be now retrieved in World::GetCharacterGuidByName
- Removed CHAR_SEL_GUID_RACE_ACC_BY_NAME synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid
- Removed CHAR_SEL_CHAR_LEVEL synchronous query, level can be retrieved by guid
- Changed CHAR_SEL_CHARACTER_ACTIONS_SPEC to asynchronous query, action bars are now loaded asynchronously
- Removed CHAR_SEL_CHARACTER_NAME_CLASS synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid
- Removed CHAR_SEL_PLAYER_ARENA_TEAMS and CHAR_SEL_ARENA_TEAM_ID_BY_PLAYER_GUID synchronous queries, arena teams are now stored in CharacterInfo
- Replaced synchronous db calls with CharacterInfo lookups
- Removed ObjectMgr::GetPlayerGUIDByName, as it used db query
- Replaced some unnecessary UpdateObjectVisibility() calls because they were either duplicated (called few lines above in other function) or it is enough to call DestroyForNearbyPlayers because object is being removed or should be invisible and DestroyForNearbyPlayers is faster
- Corrected typo in Player::DestroyForPlayer, only items in slots 0 to EQUIPMENT_SLOT_END are sent to other players
- Renamed Player::GetGuildIdFromDB to Player::GetGuildIdFromCharacterInfo and changed the function to use CharacterInfo structure
- Renamed Player::GetArenaTeamIdFromDB to Player::GetArenaTeamIdFromCharacterInfo and changed the function to use CharacterInfo structure
- Renamed Player::GetLevelFromDB to Player::GetLevelFromCharacterInfo and changed the function to use CharacterInfo structure
- Removed GameEventMgr::_questToEventLinks and associated functions, eventId is now stored in Quest class under _eventIdForQuest variable
- Changed some functions checking quest status to use other functions for quest status check instead of duplicating code
- Removed callback from add friend, because we can get the guid from appropriate storage, no need to make db query
- Removed callback from add ignore, because we can get the guid from appropriate storage, no need to make db query
- Added callback to unwrap wrapped items asynchronously
- Removed synchronous select in tutorials to check if we have any entries in db, if any entry exists in db, m_TutorialsChanged variable will have TUTORIALS_FLAG_LOADED_FROM_DB flag added and it is no longer necessary to query database

(cherrypicked from b955456008)
2019-07-21 21:06:54 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
5bfb1cc960 Core/Chat: Updated quest chat link format 2018-11-12 23:27:28 +01:00
Shauren
91be2332e2 Core/Entities: Phasing rewrite
* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
ariel-
6d060bbea8 Core/Chat: fix RBAC_PERM_COMMANDS_NOTIFY_COMMAND_NOT_FOUND_ERROR for subcommands
Ref #18463
(cherry picked from commit eb376f4b7e)
2018-03-12 16:39:42 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
b453e12423 Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
2017-06-04 01:00:45 +02:00
Shauren
f2039981e0 Core/Game: Include cleanup, part 3 2017-05-20 00:09:37 +02:00
Shauren
c5d3dd90be Core/Game: Include cleanup
* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
2017-05-18 23:53:25 +02:00
Shauren
9299e9bde0 Core/Grids: Ported cmangos/mangos-wotlk@ea99457e50 2017-05-13 19:37:33 +02:00
Shauren
beb3316089 Core/Shared: Include cleanup 2017-05-13 11:49:09 +02:00
Rochet2
80cf4e3070 * Scripts/Commands: Fix guid usage and enhance commands
- Fix targeting gameobjects and creatures for .dist and .gps. The old code used DB guid to search from core generated guid lists.
- Fix some error messages saying 'no player found' even if creatures and gameobjects and players were searched
- Change atoi to atoul when receiving lowguids as string or other uint32 values
- Use ObjectGuid::LowType instead of uint32 for lowguid type
- Allow .gob info to take in gameobject guid link as well as entry link in addition to gameobject entry and update the documentation of the command
- Change .gob delete to post the spawnid (dbguid) instead of the ingame generated guid (which is basically never seen or used by the player in any other commands that I see)
- Allow spawntimesecs to be negative when spawning a gameobject
- Disable searching by ingame spawn id in commands. (it makes little sense for a user to provide a number which is then attempted to be used as DB guid and non DB guid when both could have a match)
- Update .gob turn documentation to tell about possibility to provide orientation in command
- Correct the types in .gob add command result trinity_string
- Correct the creature search for .npc del
- Change .event to .event info
- Add .go offset command
- Remove the .go command for empty string (no subcommand given) because it just used .go xyz
- Extend .gob info to show size, faction, flags and model dimensions
- Remove some unnecessary casts
- Document .wp show better (first and last were not documented)
- Insert spawnid to .wp show info error message
- Fix spawntime printing for .gobject target
- Fix guid targetting for .npc set movetype
- Fix query by spawnid for .wp show info
- Fix deleting of existing waypoints when twice doing the command .wp show on
- Fix deleting of existing waypoints when doing the command .wp show off
- Change wpguid column in DB and in core to uint32, which is what the spawnid type is in core and db.

Closes #18978
2017-03-11 12:29:37 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
ariel-
59a9bc5ca0 Core/Channels: Revamp of channel system
* Core/Chat: general cleanup and revamping: (#17576) (fbbb03212e)
* Core/Channel: restore accidentally deleted line, fixes channels not honoring ownership setting (7c71417993)
* Channel Followup: avoid setting an invisible gm as Channel owner (#17597) (8a8362ef15)
* Core/Channel: change the way channels are stored and sent to client, fixes multiple channels per zone when using different locales (#17980)
2016-10-07 01:09:28 -03:00
Shauren
885d9b53c3 Core/DataStores: Updated dbc/db2 to 7.0.1.20994 2016-05-20 23:48:48 +02:00
Naios
9cc97f226d Core/Game: Rewrote the ScriptMgr to support script reloading.
* Finally this commit enables dynamic script hotswapping
  and finished the PR #15671.
* Split the storage layout to use optimized storages
  for database bound and unbound scripts.
* Add several unload workers to reload scripts correctly
  -> Requires further investigation.
* Fixes memory leaks in ScriptMgr when dropping invalid scripts.
* Fixes VehicleScripts
* Makes OutdoorPvP scripts reloadable
* Makes InstanceMapScripts reloadable
* Makes CommandScripts reloadable
2016-04-11 21:14:00 +02:00
Aokromes
d4146a23ac Merge pull request #16038 from tkrokli/grammar_and_spelling_corrections_335
[3.3.5] Core/Logs: English text corrections
(cherry picked from commit 4cd937140b)
2016-04-08 19:48:58 +02:00
Shauren
db0b8bf24e Core/Maps: Changed the way area data is stored in maps, it now uses ID field from AreaTable.dbc instead AreaBit used for exploration marker (and is not unique anymore on top of simply being stupidly confusing)
Note: Extracting maps is required
2016-02-02 19:13:04 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
jackpoz
ec3bba64f0 Core/Commands: Fix NULL dereference crash
Closes #15833

(cherry picked from commit abd4e2e0f1)
2015-11-10 21:27:50 +01:00
Shauren
2d942ddcc5 Core/Commands: Refactored chat command script hook, fixes a crash when building with gcc 5
Closes #15616
Closes #15740
2015-10-22 20:26:56 +02:00
Shauren
63def8aa32 Core/Battle.net:
* Changed packet structures to mirror client names
* Simplified ToString Building
* Removed deprecated structures

World: Cleaned up duplicate realm info 'realm' and 'realmHandle' variables (realmHandle was removed, that data is fully contained in realm)
2015-10-06 00:30:47 +02:00
joschiwald
cf1e80e3d0 Core/Misc: removed some useless map checks 2015-10-04 14:53:05 +02:00
jackpoz
ee7039e845 Core/Chat: Allow to sanitize | characters when sending messages to clients
Add an optional parameter "escapeCharacters" to ChatHandler::SendSysMessage() to properly escape | character, otherwise it might freeze the client.

(cherry picked from commit 7c91984a64)
2015-09-24 23:42:23 +02:00
Vincent-Michael
2e586bc520 Core: Header cleanup in game/*/*.cpp 2015-07-25 20:18:42 +02:00
jackpoz
a3faa57f3b Scripts/Commands: Fix memory leak in ".reload command"
Free commandTableCache object before assigning it the result of malloc()

(cherry picked from commit c6c09423fd)
2015-06-26 03:29:47 +01:00
Shauren
cb854a2b7b Core/Maps: Removed dbguid/spawnid grid searchers, they are no longer neccessary 2015-06-08 17:48:21 +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
Kinzcool
00cfe8f5a9 Core/Misc: Fixed wrong references to ZoneName instead of using AreaName_lang 2015-05-08 22:48:30 -04:00
Naios
95ebe4f31c Core/Log: Add type safe formatting
* improves safety and log speed through:
  - variadic templates
  - perfect forwarding
* fixes a newline in db logs
* improve performance of Appender::write by using std::ostringstream && std::move
2015-03-13 09:15:42 +01:00
Vincent-Michael
ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
joschiwald
6c6e4d4328 Core/Packets: moved chat packet building function to packet builder class 2014-12-23 00:06:36 +01:00
Nayd
a1d4c9f9dc Core: Use the correct function to convert strings to unsigned longs and unsigned long longs
Fixes wrong data being inserted into the database (i.e explored zones).
More info in #13493

Fixes #13493

Thanks to @jackpoz for finding the code issue and @Vavehl for an expectional bug report.
2014-11-26 02:12:38 +00:00
Intel
dbb102e647 Core/Packets: Added most of the chat packets 2014-11-17 20:49:15 +02:00
Intel
218f14f84b Core/Packets: Added some chat message packets 2014-11-17 00:08:38 +02:00
Intel
b5236a6cdc Core/DataStores: Updated AreaTable.dbc
Signed-off-by: Nayd <dnpd.dd@gmail.com>
2014-11-15 04:27:35 +00:00
joschiwald
620f23d9dc Core/World: hold deleted characters in character store 2014-11-12 19:16:14 +01:00
Intel
24850994b4 Core/Talents: Update talent system, remove talent points 2014-11-10 21:09:18 +02:00
Intel
a7f56c2208 Core/DataStores: Updated GameObjectDisplayInfo.dbc, GemProperties.dbc, GlyphProperties.dbc, GlyphSlot.dbc, GuildPerkSpells.dbc structs 2014-11-08 20:21:17 +02:00
Shauren
15fbb6f46f Core/Entites: Updated GUID format 2014-10-29 21:13:21 +01:00
Shauren
7afab9f783 Core/Entities: Updated HighGuid values 2014-10-27 12:03:35 +01:00
Shauren
9e1930959d Core/Entities: Changed object lowguid to uint64 2014-10-26 02:57:28 +02:00
Shauren
034561792c Core/Entities: Second batch of removing implicit conversions of ObjectGuid to uint64 2014-10-21 20:27:00 +02:00
Shauren
9cc7044546 Core/Entities: First batch of removing implicit conversions of ObjectGuid to uint64 2014-10-21 19:23:32 +02:00
Shauren
c238e8faff Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/Battlegrounds/ArenaTeamMgr.cpp
	src/server/game/Handlers/GroupHandler.cpp
2014-10-18 15:54:30 +02:00