Commit Graph

157 Commits

Author SHA1 Message Date
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +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
xinef1
3f7fe6f8a5 Core/Spells: Remade trajectory target selection (#19048)
* Remade trajectory target selection
* Added possibility to apply conditions to trajectory spells
* Properly recalculate delay time if CMSG_UPDATE_PROJECTILE_POSITION is received

(cherrypicked from c6060dd0c5)
2019-06-15 18:41:09 +02:00
Shauren
455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
7512ffb058 Core/Entities: Update updatefields to 8.0.1.27980 2018-10-10 22:11:41 +02:00
Shauren
c9465979c6 Core/Entities: Update updatefields to 7.3.5.25928 2018-02-18 16:33:27 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Seyden
5675902485 Core/Creatures: Implemented Basic Creature Scaling (#20026) 2017-07-29 21:40:28 +02: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
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
a12a34b1dc Core/Game: Include cleanup - removed G3D classes from packets
* Use our own Position class instead, with the coords written to packets being part of type
2017-05-16 22:16:21 +02:00
Shauren
6828c7bc2f Core/Items: Implemented new item bonus and enchantment types 2017-05-07 16:47:49 +02:00
Rochet2
adc7764d73 Core/PacketIO: Remove bad slot for mirror image packet (#19513) 2017-04-26 18:02:00 +02:00
Shauren
047c6f072b Core/Movement: Handle move stop embedded in spell cast requests 2017-02-25 22:13:00 +01:00
Treeston
346e4824be Entities/Unit: Cleanup refactor. Changes: (#17819)
+ Unit::m_movedPlayer -> Unit::m_playerMovingMe
+ Player::m_mover -> Player::m_unitMovedByMe
+ Unit::GetMover() -> Unit::GetUnitBeingMoved()
+ Unit::GetPlayerMover() -> Unit::GetPlayerBeingMoved()
+ NEW: Unit::GetClientControllingPlayer()
(cherry picked from commit 8deda7ed7f)

# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Handlers/MiscHandler.cpp
#	src/server/game/Handlers/MovementHandler.cpp
#	src/server/game/Handlers/SpellHandler.cpp
#	src/server/game/Server/WorldSession.cpp
#	src/server/game/Spells/SpellEffects.cpp
#	src/server/game/Spells/SpellInfo.cpp
2017-02-12 16:24:25 +01:00
Aokromes
d2dd5f9f02 Core/Logs: Fine tune more logs
And move others to more logical appenders
(cherry picked from commit 1ad24352ac)

# Conflicts:
#	src/server/authserver/Server/AuthSession.cpp
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Handlers/AuctionHouseHandler.cpp
#	src/server/game/Handlers/CharacterHandler.cpp
#	src/server/game/Handlers/GuildHandler.cpp
#	src/server/game/Handlers/LootHandler.cpp
#	src/server/game/Handlers/PetitionsHandler.cpp
#	src/server/game/Handlers/QuestHandler.cpp
#	src/server/game/Handlers/SpellHandler.cpp
#	src/server/game/Spells/SpellEffects.cpp
2017-02-11 23:15:24 +01:00
joschiwald
0f432edc4b Fixed build
Closes #18816
2017-01-13 18:54:15 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Shauren
1e4ccbf475 Core/Items: Removed invalid item bind type 5 2016-09-10 22:20:00 +02:00
Shauren
ef29f32965 Core/Items: Defined all item flags 2016-09-09 10:22:57 +02:00
Shauren
2056ce4d66 Scripts: Build fix 2016-07-17 15:20:56 +02:00
Shauren
f7883bd525 Core/Transmog: Implemented transmog collection and updated transmog handling 2016-07-05 22:07:35 +02:00
Shauren
d2733eb6f1 Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-06-13 21:00:25 +02:00
Shauren
6b1c85a676 Core/PacketIO: Updated spell packets 2016-06-05 14:08:53 +02:00
Shocker
b539ac6afa Core/GameObjects: Add isUse parameter to GossipHello for distinction between CMSG_GAMEOBJECT_USE and CMSG_GAMEOBJECT_REPORT_USE 2016-05-26 13:09:56 +03:00
Shauren
70102f32fe Core/DataStores: Updated opcodes and db2 to 7.0.3.21414 2016-05-20 23:49:53 +02:00
Shauren
c75fcbe20b Core/Achievements: AchievementMgr refactoring
* Extracted base CriteriaHandler class that deals with criteria only and will be reused for future scenario implementation
* Fixed players earning guild achievements
2016-05-07 01:16:29 +02:00
Carbenium
3bdde71a97 Core/PacketIO: Updated and enabled SMSG_NOTIFY_MISSILE_TRAJECTORY_COLLISION 2016-02-06 23:05:55 +01:00
joschiwald
3ac2ba721d Core/Gossips: added some sanity checks to prevent duplicate interaction
(cherry picked from commit 8b6954e81b)

Scripts: addition to 8b6954e81b

Closes #16466

(cherry picked from commit b259d5c2bc)
2016-02-06 18:16:11 +01:00
Carbenium
b0d8357d14 Warning fix 2016-02-04 01:11:37 +01:00
Carbenium
ff9ac9f9b0 Core/PacketIO: Use Vector3 instead of Position since orientation isn't included (MissileTrajectoryCollision and UpdateMissileTrajectory) 2016-02-03 17:14:15 +01:00
Carbenium
6715a91907 Core/PacketIO: Updated and enabled CMSG_UPDATE_MISSILE_TRAJECTORY 2016-02-03 15:10:58 +01:00
Carbenium
f269335bb2 Core/PacketIO: 305b99e065 follow-up 2016-02-03 01:48:02 +01:00
Carbenium
305b99e065 Core/PacketIO: Updated and enabled CMSG_MISSILE_TRAJECTORY_COLLISION 2016-02-03 01:25:25 +01:00
Carbenium
5b313bf74d Core/PacketIO: Updated and enabled CMSG_PET_CANCEL_AURA 2016-02-02 01:38:29 +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
Shauren
84609efb46 Core/PacketIO: Updated and enabled CMSG_CANCEL_CHANNELLING 2015-12-17 23:10:00 +01:00
Shauren
3bc3b67a8f Core/Player: Changed ranged weapons to be equipped in main hand slot instead of no longer used ranged slot
Closes #14675
Closes #15296
2015-09-27 00:06:08 +02:00
MitchesD
61256f5f8d Core/Spell: don't interrupt spells with attribute SPELL_ATTR8_RAID_MARKER
* needed for example when creating heirlooms from collection (or when upgrading)
2015-09-02 22:58:04 +02:00
joschiwald
5c813f6f02 Core/PacketIO: updated totem packets 2015-07-26 15:09:00 +02:00
Vincent-Michael
2e586bc520 Core: Header cleanup in game/*/*.cpp 2015-07-25 20:18:42 +02:00
Shauren
a22e4e121a Core/Misc: Fixing warnings detected by Visual Studio 2015 compiler 2015-07-21 00:33:36 +02:00
Golrag
34af1c4f64 Core/PacketIO: CMSG_SPELL_CLICK 2015-07-19 12:53:05 +02:00
Shauren
f45ae7af43 Core/PacketIO: Updated spell packets 2015-07-18 00:45:21 +02:00
Rochet2
abf3d22870 Fix tabard and cloak mirror image models
Apparently the order of the two items changed.
Mirror image and clone weapon spells are still likely missing transmogrification support.
2015-06-21 12:04:50 +03:00
Orion
eeb49d238a Update and enable CMSG_GET_MIRROR_IMAGE_DATA, SMSG_MIRROR_IMAGE_CREATURE_DATA, SMSG_MIRROR_IMAGE_COMPONENTED_DATA. 2015-06-15 02:03:00 +03: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
0453fafaec Core/Enums: Defined two unknown item flags, and cleaned the other item flags enums to reflect a better standardization 2015-05-01 21:56:33 -04: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