Revert "Use lowerCamelCase in tes3mp server script function names, part 1"

This reverts commit 0e2b589cdb.
This commit is contained in:
David Cernat 2016-11-16 19:28:22 +02:00
parent ad43cb5473
commit 46b41b605a
10 changed files with 309 additions and 309 deletions

View file

@ -10,7 +10,7 @@
using namespace std; using namespace std;
using namespace ESM; using namespace ESM;
void CharClassFunctions::sendClass(unsigned short pid) noexcept void CharClassFunctions::SendClass(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -18,26 +18,26 @@ void CharClassFunctions::sendClass(unsigned short pid) noexcept
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_CHARCLASS)->Send(player, false); mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_CHARCLASS)->Send(player, false);
} }
void CharClassFunctions::setDefaultClass(unsigned short pid, const char *id) noexcept void CharClassFunctions::SetDefaultClass(unsigned short pid, const char *id) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
player->charClass.mId = id; player->charClass.mId = id;
} }
void CharClassFunctions::setClassName(unsigned short pid, const char *name) noexcept void CharClassFunctions::SetClassName(unsigned short pid, const char *name) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
player->charClass.mName = name; player->charClass.mName = name;
player->charClass.mId = ""; player->charClass.mId = "";
} }
void CharClassFunctions::setClassDesc(unsigned short pid, const char *desc) noexcept void CharClassFunctions::SetClassDesc(unsigned short pid, const char *desc) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
player->charClass.mDescription = desc; player->charClass.mDescription = desc;
} }
void CharClassFunctions::setClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId) noexcept void CharClassFunctions::SetClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -48,13 +48,13 @@ void CharClassFunctions::setClassMajorAttribute(unsigned short pid, unsigned cha
player->charClass.mData.mAttribute[slot] = attrId; player->charClass.mData.mAttribute[slot] = attrId;
} }
void CharClassFunctions::setClassSpecialization(unsigned short pid, int spec) noexcept void CharClassFunctions::SetClassSpecialization(unsigned short pid, int spec) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
player->charClass.mData.mSpecialization = spec; player->charClass.mData.mSpecialization = spec;
} }
void CharClassFunctions::setClassMajorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept void CharClassFunctions::SetClassMajorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -62,7 +62,7 @@ void CharClassFunctions::setClassMajorSkill(unsigned short pid, unsigned char sl
throw invalid_argument("Incorrect skill slot id"); throw invalid_argument("Incorrect skill slot id");
player->charClass.mData.mSkills[slot][1] = skillId; player->charClass.mData.mSkills[slot][1] = skillId;
} }
void CharClassFunctions::setClassMinorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept void CharClassFunctions::SetClassMinorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -71,35 +71,35 @@ void CharClassFunctions::setClassMinorSkill(unsigned short pid, unsigned char sl
player->charClass.mData.mSkills[slot][0] = skillId; player->charClass.mData.mSkills[slot][0] = skillId;
} }
int CharClassFunctions::isClassDefault(unsigned short pid) noexcept int CharClassFunctions::IsClassDefault(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,0); GET_PLAYER(pid, player,0);
return !player->charClass.mId.empty(); // true if default return !player->charClass.mId.empty(); // true if default
} }
const char *CharClassFunctions::getDefaultClass(unsigned short pid) noexcept const char *CharClassFunctions::GetDefaultClass(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,""); GET_PLAYER(pid, player,"");
return player->charClass.mId.c_str(); return player->charClass.mId.c_str();
} }
const char *CharClassFunctions::getClassName(unsigned short pid) noexcept const char *CharClassFunctions::GetClassName(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,""); GET_PLAYER(pid, player,"");
return player->charClass.mName.c_str(); return player->charClass.mName.c_str();
} }
const char *CharClassFunctions::getClassDesc(unsigned short pid) noexcept const char *CharClassFunctions::GetClassDesc(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,""); GET_PLAYER(pid, player,"");
return player->charClass.mDescription.c_str(); return player->charClass.mDescription.c_str();
} }
int CharClassFunctions::getClassMajorAttribute(unsigned short pid, unsigned char slot) noexcept int CharClassFunctions::GetClassMajorAttribute(unsigned short pid, unsigned char slot) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,0); GET_PLAYER(pid, player,0);
@ -108,14 +108,14 @@ int CharClassFunctions::getClassMajorAttribute(unsigned short pid, unsigned char
return player->charClass.mData.mAttribute[slot]; return player->charClass.mData.mAttribute[slot];
} }
int CharClassFunctions::getClassSpecialization(unsigned short pid) noexcept int CharClassFunctions::GetClassSpecialization(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,0); GET_PLAYER(pid, player,0);
return player->charClass.mData.mSpecialization; return player->charClass.mData.mSpecialization;
} }
int CharClassFunctions::getClassMajorSkill(unsigned short pid, unsigned char slot) noexcept int CharClassFunctions::GetClassMajorSkill(unsigned short pid, unsigned char slot) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,0); GET_PLAYER(pid, player,0);
@ -124,7 +124,7 @@ int CharClassFunctions::getClassMajorSkill(unsigned short pid, unsigned char slo
return player->charClass.mData.mSkills[slot][1]; return player->charClass.mData.mSkills[slot][1];
} }
int CharClassFunctions::getClassMinorSkill(unsigned short pid, unsigned char slot) noexcept int CharClassFunctions::GetClassMinorSkill(unsigned short pid, unsigned char slot) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,0); GET_PLAYER(pid, player,0);

View file

