1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-27 20:07:45 +00:00

Aaah uuh fix some stuff here and there

This commit is contained in:
Maru 2018-03-09 12:09:05 -03:00
parent 5a41d3cfc2
commit 317c37ae09
5 changed files with 20 additions and 19 deletions

View file

@ -14,9 +14,6 @@
#include "Group.h"
#include "FriendList.h"
extern Core::ServerZone g_serverZone;
extern Core::Logger g_log;
using namespace Core::Network::Packets;
using namespace Core::Network::Packets::Server;

View file

@ -12,9 +12,6 @@
#include "Group.h"
using namespace Core::Network::Packets;
using namespace Core::Network::Packets::Server;
namespace Core {
namespace Social {
@ -26,7 +23,7 @@ public:
Group( id, ownerId ),
m_id( id ), m_ownerId( ownerId ) {};
std::vector< Core::Network::Packets::Server::PlayerEntry > getFriendListEntries( uint16_t entryAmount );
std::vector< Network::Packets::Server::PlayerEntry > getFriendListEntries( uint16_t entryAmount );
protected:
uint64_t m_id{ 0 };

View file

@ -14,9 +14,6 @@
namespace Core {
namespace Social {
class Group;
using GroupPtr = boost::shared_ptr< Group >;
struct GroupMember
{
uint64_t inviterId;
@ -37,7 +34,7 @@ enum class GroupType : uint8_t
ContentGroup
};
class Group : public boost::enable_shared_from_this< Group >
class Group
{
public:
Group( uint64_t id, uint64_t ownerId ) :
@ -88,5 +85,8 @@ private:
};
}
using GroupPtr = boost::shared_ptr< Social::Group >;
};
#endif // ! _GROUP_H

View file

@ -1,20 +1,26 @@
#include "../Group.h"
#include "SocialMgr.h"
#include "Social/Group.h"
#include <Common.h>
#include <boost/make_shared.hpp>
#include "Forwards.h"
template< class T >
Core::Social::SocialMgr< T >::SocialMgr()
: m_groupCount( 0 ),
m_lastGroupId( 0 ),
m_groups{}
{
}
template< class T >
Core::Social::SocialMgr< T >::~SocialMgr()
{
}
template< class T >
T Core::Social::SocialMgr< T >::findGroupByInviteIdForPlayer( uint64_t playerId ) const
{

View file

@ -21,7 +21,7 @@ class SocialMgr
public:
SocialMgr();
virtual ~SocialMgr();
~SocialMgr();
T findGroupByInviteIdForPlayer( uint64_t playerId ) const;
T findGroupById( uint64_t groupId ) const;
@ -44,10 +44,10 @@ protected:
// GroupType m_type{ GroupType::None };
// uint32_t m_maxEntries{ 0xFFFFFFFF };
uint64_t m_groupCount{ 0 };
uint64_t m_groupCount;
std::map< uint64_t, uint64_t > m_invites;
uint64_t m_lastGroupId{ 0 };
uint64_t m_lastGroupId;
// < recipient, groupid >
//virtual GroupPtr createGroup( PlayerPtr pOwner ) = 0;
@ -64,10 +64,11 @@ protected:
friend virtual void disband();
*/
virtual uint64_t generateGroupId();
uint64_t generateGroupId();
std::map< uint64_t, T > m_groups;
private:
std::map< uint64_t, T > m_groups;
};