[General] In ID_GAME_ATTRIBUTE & ID_GAME_SKILL, rename GAME into PLAYER

pull/163/head
David Cernat 8 years ago
parent 9130c1f302
commit 6328ffb9aa

@ -184,7 +184,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
break;
}
case ID_GAME_ATTRIBUTE:
case ID_PLAYER_ATTRIBUTE:
{
if (!player->creatureStats.mDead)
@ -197,7 +197,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
break;
}
case ID_GAME_SKILL:
case ID_PLAYER_SKILL:
{
if (!player->creatureStats.mDead)
@ -714,8 +714,8 @@ void Networking::newPlayer(RakNet::RakNetGUID guid)
{
playerController->GetPacket(ID_GAME_BASE_INFO)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_DYNAMICSTATS)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_ATTRIBUTE)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_SKILL)->Send(pl->second, guid);
playerController->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(pl->second, guid);
playerController->GetPacket(ID_PLAYER_SKILL)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_POS)->Send(pl->second, guid);
playerController->GetPacket(ID_PLAYER_CELL_CHANGE)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid);

@ -485,8 +485,8 @@ void StatsFunctions::SendAttributes(unsigned short pid) noexcept
Player *player;
GET_PLAYER(pid, player,);
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_ATTRIBUTE)->Send(player, false);
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_ATTRIBUTE)->Send(player, true);
mwmp::Networking::get().getPlayerController()->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(player, false);
mwmp::Networking::get().getPlayerController()->GetPacket(ID_PLAYER_ATTRIBUTE)->Send(player, true);
}
void StatsFunctions::SendSkills(unsigned short pid) noexcept
@ -494,8 +494,8 @@ void StatsFunctions::SendSkills(unsigned short pid) noexcept
Player *player;
GET_PLAYER(pid, player,);
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_SKILL)->Send(player, false);
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_SKILL)->Send(player, true);
mwmp::Networking::get().getPlayerController()->GetPacket(ID_PLAYER_SKILL)->Send(player, false);
mwmp::Networking::get().getPlayerController()->GetPacket(ID_PLAYER_SKILL)->Send(player, true);
}
void StatsFunctions::SendLevel(unsigned short pid) noexcept

@ -205,7 +205,7 @@ void LocalPlayer::updateAttributes(bool forceUpdate)
if (attributesChanged || forceUpdate)
{
getNetworking()->getPlayerPacket(ID_GAME_ATTRIBUTE)->Send(this);
getNetworking()->getPlayerPacket(ID_PLAYER_ATTRIBUTE)->Send(this);
}
}
@ -244,7 +244,7 @@ void LocalPlayer::updateSkills(bool forceUpdate)
if (skillsChanged || forceUpdate)
{
npcStats.mLevelProgress = ptrNpcStats.getLevelProgress();
getNetworking()->getPlayerPacket(ID_GAME_SKILL)->Send(this);
getNetworking()->getPlayerPacket(ID_PLAYER_SKILL)->Send(this);
}
}

