From 970e9aff2f20a25f936f372d63f8be66120ecc03 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Fri, 2 Sep 2016 03:45:43 +0300 Subject: [PATCH] Remove old class methods and don't include class in ID_GAME_BASE_INFO --- apps/openmw-mp/Script/Functions/Stats.cpp | 24 ------------------- apps/openmw-mp/Script/Functions/Stats.hpp | 3 --- .../openmw-mp/Packets/PacketBaseInfo.cpp | 1 - 3 files changed, 28 deletions(-) diff --git a/apps/openmw-mp/Script/Functions/Stats.cpp b/apps/openmw-mp/Script/Functions/Stats.cpp index 43452f6ae..7323e833e 100644 --- a/apps/openmw-mp/Script/Functions/Stats.cpp +++ b/apps/openmw-mp/Script/Functions/Stats.cpp @@ -80,30 +80,6 @@ const char *StatsFunctions::GetRace(unsigned short pid) noexcept return player->Npc()->mRace.c_str(); } -void StatsFunctions::SetClass(unsigned short pid, const char *className) noexcept -{ - Player *player; - GET_PLAYER(pid, player, ); - - if (player->Npc()->mClass == className) - return; - - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Setting class for %s: %s -> %s", - player->Npc()->mName.c_str(), - player->Npc()->mClass.c_str(), - className); - - player->Npc()->mClass = className; -} - -const char *StatsFunctions::GetClass(unsigned short pid) noexcept -{ - Player *player; - GET_PLAYER(pid, player, 0); - - return player->Npc()->mClass.c_str(); -} - void StatsFunctions::SetHead(unsigned short pid, const char *race) noexcept { Player *player; diff --git a/apps/openmw-mp/Script/Functions/Stats.hpp b/apps/openmw-mp/Script/Functions/Stats.hpp index 0e18af0ed..1ee21be4a 100644 --- a/apps/openmw-mp/Script/Functions/Stats.hpp +++ b/apps/openmw-mp/Script/Functions/Stats.hpp @@ -12,9 +12,6 @@ {"GetRace", StatsFunctions::GetRace},\ {"SetRace", StatsFunctions::SetRace},\ \ - {"SetClass", StatsFunctions::SetClass},\ - {"GetClass", StatsFunctions::GetClass},\ - \ {"GetHead", StatsFunctions::GetHead},\ {"SetHead", StatsFunctions::SetHead},\ \ diff --git a/components/openmw-mp/Packets/PacketBaseInfo.cpp b/components/openmw-mp/Packets/PacketBaseInfo.cpp index 4d3cba59c..bdae0b2f3 100644 --- a/components/openmw-mp/Packets/PacketBaseInfo.cpp +++ b/components/openmw-mp/Packets/PacketBaseInfo.cpp @@ -19,7 +19,6 @@ void PacketBaseInfo::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send RW(player->Npc()->mName, send); RW(player->Npc()->mModel, send); RW(player->Npc()->mRace, send); - RW(player->Npc()->mClass, send); RW(player->Npc()->mHair, send); RW(player->Npc()->mHead, send);