From bba6eb8d3dfe73a02063a7cefe6f465dae69334b Mon Sep 17 00:00:00 2001 From: Carbenium Date: Sun, 19 Apr 2015 23:37:29 +0200 Subject: 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 --- src/server/game/Server/Packets/AuthenticationPackets.cpp | 8 ++++---- src/server/game/Server/Packets/AuthenticationPackets.h | 16 +--------------- 2 files changed, 5 insertions(+), 19 deletions(-) (limited to 'src/server/game/Server') diff --git a/src/server/game/Server/Packets/AuthenticationPackets.cpp b/src/server/game/Server/Packets/AuthenticationPackets.cpp index b6d2ff21630..8dfb05e69f7 100644 --- a/src/server/game/Server/Packets/AuthenticationPackets.cpp +++ b/src/server/game/Server/Packets/AuthenticationPackets.cpp @@ -104,11 +104,11 @@ WorldPacket const* WorldPackets::Auth::AuthResponse::Write() for (auto& templat : SuccessInfo.Value.Templates) { _worldPacket << uint32(templat.TemplateSetId); - _worldPacket << uint32(templat.TemplateClasses.size()); - for (auto& templatClass : templat.TemplateClasses) + _worldPacket << uint32(templat.Classes.size()); + for (auto& templateClass : templat.Classes) { - _worldPacket << uint8(templatClass.Class); - _worldPacket << uint8(templatClass.FactionGroup); + _worldPacket << uint8(templateClass.ClassID); + _worldPacket << uint8(templateClass.FactionGroup); } _worldPacket.WriteBits(templat.Name.length(), 7); diff --git a/src/server/game/Server/Packets/AuthenticationPackets.h b/src/server/game/Server/Packets/AuthenticationPackets.h index f914e18f6bc..719993e4ee4 100644 --- a/src/server/game/Server/Packets/AuthenticationPackets.h +++ b/src/server/game/Server/Packets/AuthenticationPackets.h @@ -83,20 +83,6 @@ namespace WorldPackets std::string RealmNameNormalized; ///< the name of the realm without spaces }; - struct CharacterTemplate - { - struct TemplateClass - { - uint8 Class; - uint8 FactionGroup; ///< @todo research - }; - - uint32 TemplateSetId; ///< @todo research - std::list TemplateClasses; - std::string Name; - std::string Description; - }; - struct AuthSuccessInfo { uint32 TimeRemain = 0; ///< the remaining game time that the account has in seconds. It is not currently implemented and probably won't ever be. @@ -111,7 +97,7 @@ namespace WorldPackets uint32 CurrencyID = 0; ///< this is probably used for the ingame shop. @todo implement std::list VirtualRealms; ///< list of realms connected to this one (inclusive) @todo implement - std::list Templates; ///< list of pre-made character templates. @todo implement + std::list Templates; ///< list of pre-made character templates. ExpansionRequirementContainer const* AvailableClasses = nullptr; ///< the minimum AccountExpansion required to select the classes ExpansionRequirementContainer const* AvailableRaces = nullptr; ///< the minimum AccountExpansion required to select the races -- cgit v1.2.3