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;
|
|
|
|
|
2021-12-13 23:04:07 -03:00
|
|
|
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 );
|
|
|
|
|
2021-12-13 23:04:07 -03:00
|
|
|
bool isBlacklisted( Entity::Player& source, Entity::Player& target ) const;
|
2021-12-13 22:36:29 -03:00
|
|
|
|
|
|
|
private:
|
2021-12-13 23:04:07 -03:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|