Removed the statistics structure from common/* and server/*
This commit is contained in:
@@ -21,10 +21,6 @@
|
||||
*/
|
||||
#include "character_data.hpp"
|
||||
|
||||
Statistics* CharacterData::GetBaseStats() {
|
||||
return &baseStats;
|
||||
}
|
||||
|
||||
int CharacterData::GetOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
//components
|
||||
#include "character_defines.hpp"
|
||||
#include "entity.hpp"
|
||||
#include "statistics.hpp"
|
||||
|
||||
//std namespace
|
||||
#include <string>
|
||||
@@ -37,7 +36,7 @@ public:
|
||||
~CharacterData() = default;
|
||||
|
||||
//accessors and mutators
|
||||
Statistics* GetBaseStats();
|
||||
//...
|
||||
|
||||
//database stuff
|
||||
int GetOwner();
|
||||
@@ -47,8 +46,6 @@ public:
|
||||
private:
|
||||
friend class CharacterManager;
|
||||
|
||||
Statistics baseStats;
|
||||
|
||||
int owner;
|
||||
std::string handle;
|
||||
std::string avatar;
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
*/
|
||||
#include "monster_data.hpp"
|
||||
|
||||
Statistics* MonsterData::GetBaseStats() {
|
||||
return &baseStats;
|
||||
}
|
||||
|
||||
std::string MonsterData::SetAvatar(std::string s) {
|
||||
return avatar = s;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#define MONSTERDATA_HPP_
|
||||
|
||||
#include "entity.hpp"
|
||||
#include "statistics.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -32,8 +31,6 @@ public:
|
||||
MonsterData() = default;
|
||||
~MonsterData() = default;
|
||||
|
||||
Statistics* GetBaseStats();
|
||||
|
||||
std::string SetAvatar(std::string);
|
||||
int SetScriptReference(int);
|
||||
|
||||
@@ -43,7 +40,6 @@ public:
|
||||
private:
|
||||
friend class MonsterManager;
|
||||
|
||||
Statistics baseStats;
|
||||
std::string avatar;
|
||||
int scriptRef;
|
||||
};
|
||||
|
||||
@@ -240,8 +240,6 @@ void ServerApplication::HandleCharacterUpdate(CharacterPacket* const argPacket)
|
||||
character->SetOrigin(argPacket->origin);
|
||||
character->SetMotion(argPacket->motion);
|
||||
|
||||
*character->GetBaseStats() = argPacket->stats;
|
||||
|
||||
//TODO: gameplay components: equipment, items, buffs, debuffs
|
||||
|
||||
PumpPacket(argPacket);
|
||||
@@ -353,5 +351,4 @@ void ServerApplication::CopyCharacterToPacket(CharacterPacket* const packet, int
|
||||
packet->roomIndex = character->GetRoomIndex();
|
||||
packet->origin = character->GetOrigin();
|
||||
packet->motion = character->GetMotion();
|
||||
packet->stats = *character->GetBaseStats();
|
||||
}
|
||||
Reference in New Issue
Block a user