@ -8,75 +8,75 @@
#include "../Types.hpp" #include "../Types.hpp"
#define CHARCLASSFUNCTIONS \ #define CHARCLASSFUNCTIONS \
{"setDefaultClass", CharClassFunctions::setDefaultClass},\ {"SetDefaultClass", CharClassFunctions::SetDefaultClass},\
{"setClassName", CharClassFunctions::setClassName},\ {"SetClassName", CharClassFunctions::SetClassName},\
{"setClassDesc", CharClassFunctions::setClassDesc},\ {"SetClassDesc", CharClassFunctions::SetClassDesc},\
{"setClassMajorAttribute", CharClassFunctions::setClassMajorAttribute},\ {"SetClassMajorAttribute", CharClassFunctions::SetClassMajorAttribute},\
{"setClassSpecialization", CharClassFunctions::setClassSpecialization},\ {"SetClassSpecialization", CharClassFunctions::SetClassSpecialization},\
{"setClassMajorSkill", CharClassFunctions::setClassMajorSkill},\ {"SetClassMajorSkill", CharClassFunctions::SetClassMajorSkill},\
{"setClassMinorSkill", CharClassFunctions::setClassMinorSkill},\ {"SetClassMinorSkill", CharClassFunctions::SetClassMinorSkill},\
{"getDefaultClass", CharClassFunctions::getDefaultClass},\ {"GetDefaultClass", CharClassFunctions::GetDefaultClass},\
{"getClassName", CharClassFunctions::getClassName},\ {"GetClassName", CharClassFunctions::GetClassName},\
{"getClassDesc", CharClassFunctions::getClassDesc},\ {"GetClassDesc", CharClassFunctions::GetClassDesc},\
{"getClassMajorAttribute", CharClassFunctions::getClassMajorAttribute},\ {"GetClassMajorAttribute", CharClassFunctions::GetClassMajorAttribute},\
{"getClassSpecialization", CharClassFunctions::getClassSpecialization},\ {"GetClassSpecialization", CharClassFunctions::GetClassSpecialization},\
{"getClassMajorSkill", CharClassFunctions::getClassMajorSkill},\ {"GetClassMajorSkill", CharClassFunctions::GetClassMajorSkill},\
{"getClassMinorSkill", CharClassFunctions::getClassMinorSkill},\ {"GetClassMinorSkill", CharClassFunctions::GetClassMinorSkill},\
{"isClassDefault", CharClassFunctions::isClassDefault},\ {"IsClassDefault", CharClassFunctions::IsClassDefault},\
{"sendClass", CharClassFunctions::sendClass} {"SendClass", CharClassFunctions::SendClass}
class CharClassFunctions class CharClassFunctions
{ {
public: public:
CharClassFunctions() {} CharClassFunctions() {}
static void setDefaultClass(unsigned short pid, const char *id) noexcept; static void SetDefaultClass(unsigned short pid, const char *id) noexcept;
static void setClassName(unsigned short pid, const char *name) noexcept; static void SetClassName(unsigned short pid, const char *name) noexcept;
static void setClassDesc(unsigned short pid, const char *desc) noexcept; static void SetClassDesc(unsigned short pid, const char *desc) noexcept;
/** /**
* \param pid * \param pid
* \param slot 0 = first, 1 = second * \param slot 0 = first, 1 = second
* \param attrId * \param attrId
*/ */
static void setClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId) noexcept; static void SetClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId) noexcept;
/** /**
* \param pid * \param pid
* \param spec 0 = Combat, 1 = Magic, 2 = Stealth * \param spec 0 = Combat, 1 = Magic, 2 = Stealth
*/ */
static void setClassSpecialization(unsigned short pid, int spec) noexcept; static void SetClassSpecialization(unsigned short pid, int spec) noexcept;
/** /**
* \param pid * \param pid
* \param slot 0 to 4 * \param slot 0 to 4
* \param skillId * \param skillId
*/ */
static void setClassMajorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept; static void SetClassMajorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept;
static void setClassMinorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept; static void SetClassMinorSkill(unsigned short pid, unsigned char slot, int skillId) noexcept;
static const char *getDefaultClass(unsigned short pid) noexcept; static const char *GetDefaultClass(unsigned short pid) noexcept;
static const char *getClassName(unsigned short pid) noexcept; static const char *GetClassName(unsigned short pid) noexcept;
static const char *getClassDesc(unsigned short pid) noexcept; static const char *GetClassDesc(unsigned short pid) noexcept;
/** /**
* \param pid * \param pid
* \param slot 0 = first, 1 = second * \param slot 0 = first, 1 = second
* \return attrId * \return attrId
*/ */
static int getClassMajorAttribute(unsigned short pid, unsigned char slot) noexcept; static int GetClassMajorAttribute(unsigned short pid, unsigned char slot) noexcept;
/** /**
* \param pid * \param pid
* \return spec 0 = Combat, 1 = Magic, 2 = Stealth * \return spec 0 = Combat, 1 = Magic, 2 = Stealth
*/ */
static int getClassSpecialization(unsigned short pid) noexcept; static int GetClassSpecialization(unsigned short pid) noexcept;
/** /**
* \param pid * \param pid
* \param slot 0 to 4 * \param slot 0 to 4
* \return skillId * \return skillId
*/ */
static int getClassMajorSkill(unsigned short pid, unsigned char slot) noexcept; static int GetClassMajorSkill(unsigned short pid, unsigned char slot) noexcept;
static int getClassMinorSkill(unsigned short pid, unsigned char slot) noexcept; static int GetClassMinorSkill(unsigned short pid, unsigned char slot) noexcept;
static int isClassDefault(unsigned short pid) noexcept; static int IsClassDefault(unsigned short pid) noexcept;
static void sendClass(unsigned short pid) noexcept; static void SendClass(unsigned short pid) noexcept;
}; };
#endif //OPENMW_CHARCLASS_HPP #endif //OPENMW_CHARCLASS_HPP

View file

@ -10,7 +10,7 @@
using namespace mwmp; using namespace mwmp;
void ItemFunctions::addItem(unsigned short pid, const char* itemName, unsigned int count, int health) noexcept void ItemFunctions::AddItem(unsigned short pid, const char* itemName, unsigned int count, int health) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -24,7 +24,7 @@ void ItemFunctions::addItem(unsigned short pid, const char* itemName, unsigned i
player->inventorySendBuffer.action = Inventory::ADDITEM; player->inventorySendBuffer.action = Inventory::ADDITEM;
} }
void ItemFunctions::equipItem(unsigned short pid, unsigned short slot, const char *itemName, unsigned int count, int health) noexcept void ItemFunctions::EquipItem(unsigned short pid, unsigned short slot, const char *itemName, unsigned int count, int health) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -34,13 +34,13 @@ void ItemFunctions::equipItem(unsigned short pid, unsigned short slot, const cha
player->EquipedItem(slot)->health = health; player->EquipedItem(slot)->health = health;
} }
void ItemFunctions::unequipItem(unsigned short pid, unsigned short slot) noexcept void ItemFunctions::UnequipItem(unsigned short pid, unsigned short slot) noexcept
{ {
LOG_MESSAGE(Log::LOG_WARN, "%s", "stub"); LOG_MESSAGE(Log::LOG_WARN, "%s", "stub");
//ItemFunctions::equipItem(pid, slot, "", 0); //ItemFunctions::EquipItem(pid, slot, "", 0);
} }
const char *ItemFunctions::getItemSlot(unsigned short pid, unsigned short slot) noexcept const char *ItemFunctions::GetItemSlot(unsigned short pid, unsigned short slot) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -48,7 +48,7 @@ const char *ItemFunctions::getItemSlot(unsigned short pid, unsigned short slot)
return player->EquipedItem(slot)->refid.c_str(); return player->EquipedItem(slot)->refid.c_str();
} }
bool ItemFunctions::hasItemEquipped(unsigned short pid, const char* itemName) bool ItemFunctions::HasItemEquipped(unsigned short pid, const char* itemName)
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, false); GET_PLAYER(pid, player, false);
@ -59,7 +59,7 @@ bool ItemFunctions::hasItemEquipped(unsigned short pid, const char* itemName)
return false; return false;
} }
void ItemFunctions::removeItem(unsigned short pid, const char* itemName, unsigned short count) noexcept void ItemFunctions::RemoveItem(unsigned short pid, const char* itemName, unsigned short count) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -72,12 +72,12 @@ void ItemFunctions::removeItem(unsigned short pid, const char* itemName, unsigne
player->inventorySendBuffer.items.push_back(item); player->inventorySendBuffer.items.push_back(item);
player->inventorySendBuffer.action = Inventory::REMOVEITEM; player->inventorySendBuffer.action = Inventory::REMOVEITEM;
} }
void ItemFunctions::getItemCount(unsigned short pid, const char* itemName) noexcept void ItemFunctions::GetItemCount(unsigned short pid, const char* itemName) noexcept
{ {
LOG_MESSAGE(Log::LOG_WARN, "%s", "stub"); LOG_MESSAGE(Log::LOG_WARN, "%s", "stub");
} }
const char *ItemFunctions::getItemName(unsigned short pid, unsigned int i) noexcept const char *ItemFunctions::GetItemName(unsigned short pid, unsigned int i) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ""); GET_PLAYER(pid, player, "");
@ -85,7 +85,7 @@ const char *ItemFunctions::getItemName(unsigned short pid, unsigned int i) noexc
return player->inventory.items.at(i).refid.c_str(); return player->inventory.items.at(i).refid.c_str();
} }
int ItemFunctions::getItemCount2(unsigned short pid, unsigned int i) noexcept int ItemFunctions::GetItemCount2(unsigned short pid, unsigned int i) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -93,7 +93,7 @@ int ItemFunctions::getItemCount2(unsigned short pid, unsigned int i) noexcept
return player->inventory.items.at(i).count; return player->inventory.items.at(i).count;
} }
int ItemFunctions::getItemHealth(unsigned short pid, unsigned int i) noexcept int ItemFunctions::GetItemHealth(unsigned short pid, unsigned int i) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -101,7 +101,7 @@ int ItemFunctions::getItemHealth(unsigned short pid, unsigned int i) noexcept
return player->inventory.items.at(i).health; return player->inventory.items.at(i).health;
} }
unsigned int ItemFunctions::getInventorySize(unsigned short pid) noexcept unsigned int ItemFunctions::GetInventorySize(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -109,7 +109,7 @@ unsigned int ItemFunctions::getInventorySize(unsigned short pid) noexcept
return player->inventory.count; return player->inventory.count;
} }
void ItemFunctions::sendEquipment(unsigned short pid) noexcept void ItemFunctions::SendEquipment(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );
@ -118,7 +118,7 @@ void ItemFunctions::sendEquipment(unsigned short pid) noexcept
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_EQUIPMENT)->Send(player, true); mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_EQUIPMENT)->Send(player, true);
} }
void ItemFunctions::sendInventory(unsigned short pid) noexcept void ItemFunctions::SendInventory(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );

View file

