1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-08 11:47:45 +00:00
sapphire/src/world/Manager/BlacklistMgr.h

28 lines
821 B
C
Raw Normal View History

2021-12-13 22:36:29 -03:00
#pragma once
#include <memory>
#include <vector>
#include "ForwardsZone.h"
namespace Sapphire::World::Manager
{
class BlacklistMgr
{
public:
BlacklistMgr() = default;
bool onAddCharacter( Entity::Player& source, const std::string& targetName );
bool onRemoveCharacter( Entity::Player& source, const std::string& targetName );
2021-12-13 22:36:29 -03:00
bool onGetBlacklistPage( Entity::Player& source, uint8_t key, uint8_t nextIdx );
bool isBlacklisted( Entity::Player& source, Entity::Player& target ) const;
2021-12-13 22:36:29 -03:00
private:
ptrdiff_t getEntryIndex( Entity::Player& source, uint64_t characterId ) const;
void sendAddResultPacket( Entity::Player& source, Entity::PlayerPtr pTarget, uint32_t result );
void sendRemoveResultPacket( Entity::Player& source, Entity::PlayerPtr pTarget, uint32_t result );
2021-12-13 22:36:29 -03:00
};
}