mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
pet bouncers now bounce player upon pressing shift
This commit is contained in:
@@ -3589,6 +3589,35 @@ void GameMessages::SendBouncerActiveStatus(LWOOBJID objectId, bool bActive, cons
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendRequestClientBounce(const LWOOBJID& objectId, const LWOOBJID& bounceTargetId, const NiPoint3& bounceTargetPos, const NiPoint3& bouncedObjLinVel, const LWOOBJID& requestSourceId, const bool bAllBounced, const bool bAllowClientOverload, const SystemAddress& sysAddr) {
|
||||
LOG_DEBUG("REQUEST CLIENT BOUNCE!");
|
||||
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectId);
|
||||
LOG_DEBUG("Object id: %llu", objectId);
|
||||
bitStream.Write(eGameMessageType::REQUEST_CLIENT_BOUNCE);
|
||||
|
||||
bitStream.Write(bounceTargetId);
|
||||
LOG_DEBUG("Bounce target id: %llu", bounceTargetId);
|
||||
bitStream.Write(bounceTargetPos.x);
|
||||
bitStream.Write(bounceTargetPos.y);
|
||||
bitStream.Write(bounceTargetPos.z);
|
||||
LOG_DEBUG("Bounce target pos on server: %f %f %f", bounceTargetPos.x, bounceTargetPos.y, bounceTargetPos.z);
|
||||
bitStream.Write(bouncedObjLinVel.x);
|
||||
bitStream.Write(bouncedObjLinVel.y);
|
||||
bitStream.Write(bouncedObjLinVel.z);
|
||||
LOG_DEBUG("Bounced object linear velocity: %f %f %f", bouncedObjLinVel.x, bouncedObjLinVel.y, bouncedObjLinVel.z);
|
||||
bitStream.Write(requestSourceId);
|
||||
LOG_DEBUG("Request source id: %llu", requestSourceId);
|
||||
|
||||
bitStream.Write(bAllBounced);
|
||||
bitStream.Write(bAllowClientOverload);
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST;
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendSetPetName(LWOOBJID objectId, std::u16string name, LWOOBJID petDBID, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM;
|
||||
|
@@ -393,8 +393,26 @@ namespace GameMessages {
|
||||
|
||||
void SendPlayEmote(LWOOBJID objectId, int32_t emoteID, LWOOBJID target, const SystemAddress& sysAddr);
|
||||
|
||||
/**
|
||||
* Sends the bouncer active status
|
||||
* @param objectId Object ID of the bouncer
|
||||
* @param bActive Active state of the bouncer
|
||||
* @param sysAddr System address of the user
|
||||
*/
|
||||
void SendBouncerActiveStatus(LWOOBJID objectId, bool bActive, const SystemAddress& sysAddr);
|
||||
|
||||
/**
|
||||
* Sends a request to the client to bounce (I think?)
|
||||
* @param objectId Object ID
|
||||
* @param bounceTargetId The object ID of the bounce target
|
||||
* @param bounceTargetPos The position of the bounce target
|
||||
* @param bouncedObjLinVel TODO: UNUSED
|
||||
* @param requestSourceId The object Id of the entity requesting the bounce
|
||||
* @param bAllBounced Whether to bounce all entities standing on the bouncer pad
|
||||
* @param bAllowClientOverload TODO: UNUSED
|
||||
*/
|
||||
void SendRequestClientBounce(const LWOOBJID& objectId, const LWOOBJID& bounceTargetId, const NiPoint3& bounceTargetPos, const NiPoint3& bouncedObjLinVel, const LWOOBJID& requestSourceId, const bool bAllBounced, const bool bAllowClientOverload, const SystemAddress& sysAddr);
|
||||
|
||||
void SendSetPetName(LWOOBJID objectId, std::u16string name, LWOOBJID petDBID, const SystemAddress& sysAddr);
|
||||
|
||||
void SendSetPetNameModerated(LWOOBJID objectId, LWOOBJID petDBID, int32_t nModerationStatus, const SystemAddress& sysAddr);
|
||||
|
Reference in New Issue
Block a user