@ -6,38 +6,38 @@
#define OPENMW_ITEMS_HPP #define OPENMW_ITEMS_HPP
#define ITEMAPI \ #define ITEMAPI \
{"addItem", ItemFunctions::addItem},\ {"AddItem", ItemFunctions::AddItem},\
{"removeItem", ItemFunctions::removeItem},\ {"RemoveItem", ItemFunctions::RemoveItem},\
{"getItemCount", ItemFunctions::getItemCount2},\ {"GetItemCount", ItemFunctions::GetItemCount2},\
{"equipItem", ItemFunctions::equipItem},\ {"EquipItem", ItemFunctions::EquipItem},\
{"unequipItem", ItemFunctions::unequipItem},\ {"UnequipItem", ItemFunctions::UnequipItem},\
{"getItemSlot", ItemFunctions::getItemSlot},\ {"GetItemSlot", ItemFunctions::GetItemSlot},\
{"hasItemEquipped", ItemFunctions::hasItemEquipped},\ {"HasItemEquipped", ItemFunctions::HasItemEquipped},\
{"getItemName", ItemFunctions::getItemName},\ {"GetItemName", ItemFunctions::GetItemName},\
{"getItemHealth", ItemFunctions::getItemHealth},\ {"GetItemHealth", ItemFunctions::GetItemHealth},\
{"getInventorySize", ItemFunctions::getInventorySize},\ {"GetInventorySize", ItemFunctions::GetInventorySize},\
\ \
{"sendEquipment", ItemFunctions::sendEquipment},\ {"SendEquipment", ItemFunctions::SendEquipment},\
{"sendInventory", ItemFunctions::sendInventory}\ {"SendInventory", ItemFunctions::SendInventory}\
class ItemFunctions class ItemFunctions
{ {
public: public:
static void addItem(unsigned short pid, const char* itemName, unsigned int count, int health) noexcept; static void AddItem(unsigned short pid, const char* itemName, unsigned int count, int health) noexcept;
static void removeItem(unsigned short pid, const char* itemName, unsigned short count) noexcept; static void RemoveItem(unsigned short pid, const char* itemName, unsigned short count) noexcept;
static void getItemCount(unsigned short pid, const char* itemName) noexcept; static void GetItemCount(unsigned short pid, const char* itemName) noexcept;
static void equipItem(unsigned short pid, unsigned short slot, const char* itemName, unsigned int count, int health) noexcept; static void EquipItem(unsigned short pid, unsigned short slot, const char* itemName, unsigned int count, int health) noexcept;
static void unequipItem(unsigned short pid, unsigned short slot) noexcept; static void UnequipItem(unsigned short pid, unsigned short slot) noexcept;
static bool hasItemEquipped(unsigned short pid, const char* itemName); static bool HasItemEquipped(unsigned short pid, const char* itemName);
static const char *getItemSlot(unsigned short pid, unsigned short slot) noexcept; static const char *GetItemSlot(unsigned short pid, unsigned short slot) noexcept;
static const char *getItemName(unsigned short pid, unsigned int i) noexcept; static const char *GetItemName(unsigned short pid, unsigned int i) noexcept;
static int getItemCount2(unsigned short pid, unsigned int i) noexcept; static int GetItemCount2(unsigned short pid, unsigned int i) noexcept;
static int getItemHealth(unsigned short pid, unsigned int i) noexcept; static int GetItemHealth(unsigned short pid, unsigned int i) noexcept;
static unsigned int getInventorySize(unsigned short pid) noexcept; static unsigned int GetInventorySize(unsigned short pid) noexcept;
static void sendEquipment(unsigned short pid) noexcept; static void SendEquipment(unsigned short pid) noexcept;
static void sendInventory(unsigned short pid) noexcept; static void SendInventory(unsigned short pid) noexcept;
private: private:
}; };

View file

