mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-04-26 16:46:31 +00:00
add semi-colons to macros consistently
This commit is contained in:
parent
88f316bf93
commit
9e4ce24fd2
@ -730,7 +730,7 @@ void ChatPacketHandler::SendTeamInviteConfirm(PlayerData* receiver, bool bLeader
|
||||
bitStream.Write(receiver->playerID);
|
||||
|
||||
//portion that will get routed:
|
||||
CMSGHEADER
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(receiver->playerID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_TEAM_INVITE_CONFIRM);
|
||||
@ -757,7 +757,7 @@ void ChatPacketHandler::SendTeamStatus(PlayerData* receiver, LWOOBJID i64LeaderI
|
||||
bitStream.Write(receiver->playerID);
|
||||
|
||||
//portion that will get routed:
|
||||
CMSGHEADER
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(receiver->playerID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_TEAM_GET_STATUS_RESPONSE);
|
||||
@ -782,7 +782,7 @@ void ChatPacketHandler::SendTeamSetLeader(PlayerData* receiver, LWOOBJID i64Play
|
||||
bitStream.Write(receiver->playerID);
|
||||
|
||||
//portion that will get routed:
|
||||
CMSGHEADER
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(receiver->playerID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_TEAM_SET_LEADER);
|
||||
@ -799,7 +799,7 @@ void ChatPacketHandler::SendTeamAddPlayer(PlayerData* receiver, bool bIsFreeTria
|
||||
bitStream.Write(receiver->playerID);
|
||||
|
||||
//portion that will get routed:
|
||||
CMSGHEADER
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(receiver->playerID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_TEAM_ADD_PLAYER);
|
||||
@ -828,7 +828,7 @@ void ChatPacketHandler::SendTeamRemovePlayer(PlayerData* receiver, bool bDisband
|
||||
bitStream.Write(receiver->playerID);
|
||||
|
||||
//portion that will get routed:
|
||||
CMSGHEADER
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(receiver->playerID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_TEAM_REMOVE_PLAYER);
|
||||
@ -854,7 +854,7 @@ void ChatPacketHandler::SendTeamSetOffWorldFlag(PlayerData* receiver, LWOOBJID i
|
||||
bitStream.Write(receiver->playerID);
|
||||
|
||||
//portion that will get routed:
|
||||
CMSGHEADER
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(receiver->playerID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_TEAM_SET_OFF_WORLD_FLAG);
|
||||
|
@ -31,7 +31,7 @@ using namespace std;
|
||||
|
||||
void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const SystemAddress& sysAddr, LWOOBJID objectID, GAME_MSG messageID) {
|
||||
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
|
||||
// Get the entity
|
||||
Entity* entity = EntityManager::Instance()->GetEntity(objectID);
|
||||
|
@ -69,8 +69,8 @@
|
||||
#include "TradingManager.h"
|
||||
|
||||
void GameMessages::SendFireEventClientSide(const LWOOBJID& objectID, const SystemAddress& sysAddr, std::u16string args, const LWOOBJID& object, int64_t param1, int param2, const LWOOBJID& sender) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_FIRE_EVENT_CLIENT_SIDE);
|
||||
@ -88,12 +88,12 @@ void GameMessages::SendFireEventClientSide(const LWOOBJID& objectID, const Syste
|
||||
//bitStream.Write(param2);
|
||||
bitStream.Write(sender);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendTeleport(const LWOOBJID& objectID, const NiPoint3& pos, const NiQuaternion& rot, const SystemAddress& sysAddr, bool bSetRotation, bool noGravTeleport) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_TELEPORT);
|
||||
|
||||
@ -121,7 +121,7 @@ void GameMessages::SendTeleport(const LWOOBJID& objectID, const NiPoint3& pos, c
|
||||
bitStream.Write(rot.y);
|
||||
bitStream.Write(rot.z);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendPlayAnimation(Entity* entity, const std::u16string& animationName, float fPriority, float fScale) {
|
||||
@ -171,7 +171,7 @@ void GameMessages::SendPlayerReady(Entity* entity, const SystemAddress& sysAddr)
|
||||
}
|
||||
|
||||
void GameMessages::SendPlayerAllowedRespawn(LWOOBJID entityID, bool doNotPromptRespawn, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entityID);
|
||||
@ -182,8 +182,8 @@ void GameMessages::SendPlayerAllowedRespawn(LWOOBJID entityID, bool doNotPromptR
|
||||
}
|
||||
|
||||
void GameMessages::SendInvalidZoneTransferList(Entity* entity, const SystemAddress& sysAddr, const std::u16string& feedbackURL, const std::u16string& invalidMapTransferList, bool feedbackOnExit, bool feedbackOnInvalidTransfer) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_INVALID_ZONE_TRANSFER_LIST);
|
||||
@ -203,12 +203,12 @@ void GameMessages::SendInvalidZoneTransferList(Entity* entity, const SystemAddre
|
||||
bitStream.Write(feedbackOnExit);
|
||||
bitStream.Write(feedbackOnInvalidTransfer);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendKnockback(const LWOOBJID& objectID, const LWOOBJID& caster, const LWOOBJID& originator, int knockBackTimeMS, const NiPoint3& vector) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write(GAME_MSG_KNOCKBACK);
|
||||
@ -225,7 +225,7 @@ void GameMessages::SendKnockback(const LWOOBJID& objectID, const LWOOBJID& caste
|
||||
if (knockBackTimeMSFlag) bitStream.Write(knockBackTimeMS);
|
||||
bitStream.Write(vector);
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendStartArrangingWithItem(
|
||||
@ -243,8 +243,8 @@ void GameMessages::SendStartArrangingWithItem(
|
||||
NiPoint3 targetPOS,
|
||||
int targetTYPE
|
||||
) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_START_ARRANGING_WITH_ITEM);
|
||||
@ -262,13 +262,13 @@ void GameMessages::SendStartArrangingWithItem(
|
||||
bitStream.Write(targetPOS);
|
||||
bitStream.Write(targetTYPE);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendPlayerSetCameraCyclingMode(const LWOOBJID& objectID, const SystemAddress& sysAddr,
|
||||
bool bAllowCyclingWhileDeadOnly, eCyclingMode cyclingMode) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write(GAME_MSG_PLAYER_SET_CAMERA_CYCLING_MODE);
|
||||
@ -280,12 +280,12 @@ void GameMessages::SendPlayerSetCameraCyclingMode(const LWOOBJID& objectID, cons
|
||||
bitStream.Write<uint32_t>(cyclingMode);
|
||||
}
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendPlayNDAudioEmitter(Entity* entity, const SystemAddress& sysAddr, std::string audioGUID) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG_PLAY_ND_AUDIO_EMITTER);
|
||||
@ -309,7 +309,7 @@ void GameMessages::SendPlayNDAudioEmitter(Entity* entity, const SystemAddress& s
|
||||
bitStream.Write0();
|
||||
bitStream.Write0();
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendStartPathing(Entity* entity) {
|
||||
@ -325,8 +325,8 @@ void GameMessages::SendStartPathing(Entity* entity) {
|
||||
void GameMessages::SendPlatformResync(Entity* entity, const SystemAddress& sysAddr, bool bStopAtDesiredWaypoint,
|
||||
int iIndex, int iDesiredWaypointIndex, int nextIndex,
|
||||
MovementPlatformState movementState) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
const auto lot = entity->GetLOT();
|
||||
|
||||
@ -373,47 +373,47 @@ void GameMessages::SendPlatformResync(Entity* entity, const SystemAddress& sysAd
|
||||
bitStream.Write(qUnexpectedRotation.w);
|
||||
}
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendRestoreToPostLoadStats(Entity* entity, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_RESTORE_TO_POST_LOAD_STATS);
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendServerDoneLoadingAllObjects(Entity* entity, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_SERVER_DONE_LOADING_ALL_OBJECTS);
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendChatModeUpdate(const LWOOBJID& objectID, uint8_t level) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write((uint16_t)GAME_MSG_UPDATE_CHAT_MODE);
|
||||
bitStream.Write(level);
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendGMLevelBroadcast(const LWOOBJID& objectID, uint8_t level) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write((uint16_t)GAME_MSG_SET_GM_LEVEL);
|
||||
bitStream.Write1();
|
||||
bitStream.Write(level);
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendAddItemToInventoryClientSync(Entity* entity, const SystemAddress& sysAddr, Item* item, const LWOOBJID& objectID, bool showFlyingLoot, int itemCount, LWOOBJID subKey, eLootSourceType lootSourceType) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(static_cast<uint16_t>(GAME_MSG_ADD_ITEM_TO_INVENTORY_CLIENT_SYNC));
|
||||
@ -467,31 +467,31 @@ void GameMessages::SendAddItemToInventoryClientSync(Entity* entity, const System
|
||||
bitStream.Write(showFlyingLoot);
|
||||
bitStream.Write(item->GetSlot());
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendNotifyClientFlagChange(const LWOOBJID& objectID, int iFlagID, bool bFlag, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write((uint16_t)GAME_MSG_NOTIFY_CLIENT_FLAG_CHANGE);
|
||||
bitStream.Write(bFlag);
|
||||
bitStream.Write(iFlagID);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendChangeObjectWorldState(const LWOOBJID& objectID, int state, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write((uint16_t)GAME_MSG_CHANGE_OBJECT_WORLD_STATE);
|
||||
bitStream.Write(state);
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendOfferMission(const LWOOBJID& entity, const SystemAddress& sysAddr, int32_t missionID, const LWOOBJID& offererID) {
|
||||
@ -501,32 +501,32 @@ void GameMessages::SendOfferMission(const LWOOBJID& entity, const SystemAddress&
|
||||
//The second, actually makes the UI pop up so you can be offered the mission.
|
||||
//Why is it like this? Because LU isn't just a clown, it's the entire circus.
|
||||
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(offererID);
|
||||
bitStream.Write(uint16_t(GAME_MSG_OFFER_MISSION));
|
||||
bitStream.Write(missionID);
|
||||
bitStream.Write(offererID);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
|
||||
{
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity);
|
||||
bitStream.Write(uint16_t(GAME_MSG_OFFER_MISSION));
|
||||
bitStream.Write(missionID);
|
||||
bitStream.Write(offererID);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
}
|
||||
|
||||
void GameMessages::SendNotifyMission(Entity* entity, const SystemAddress& sysAddr, int missionID, int missionState, bool sendingRewards) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(uint16_t(GAME_MSG_NOTIFY_MISSION));
|
||||
@ -534,12 +534,12 @@ void GameMessages::SendNotifyMission(Entity* entity, const SystemAddress& sysAdd
|
||||
bitStream.Write(missionState);
|
||||
bitStream.Write(sendingRewards);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendNotifyMissionTask(Entity* entity, const SystemAddress& sysAddr, int missionID, int taskMask, std::vector<float> updates) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG_NOTIFY_MISSION_TASK);
|
||||
@ -552,12 +552,12 @@ void GameMessages::SendNotifyMissionTask(Entity* entity, const SystemAddress& sy
|
||||
bitStream.Write(updates[i]);
|
||||
}
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendModifyLEGOScore(Entity* entity, const SystemAddress& sysAddr, int64_t score, eLootSourceType sourceType) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG_MODIFY_LEGO_SCORE);
|
||||
@ -566,12 +566,12 @@ void GameMessages::SendModifyLEGOScore(Entity* entity, const SystemAddress& sysA
|
||||
bitStream.Write(sourceType != eLootSourceType::LOOT_SOURCE_NONE);
|
||||
if (sourceType != eLootSourceType::LOOT_SOURCE_NONE) bitStream.Write(sourceType);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendUIMessageServerToSingleClient(Entity* entity, const SystemAddress& sysAddr, const std::string& message, NDGFxValue args) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG_UI_MESSAGE_SERVER_TO_SINGLE_CLIENT);
|
||||
@ -584,7 +584,7 @@ void GameMessages::SendUIMessageServerToSingleClient(Entity* entity, const Syste
|
||||
bitStream.Write(static_cast<char>(message[k]));
|
||||
}
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendUIMessageServerToAllClients(const std::string& message, NDGFxValue args) {
|
||||
@ -607,8 +607,8 @@ void GameMessages::SendUIMessageServerToAllClients(const std::string& message, N
|
||||
}
|
||||
|
||||
void GameMessages::SendPlayEmbeddedEffectOnAllClientsNearObject(Entity* entity, std::u16string effectName, const LWOOBJID& fromObjectID, float radius) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG_PLAY_EMBEDDED_EFFECT_ON_ALL_CLIENTS_NEAR_OBJECT);
|
||||
@ -620,7 +620,7 @@ void GameMessages::SendPlayEmbeddedEffectOnAllClientsNearObject(Entity* entity,
|
||||
bitStream.Write(fromObjectID);
|
||||
bitStream.Write(radius);
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendPlayFXEffect(Entity* entity, int32_t effectID, const std::u16string& effectType, const std::string& name, LWOOBJID secondary, float priority, float scale, bool serialize) {
|
||||
@ -658,12 +658,12 @@ void GameMessages::SendPlayFXEffect(const LWOOBJID& entity, int32_t effectID, co
|
||||
|
||||
bitStream.Write(serialize);
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendStopFXEffect(Entity* entity, bool killImmediate, std::string name) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_STOP_FX_EFFECT);
|
||||
@ -672,12 +672,12 @@ void GameMessages::SendStopFXEffect(Entity* entity, bool killImmediate, std::str
|
||||
bitStream.Write<uint32_t>(name.size());
|
||||
bitStream.Write(name.c_str(), name.size());
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendBroadcastTextToChatbox(Entity* entity, const SystemAddress& sysAddr, const std::u16string& attrs, const std::u16string& wsText) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG::GAME_MSG_BROADCAST_TEXT_TO_CHATBOX);
|
||||
@ -698,12 +698,12 @@ void GameMessages::SendBroadcastTextToChatbox(Entity* entity, const SystemAddres
|
||||
bitStream.Write(static_cast<uint16_t>(wsText[k]));
|
||||
}
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendSetCurrency(Entity* entity, int64_t currency, int lootType, const LWOOBJID& sourceID, const LOT& sourceLOT, int sourceTradeID, bool overrideCurrent, eLootSourceType sourceType) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(uint16_t(GAME_MSG_SET_CURRENCY));
|
||||
@ -728,12 +728,12 @@ void GameMessages::SendSetCurrency(Entity* entity, int64_t currency, int lootTyp
|
||||
if (sourceType != LOOTTYPE_NONE) bitStream.Write(sourceType);
|
||||
|
||||
SystemAddress sysAddr = entity->GetSystemAddress();
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendRebuildNotifyState(Entity* entity, int prevState, int state, const LWOOBJID& playerID) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG_REBUILD_NOTIFY_STATE);
|
||||
@ -742,12 +742,12 @@ void GameMessages::SendRebuildNotifyState(Entity* entity, int prevState, int sta
|
||||
bitStream.Write(state);
|
||||
bitStream.Write(playerID);
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendEnableRebuild(Entity* entity, bool enable, bool fail, bool success, int failReason, float duration, const LWOOBJID& playerID) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG_ENABLE_REBUILD);
|
||||
@ -762,12 +762,12 @@ void GameMessages::SendEnableRebuild(Entity* entity, bool enable, bool fail, boo
|
||||
bitStream.Write(duration);
|
||||
bitStream.Write(playerID);
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendTerminateInteraction(const LWOOBJID& objectID, eTerminateType type, const LWOOBJID& terminator) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write((uint16_t)GAME_MSG_TERMINATE_INTERACTION);
|
||||
@ -775,12 +775,12 @@ void GameMessages::SendTerminateInteraction(const LWOOBJID& objectID, eTerminate
|
||||
bitStream.Write(terminator);
|
||||
bitStream.Write(type);
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendDieNoImplCode(Entity* entity, const LWOOBJID& killerID, const LWOOBJID& lootOwnerID, eKillType killType, std::u16string deathType, float directionRelative_AngleY, float directionRelative_AngleXZ, float directionRelative_Force, bool bClientDeath, bool bSpawnLoot) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(uint16_t(GAME_MSG_DIE));
|
||||
@ -797,7 +797,7 @@ void GameMessages::SendDieNoImplCode(Entity* entity, const LWOOBJID& killerID, c
|
||||
bitStream.Write(killerID);
|
||||
bitStream.Write(lootOwnerID);
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendDie(Entity* entity, const LWOOBJID& killerID, const LWOOBJID& lootOwnerID, bool bDieAccepted, eKillType killType, std::u16string deathType, float directionRelative_AngleY, float directionRelative_AngleXZ, float directionRelative_Force, bool bClientDeath, bool bSpawnLoot, float coinSpawnTime) {
|
||||
@ -838,8 +838,8 @@ void GameMessages::SendDie(Entity* entity, const LWOOBJID& killerID, const LWOOB
|
||||
}
|
||||
|
||||
void GameMessages::SendSetInventorySize(Entity* entity, int invType, int size) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(uint16_t(GAME_MSG_SET_INVENTORY_SIZE));
|
||||
@ -847,12 +847,12 @@ void GameMessages::SendSetInventorySize(Entity* entity, int invType, int size) {
|
||||
bitStream.Write(size);
|
||||
|
||||
SystemAddress sysAddr = entity->GetSystemAddress();
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendSetEmoteLockState(Entity* entity, bool bLock, int emoteID) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(uint16_t(GAME_MSG_SET_EMOTE_LOCK_STATE));
|
||||
@ -860,7 +860,7 @@ void GameMessages::SendSetEmoteLockState(Entity* entity, bool bLock, int emoteID
|
||||
bitStream.Write(emoteID);
|
||||
|
||||
SystemAddress sysAddr = entity->GetSystemAddress();
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendSetJetPackMode(Entity* entity, bool use, bool bypassChecks, bool doHover, int effectID, float airspeed, float maxAirspeed, float verticalVelocity, int warningEffectID) {
|
||||
@ -872,8 +872,8 @@ void GameMessages::SendSetJetPackMode(Entity* entity, bool use, bool bypassCheck
|
||||
}
|
||||
*/
|
||||
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(uint16_t(GAME_MSG_SET_JET_PACK_MODE));
|
||||
@ -897,7 +897,7 @@ void GameMessages::SendSetJetPackMode(Entity* entity, bool use, bool bypassCheck
|
||||
bitStream.Write(warningEffectID != -1);
|
||||
if (warningEffectID != -1) bitStream.Write(warningEffectID);
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendResurrect(Entity* entity) {
|
||||
@ -930,8 +930,8 @@ void GameMessages::SendResurrect(Entity* entity) {
|
||||
}
|
||||
|
||||
void GameMessages::SendStop2DAmbientSound(Entity* entity, bool force, std::string audioGUID, bool result) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG_PLAY2_DAMBIENT_SOUND);
|
||||
@ -949,12 +949,12 @@ void GameMessages::SendStop2DAmbientSound(Entity* entity, bool force, std::strin
|
||||
|
||||
SystemAddress sysAddr = entity->GetSystemAddress();
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendPlay2DAmbientSound(Entity* entity, std::string audioGUID, bool result) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG_PLAY2_DAMBIENT_SOUND);
|
||||
@ -968,12 +968,12 @@ void GameMessages::SendPlay2DAmbientSound(Entity* entity, std::string audioGUID,
|
||||
bitStream.Write(result);
|
||||
|
||||
SystemAddress sysAddr = entity->GetSystemAddress();
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendSetNetworkScriptVar(Entity* entity, const SystemAddress& sysAddr, std::string data) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write((uint16_t)GAME_MSG_SET_NETWORK_SCRIPT_VAR);
|
||||
@ -1177,8 +1177,8 @@ void GameMessages::SendRemoveSkill(Entity* entity, TSkillID skillID) {
|
||||
}
|
||||
|
||||
void GameMessages::SendFinishArrangingWithItem(Entity* entity, const LWOOBJID& buildArea) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bool bFirstTime = true;
|
||||
const LWOOBJID& buildAreaID = buildArea;
|
||||
@ -1215,33 +1215,33 @@ void GameMessages::SendFinishArrangingWithItem(Entity* entity, const LWOOBJID& b
|
||||
bitStream.Write(oldItemTYPE);
|
||||
|
||||
SystemAddress sysAddr = entity->GetSystemAddress();
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendModularBuildEnd(Entity* entity) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_MODULAR_BUILD_END);
|
||||
|
||||
SystemAddress sysAddr = entity->GetSystemAddress();
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendVendorOpenWindow(Entity* entity, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_VENDOR_OPEN_WINDOW);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendVendorStatusUpdate(Entity* entity, const SystemAddress& sysAddr, bool bUpdateOnly) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
VendorComponent* vendor = static_cast<VendorComponent*>(entity->GetComponent(COMPONENT_TYPE_VENDOR));
|
||||
if (!vendor) return;
|
||||
@ -1260,12 +1260,12 @@ void GameMessages::SendVendorStatusUpdate(Entity* entity, const SystemAddress& s
|
||||
}
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendVendorTransactionResult(Entity* entity, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
int iResult = 0x02; // success, seems to be the only relevant one
|
||||
|
||||
@ -1273,12 +1273,12 @@ void GameMessages::SendVendorTransactionResult(Entity* entity, const SystemAddre
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_VENDOR_TRANSACTION_RESULT);
|
||||
bitStream.Write(iResult);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendRemoveItemFromInventory(Entity* entity, const SystemAddress& sysAddr, LWOOBJID objectID, LOT templateID, int inventoryType, uint32_t stackCount, uint32_t stackRemaining) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
// this is used for a lot more than just inventory trashing (trades, vendors, etc.) but for now since it's just used for that, that's all im going to implement
|
||||
bool bConfirmed = true;
|
||||
bool bDeleteItem = true;
|
||||
@ -1320,12 +1320,12 @@ void GameMessages::SendRemoveItemFromInventory(Entity* entity, const SystemAddre
|
||||
bitStream.Write0();
|
||||
bitStream.Write0();
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendConsumeClientItem(Entity* entity, bool bSuccess, LWOOBJID item) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG_CONSUME_CLIENT_ITEM);
|
||||
@ -1333,12 +1333,12 @@ void GameMessages::SendConsumeClientItem(Entity* entity, bool bSuccess, LWOOBJID
|
||||
bitStream.Write(item);
|
||||
|
||||
SystemAddress sysAddr = entity->GetSystemAddress();
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendUseItemResult(Entity* entity, LOT templateID, bool useItemResult) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG_USE_ITEM_RESULT);
|
||||
@ -1346,24 +1346,24 @@ void GameMessages::SendUseItemResult(Entity* entity, LOT templateID, bool useIte
|
||||
bitStream.Write(useItemResult);
|
||||
|
||||
SystemAddress sysAddr = entity->GetSystemAddress();
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendUseItemRequirementsResponse(LWOOBJID objectID, const SystemAddress& sysAddr, UseItemResponse itemResponse) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_USE_ITEM_REQUIREMENTS_RESPONSE);
|
||||
|
||||
bitStream.Write(itemResponse);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendMoveInventoryBatch(Entity* entity, uint32_t stackCount, int srcInv, int dstInv, const LWOOBJID& iObjID) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
InventoryComponent* inv = static_cast<InventoryComponent*>(entity->GetComponent(COMPONENT_TYPE_INVENTORY));
|
||||
if (!inv) return;
|
||||
@ -1408,23 +1408,23 @@ void GameMessages::SendMoveInventoryBatch(Entity* entity, uint32_t stackCount, i
|
||||
|
||||
auto sysAddr = entity->GetSystemAddress();
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendMatchResponse(Entity* entity, const SystemAddress& sysAddr, int response) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_MATCH_RESPONSE);
|
||||
bitStream.Write(response);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendMatchUpdate(Entity* entity, const SystemAddress& sysAddr, std::string data, int type) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_MATCH_UPDATE);
|
||||
@ -1435,15 +1435,15 @@ void GameMessages::SendMatchUpdate(Entity* entity, const SystemAddress& sysAddr,
|
||||
if (data.size() > 0) bitStream.Write(uint16_t(0));
|
||||
bitStream.Write(type);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendRequestActivitySummaryLeaderboardData(const LWOOBJID& objectID, const LWOOBJID& targetID,
|
||||
const SystemAddress& sysAddr, const int32_t& gameID,
|
||||
const int32_t& queryType, const int32_t& resultsEnd,
|
||||
const int32_t& resultsStart, bool weekly) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_REQUEST_ACTIVITY_SUMMARY_LEADERBOARD_DATA);
|
||||
@ -1471,36 +1471,36 @@ void GameMessages::SendRequestActivitySummaryLeaderboardData(const LWOOBJID& obj
|
||||
bitStream.Write<LWOOBJID>(targetID);
|
||||
bitStream.Write(weekly);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendActivityPause(LWOOBJID objectId, bool pause, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectId);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_ACTIVITY_PAUSE);
|
||||
bitStream.Write(pause);
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST;
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendStartActivityTime(LWOOBJID objectId, float_t startTime, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectId);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_START_ACTIVITY_TIME);
|
||||
bitStream.Write<float_t>(startTime);
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST;
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendRequestActivityEnter(LWOOBJID objectId, const SystemAddress& sysAddr, bool bStart, LWOOBJID userID) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectId);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_REQUEST_ACTIVITY_ENTER);
|
||||
@ -1508,12 +1508,12 @@ void GameMessages::SendRequestActivityEnter(LWOOBJID objectId, const SystemAddre
|
||||
bitStream.Write<LWOOBJID>(userID);
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST;
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::NotifyLevelRewards(LWOOBJID objectID, const SystemAddress& sysAddr, int level, bool sending_rewards) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write((uint16_t)GAME_MSG::GAME_MSG_NOTIFY_LEVEL_REWARDS);
|
||||
@ -1521,7 +1521,7 @@ void GameMessages::NotifyLevelRewards(LWOOBJID objectID, const SystemAddress& sy
|
||||
bitStream.Write(level);
|
||||
bitStream.Write(sending_rewards);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendSetShootingGalleryParams(LWOOBJID objectId, const SystemAddress& sysAddr,
|
||||
@ -1533,8 +1533,8 @@ void GameMessages::SendSetShootingGalleryParams(LWOOBJID objectId, const SystemA
|
||||
float projectileVelocity,
|
||||
float timeLimit,
|
||||
bool bUseLeaderboards) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectId);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_SET_SHOOTING_GALLERY_PARAMS);
|
||||
@ -1559,7 +1559,7 @@ void GameMessages::SendSetShootingGalleryParams(LWOOBJID objectId, const SystemA
|
||||
bitStream.Write<float>(timeLimit);
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST;
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
|
||||
@ -1568,8 +1568,8 @@ void GameMessages::SendNotifyClientShootingGalleryScore(LWOOBJID objectId, const
|
||||
int32_t score,
|
||||
LWOOBJID target,
|
||||
NiPoint3 targetPos) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectId);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_NOTIFY_CLIENT_SHOOTING_GALLERY_SCORE);
|
||||
@ -1579,7 +1579,7 @@ void GameMessages::SendNotifyClientShootingGalleryScore(LWOOBJID objectId, const
|
||||
bitStream.Write<NiPoint3>(targetPos);
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST;
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
|
||||
@ -1599,8 +1599,8 @@ void GameMessages::HandleActivitySummaryLeaderboardData(RakNet::BitStream* instr
|
||||
}
|
||||
|
||||
void GameMessages::SendActivitySummaryLeaderboardData(const LWOOBJID& objectID, const Leaderboard* leaderboard, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(objectID);
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_SEND_ACTIVITY_SUMMARY_LEADERBOARD_DATA);
|
||||
@ -1619,7 +1619,7 @@ void GameMessages::SendActivitySummaryLeaderboardData(const LWOOBJID& objectID,
|
||||
bitStream.Write0();
|
||||
bitStream.Write0();
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::HandleRequestActivitySummaryLeaderboardData(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
|
||||
@ -1942,8 +1942,8 @@ void GameMessages::SendOpenPropertyVendor(const LWOOBJID objectId, const SystemA
|
||||
}
|
||||
|
||||
void GameMessages::SendOpenPropertyManagment(const LWOOBJID objectId, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(PropertyManagementComponent::Instance()->GetParent()->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_OPEN_PROPERTY_MANAGEMENT);
|
||||
@ -2364,8 +2364,8 @@ void GameMessages::HandleBBBLoadItemRequest(RakNet::BitStream* inStream, Entity*
|
||||
}
|
||||
|
||||
void GameMessages::SendSmash(Entity* entity, float force, float ghostOpacity, LWOOBJID killerID, bool ignoreObjectVisibility) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_SMASH);
|
||||
@ -2375,12 +2375,12 @@ void GameMessages::SendSmash(Entity* entity, float force, float ghostOpacity, LW
|
||||
bitStream.Write(ghostOpacity);
|
||||
bitStream.Write(killerID);
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendUnSmash(Entity* entity, LWOOBJID builderID, float duration) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(GAME_MSG::GAME_MSG_UNSMASH);
|
||||
@ -2391,7 +2391,7 @@ void GameMessages::SendUnSmash(Entity* entity, LWOOBJID builderID, float duratio
|
||||
bitStream.Write(duration != 3.0f);
|
||||
if (duration != 3.0f) bitStream.Write(duration);
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::HandleControlBehaviors(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
|
||||
@ -5723,8 +5723,8 @@ void GameMessages::HandleGetHotPropertyData(RakNet::BitStream* inStream, Entity*
|
||||
}
|
||||
|
||||
void GameMessages::SendGetHotPropertyData(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
|
||||
CBITSTREAM
|
||||
CMSGHEADER
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
/**
|
||||
* [u32] - Number of properties
|
||||
* [objid] - property id
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "dServer.h"
|
||||
|
||||
void ChatPackets::SendChatMessage(const SystemAddress& sysAddr, char chatChannel, const std::string& senderName, LWOOBJID playerObjectID, bool senderMythran, const std::u16string& message) {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
PacketUtils::WriteHeader(bitStream, CHAT, MSG_CHAT_GENERAL_CHAT_MESSAGE);
|
||||
|
||||
bitStream.Write(static_cast<uint64_t>(0));
|
||||
@ -30,11 +30,11 @@ void ChatPackets::SendChatMessage(const SystemAddress& sysAddr, char chatChannel
|
||||
}
|
||||
bitStream.Write(static_cast<uint16_t>(0));
|
||||
|
||||
SEND_PACKET_BROADCAST
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void ChatPackets::SendSystemMessage(const SystemAddress& sysAddr, const std::u16string& message, const bool broadcast) {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
PacketUtils::WriteHeader(bitStream, CHAT, MSG_CHAT_GENERAL_CHAT_MESSAGE);
|
||||
|
||||
bitStream.Write(static_cast<uint64_t>(0));
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <string>
|
||||
|
||||
void MasterPackets::SendPersistentIDRequest(dServer* server, uint64_t requestID) {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
PacketUtils::WriteHeader(bitStream, MASTER, MSG_MASTER_REQUEST_PERSISTENT_ID);
|
||||
bitStream.Write(requestID);
|
||||
server->SendToMaster(&bitStream);
|
||||
|
@ -34,7 +34,7 @@ void WorldPackets::SendLoadStaticZone(const SystemAddress& sysAddr, float x, flo
|
||||
|
||||
bitStream.Write(static_cast<uint32_t>(0)); // Change this to eventually use 4 on activity worlds
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void WorldPackets::SendCharacterList(const SystemAddress& sysAddr, User* user) {
|
||||
@ -85,28 +85,28 @@ void WorldPackets::SendCharacterList(const SystemAddress& sysAddr, User* user) {
|
||||
}
|
||||
}
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void WorldPackets::SendCharacterCreationResponse(const SystemAddress& sysAddr, eCreationResponse response) {
|
||||
RakNet::BitStream bitStream;
|
||||
PacketUtils::WriteHeader(bitStream, CLIENT, MSG_CLIENT_CHARACTER_CREATE_RESPONSE);
|
||||
bitStream.Write(response);
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void WorldPackets::SendCharacterRenameResponse(const SystemAddress& sysAddr, eRenameResponse response) {
|
||||
RakNet::BitStream bitStream;
|
||||
PacketUtils::WriteHeader(bitStream, CLIENT, MSG_CLIENT_CHARACTER_RENAME_RESPONSE);
|
||||
bitStream.Write(response);
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void WorldPackets::SendCharacterDeleteResponse(const SystemAddress& sysAddr, bool response) {
|
||||
RakNet::BitStream bitStream;
|
||||
PacketUtils::WriteHeader(bitStream, CLIENT, MSG_CLIENT_DELETE_CHARACTER_RESPONSE);
|
||||
bitStream.Write(static_cast<uint8_t>(response));
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void WorldPackets::SendTransferToWorld(const SystemAddress& sysAddr, const std::string& serverIP, uint32_t serverPort, bool mythranShift) {
|
||||
@ -117,14 +117,14 @@ void WorldPackets::SendTransferToWorld(const SystemAddress& sysAddr, const std::
|
||||
bitStream.Write(static_cast<uint16_t>(serverPort));
|
||||
bitStream.Write(static_cast<uint8_t>(mythranShift));
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void WorldPackets::SendServerState(const SystemAddress& sysAddr) {
|
||||
RakNet::BitStream bitStream;
|
||||
PacketUtils::WriteHeader(bitStream, CLIENT, MSG_CLIENT_SERVER_STATES);
|
||||
bitStream.Write(static_cast<uint8_t>(1)); //If the server is receiving this request, it probably is ready anyway.
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void WorldPackets::SendCreateCharacter(const SystemAddress& sysAddr, Entity* entity, const std::string& xmlData, const std::u16string& username, int32_t gm) {
|
||||
@ -184,12 +184,12 @@ void WorldPackets::SendCreateCharacter(const SystemAddress& sysAddr, Entity* ent
|
||||
#endif
|
||||
|
||||
PacketUtils::SavePacket("chardata.bin", (const char*)bitStream.GetData(), static_cast<uint32_t>(bitStream.GetNumberOfBytesUsed()));
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
Game::logger->Log("WorldPackets", "Sent CreateCharacter for ID: %llu", entity->GetObjectID());
|
||||
}
|
||||
|
||||
void WorldPackets::SendChatModerationResponse(const SystemAddress& sysAddr, bool requestAccepted, uint32_t requestID, const std::string& receiver, std::vector<std::pair<uint8_t, uint8_t>> unacceptedItems) {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
PacketUtils::WriteHeader(bitStream, CLIENT, MSG_CLIENT_CHAT_MODERATION_STRING);
|
||||
|
||||
bitStream.Write<uint8_t>(unacceptedItems.empty()); // Is sentence ok?
|
||||
@ -209,11 +209,11 @@ void WorldPackets::SendChatModerationResponse(const SystemAddress& sysAddr, bool
|
||||
bitStream.Write<uint16_t>(0);
|
||||
}
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void WorldPackets::SendGMLevelChange(const SystemAddress& sysAddr, bool success, uint8_t highestLevel, uint8_t prevLevel, uint8_t newLevel) {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
PacketUtils::WriteHeader(bitStream, CLIENT, MSG_CLIENT_MAKE_GM_RESPONSE);
|
||||
|
||||
bitStream.Write<uint8_t>(success);
|
||||
@ -221,5 +221,5 @@ void WorldPackets::SendGMLevelChange(const SystemAddress& sysAddr, bool success,
|
||||
bitStream.Write<uint16_t>(prevLevel);
|
||||
bitStream.Write<uint16_t>(newLevel);
|
||||
|
||||
SEND_PACKET
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
@ -772,7 +772,7 @@ void HandlePacket(Packet* packet) {
|
||||
|
||||
Game::logger->Log("MasterServer", "Got affirmation request of transfer %llu", requestID);
|
||||
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
|
||||
PacketUtils::WriteHeader(bitStream, MASTER, MSG_MASTER_AFFIRM_TRANSFER_RESPONSE);
|
||||
bitStream.Write(requestID);
|
||||
|
@ -14,7 +14,7 @@ std::unique_ptr<AMFValue> ReadFromBitStream(RakNet::BitStream* bitStream) {
|
||||
}
|
||||
|
||||
int ReadAMFUndefinedFromBitStream() {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
bitStream.Write<uint8_t>(0x00);
|
||||
std::unique_ptr<AMFValue> res(ReadFromBitStream(&bitStream));
|
||||
ASSERT_EQ(res->GetValueType(), AMFValueType::AMFUndefined);
|
||||
@ -22,7 +22,7 @@ int ReadAMFUndefinedFromBitStream() {
|
||||
}
|
||||
|
||||
int ReadAMFNullFromBitStream() {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
bitStream.Write<uint8_t>(0x01);
|
||||
std::unique_ptr<AMFValue> res(ReadFromBitStream(&bitStream));
|
||||
ASSERT_EQ(res->GetValueType(), AMFValueType::AMFNull);
|
||||
@ -30,7 +30,7 @@ int ReadAMFNullFromBitStream() {
|
||||
}
|
||||
|
||||
int ReadAMFFalseFromBitStream() {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
bitStream.Write<uint8_t>(0x02);
|
||||
std::unique_ptr<AMFValue> res(ReadFromBitStream(&bitStream));
|
||||
ASSERT_EQ(res->GetValueType(), AMFValueType::AMFFalse);
|
||||
@ -38,7 +38,7 @@ int ReadAMFFalseFromBitStream() {
|
||||
}
|
||||
|
||||
int ReadAMFTrueFromBitStream() {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
bitStream.Write<uint8_t>(0x03);
|
||||
std::unique_ptr<AMFValue> res(ReadFromBitStream(&bitStream));
|
||||
ASSERT_EQ(res->GetValueType(), AMFValueType::AMFTrue);
|
||||
@ -46,7 +46,7 @@ int ReadAMFTrueFromBitStream() {
|
||||
}
|
||||
|
||||
int ReadAMFIntegerFromBitStream() {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
{
|
||||
bitStream.Write<uint8_t>(0x04);
|
||||
// 127 == 01111111
|
||||
@ -95,7 +95,7 @@ int ReadAMFIntegerFromBitStream() {
|
||||
}
|
||||
|
||||
int ReadAMFDoubleFromBitStream() {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
bitStream.Write<uint8_t>(0x05);
|
||||
bitStream.Write<double>(25346.4f);
|
||||
std::unique_ptr<AMFValue> res(ReadFromBitStream(&bitStream));
|
||||
@ -105,7 +105,7 @@ int ReadAMFDoubleFromBitStream() {
|
||||
}
|
||||
|
||||
int ReadAMFStringFromBitStream() {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
bitStream.Write<uint8_t>(0x06);
|
||||
bitStream.Write<uint8_t>(0x0F);
|
||||
std::string toWrite = "stateID";
|
||||
@ -117,7 +117,7 @@ int ReadAMFStringFromBitStream() {
|
||||
}
|
||||
|
||||
int ReadAMFArrayFromBitStream() {
|
||||
CBITSTREAM
|
||||
CBITSTREAM;
|
||||
// Test empty AMFArray
|
||||
bitStream.Write<uint8_t>(0x09);
|
||||
bitStream.Write<uint8_t>(0x01);
|
||||
|
Loading…
x
Reference in New Issue
Block a user