@ -574,7 +574,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
}
break;
}
case ID_GAME_ATTRIBUTE:
case ID_PLAYER_ATTRIBUTE:
{
if (guid == myGuid)
{
@ -604,7 +604,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
}
break;
}
case ID_GAME_SKILL:
case ID_PLAYER_SKILL:
{
if (guid == myGuid)
{

@ -154,8 +154,8 @@ add_component_dir (openmw-mp
Packets/Player/PacketBaseInfo Packets/Player/PacketPosition Packets/Player/PacketEquipment
Packets/Player/PacketAttack Packets/Player/PacketDynamicStats Packets/Player/PacketDrawState
Packets/Player/PacketChatMessage Packets/Player/PacketCharGen Packets/Player/PacketAttribute
Packets/Player/PacketSkill Packets/Player/PacketLevel Packets/Player/PacketHandshake
Packets/Player/PacketChatMessage Packets/Player/PacketCharGen Packets/Player/PacketPlayerAttribute
Packets/Player/PacketPlayerSkill Packets/Player/PacketLevel Packets/Player/PacketHandshake
Packets/Player/PacketGUIBoxes Packets/Player/PacketClass Packets/Player/PacketTime
Packets/Player/PacketInventory Packets/Player/PacketSpellbook Packets/Player/PacketJournal
Packets/Player/PacketActiveSkills Packets/Player/PacketPlayerCellChange

@ -17,8 +17,8 @@
#include "../Packets/Player/PacketDrawState.hpp"
#include "../Packets/Player/PacketChatMessage.hpp"
#include "../Packets/Player/PacketCharGen.hpp"
#include "../Packets/Player/PacketAttribute.hpp"
#include "../Packets/Player/PacketSkill.hpp"
#include "../Packets/Player/PacketPlayerAttribute.hpp"
#include "../Packets/Player/PacketPlayerSkill.hpp"
#include "../Packets/Player/PacketLevel.hpp"
#include "../Packets/Player/PacketHandshake.hpp"
#include "../Packets/Player/PacketGUIBoxes.hpp"
@ -60,8 +60,8 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p
AddPacket<PacketChatMessage>(&packets, peer);
AddPacket<PacketCharGen>(&packets, peer);
AddPacket<PacketAttribute>(&packets, peer);
AddPacket<PacketSkill>(&packets, peer);
AddPacket<PacketPlayerAttribute>(&packets, peer);
AddPacket<PacketPlayerSkill>(&packets, peer);
AddPacket<PacketLevel>(&packets, peer);
AddPacket<PacketHandshake>(&packets, peer);

@ -23,8 +23,8 @@ enum GameMessages
ID_CHAT_MESSAGE,
ID_GAME_DRAWSTATE,
ID_GAME_ATTRIBUTE,
ID_GAME_SKILL,
ID_PLAYER_ATTRIBUTE,
ID_PLAYER_SKILL,
ID_GAME_LEVEL,
ID_GAME_CHARCLASS,
ID_HANDSHAKE,

@ -2,17 +2,17 @@
// Created by koncord on 08.03.16.
//
#include "PacketAttribute.hpp"
#include "PacketPlayerAttribute.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
using namespace mwmp;
PacketAttribute::PacketAttribute(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
PacketPlayerAttribute::PacketPlayerAttribute(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_GAME_ATTRIBUTE;
packetID = ID_PLAYER_ATTRIBUTE;
}
void PacketAttribute::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
void PacketPlayerAttribute::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
{
PlayerPacket::Packet(bs, player, send);

@ -2,21 +2,21 @@
// Created by koncord on 08.03.16.
//
#ifndef OPENMW_PACKETATTRIBUTE_HPP
#define OPENMW_PACKETATTRIBUTE_HPP
#ifndef OPENMW_PACKETPLAYERATTRIBUTE_HPP
#define OPENMW_PACKETPLAYERATTRIBUTE_HPP
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
namespace mwmp
{
class PacketAttribute : public PlayerPacket
class PacketPlayerAttribute : public PlayerPacket
{
public:
const static int AttributeCount = 8;
PacketAttribute(RakNet::RakPeerInterface *peer);
PacketPlayerAttribute(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
};
}
#endif //OPENMW_PACKETATTRIBUTE_HPP
#endif //OPENMW_PACKETPLAYERATTRIBUTE_HPP

@ -2,19 +2,19 @@
// Created by koncord on 17.03.16.
//
#include "PacketSkill.hpp"
#include "PacketPlayerSkill.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/esm/creaturestats.hpp>
using namespace mwmp;
PacketSkill::PacketSkill(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
PacketPlayerSkill::PacketPlayerSkill(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_GAME_SKILL;
packetID = ID_PLAYER_SKILL;
}
void PacketSkill::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
void PacketPlayerSkill::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
{
PlayerPacket::Packet(bs, player, send);

@ -2,20 +2,20 @@
// Created by koncord on 17.03.16.
//
#ifndef OPENMW_PACKETSKILL_HPP
#define OPENMW_PACKETSKILL_HPP
#ifndef OPENMW_PACKETPLAYERSKILL_HPP
#define OPENMW_PACKETPLAYERSKILL_HPP
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
namespace mwmp
{
class PacketSkill : public PlayerPacket
class PacketPlayerSkill : public PlayerPacket
{
public:
const static int SkillCount = 27;
const static int AttributeCount = 8;
PacketSkill(RakNet::RakPeerInterface *peer);
PacketPlayerSkill(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
};
@ -23,4 +23,4 @@ namespace mwmp
#endif //OPENMW_PACKETSKILL_HPP
#endif //OPENMW_PACKETPLAYERSKILL_HPP
Loading…
Cancel
Save