@ -15,7 +15,7 @@
using namespace std; using namespace std;
using namespace ESM; using namespace ESM;
void StatsFunctions::setName(unsigned short pid, const char *name) noexcept void StatsFunctions::SetName(unsigned short pid, const char *name) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -26,7 +26,7 @@ void StatsFunctions::setName(unsigned short pid, const char *name) noexcept
player->Npc()->mName = name; player->Npc()->mName = name;
} }
const char *StatsFunctions::getName(unsigned short pid) noexcept const char *StatsFunctions::GetName(unsigned short pid) noexcept
{ {
Player *player; Player *player;
@ -35,7 +35,7 @@ const char *StatsFunctions::getName(unsigned short pid) noexcept
return player->Npc()->mName.c_str(); return player->Npc()->mName.c_str();
} }
void StatsFunctions::setBirthsign(unsigned short pid, const char *sign) noexcept void StatsFunctions::SetBirthsign(unsigned short pid, const char *sign) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -46,7 +46,7 @@ void StatsFunctions::setBirthsign(unsigned short pid, const char *sign) noexcept
*player->BirthSign() = sign; *player->BirthSign() = sign;
} }
const char *StatsFunctions::getBirthsign(unsigned short pid) noexcept const char *StatsFunctions::GetBirthsign(unsigned short pid) noexcept
{ {
Player *player; Player *player;
@ -56,7 +56,7 @@ const char *StatsFunctions::getBirthsign(unsigned short pid) noexcept
return player->BirthSign()->c_str(); return player->BirthSign()->c_str();
} }
void StatsFunctions::setRace(unsigned short pid, const char *race) noexcept void StatsFunctions::SetRace(unsigned short pid, const char *race) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -72,7 +72,7 @@ void StatsFunctions::setRace(unsigned short pid, const char *race) noexcept
player->Npc()->mRace = race; player->Npc()->mRace = race;
} }
const char *StatsFunctions::getRace(unsigned short pid) noexcept const char *StatsFunctions::GetRace(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -80,7 +80,7 @@ const char *StatsFunctions::getRace(unsigned short pid) noexcept
return player->Npc()->mRace.c_str(); return player->Npc()->mRace.c_str();
} }
void StatsFunctions::setHead(unsigned short pid, const char *head) noexcept void StatsFunctions::SetHead(unsigned short pid, const char *head) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -91,7 +91,7 @@ void StatsFunctions::setHead(unsigned short pid, const char *head) noexcept
player->Npc()->mHead = head; player->Npc()->mHead = head;
} }
const char *StatsFunctions::getHead(unsigned short pid) noexcept const char *StatsFunctions::GetHead(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -99,7 +99,7 @@ const char *StatsFunctions::getHead(unsigned short pid) noexcept
return player->Npc()->mHead.c_str(); return player->Npc()->mHead.c_str();
} }
void StatsFunctions::setHairstyle(unsigned short pid, const char *style) noexcept void StatsFunctions::SetHairstyle(unsigned short pid, const char *style) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -110,7 +110,7 @@ void StatsFunctions::setHairstyle(unsigned short pid, const char *style) noexcep
player->Npc()->mHair = style; player->Npc()->mHair = style;
} }
const char *StatsFunctions::getHairstyle(unsigned short pid) noexcept const char *StatsFunctions::GetHairstyle(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -118,7 +118,7 @@ const char *StatsFunctions::getHairstyle(unsigned short pid) noexcept
return player->Npc()->mHair.c_str(); return player->Npc()->mHair.c_str();
} }
int StatsFunctions::getIsMale(unsigned short pid) noexcept int StatsFunctions::GetIsMale(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,false); GET_PLAYER(pid, player,false);
@ -126,7 +126,7 @@ int StatsFunctions::getIsMale(unsigned short pid) noexcept
return player->Npc()->isMale(); return player->Npc()->isMale();
} }
void StatsFunctions::setIsMale(unsigned short pid, int value) noexcept void StatsFunctions::SetIsMale(unsigned short pid, int value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -134,7 +134,7 @@ void StatsFunctions::setIsMale(unsigned short pid, int value) noexcept
player->Npc()->setIsMale(value == true); player->Npc()->setIsMale(value == true);
} }
int StatsFunctions::getLevel(unsigned short pid) noexcept int StatsFunctions::GetLevel(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -142,7 +142,7 @@ int StatsFunctions::getLevel(unsigned short pid) noexcept
return player->CreatureStats()->mLevel; return player->CreatureStats()->mLevel;
} }
void StatsFunctions::setLevel(unsigned short pid, int value) noexcept void StatsFunctions::SetLevel(unsigned short pid, int value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );
@ -150,7 +150,7 @@ void StatsFunctions::setLevel(unsigned short pid, int value) noexcept
player->CreatureStats()->mLevel = value; player->CreatureStats()->mLevel = value;
} }
int StatsFunctions::getLevelProgress(unsigned short pid) noexcept int StatsFunctions::GetLevelProgress(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -158,7 +158,7 @@ int StatsFunctions::getLevelProgress(unsigned short pid) noexcept
return player->NpcStats()->mLevelProgress; return player->NpcStats()->mLevelProgress;
} }
void StatsFunctions::setLevelProgress(unsigned short pid, int value) noexcept void StatsFunctions::SetLevelProgress(unsigned short pid, int value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );
@ -166,7 +166,7 @@ void StatsFunctions::setLevelProgress(unsigned short pid, int value) noexcept
player->NpcStats()->mLevelProgress = value; player->NpcStats()->mLevelProgress = value;
} }
double StatsFunctions::getHealthBase(unsigned short pid) noexcept double StatsFunctions::GetHealthBase(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -174,7 +174,7 @@ double StatsFunctions::getHealthBase(unsigned short pid) noexcept
return player->CreatureStats()->mDynamic[0].mBase; return player->CreatureStats()->mDynamic[0].mBase;
} }
void StatsFunctions::setHealthBase(unsigned short pid, double value) noexcept void StatsFunctions::SetHealthBase(unsigned short pid, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -182,7 +182,7 @@ void StatsFunctions::setHealthBase(unsigned short pid, double value) noexcept
player->CreatureStats()->mDynamic[0].mBase = value; player->CreatureStats()->mDynamic[0].mBase = value;
} }
double StatsFunctions::getHealthCurrent(unsigned short pid) noexcept double StatsFunctions::GetHealthCurrent(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -190,7 +190,7 @@ double StatsFunctions::getHealthCurrent(unsigned short pid) noexcept
return player->CreatureStats()->mDynamic[0].mCurrent; return player->CreatureStats()->mDynamic[0].mCurrent;
} }
void StatsFunctions::setHealthCurrent(unsigned short pid, double value) noexcept void StatsFunctions::SetHealthCurrent(unsigned short pid, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -198,7 +198,7 @@ void StatsFunctions::setHealthCurrent(unsigned short pid, double value) noexcept
player->CreatureStats()->mDynamic[0].mCurrent = value; player->CreatureStats()->mDynamic[0].mCurrent = value;
} }
double StatsFunctions::getMagickaBase(unsigned short pid) noexcept double StatsFunctions::GetMagickaBase(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -206,7 +206,7 @@ double StatsFunctions::getMagickaBase(unsigned short pid) noexcept
return player->CreatureStats()->mDynamic[1].mBase; return player->CreatureStats()->mDynamic[1].mBase;
} }
void StatsFunctions::setMagickaBase(unsigned short pid, double value) noexcept void StatsFunctions::SetMagickaBase(unsigned short pid, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -214,7 +214,7 @@ void StatsFunctions::setMagickaBase(unsigned short pid, double value) noexcept
player->CreatureStats()->mDynamic[1].mBase = value; player->CreatureStats()->mDynamic[1].mBase = value;
} }
double StatsFunctions::getMagickaCurrent(unsigned short pid) noexcept double StatsFunctions::GetMagickaCurrent(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -222,7 +222,7 @@ double StatsFunctions::getMagickaCurrent(unsigned short pid) noexcept
return player->CreatureStats()->mDynamic[1].mCurrent; return player->CreatureStats()->mDynamic[1].mCurrent;
} }
void StatsFunctions::setMagickaCurrent(unsigned short pid, double value) noexcept void StatsFunctions::SetMagickaCurrent(unsigned short pid, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -230,7 +230,7 @@ void StatsFunctions::setMagickaCurrent(unsigned short pid, double value) noexcep
player->CreatureStats()->mDynamic[1].mCurrent = value; player->CreatureStats()->mDynamic[1].mCurrent = value;
} }
double StatsFunctions::getFatigueBase(unsigned short pid) noexcept double StatsFunctions::GetFatigueBase(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -238,7 +238,7 @@ double StatsFunctions::getFatigueBase(unsigned short pid) noexcept
return player->CreatureStats()->mDynamic[2].mBase; return player->CreatureStats()->mDynamic[2].mBase;
} }
void StatsFunctions::setFatigueBase(unsigned short pid, double value) noexcept void StatsFunctions::SetFatigueBase(unsigned short pid, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -246,7 +246,7 @@ void StatsFunctions::setFatigueBase(unsigned short pid, double value) noexcept
player->CreatureStats()->mDynamic[2].mBase = value; player->CreatureStats()->mDynamic[2].mBase = value;
} }
double StatsFunctions::getFatigueCurrent(unsigned short pid) noexcept double StatsFunctions::GetFatigueCurrent(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -254,7 +254,7 @@ double StatsFunctions::getFatigueCurrent(unsigned short pid) noexcept
return player->CreatureStats()->mDynamic[2].mCurrent; return player->CreatureStats()->mDynamic[2].mCurrent;
} }
void StatsFunctions::setFatigueCurrent(unsigned short pid, double value) noexcept void StatsFunctions::SetFatigueCurrent(unsigned short pid, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -262,17 +262,17 @@ void StatsFunctions::setFatigueCurrent(unsigned short pid, double value) noexcep
player->CreatureStats()->mDynamic[2].mCurrent = value; player->CreatureStats()->mDynamic[2].mCurrent = value;
} }
int StatsFunctions::getAttributeCount() noexcept int StatsFunctions::GetAttributeCount() noexcept
{ {
return Attribute::Length; return Attribute::Length;
} }
int StatsFunctions::getSkillCount() noexcept int StatsFunctions::GetSkillCount() noexcept
{ {
return Skill::Length; return Skill::Length;
} }
int StatsFunctions::getAttributeId(const char *name) noexcept int StatsFunctions::GetAttributeId(const char *name) noexcept
{ {
for (int x = 0; x < Attribute::Length; x++) for (int x = 0; x < Attribute::Length; x++)
{ {
@ -285,7 +285,7 @@ int StatsFunctions::getAttributeId(const char *name) noexcept
return -1; return -1;
} }
int StatsFunctions::getSkillId(const char *name) noexcept int StatsFunctions::GetSkillId(const char *name) noexcept
{ {
for (int x = 0; x < Skill::Length; x++) for (int x = 0; x < Skill::Length; x++)
{ {
@ -298,7 +298,7 @@ int StatsFunctions::getSkillId(const char *name) noexcept
return -1; return -1;
} }
const char *StatsFunctions::getAttributeName(unsigned short attribute) noexcept const char *StatsFunctions::GetAttributeName(unsigned short attribute) noexcept
{ {
if (attribute >= Attribute::Length) if (attribute >= Attribute::Length)
return "invalid"; return "invalid";
@ -306,7 +306,7 @@ const char *StatsFunctions::getAttributeName(unsigned short attribute) noexcept
return Attribute::sAttributeNames[attribute].c_str(); return Attribute::sAttributeNames[attribute].c_str();
} }
const char *StatsFunctions::getSkillName(unsigned short skill) noexcept const char *StatsFunctions::GetSkillName(unsigned short skill) noexcept
{ {
if (skill >= Skill::Length) if (skill >= Skill::Length)
return "invalid"; return "invalid";
@ -314,7 +314,7 @@ const char *StatsFunctions::getSkillName(unsigned short skill) noexcept
return Skill::sSkillNames[skill].c_str(); return Skill::sSkillNames[skill].c_str();
} }
int StatsFunctions::getAttributeBase(unsigned short pid, unsigned short attribute) noexcept int StatsFunctions::GetAttributeBase(unsigned short pid, unsigned short attribute) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -325,7 +325,7 @@ int StatsFunctions::getAttributeBase(unsigned short pid, unsigned short attribut
return player->CreatureStats()->mAttributes[attribute].mBase; return player->CreatureStats()->mAttributes[attribute].mBase;
} }
void StatsFunctions::setAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept void StatsFunctions::SetAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -336,7 +336,7 @@ void StatsFunctions::setAttributeBase(unsigned short pid, unsigned short attribu
player->CreatureStats()->mAttributes[attribute].mBase = value; player->CreatureStats()->mAttributes[attribute].mBase = value;
} }
int StatsFunctions::getAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept int StatsFunctions::GetAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -347,7 +347,7 @@ int StatsFunctions::getAttributeCurrent(unsigned short pid, unsigned short attri
return player->CreatureStats()->mAttributes[attribute].mCurrent; return player->CreatureStats()->mAttributes[attribute].mCurrent;
} }
void StatsFunctions::setAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept void StatsFunctions::SetAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -358,7 +358,7 @@ void StatsFunctions::setAttributeCurrent(unsigned short pid, unsigned short attr
player->CreatureStats()->mAttributes[attribute].mCurrent = value; player->CreatureStats()->mAttributes[attribute].mCurrent = value;
} }
int StatsFunctions::getSkillBase(unsigned short pid, unsigned short skill) noexcept int StatsFunctions::GetSkillBase(unsigned short pid, unsigned short skill) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -369,7 +369,7 @@ int StatsFunctions::getSkillBase(unsigned short pid, unsigned short skill) noexc
return player->NpcStats()->mSkills[skill].mBase; return player->NpcStats()->mSkills[skill].mBase;
} }
void StatsFunctions::setSkillBase(unsigned short pid, unsigned short skill, int value) noexcept //TODO: need packet for one value void StatsFunctions::SetSkillBase(unsigned short pid, unsigned short skill, int value) noexcept //TODO: need packet for one value
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -380,7 +380,7 @@ void StatsFunctions::setSkillBase(unsigned short pid, unsigned short skill, int
player->NpcStats()->mSkills[skill].mBase = value; player->NpcStats()->mSkills[skill].mBase = value;
} }
int StatsFunctions::getSkillCurrent(unsigned short pid, unsigned short skill) noexcept int StatsFunctions::GetSkillCurrent(unsigned short pid, unsigned short skill) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -391,7 +391,7 @@ int StatsFunctions::getSkillCurrent(unsigned short pid, unsigned short skill) no
return player->NpcStats()->mSkills[skill].mCurrent; return player->NpcStats()->mSkills[skill].mCurrent;
} }
void StatsFunctions::setSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept //TODO: need packet for one value void StatsFunctions::SetSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept //TODO: need packet for one value
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -402,7 +402,7 @@ void StatsFunctions::setSkillCurrent(unsigned short pid, unsigned short skill, i
player->NpcStats()->mSkills[skill].mCurrent = value; player->NpcStats()->mSkills[skill].mCurrent = value;
} }
double StatsFunctions::getSkillProgress(unsigned short pid, unsigned short skill) noexcept double StatsFunctions::GetSkillProgress(unsigned short pid, unsigned short skill) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -413,7 +413,7 @@ double StatsFunctions::getSkillProgress(unsigned short pid, unsigned short skill
return player->NpcStats()->mSkills[skill].mProgress; return player->NpcStats()->mSkills[skill].mProgress;
} }
void StatsFunctions::setSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept void StatsFunctions::SetSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );
@ -424,7 +424,7 @@ void StatsFunctions::setSkillProgress(unsigned short pid, unsigned short skill,
player->NpcStats()->mSkills[skill].mProgress = value; player->NpcStats()->mSkills[skill].mProgress = value;
} }
int StatsFunctions::getSkillIncrease(unsigned short pid, unsigned int attribute) noexcept int StatsFunctions::GetSkillIncrease(unsigned short pid, unsigned int attribute) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -435,7 +435,7 @@ int StatsFunctions::getSkillIncrease(unsigned short pid, unsigned int attribute)
return player->NpcStats()->mSkillIncrease[attribute]; return player->NpcStats()->mSkillIncrease[attribute];
} }
void StatsFunctions::setSkillIncrease(unsigned short pid, unsigned int attribute, int value) noexcept // TODO: need packet for transmit it void StatsFunctions::SetSkillIncrease(unsigned short pid, unsigned int attribute, int value) noexcept // TODO: need packet for transmit it
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -446,7 +446,7 @@ void StatsFunctions::setSkillIncrease(unsigned short pid, unsigned int attribute
player->NpcStats()->mSkillIncrease[attribute] = value; player->NpcStats()->mSkillIncrease[attribute] = value;
} }
void StatsFunctions::setCharGenStage(unsigned short pid, int start, int end) noexcept void StatsFunctions::SetCharGenStage(unsigned short pid, int start, int end) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -457,14 +457,14 @@ void StatsFunctions::setCharGenStage(unsigned short pid, int start, int end) noe
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_CHARGEN)->Send(player, false); mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_CHARGEN)->Send(player, false);
} }
void StatsFunctions::resurrect(unsigned short pid) void StatsFunctions::Resurrect(unsigned short pid)
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_RESURRECT)->RequestData(player->guid); mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_RESURRECT)->RequestData(player->guid);
} }
void StatsFunctions::sendBaseInfo(unsigned short pid) noexcept void StatsFunctions::SendBaseInfo(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -473,7 +473,7 @@ void StatsFunctions::sendBaseInfo(unsigned short pid) noexcept
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_BASE_INFO)->Send(player, true); mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_BASE_INFO)->Send(player, true);
} }
void StatsFunctions::sendDynamicStats(unsigned short pid) noexcept void StatsFunctions::SendDynamicStats(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );
@ -481,7 +481,7 @@ void StatsFunctions::sendDynamicStats(unsigned short pid) noexcept
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_DYNAMICSTATS)->Send(player, true); mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_DYNAMICSTATS)->Send(player, true);
} }
void StatsFunctions::sendAttributes(unsigned short pid) noexcept void StatsFunctions::SendAttributes(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -490,7 +490,7 @@ void StatsFunctions::sendAttributes(unsigned short pid) noexcept
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_ATTRIBUTE)->Send(player, true); mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_ATTRIBUTE)->Send(player, true);
} }
void StatsFunctions::sendSkills(unsigned short pid) noexcept void StatsFunctions::SendSkills(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -499,7 +499,7 @@ void StatsFunctions::sendSkills(unsigned short pid) noexcept
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_SKILL)->Send(player, true); mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_SKILL)->Send(player, true);
} }
void StatsFunctions::sendLevel(unsigned short pid) noexcept void StatsFunctions::SendLevel(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );

