Rename ID_GAME_UPDATE_EQUIPED into ID_GAME_EQUIPMENT

coverity_scan^2
David Cernat 8 years ago
parent 0479eb38cc
commit 26487598a6

@ -226,9 +226,9 @@ void Networking::Update(RakNet::Packet *packet)
break;
}
case ID_GAME_UPDATE_EQUIPED:
case ID_GAME_EQUIPMENT:
{
DEBUG_PRINTF("ID_GAME_UPDATE_EQUIPED\n");
DEBUG_PRINTF("ID_GAME_EQUIPMENT\n");
myPacket->Read(player);
myPacket->Send(player, true);
@ -365,7 +365,7 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid)
controller->GetPacket(ID_GAME_DYNAMICSTATS_CURRENT)->RequestData(guid);
controller->GetPacket(ID_GAME_UPDATE_POS)->RequestData(guid);
controller->GetPacket(ID_GAME_CELL)->RequestData(guid);
controller->GetPacket(ID_GAME_UPDATE_EQUIPED)->RequestData(guid);
controller->GetPacket(ID_GAME_EQUIPMENT)->RequestData(guid);
for (TPlayers::iterator pl = players->begin(); pl != players->end(); pl++) //sending other players to new player
{
@ -377,7 +377,7 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid)
controller->GetPacket(ID_GAME_SKILL)->Send(pl->second, guid);
controller->GetPacket(ID_GAME_UPDATE_POS)->Send(pl->second, guid);
controller->GetPacket(ID_GAME_CELL)->Send(pl->second, guid);
controller->GetPacket(ID_GAME_UPDATE_EQUIPED)->Send(pl->second, guid);
controller->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid);
}
}

@ -29,8 +29,8 @@ void ItemFunctions::EquipItem(unsigned short pid, unsigned short slot, const cha
player->EquipedItem(slot)->refid = itemName;
player->EquipedItem(slot)->count = count;
mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_UPDATE_EQUIPED)->Send(player, false);
mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_UPDATE_EQUIPED)->Send(player, true);
mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_EQUIPMENT)->Send(player, false);
mwmp::Networking::Get().GetController()->GetPacket(ID_GAME_EQUIPMENT)->Send(player, true);
}
void ItemFunctions::UnequipItem(unsigned short pid, unsigned short slot) noexcept

@ -267,7 +267,7 @@ void LocalPlayer::updateInventory(bool forceUpdate)
{
RakNet::BitStream bs;
bs.ResetWritePointer();
GetNetworking()->GetPacket((RakNet::MessageID) ID_GAME_UPDATE_EQUIPED)->Packet(&bs, this, true);
GetNetworking()->GetPacket((RakNet::MessageID) ID_GAME_EQUIPMENT)->Packet(&bs, this, true);
GetNetworking()->SendData(&bs);
invChanged = false;
}

@ -255,7 +255,7 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
Players::DisconnectPlayer(id);
}
case ID_GAME_UPDATE_EQUIPED:
case ID_GAME_EQUIPMENT:
{
if (id == myid)
{

@ -12,7 +12,7 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Packets/PacketPosition.hpp>
#include <components/openmw-mp/Packets/PacketBaseInfo.hpp>
#include <components/openmw-mp/Packets/PacketEquiped.hpp>
#include <components/openmw-mp/Packets/PacketEquipment.hpp>
#include <components/openmw-mp/Packets/PacketAttack.hpp>
#include <components/openmw-mp/Packets/PacketDynamicStatsBase.hpp>
#include <components/openmw-mp/Packets/PacketDynamicStatsCurrent.hpp>

@ -148,7 +148,7 @@ add_component_dir (version
add_component_dir (openmw-mp
Log
PacketsController
Packets/BasePacket Packets/PacketBaseInfo Packets/PacketPosition Packets/PacketEquiped Packets/PacketAttack
Packets/BasePacket Packets/PacketBaseInfo Packets/PacketPosition Packets/PacketEquipment Packets/PacketAttack
Packets/PacketDynamicStatsBase Packets/PacketDynamicStatsCurrent Packets/PacketCell Packets/PacketDrawState
Packets/PacketChatMessage Packets/PacketCharGen Packets/PacketAttribute Packets/PacketSkill Packets/PacketLevel
Packets/PacketHandshake Packets/PacketGUIBoxes Packets/PacketClass Packets/PacketTime)

@ -16,7 +16,7 @@ enum GameMessages
ID_GAME_DYNAMICSTATS_CURRENT,
ID_GAME_ATTACK,
ID_USER_MYID,
ID_GAME_UPDATE_EQUIPED,
ID_GAME_EQUIPMENT,
ID_USER_DISCONNECTED,
ID_GAME_CREATE_PROJECTILE,
ID_GAME_CAST,

@ -2,17 +2,17 @@
// Created by koncord on 07.01.16.
//
#include "PacketEquiped.hpp"
#include "PacketEquipment.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
using namespace mwmp;
PacketEquiped::PacketEquiped(RakNet::RakPeerInterface *peer) : BasePacket(peer)
PacketEquipment::PacketEquipment(RakNet::RakPeerInterface *peer) : BasePacket(peer)
{
packetID = ID_GAME_UPDATE_EQUIPED;
packetID = ID_GAME_EQUIPMENT;
}
void PacketEquiped::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
void PacketEquipment::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
{
BasePacket::Packet(bs, player, send);

@ -9,10 +9,10 @@
namespace mwmp
{
class PacketEquiped : public BasePacket
class PacketEquipment : public BasePacket
{
public:
PacketEquiped(RakNet::RakPeerInterface *peer);
PacketEquipment(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
};

@ -9,7 +9,7 @@
#include "Packets/PacketClass.hpp"
#include "Packets/PacketPosition.hpp"
#include "Packets/PacketBaseInfo.hpp"
#include "components/openmw-mp/Packets/PacketEquiped.hpp"
#include "components/openmw-mp/Packets/PacketEquipment.hpp"
#include "Packets/PacketAttack.hpp"
#include "Packets/PacketDynamicStatsBase.hpp"
#include "Packets/PacketDynamicStatsCurrent.hpp"
@ -44,7 +44,7 @@ mwmp::PacketsController::PacketsController(RakNet::RakPeerInterface *peer)
AddPacket<PacketPosition>(&packets, peer);
AddPacket<PacketCell>(&packets, peer);
AddPacket<PacketBaseInfo>(&packets, peer);
AddPacket<PacketEquiped>(&packets, peer);
AddPacket<PacketEquipment>(&packets, peer);
AddPacket<PacketAttack>(&packets, peer);
AddPacket<PacketDynamicStatsBase>(&packets, peer);

Loading…
Cancel
Save