1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-30 08:07:46 +00:00

cleanup tellhandler and allow GMs to send messages to busy players

This commit is contained in:
NotAdam 2019-01-31 13:13:46 +11:00
parent 73ceb36d7d
commit 8e945a5698
3 changed files with 11 additions and 9 deletions

View file

@ -57,6 +57,11 @@ namespace Sapphire::Common
French = 8 French = 8
}; };
enum TellFlags : uint8_t
{
GmTellMsg = 0x4,
};
enum ObjKind : uint8_t enum ObjKind : uint8_t
{ {
None = 0x00, None = 0x00,

View file

@ -17,7 +17,7 @@ struct FFXIVIpcTell : FFXIVIpcBasePacket< Tell >
{ {
uint64_t contentId; uint64_t contentId;
uint16_t worldId; uint16_t worldId;
uint8_t preName; uint8_t flags;
char receipientName[32]; char receipientName[32];
char msg[1029]; char msg[1029];
}; };

View file

@ -636,14 +636,14 @@ void Sapphire::Network::GameConnection::tellHandler( FrameworkPtr pFw,
return; return;
} }
if( pTargetPlayer->hasStateFlag( PlayerStateFlag::BoundByDuty ) ) if( pTargetPlayer->hasStateFlag( PlayerStateFlag::BoundByDuty ) && !player.isActingAsGm() )
{ {
// send error for player bound by duty // send error for player bound by duty
// TODO: implement me // TODO: implement me
return; return;
} }
if( pTargetPlayer->getOnlineStatus() == OnlineStatus::Busy ) if( pTargetPlayer->getOnlineStatus() == OnlineStatus::Busy && !player.isActingAsGm() )
{ {
// send error for player being busy // send error for player being busy
// TODO: implement me ( i've seen this done with packet type 67 i think ) // TODO: implement me ( i've seen this done with packet type 67 i think )
@ -656,16 +656,13 @@ void Sapphire::Network::GameConnection::tellHandler( FrameworkPtr pFw,
// TODO: world id from server // TODO: world id from server
tellPacket->data().contentId = player.getContentId(); tellPacket->data().contentId = player.getContentId();
tellPacket->data().worldId = 67; tellPacket->data().worldId = 67;
// TODO: do these have a meaning?
//tellPacket.data().u1 = 0x92CD7337;
//tellPacket.data().u2a = 0x2E;
//tellPacket.data().u2b = 0x40;
if( player.isActingAsGm() ) if( player.isActingAsGm() )
{ {
tellPacket->data().preName = 0x04; tellPacket->data().flags |= TellFlags::GmTellMsg;
} }
pTargetPlayer->queueChatPacket( tellPacket );
pTargetPlayer->queueChatPacket( tellPacket );
} }
void Sapphire::Network::GameConnection::performNoteHandler( FrameworkPtr pFw, void Sapphire::Network::GameConnection::performNoteHandler( FrameworkPtr pFw,