View file

@ -6,146 +6,146 @@
#define OPENMW_STATS_HPP #define OPENMW_STATS_HPP
#define STATSFUNCTIONS \ #define STATSFUNCTIONS \
{"getName", StatsFunctions::getName},\ {"GetName", StatsFunctions::GetName},\
{"setName", StatsFunctions::setName},\ {"SetName", StatsFunctions::SetName},\
\ \
{"getRace", StatsFunctions::getRace},\ {"GetRace", StatsFunctions::GetRace},\
{"setRace", StatsFunctions::setRace},\ {"SetRace", StatsFunctions::SetRace},\
\ \
{"getHead", StatsFunctions::getHead},\ {"GetHead", StatsFunctions::GetHead},\
{"setHead", StatsFunctions::setHead},\ {"SetHead", StatsFunctions::SetHead},\
\ \
{"GetHair", StatsFunctions::getHairstyle},\ {"GetHair", StatsFunctions::GetHairstyle},\
{"SetHair", StatsFunctions::setHairstyle},\ {"SetHair", StatsFunctions::SetHairstyle},\
\ \
{"getIsMale", StatsFunctions::getIsMale},\ {"GetIsMale", StatsFunctions::GetIsMale},\
{"setIsMale", StatsFunctions::setIsMale},\ {"SetIsMale", StatsFunctions::SetIsMale},\
\ \
{"getLevel", StatsFunctions::getLevel},\ {"GetLevel", StatsFunctions::GetLevel},\
{"setLevel", StatsFunctions::setLevel},\ {"SetLevel", StatsFunctions::SetLevel},\
{"getLevelProgress", StatsFunctions::getLevelProgress},\ {"GetLevelProgress", StatsFunctions::GetLevelProgress},\
{"setLevelProgress", StatsFunctions::setLevelProgress},\ {"SetLevelProgress", StatsFunctions::SetLevelProgress},\
\ \
{"getBirthsign", StatsFunctions::getBirthsign},\ {"GetBirthsign", StatsFunctions::GetBirthsign},\
{"setBirthsign", StatsFunctions::setBirthsign},\ {"SetBirthsign", StatsFunctions::SetBirthsign},\
\ \
{"getAttributeCount", StatsFunctions::getAttributeCount},\ {"GetAttributeCount", StatsFunctions::GetAttributeCount},\
{"getSkillCount", StatsFunctions::getSkillCount},\ {"GetSkillCount", StatsFunctions::GetSkillCount},\
{"getAttributeId", StatsFunctions::getAttributeId},\ {"GetAttributeId", StatsFunctions::GetAttributeId},\
{"getSkillId", StatsFunctions::getSkillId},\ {"GetSkillId", StatsFunctions::GetSkillId},\
{"getAttributeName", StatsFunctions::getAttributeName},\ {"GetAttributeName", StatsFunctions::GetAttributeName},\
{"getSkillName", StatsFunctions::getSkillName},\ {"GetSkillName", StatsFunctions::GetSkillName},\
\ \
{"getAttributeBase", StatsFunctions::getAttributeBase},\ {"GetAttributeBase", StatsFunctions::GetAttributeBase},\
{"setAttributeBase", StatsFunctions::setAttributeBase},\ {"SetAttributeBase", StatsFunctions::SetAttributeBase},\
{"getAttributeCurrent", StatsFunctions::getAttributeCurrent},\ {"GetAttributeCurrent", StatsFunctions::GetAttributeCurrent},\
{"setAttributeCurrent", StatsFunctions::setAttributeCurrent},\ {"SetAttributeCurrent", StatsFunctions::SetAttributeCurrent},\
\ \
{"getSkillBase", StatsFunctions::getSkillBase},\ {"GetSkillBase", StatsFunctions::GetSkillBase},\
{"setSkillBase", StatsFunctions::setSkillBase},\ {"SetSkillBase", StatsFunctions::SetSkillBase},\
{"getSkillCurrent", StatsFunctions::getSkillCurrent},\ {"GetSkillCurrent", StatsFunctions::GetSkillCurrent},\
{"setSkillCurrent", StatsFunctions::setSkillCurrent},\ {"SetSkillCurrent", StatsFunctions::SetSkillCurrent},\
{"getSkillProgress", StatsFunctions::getSkillProgress},\ {"GetSkillProgress", StatsFunctions::GetSkillProgress},\
{"setSkillProgress", StatsFunctions::setSkillProgress},\ {"SetSkillProgress", StatsFunctions::SetSkillProgress},\
\ \
{"getHealthBase", StatsFunctions::getHealthBase},\ {"GetHealthBase", StatsFunctions::GetHealthBase},\
{"setHealthBase", StatsFunctions::setHealthBase},\ {"SetHealthBase", StatsFunctions::SetHealthBase},\
{"getHealthCurrent", StatsFunctions::getHealthCurrent},\ {"GetHealthCurrent", StatsFunctions::GetHealthCurrent},\
{"setHealthCurrent", StatsFunctions::setHealthCurrent},\ {"SetHealthCurrent", StatsFunctions::SetHealthCurrent},\
\ \
{"getMagickaBase", StatsFunctions::getMagickaBase},\ {"GetMagickaBase", StatsFunctions::GetMagickaBase},\
{"setMagickaBase", StatsFunctions::setMagickaBase},\ {"SetMagickaBase", StatsFunctions::SetMagickaBase},\
{"getMagickaCurrent", StatsFunctions::getMagickaCurrent},\ {"GetMagickaCurrent", StatsFunctions::GetMagickaCurrent},\
{"setMagickaCurrent", StatsFunctions::setMagickaCurrent},\ {"SetMagickaCurrent", StatsFunctions::SetMagickaCurrent},\
\ \
{"setFatigueBase", StatsFunctions::setFatigueBase},\ {"SetFatigueBase", StatsFunctions::SetFatigueBase},\
{"getFatigueBase", StatsFunctions::getFatigueBase},\ {"GetFatigueBase", StatsFunctions::GetFatigueBase},\
{"setFatigueCurrent", StatsFunctions::setFatigueCurrent},\ {"SetFatigueCurrent", StatsFunctions::SetFatigueCurrent},\
{"getFatigueCurrent", StatsFunctions::getFatigueCurrent},\ {"GetFatigueCurrent", StatsFunctions::GetFatigueCurrent},\
\ \
{"getSkillIncrease", StatsFunctions::getSkillIncrease},\ {"GetSkillIncrease", StatsFunctions::GetSkillIncrease},\
{"setSkillIncrease", StatsFunctions::setSkillIncrease},\ {"SetSkillIncrease", StatsFunctions::SetSkillIncrease},\
\ \
{"setCharGenStage", StatsFunctions::setCharGenStage},\ {"SetCharGenStage", StatsFunctions::SetCharGenStage},\
{"resurrect", StatsFunctions::resurrect},\ {"Resurrect", StatsFunctions::Resurrect},\
{"sendBaseInfo", StatsFunctions::sendBaseInfo},\ {"SendBaseInfo", StatsFunctions::SendBaseInfo},\
\ \
{"sendDynamicStats", StatsFunctions::sendDynamicStats},\ {"SendDynamicStats", StatsFunctions::SendDynamicStats},\
{"sendAttributes", StatsFunctions::sendAttributes},\ {"SendAttributes", StatsFunctions::SendAttributes},\
{"sendSkills", StatsFunctions::sendSkills},\ {"SendSkills", StatsFunctions::SendSkills},\
{"sendLevel", StatsFunctions::sendLevel} {"SendLevel", StatsFunctions::SendLevel}
class StatsFunctions class StatsFunctions
{ {
public: public:
static void setName(unsigned short pid, const char *name) noexcept; static void SetName(unsigned short pid, const char *name) noexcept;
static const char *getName(unsigned short pid) noexcept; static const char *GetName(unsigned short pid) noexcept;
static void setBirthsign(unsigned short pid, const char *name) noexcept; static void SetBirthsign(unsigned short pid, const char *name) noexcept;
static const char *getBirthsign(unsigned short pid) noexcept; static const char *GetBirthsign(unsigned short pid) noexcept;
static void setRace(unsigned short pid, const char *race) noexcept; static void SetRace(unsigned short pid, const char *race) noexcept;
static const char *getRace(unsigned short pid) noexcept; static const char *GetRace(unsigned short pid) noexcept;
static void setHead(unsigned short pid, const char *head) noexcept; static void SetHead(unsigned short pid, const char *head) noexcept;
static const char *getHead(unsigned short pid) noexcept; static const char *GetHead(unsigned short pid) noexcept;
static void setHairstyle(unsigned short pid, const char *style) noexcept; static void SetHairstyle(unsigned short pid, const char *style) noexcept;
static const char *getHairstyle(unsigned short pid) noexcept; static const char *GetHairstyle(unsigned short pid) noexcept;
static void setIsMale(unsigned short pid, int male) noexcept; static void SetIsMale(unsigned short pid, int male) noexcept;
static int getIsMale(unsigned short pid) noexcept; static int GetIsMale(unsigned short pid) noexcept;
static int getLevel(unsigned short pid) noexcept; static int GetLevel(unsigned short pid) noexcept;
static void setLevel(unsigned short pid, int value) noexcept; static void SetLevel(unsigned short pid, int value) noexcept;
static int getLevelProgress(unsigned short pid) noexcept; static int GetLevelProgress(unsigned short pid) noexcept;
static void setLevelProgress(unsigned short pid, int value) noexcept; static void SetLevelProgress(unsigned short pid, int value) noexcept;
static double getHealthBase(unsigned short pid) noexcept; static double GetHealthBase(unsigned short pid) noexcept;
static void setHealthBase(unsigned short pid, double value) noexcept; static void SetHealthBase(unsigned short pid, double value) noexcept;
static double getHealthCurrent(unsigned short pid) noexcept; static double GetHealthCurrent(unsigned short pid) noexcept;
static void setHealthCurrent(unsigned short pid, double value) noexcept; static void SetHealthCurrent(unsigned short pid, double value) noexcept;
static double getMagickaBase(unsigned short pid) noexcept; static double GetMagickaBase(unsigned short pid) noexcept;
static void setMagickaBase(unsigned short pid, double value) noexcept; static void SetMagickaBase(unsigned short pid, double value) noexcept;
static double getMagickaCurrent(unsigned short pid) noexcept; static double GetMagickaCurrent(unsigned short pid) noexcept;
static void setMagickaCurrent(unsigned short pid, double value) noexcept; static void SetMagickaCurrent(unsigned short pid, double value) noexcept;
static double getFatigueBase(unsigned short pid) noexcept; static double GetFatigueBase(unsigned short pid) noexcept;
static void setFatigueBase(unsigned short pid, double value) noexcept; static void SetFatigueBase(unsigned short pid, double value) noexcept;
static double getFatigueCurrent(unsigned short pid) noexcept; static double GetFatigueCurrent(unsigned short pid) noexcept;
static void setFatigueCurrent(unsigned short pid, double value) noexcept; static void SetFatigueCurrent(unsigned short pid, double value) noexcept;
static int getAttributeCount() noexcept; static int GetAttributeCount() noexcept;
static int getSkillCount() noexcept; static int GetSkillCount() noexcept;
static int getAttributeId(const char *name) noexcept; static int GetAttributeId(const char *name) noexcept;
static int getSkillId(const char *name) noexcept; static int GetSkillId(const char *name) noexcept;
static const char *getAttributeName(unsigned short attribute) noexcept; static const char *GetAttributeName(unsigned short attribute) noexcept;
static const char *getSkillName(unsigned short skill) noexcept; static const char *GetSkillName(unsigned short skill) noexcept;
static int getAttributeBase(unsigned short pid, unsigned short attribute) noexcept; static int GetAttributeBase(unsigned short pid, unsigned short attribute) noexcept;
static void setAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept; static void SetAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept;
static int getAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept; static int GetAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept;
static void setAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept; static void SetAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept;
static int getSkillBase(unsigned short pid, unsigned short skill) noexcept; static int GetSkillBase(unsigned short pid, unsigned short skill) noexcept;
static void setSkillBase(unsigned short pid, unsigned short skill, int value) noexcept; static void SetSkillBase(unsigned short pid, unsigned short skill, int value) noexcept;
static int getSkillCurrent(unsigned short pid, unsigned short skill) noexcept; static int GetSkillCurrent(unsigned short pid, unsigned short skill) noexcept;
static void setSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept; static void SetSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept;
static double getSkillProgress(unsigned short pid, unsigned short skill) noexcept; static double GetSkillProgress(unsigned short pid, unsigned short skill) noexcept;
static void setSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept; static void SetSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept;
static int getSkillIncrease(unsigned short pid, unsigned int pos) noexcept; static int GetSkillIncrease(unsigned short pid, unsigned int pos) noexcept;
static void setSkillIncrease(unsigned short pid, unsigned int pos, int value) noexcept; static void SetSkillIncrease(unsigned short pid, unsigned int pos, int value) noexcept;
static void resurrect(unsigned short pid); static void Resurrect(unsigned short pid);
static void setCharGenStage(unsigned short pid, int start, int end) noexcept; static void SetCharGenStage(unsigned short pid, int start, int end) noexcept;
static void sendBaseInfo(unsigned short pid) noexcept; static void SendBaseInfo(unsigned short pid) noexcept;
static void sendDynamicStats(unsigned short pid) noexcept; static void SendDynamicStats(unsigned short pid) noexcept;
static void sendAttributes(unsigned short pid) noexcept; static void SendAttributes(unsigned short pid) noexcept;
static void sendSkills(unsigned short pid) noexcept; static void SendSkills(unsigned short pid) noexcept;
static void sendLevel(unsigned short pid) noexcept; static void SendLevel(unsigned short pid) noexcept;
}; };
#endif //OPENMW_STATS_HPP #endif //OPENMW_STATS_HPP

