1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 15:15:31 +00:00

Rename ID_GAME_UPDATE_EQUIPED into ID_GAME_EQUIPMENT

This commit is contained in:
David Cernat 2016-09-28 11:36:29 +03:00
parent 0479eb38cc
commit 26487598a6
10 changed files with 19 additions and 19 deletions

View file

@ -226,9 +226,9 @@ void Networking::Update(RakNet::Packet *packet)
break; 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->Read(player);
myPacket->Send(player, true); 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_DYNAMICSTATS_CURRENT)->RequestData(guid);
controller->GetPacket(ID_GAME_UPDATE_POS)->RequestData(guid); controller->GetPacket(ID_GAME_UPDATE_POS)->RequestData(guid);
controller->GetPacket(ID_GAME_CELL)->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 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_SKILL)->Send(pl->second, guid);
controller->GetPacket(ID_GAME_UPDATE_POS)->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_CELL)->Send(pl->second, guid);
controller->GetPacket(ID_GAME_UPDATE_EQUIPED)->Send(pl->second, guid); controller->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid);
} }
} }

View file

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

View file

@ -267,7 +267,7 @@ void LocalPlayer::updateInventory(bool forceUpdate)
{ {
RakNet::BitStream bs; RakNet::BitStream bs;
bs.ResetWritePointer(); 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); GetNetworking()->SendData(&bs);
invChanged = false; invChanged = false;
} }

View file

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

View file

@ -12,7 +12,7 @@
#include <components/openmw-mp/NetworkMessages.hpp> #include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Packets/PacketPosition.hpp> #include <components/openmw-mp/Packets/PacketPosition.hpp>
#include <components/openmw-mp/Packets/PacketBaseInfo.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/PacketAttack.hpp>
#include <components/openmw-mp/Packets/PacketDynamicStatsBase.hpp> #include <components/openmw-mp/Packets/PacketDynamicStatsBase.hpp>
#include <components/openmw-mp/Packets/PacketDynamicStatsCurrent.hpp> #include <components/openmw-mp/Packets/PacketDynamicStatsCurrent.hpp>

View file

@ -148,7 +148,7 @@ add_component_dir (version
add_component_dir (openmw-mp add_component_dir (openmw-mp
Log Log
PacketsController 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/PacketDynamicStatsBase Packets/PacketDynamicStatsCurrent Packets/PacketCell Packets/PacketDrawState
Packets/PacketChatMessage Packets/PacketCharGen Packets/PacketAttribute Packets/PacketSkill Packets/PacketLevel Packets/PacketChatMessage Packets/PacketCharGen Packets/PacketAttribute Packets/PacketSkill Packets/PacketLevel
Packets/PacketHandshake Packets/PacketGUIBoxes Packets/PacketClass Packets/PacketTime) Packets/PacketHandshake Packets/PacketGUIBoxes Packets/PacketClass Packets/PacketTime)

View file

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

View file

@ -2,17 +2,17 @@
// Created by koncord on 07.01.16. // Created by koncord on 07.01.16.
// //
#include "PacketEquiped.hpp" #include "PacketEquipment.hpp"
#include <components/openmw-mp/NetworkMessages.hpp> #include <components/openmw-mp/NetworkMessages.hpp>
using namespace mwmp; 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); BasePacket::Packet(bs, player, send);

View file

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

View file

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