diff --git a/src/common/Common.h b/src/common/Common.h index 5d6b0488..f99a7c77 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -14,9 +14,9 @@ namespace Core { namespace Common { - // 99 is the last spawn id that seems to spawn any actor - const uint8_t MAX_DISPLAYED_ACTORS = 99; - const uint8_t MAX_DISPLAYED_EOBJS = 40; + // 99 is the last spawn id that seems to spawn any actor + const uint8_t MAX_DISPLAYED_ACTORS = 99; + const uint8_t MAX_DISPLAYED_EOBJS = 40; const int32_t INVALID_GAME_OBJECT_ID = 0xE0000000; @@ -381,44 +381,39 @@ namespace Core { InvincibilityStayAlive, }; - enum struct PlayerStateFlag : uint8_t + enum PlayerStateFlag : uint8_t { - NoCombat, - Combat, - Casting, - StatusAffliction, - StatusAffliction1, - Occupied, - Occupied1, - Occupied2, - Occupied3, + HideUILockChar = 0, // as the name suggests, hides the ui and logs the char... + InCombat = 1, // in Combat, locks gearchange/return/teleport + Casting = 2, + InNpcEvent = 7, // when talking to an npc, locks ui giving "occupied" message - BoundByDuty, - Occupied4, - DuelingArea, - TradeOpen, - Occupied5, - HandlingItems, - Crafting, - PreparingToCraft, - Gathering, - Fishing, + InNpcEvent1 = 10, // Sent together with InNpcEvent, when waiting for input? just a guess... - enum PlayerStateFlag : uint8_t - { - HideUILockChar = 0, // as the name suggests, hides the ui and logs the char... - InCombat = 1, // in Combat, locks gearchange/return/teleport - Casting = 2, - InNpcEvent = 7, // when talking to an npc, locks ui giving "occupied" message - - InNpcEvent1 = 10, // Sent together with InNpcEvent, when waiting for input? just a guess... - - BetweenAreas = 24, - BoundByDuty = 28, - WatchingCutscene = 50, // this is actually just a dummy, this id is different + BetweenAreas = 24, + BoundByDuty = 28, + WatchingCutscene = 50, // this is actually just a dummy, this id is different - }; + }; + + enum struct FateStatus : uint8_t + { + Active = 2, + Inactive = 4, + Preparing = 7, + Completed = 8, + }; + + enum ActorControlType : uint16_t + { + ToggleWeapon = 0x01, + SetStatus = 0x02, + CastStart = 0x03, + ToggleAggro = 0x04, + ClassJobChange = 0x05, + DefeatMsg = 0x06, + GainExpMsg = 0x07, LevelUpEffect = 0x0A, @@ -712,16 +707,6 @@ namespace Core { MountSkill = 0xD, }; - /*! ModelType as found in eventsystemdefine.exd */ - enum ModelType : uint8_t - { - Human = 1, - DemiHuman = 2, - Monster = 3, - SharedGroup = 4, - Parts = 5 - }; - enum SocialCategory : uint8_t { Party = 1, @@ -730,9 +715,15 @@ namespace Core { FreeCompany = 5, }; - typedef std::vector< PlayerStateFlag > PlayerStateFlagList; + enum SocialListType : uint8_t + { + PartyList = 0x02, + FriendList = 0x0b, + SearchList = 0x0e, + }; - // todo: rename SocialRequestAction and SocialRequestResponse cause they seem ambiguous + + // todo: rename SocialRequestAction and SocialRequestResponse cause they seem ambiguous enum class SocialRequestAction : uint8_t { Invite = 1, diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index a33ba72a..0c565c60 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -72,7 +72,6 @@ namespace Packets { Playtime = 0x00DF, // updated 4.2 CFRegistered = 0x00B8, // updated 4.1 - SocialRequestResponse = 0x00BB, // updated 4.1 CancelAllianceForming = 0x00C6, // updated 4.2 Chat = 0x00E1, // updated 4.2 SocialRequestResponse = 0x00E5, // updated 4.1 diff --git a/src/servers/sapphire_zone/Framework.h b/src/servers/sapphire_zone/Framework.h index 67e8e068..fda0ff2e 100644 --- a/src/servers/sapphire_zone/Framework.h +++ b/src/servers/sapphire_zone/Framework.h @@ -22,7 +22,8 @@ #include "DebugCommand/DebugCommandHandler.h" #include "Social/Manager/SocialMgr.h" - +#include "Social/FriendList.h" +#include "Social/Group.h" namespace Core { diff --git a/src/servers/sapphire_zone/Social/FriendList.cpp b/src/servers/sapphire_zone/Social/FriendList.cpp index aa95d721..f245209a 100644 --- a/src/servers/sapphire_zone/Social/FriendList.cpp +++ b/src/servers/sapphire_zone/Social/FriendList.cpp @@ -1,16 +1,17 @@ #include #include -#include +#include +#include #include #include -#include #include #include #include +#include #include -#include "FriendList.h" #include "Group.h" +#include "FriendList.h" extern Core::ServerZone g_serverZone; extern Core::Logger g_log; diff --git a/src/servers/sapphire_zone/Social/FriendList.h b/src/servers/sapphire_zone/Social/FriendList.h index 3d55f99d..24eb5f47 100644 --- a/src/servers/sapphire_zone/Social/FriendList.h +++ b/src/servers/sapphire_zone/Social/FriendList.h @@ -3,14 +3,14 @@ #include #include -#include #include -#include #include #include #include #include #include +#include "Group.h" + using namespace Core::Network::Packets; using namespace Core::Network::Packets::Server; @@ -18,9 +18,6 @@ using namespace Core::Network::Packets::Server; namespace Core { namespace Social { -class FriendList; -using FriendListPtr = boost::shared_ptr< FriendList >; - class FriendList : public Group { @@ -29,22 +26,8 @@ public: Group( id, ownerId ), m_id( id ), m_ownerId( ownerId ) {}; - /*virtual void load(); - virtual void update(); - virtual void disband();*/ - - bool isParty() const; - bool isFriendList() const; - bool isFreeCompany() const; - bool isLinkshell() const; - bool isFreeCompanyPetition() const; - /*bool isBlacklist() const; - bool isContentGroup() const;*/ - std::vector< Core::Network::Packets::Server::PlayerEntry > getFriendListEntries( uint16_t entryAmount ); - - protected: uint64_t m_id{ 0 }; uint64_t m_ownerId{ 0 }; @@ -55,6 +38,9 @@ protected: }; + +using FriendListPtr = boost::shared_ptr< FriendList >; + } }; #endif // ! _FRIENDLIST_H \ No newline at end of file