View file

@ -11,7 +11,7 @@
#include <iostream> #include <iostream>
using namespace std; using namespace std;
void TranslocationFunctions::getPos(unsigned short pid, float *x, float *y, float *z) noexcept void TranslocationFunctions::GetPos(unsigned short pid, float *x, float *y, float *z) noexcept
{ {
*x = 0.00; *x = 0.00;
*y = 0.00; *y = 0.00;
@ -25,7 +25,7 @@ void TranslocationFunctions::getPos(unsigned short pid, float *x, float *y, floa
*z = player->Position()->pos[2]; *z = player->Position()->pos[2];
} }
double TranslocationFunctions::getPosX(unsigned short pid) noexcept double TranslocationFunctions::GetPosX(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -33,7 +33,7 @@ double TranslocationFunctions::getPosX(unsigned short pid) noexcept
return player->Position()->pos[0]; return player->Position()->pos[0];
} }
double TranslocationFunctions::getPosY(unsigned short pid) noexcept double TranslocationFunctions::GetPosY(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -41,7 +41,7 @@ double TranslocationFunctions::getPosY(unsigned short pid) noexcept
return player->Position()->pos[1]; return player->Position()->pos[1];
} }
double TranslocationFunctions::getPosZ(unsigned short pid) noexcept double TranslocationFunctions::GetPosZ(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -49,7 +49,7 @@ double TranslocationFunctions::getPosZ(unsigned short pid) noexcept
return player->Position()->pos[2]; return player->Position()->pos[2];
} }
void TranslocationFunctions::getAngle(unsigned short pid, float *x, float *y, float *z) noexcept void TranslocationFunctions::GetAngle(unsigned short pid, float *x, float *y, float *z) noexcept
{ {
*x = 0.00; *x = 0.00;
*y = 0.00; *y = 0.00;
@ -63,7 +63,7 @@ void TranslocationFunctions::getAngle(unsigned short pid, float *x, float *y, fl
*z = player->Position()->rot[2]; *z = player->Position()->rot[2];
} }
double TranslocationFunctions::getAngleX(unsigned short pid) noexcept double TranslocationFunctions::GetAngleX(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -71,7 +71,7 @@ double TranslocationFunctions::getAngleX(unsigned short pid) noexcept
return player->Position()->rot[0]; return player->Position()->rot[0];
} }
double TranslocationFunctions::getAngleY(unsigned short pid) noexcept double TranslocationFunctions::GetAngleY(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -79,7 +79,7 @@ double TranslocationFunctions::getAngleY(unsigned short pid) noexcept
return player->Position()->rot[1]; return player->Position()->rot[1];
} }
double TranslocationFunctions::getAngleZ(unsigned short pid) noexcept double TranslocationFunctions::GetAngleZ(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0.0f); GET_PLAYER(pid, player, 0.0f);
@ -87,7 +87,7 @@ double TranslocationFunctions::getAngleZ(unsigned short pid) noexcept
return player->Position()->rot[2]; return player->Position()->rot[2];
} }
void TranslocationFunctions::setPos(unsigned short pid, double x, double y, double z) noexcept void TranslocationFunctions::SetPos(unsigned short pid, double x, double y, double z) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -97,7 +97,7 @@ void TranslocationFunctions::setPos(unsigned short pid, double x, double y, doub
player->Position()->pos[2] = z; player->Position()->pos[2] = z;
} }
void TranslocationFunctions::setAngle(unsigned short pid, double x, double y, double z) noexcept void TranslocationFunctions::SetAngle(unsigned short pid, double x, double y, double z) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );
@ -107,7 +107,7 @@ void TranslocationFunctions::setAngle(unsigned short pid, double x, double y, do
player->Position()->rot[2] = z; player->Position()->rot[2] = z;
} }
const char* TranslocationFunctions::getCell(unsigned short pid) noexcept const char* TranslocationFunctions::GetCell(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, 0); GET_PLAYER(pid, player, 0);
@ -115,7 +115,7 @@ const char* TranslocationFunctions::getCell(unsigned short pid) noexcept
return player->getCell()->mName.c_str(); return player->getCell()->mName.c_str();
} }
void TranslocationFunctions::setCell(unsigned short pid, const char *name) noexcept void TranslocationFunctions::SetCell(unsigned short pid, const char *name) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -135,7 +135,7 @@ void TranslocationFunctions::setCell(unsigned short pid, const char *name) noexc
player->getCell()->mName = name; player->getCell()->mName = name;
} }
void TranslocationFunctions::setExterior(unsigned short pid, int x, int y) noexcept void TranslocationFunctions::SetExterior(unsigned short pid, int x, int y) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -156,21 +156,21 @@ void TranslocationFunctions::setExterior(unsigned short pid, int x, int y) noexc
player->getCell()->mData.mY = y; player->getCell()->mData.mY = y;
} }
int TranslocationFunctions::getExteriorX(unsigned short pid) noexcept int TranslocationFunctions::GetExteriorX(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,0); GET_PLAYER(pid, player,0);
return player->getCell()->mData.mX; return player->getCell()->mData.mX;
} }
int TranslocationFunctions::getExteriorY(unsigned short pid) noexcept int TranslocationFunctions::GetExteriorY(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,0); GET_PLAYER(pid, player,0);
return player->getCell()->mData.mY; return player->getCell()->mData.mY;
} }
bool TranslocationFunctions::isInExterior(unsigned short pid) noexcept bool TranslocationFunctions::IsInExterior(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, false); GET_PLAYER(pid, player, false);
@ -178,7 +178,7 @@ bool TranslocationFunctions::isInExterior(unsigned short pid) noexcept
return player->getCell()->isExterior(); return player->getCell()->isExterior();
} }
void TranslocationFunctions::sendPos(unsigned short pid) noexcept void TranslocationFunctions::SendPos(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );
@ -186,7 +186,7 @@ void TranslocationFunctions::sendPos(unsigned short pid) noexcept
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_POS)->Send(player, false); mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_POS)->Send(player, false);
} }
void TranslocationFunctions::sendCell(unsigned short pid) noexcept void TranslocationFunctions::SendCell(unsigned short pid) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player, ); GET_PLAYER(pid, player, );

View file

@ -8,55 +8,55 @@
#include "../Types.hpp" #include "../Types.hpp"
#define TRANSLOCATIONFUNCTIONS \ #define TRANSLOCATIONFUNCTIONS \
{"getPos", TranslocationFunctions::getPos},\ {"GetPos", TranslocationFunctions::GetPos},\
{"getPosX", TranslocationFunctions::getPosX},\ {"GetPosX", TranslocationFunctions::GetPosX},\
{"getPosY", TranslocationFunctions::getPosY},\ {"GetPosY", TranslocationFunctions::GetPosY},\
{"getPosZ", TranslocationFunctions::getPosZ},\ {"GetPosZ", TranslocationFunctions::GetPosZ},\
\ \
{"getAngle", TranslocationFunctions::getAngle},\ {"GetAngle", TranslocationFunctions::GetAngle},\
{"getAngleX", TranslocationFunctions::getAngleX},\ {"GetAngleX", TranslocationFunctions::GetAngleX},\
{"getAngleY", TranslocationFunctions::getAngleY},\ {"GetAngleY", TranslocationFunctions::GetAngleY},\
{"getAngleZ", TranslocationFunctions::getAngleZ},\ {"GetAngleZ", TranslocationFunctions::GetAngleZ},\
\ \
{"setPos", TranslocationFunctions::setPos},\ {"SetPos", TranslocationFunctions::SetPos},\
{"setAngle", TranslocationFunctions::setAngle},\ {"SetAngle", TranslocationFunctions::SetAngle},\
\ \
{"getCell", TranslocationFunctions::getCell},\ {"GetCell", TranslocationFunctions::GetCell},\
{"setCell", TranslocationFunctions::setCell},\ {"SetCell", TranslocationFunctions::SetCell},\
{"setExterior", TranslocationFunctions::setExterior},\ {"SetExterior", TranslocationFunctions::SetExterior},\
{"getExteriorX", TranslocationFunctions::getExteriorX},\ {"GetExteriorX", TranslocationFunctions::GetExteriorX},\
{"getExteriorY", TranslocationFunctions::getExteriorY},\ {"GetExteriorY", TranslocationFunctions::GetExteriorY},\
{"isInExterior", TranslocationFunctions::isInExterior},\ {"IsInExterior", TranslocationFunctions::IsInExterior},\
\ \
{"sendPos", TranslocationFunctions::sendPos},\ {"SendPos", TranslocationFunctions::SendPos},\
{"sendCell", TranslocationFunctions::sendCell} {"SendCell", TranslocationFunctions::SendCell}
class TranslocationFunctions class TranslocationFunctions
{ {
public: public:
static void getPos(unsigned short pid, float *x, float *y, float *z) noexcept; static void GetPos(unsigned short pid, float *x, float *y, float *z) noexcept;
static double getPosX(unsigned short pid) noexcept; static double GetPosX(unsigned short pid) noexcept;
static double getPosY(unsigned short pid) noexcept; static double GetPosY(unsigned short pid) noexcept;
static double getPosZ(unsigned short pid) noexcept; static double GetPosZ(unsigned short pid) noexcept;
static void getAngle(unsigned short pid, float *x, float *y, float *z) noexcept; static void GetAngle(unsigned short pid, float *x, float *y, float *z) noexcept;
static double getAngleX(unsigned short pid) noexcept; static double GetAngleX(unsigned short pid) noexcept;
static double getAngleY(unsigned short pid) noexcept; static double GetAngleY(unsigned short pid) noexcept;
static double getAngleZ(unsigned short pid) noexcept; static double GetAngleZ(unsigned short pid) noexcept;
static void setPos(unsigned short pid, double x, double y, double z) noexcept; static void SetPos(unsigned short pid, double x, double y, double z) noexcept;
static void setAngle(unsigned short pid, double x, double y, double z) noexcept; static void SetAngle(unsigned short pid, double x, double y, double z) noexcept;
static const char *getCell(unsigned short pid) noexcept; static const char *GetCell(unsigned short pid) noexcept;
static void setCell(unsigned short pid, const char *name) noexcept; static void SetCell(unsigned short pid, const char *name) noexcept;
static void setExterior(unsigned short pid, int x, int y) noexcept; static void SetExterior(unsigned short pid, int x, int y) noexcept;
static int getExteriorX(unsigned short pid) noexcept; static int GetExteriorX(unsigned short pid) noexcept;
static int getExteriorY(unsigned short pid) noexcept; static int GetExteriorY(unsigned short pid) noexcept;
static bool isInExterior(unsigned short pid) noexcept; static bool IsInExterior(unsigned short pid) noexcept;
static void sendPos(unsigned short pid) noexcept; static void SendPos(unsigned short pid) noexcept;
static void sendCell(unsigned short pid) noexcept; static void SendCell(unsigned short pid) noexcept;
}; };
#endif //OPENMW_TRANSLOCATIONS_HPP #endif //OPENMW_TRANSLOCATIONS_HPP

View file

@ -8,7 +8,7 @@
#include <components/openmw-mp/NetworkMessages.hpp> #include <components/openmw-mp/NetworkMessages.hpp>
#include "World.hpp" #include "World.hpp"
void WorldFunctions::setHour(unsigned short pid, double hour) noexcept void WorldFunctions::SetHour(unsigned short pid, double hour) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -20,7 +20,7 @@ void WorldFunctions::setHour(unsigned short pid, double hour) noexcept
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_TIME)->Send(player, false); mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_TIME)->Send(player, false);
} }
void WorldFunctions::setMonth(unsigned short pid, int month) noexcept void WorldFunctions::SetMonth(unsigned short pid, int month) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);
@ -33,7 +33,7 @@ void WorldFunctions::setMonth(unsigned short pid, int month) noexcept
} }
void WorldFunctions::setDay(unsigned short pid, int day) noexcept void WorldFunctions::SetDay(unsigned short pid, int day) noexcept
{ {
Player *player; Player *player;
GET_PLAYER(pid, player,); GET_PLAYER(pid, player,);

View file

@ -6,16 +6,16 @@
#define OPENMW_WORLD_HPP #define OPENMW_WORLD_HPP
#define WORLDFUNCTIONS \ #define WORLDFUNCTIONS \
{"setHour", WorldFunctions::setHour},\ {"SetHour", WorldFunctions::SetHour},\
{"setMonth", WorldFunctions::setMonth},\ {"SetMonth", WorldFunctions::SetMonth},\
{"setDay", WorldFunctions::setDay} {"SetDay", WorldFunctions::SetDay}
class WorldFunctions class WorldFunctions
{ {
public: public:
static void setHour(unsigned short pid, double hour) noexcept; static void SetHour(unsigned short pid, double hour) noexcept;
static void setMonth(unsigned short pid, int month) noexcept; static void SetMonth(unsigned short pid, int month) noexcept;
static void setDay(unsigned short pid, int day) noexcept; static void SetDay(unsigned short pid, int day) noexcept;
}; };