From 46b41b605a868e96392abdf4bc5042cd69d26b1c Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 16 Nov 2016 19:28:22 +0200 Subject: [PATCH] Revert "Use lowerCamelCase in tes3mp server script function names, part 1" This reverts commit 0e2b589cdbfbf2d2ce8315170c043c7395619ac4. --- apps/openmw-mp/Script/Functions/CharClass.cpp | 32 +-- apps/openmw-mp/Script/Functions/CharClass.hpp | 64 +++--- apps/openmw-mp/Script/Functions/Items.cpp | 28 +-- apps/openmw-mp/Script/Functions/Items.hpp | 50 ++--- apps/openmw-mp/Script/Functions/Stats.cpp | 106 ++++----- apps/openmw-mp/Script/Functions/Stats.hpp | 212 +++++++++--------- .../Script/Functions/Translocations.cpp | 36 +-- .../Script/Functions/Translocations.hpp | 72 +++--- apps/openmw-mp/Script/Functions/World.cpp | 6 +- apps/openmw-mp/Script/Functions/World.hpp | 12 +- 10 files changed, 309 insertions(+), 309 deletions(-) diff --git a/apps/openmw-mp/Script/Functions/CharClass.cpp b/apps/openmw-mp/Script/Functions/CharClass.cpp index 48f12f64a..7449c6b62 100644 --- a/apps/openmw-mp/Script/Functions/CharClass.cpp +++ b/apps/openmw-mp/Script/Functions/CharClass.cpp @@ -10,7 +10,7 @@ using namespace std; using namespace ESM; -void CharClassFunctions::sendClass(unsigned short pid) noexcept +void CharClassFunctions::SendClass(unsigned short pid) noexcept { Player *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); } -void CharClassFunctions::setDefaultClass(unsigned short pid, const char *id) noexcept +void CharClassFunctions::SetDefaultClass(unsigned short pid, const char *id) noexcept { Player *player; GET_PLAYER(pid, player,); 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; GET_PLAYER(pid, player,); player->charClass.mName = name; 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; GET_PLAYER(pid, player,); 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; GET_PLAYER(pid, player,); @@ -48,13 +48,13 @@ void CharClassFunctions::setClassMajorAttribute(unsigned short pid, unsigned cha 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; GET_PLAYER(pid, player,); 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; GET_PLAYER(pid, player,); @@ -62,7 +62,7 @@ void CharClassFunctions::setClassMajorSkill(unsigned short pid, unsigned char sl throw invalid_argument("Incorrect skill slot id"); 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; GET_PLAYER(pid, player,); @@ -71,35 +71,35 @@ void CharClassFunctions::setClassMinorSkill(unsigned short pid, unsigned char sl player->charClass.mData.mSkills[slot][0] = skillId; } -int CharClassFunctions::isClassDefault(unsigned short pid) noexcept +int CharClassFunctions::IsClassDefault(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player,0); 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; GET_PLAYER(pid, player,""); return player->charClass.mId.c_str(); } -const char *CharClassFunctions::getClassName(unsigned short pid) noexcept +const char *CharClassFunctions::GetClassName(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player,""); return player->charClass.mName.c_str(); } -const char *CharClassFunctions::getClassDesc(unsigned short pid) noexcept +const char *CharClassFunctions::GetClassDesc(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player,""); 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; GET_PLAYER(pid, player,0); @@ -108,14 +108,14 @@ int CharClassFunctions::getClassMajorAttribute(unsigned short pid, unsigned char return player->charClass.mData.mAttribute[slot]; } -int CharClassFunctions::getClassSpecialization(unsigned short pid) noexcept +int CharClassFunctions::GetClassSpecialization(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player,0); 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; 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]; } -int CharClassFunctions::getClassMinorSkill(unsigned short pid, unsigned char slot) noexcept +int CharClassFunctions::GetClassMinorSkill(unsigned short pid, unsigned char slot) noexcept { Player *player; GET_PLAYER(pid, player,0); diff --git a/apps/openmw-mp/Script/Functions/CharClass.hpp b/apps/openmw-mp/Script/Functions/CharClass.hpp index a115a2288..bfa54852e 100644 --- a/apps/openmw-mp/Script/Functions/CharClass.hpp +++ b/apps/openmw-mp/Script/Functions/CharClass.hpp @@ -8,75 +8,75 @@ #include "../Types.hpp" #define CHARCLASSFUNCTIONS \ -{"setDefaultClass", CharClassFunctions::setDefaultClass},\ -{"setClassName", CharClassFunctions::setClassName},\ -{"setClassDesc", CharClassFunctions::setClassDesc},\ -{"setClassMajorAttribute", CharClassFunctions::setClassMajorAttribute},\ -{"setClassSpecialization", CharClassFunctions::setClassSpecialization},\ -{"setClassMajorSkill", CharClassFunctions::setClassMajorSkill},\ -{"setClassMinorSkill", CharClassFunctions::setClassMinorSkill},\ -{"getDefaultClass", CharClassFunctions::getDefaultClass},\ -{"getClassName", CharClassFunctions::getClassName},\ -{"getClassDesc", CharClassFunctions::getClassDesc},\ -{"getClassMajorAttribute", CharClassFunctions::getClassMajorAttribute},\ -{"getClassSpecialization", CharClassFunctions::getClassSpecialization},\ -{"getClassMajorSkill", CharClassFunctions::getClassMajorSkill},\ -{"getClassMinorSkill", CharClassFunctions::getClassMinorSkill},\ -{"isClassDefault", CharClassFunctions::isClassDefault},\ -{"sendClass", CharClassFunctions::sendClass} +{"SetDefaultClass", CharClassFunctions::SetDefaultClass},\ +{"SetClassName", CharClassFunctions::SetClassName},\ +{"SetClassDesc", CharClassFunctions::SetClassDesc},\ +{"SetClassMajorAttribute", CharClassFunctions::SetClassMajorAttribute},\ +{"SetClassSpecialization", CharClassFunctions::SetClassSpecialization},\ +{"SetClassMajorSkill", CharClassFunctions::SetClassMajorSkill},\ +{"SetClassMinorSkill", CharClassFunctions::SetClassMinorSkill},\ +{"GetDefaultClass", CharClassFunctions::GetDefaultClass},\ +{"GetClassName", CharClassFunctions::GetClassName},\ +{"GetClassDesc", CharClassFunctions::GetClassDesc},\ +{"GetClassMajorAttribute", CharClassFunctions::GetClassMajorAttribute},\ +{"GetClassSpecialization", CharClassFunctions::GetClassSpecialization},\ +{"GetClassMajorSkill", CharClassFunctions::GetClassMajorSkill},\ +{"GetClassMinorSkill", CharClassFunctions::GetClassMinorSkill},\ +{"IsClassDefault", CharClassFunctions::IsClassDefault},\ +{"SendClass", CharClassFunctions::SendClass} class CharClassFunctions { public: CharClassFunctions() {} - static void setDefaultClass(unsigned short pid, const char *id) noexcept; - static void setClassName(unsigned short pid, const char *name) noexcept; - static void setClassDesc(unsigned short pid, const char *desc) noexcept; + static void SetDefaultClass(unsigned short pid, const char *id) noexcept; + static void SetClassName(unsigned short pid, const char *name) noexcept; + static void SetClassDesc(unsigned short pid, const char *desc) noexcept; /** * \param pid * \param slot 0 = first, 1 = second * \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 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 slot 0 to 4 * \param skillId */ - 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 SetClassMajorSkill(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 *getClassName(unsigned short pid) noexcept; - static const char *getClassDesc(unsigned short pid) noexcept; + static const char *GetDefaultClass(unsigned short pid) noexcept; + static const char *GetClassName(unsigned short pid) noexcept; + static const char *GetClassDesc(unsigned short pid) noexcept; /** * \param pid * \param slot 0 = first, 1 = second * \return attrId */ - static int getClassMajorAttribute(unsigned short pid, unsigned char slot) noexcept; + static int GetClassMajorAttribute(unsigned short pid, unsigned char slot) noexcept; /** * \param pid * \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 slot 0 to 4 * \return skillId */ - static int getClassMajorSkill(unsigned short pid, unsigned char slot) noexcept; - static int getClassMinorSkill(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 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 diff --git a/apps/openmw-mp/Script/Functions/Items.cpp b/apps/openmw-mp/Script/Functions/Items.cpp index 04f200a96..32d148193 100644 --- a/apps/openmw-mp/Script/Functions/Items.cpp +++ b/apps/openmw-mp/Script/Functions/Items.cpp @@ -10,7 +10,7 @@ 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; GET_PLAYER(pid, player,); @@ -24,7 +24,7 @@ void ItemFunctions::addItem(unsigned short pid, const char* itemName, unsigned i 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; GET_PLAYER(pid, player,); @@ -34,13 +34,13 @@ void ItemFunctions::equipItem(unsigned short pid, unsigned short slot, const cha 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"); - //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; 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(); } -bool ItemFunctions::hasItemEquipped(unsigned short pid, const char* itemName) +bool ItemFunctions::HasItemEquipped(unsigned short pid, const char* itemName) { Player *player; GET_PLAYER(pid, player, false); @@ -59,7 +59,7 @@ bool ItemFunctions::hasItemEquipped(unsigned short pid, const char* itemName) 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; 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.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"); } -const char *ItemFunctions::getItemName(unsigned short pid, unsigned int i) noexcept +const char *ItemFunctions::GetItemName(unsigned short pid, unsigned int i) noexcept { Player *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(); } -int ItemFunctions::getItemCount2(unsigned short pid, unsigned int i) noexcept +int ItemFunctions::GetItemCount2(unsigned short pid, unsigned int i) noexcept { Player *player; 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; } -int ItemFunctions::getItemHealth(unsigned short pid, unsigned int i) noexcept +int ItemFunctions::GetItemHealth(unsigned short pid, unsigned int i) noexcept { Player *player; 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; } -unsigned int ItemFunctions::getInventorySize(unsigned short pid) noexcept +unsigned int ItemFunctions::GetInventorySize(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0); @@ -109,7 +109,7 @@ unsigned int ItemFunctions::getInventorySize(unsigned short pid) noexcept return player->inventory.count; } -void ItemFunctions::sendEquipment(unsigned short pid) noexcept +void ItemFunctions::SendEquipment(unsigned short pid) noexcept { Player *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); } -void ItemFunctions::sendInventory(unsigned short pid) noexcept +void ItemFunctions::SendInventory(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, ); diff --git a/apps/openmw-mp/Script/Functions/Items.hpp b/apps/openmw-mp/Script/Functions/Items.hpp index 9e976da25..0a9acf723 100644 --- a/apps/openmw-mp/Script/Functions/Items.hpp +++ b/apps/openmw-mp/Script/Functions/Items.hpp @@ -6,38 +6,38 @@ #define OPENMW_ITEMS_HPP #define ITEMAPI \ - {"addItem", ItemFunctions::addItem},\ - {"removeItem", ItemFunctions::removeItem},\ - {"getItemCount", ItemFunctions::getItemCount2},\ - {"equipItem", ItemFunctions::equipItem},\ - {"unequipItem", ItemFunctions::unequipItem},\ - {"getItemSlot", ItemFunctions::getItemSlot},\ - {"hasItemEquipped", ItemFunctions::hasItemEquipped},\ - {"getItemName", ItemFunctions::getItemName},\ - {"getItemHealth", ItemFunctions::getItemHealth},\ - {"getInventorySize", ItemFunctions::getInventorySize},\ + {"AddItem", ItemFunctions::AddItem},\ + {"RemoveItem", ItemFunctions::RemoveItem},\ + {"GetItemCount", ItemFunctions::GetItemCount2},\ + {"EquipItem", ItemFunctions::EquipItem},\ + {"UnequipItem", ItemFunctions::UnequipItem},\ + {"GetItemSlot", ItemFunctions::GetItemSlot},\ + {"HasItemEquipped", ItemFunctions::HasItemEquipped},\ + {"GetItemName", ItemFunctions::GetItemName},\ + {"GetItemHealth", ItemFunctions::GetItemHealth},\ + {"GetInventorySize", ItemFunctions::GetInventorySize},\ \ - {"sendEquipment", ItemFunctions::sendEquipment},\ - {"sendInventory", ItemFunctions::sendInventory}\ + {"SendEquipment", ItemFunctions::SendEquipment},\ + {"SendInventory", ItemFunctions::SendInventory}\ class ItemFunctions { public: - 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 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 unequipItem(unsigned short pid, unsigned short slot) noexcept; - static bool hasItemEquipped(unsigned short pid, const char* itemName); - static const char *getItemSlot(unsigned short pid, unsigned short slot) 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 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 UnequipItem(unsigned short pid, unsigned short slot) noexcept; + static bool HasItemEquipped(unsigned short pid, const char* itemName); + static const char *GetItemSlot(unsigned short pid, unsigned short slot) noexcept; - static const char *getItemName(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 unsigned int getInventorySize(unsigned short pid) noexcept; + static const char *GetItemName(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 unsigned int GetInventorySize(unsigned short pid) noexcept; - static void sendEquipment(unsigned short pid) noexcept; - static void sendInventory(unsigned short pid) noexcept; + static void SendEquipment(unsigned short pid) noexcept; + static void SendInventory(unsigned short pid) noexcept; private: }; diff --git a/apps/openmw-mp/Script/Functions/Stats.cpp b/apps/openmw-mp/Script/Functions/Stats.cpp index f7a69be36..7e4b3b77b 100644 --- a/apps/openmw-mp/Script/Functions/Stats.cpp +++ b/apps/openmw-mp/Script/Functions/Stats.cpp @@ -15,7 +15,7 @@ using namespace std; 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; GET_PLAYER(pid, player,); @@ -26,7 +26,7 @@ void StatsFunctions::setName(unsigned short pid, const char *name) noexcept player->Npc()->mName = name; } -const char *StatsFunctions::getName(unsigned short pid) noexcept +const char *StatsFunctions::GetName(unsigned short pid) noexcept { Player *player; @@ -35,7 +35,7 @@ const char *StatsFunctions::getName(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -46,7 +46,7 @@ void StatsFunctions::setBirthsign(unsigned short pid, const char *sign) noexcept *player->BirthSign() = sign; } -const char *StatsFunctions::getBirthsign(unsigned short pid) noexcept +const char *StatsFunctions::GetBirthsign(unsigned short pid) noexcept { Player *player; @@ -56,7 +56,7 @@ const char *StatsFunctions::getBirthsign(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -72,7 +72,7 @@ void StatsFunctions::setRace(unsigned short pid, const char *race) noexcept player->Npc()->mRace = race; } -const char *StatsFunctions::getRace(unsigned short pid) noexcept +const char *StatsFunctions::GetRace(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0); @@ -80,7 +80,7 @@ const char *StatsFunctions::getRace(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -91,7 +91,7 @@ void StatsFunctions::setHead(unsigned short pid, const char *head) noexcept player->Npc()->mHead = head; } -const char *StatsFunctions::getHead(unsigned short pid) noexcept +const char *StatsFunctions::GetHead(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0); @@ -99,7 +99,7 @@ const char *StatsFunctions::getHead(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -110,7 +110,7 @@ void StatsFunctions::setHairstyle(unsigned short pid, const char *style) noexcep player->Npc()->mHair = style; } -const char *StatsFunctions::getHairstyle(unsigned short pid) noexcept +const char *StatsFunctions::GetHairstyle(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0); @@ -118,7 +118,7 @@ const char *StatsFunctions::getHairstyle(unsigned short pid) noexcept return player->Npc()->mHair.c_str(); } -int StatsFunctions::getIsMale(unsigned short pid) noexcept +int StatsFunctions::GetIsMale(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player,false); @@ -126,7 +126,7 @@ int StatsFunctions::getIsMale(unsigned short pid) noexcept return player->Npc()->isMale(); } -void StatsFunctions::setIsMale(unsigned short pid, int value) noexcept +void StatsFunctions::SetIsMale(unsigned short pid, int value) noexcept { Player *player; GET_PLAYER(pid, player,); @@ -134,7 +134,7 @@ void StatsFunctions::setIsMale(unsigned short pid, int value) noexcept player->Npc()->setIsMale(value == true); } -int StatsFunctions::getLevel(unsigned short pid) noexcept +int StatsFunctions::GetLevel(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -142,7 +142,7 @@ int StatsFunctions::getLevel(unsigned short pid) noexcept return player->CreatureStats()->mLevel; } -void StatsFunctions::setLevel(unsigned short pid, int value) noexcept +void StatsFunctions::SetLevel(unsigned short pid, int value) noexcept { Player *player; GET_PLAYER(pid, player, ); @@ -150,7 +150,7 @@ void StatsFunctions::setLevel(unsigned short pid, int value) noexcept player->CreatureStats()->mLevel = value; } -int StatsFunctions::getLevelProgress(unsigned short pid) noexcept +int StatsFunctions::GetLevelProgress(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -158,7 +158,7 @@ int StatsFunctions::getLevelProgress(unsigned short pid) noexcept return player->NpcStats()->mLevelProgress; } -void StatsFunctions::setLevelProgress(unsigned short pid, int value) noexcept +void StatsFunctions::SetLevelProgress(unsigned short pid, int value) noexcept { Player *player; GET_PLAYER(pid, player, ); @@ -166,7 +166,7 @@ void StatsFunctions::setLevelProgress(unsigned short pid, int value) noexcept player->NpcStats()->mLevelProgress = value; } -double StatsFunctions::getHealthBase(unsigned short pid) noexcept +double StatsFunctions::GetHealthBase(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -174,7 +174,7 @@ double StatsFunctions::getHealthBase(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -182,7 +182,7 @@ void StatsFunctions::setHealthBase(unsigned short pid, double value) noexcept player->CreatureStats()->mDynamic[0].mBase = value; } -double StatsFunctions::getHealthCurrent(unsigned short pid) noexcept +double StatsFunctions::GetHealthCurrent(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -190,7 +190,7 @@ double StatsFunctions::getHealthCurrent(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -198,7 +198,7 @@ void StatsFunctions::setHealthCurrent(unsigned short pid, double value) noexcept player->CreatureStats()->mDynamic[0].mCurrent = value; } -double StatsFunctions::getMagickaBase(unsigned short pid) noexcept +double StatsFunctions::GetMagickaBase(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -206,7 +206,7 @@ double StatsFunctions::getMagickaBase(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -214,7 +214,7 @@ void StatsFunctions::setMagickaBase(unsigned short pid, double value) noexcept player->CreatureStats()->mDynamic[1].mBase = value; } -double StatsFunctions::getMagickaCurrent(unsigned short pid) noexcept +double StatsFunctions::GetMagickaCurrent(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -222,7 +222,7 @@ double StatsFunctions::getMagickaCurrent(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -230,7 +230,7 @@ void StatsFunctions::setMagickaCurrent(unsigned short pid, double value) noexcep player->CreatureStats()->mDynamic[1].mCurrent = value; } -double StatsFunctions::getFatigueBase(unsigned short pid) noexcept +double StatsFunctions::GetFatigueBase(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -238,7 +238,7 @@ double StatsFunctions::getFatigueBase(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -246,7 +246,7 @@ void StatsFunctions::setFatigueBase(unsigned short pid, double value) noexcept player->CreatureStats()->mDynamic[2].mBase = value; } -double StatsFunctions::getFatigueCurrent(unsigned short pid) noexcept +double StatsFunctions::GetFatigueCurrent(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -254,7 +254,7 @@ double StatsFunctions::getFatigueCurrent(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -262,17 +262,17 @@ void StatsFunctions::setFatigueCurrent(unsigned short pid, double value) noexcep player->CreatureStats()->mDynamic[2].mCurrent = value; } -int StatsFunctions::getAttributeCount() noexcept +int StatsFunctions::GetAttributeCount() noexcept { return Attribute::Length; } -int StatsFunctions::getSkillCount() noexcept +int StatsFunctions::GetSkillCount() noexcept { 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++) { @@ -285,7 +285,7 @@ int StatsFunctions::getAttributeId(const char *name) noexcept return -1; } -int StatsFunctions::getSkillId(const char *name) noexcept +int StatsFunctions::GetSkillId(const char *name) noexcept { for (int x = 0; x < Skill::Length; x++) { @@ -298,7 +298,7 @@ int StatsFunctions::getSkillId(const char *name) noexcept return -1; } -const char *StatsFunctions::getAttributeName(unsigned short attribute) noexcept +const char *StatsFunctions::GetAttributeName(unsigned short attribute) noexcept { if (attribute >= Attribute::Length) return "invalid"; @@ -306,7 +306,7 @@ const char *StatsFunctions::getAttributeName(unsigned short attribute) noexcept 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) return "invalid"; @@ -314,7 +314,7 @@ const char *StatsFunctions::getSkillName(unsigned short skill) noexcept 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; GET_PLAYER(pid, player, 0); @@ -325,7 +325,7 @@ int StatsFunctions::getAttributeBase(unsigned short pid, unsigned short attribut 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; GET_PLAYER(pid, player,); @@ -336,7 +336,7 @@ void StatsFunctions::setAttributeBase(unsigned short pid, unsigned short attribu 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; GET_PLAYER(pid, player, 0); @@ -347,7 +347,7 @@ int StatsFunctions::getAttributeCurrent(unsigned short pid, unsigned short attri 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; GET_PLAYER(pid, player,); @@ -358,7 +358,7 @@ void StatsFunctions::setAttributeCurrent(unsigned short pid, unsigned short attr 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; 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; } -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; GET_PLAYER(pid, player,); @@ -380,7 +380,7 @@ void StatsFunctions::setSkillBase(unsigned short pid, unsigned short skill, int 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; 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; } -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; GET_PLAYER(pid, player,); @@ -402,7 +402,7 @@ void StatsFunctions::setSkillCurrent(unsigned short pid, unsigned short skill, i 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; 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; } -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; GET_PLAYER(pid, player, ); @@ -424,7 +424,7 @@ void StatsFunctions::setSkillProgress(unsigned short pid, unsigned short skill, 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; GET_PLAYER(pid, player, 0); @@ -435,7 +435,7 @@ int StatsFunctions::getSkillIncrease(unsigned short pid, unsigned int 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; GET_PLAYER(pid, player,); @@ -446,7 +446,7 @@ void StatsFunctions::setSkillIncrease(unsigned short pid, unsigned int attribute 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; 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); } -void StatsFunctions::resurrect(unsigned short pid) +void StatsFunctions::Resurrect(unsigned short pid) { Player *player; GET_PLAYER(pid, player,); 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; 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); } -void StatsFunctions::sendDynamicStats(unsigned short pid) noexcept +void StatsFunctions::SendDynamicStats(unsigned short pid) noexcept { Player *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); } -void StatsFunctions::sendAttributes(unsigned short pid) noexcept +void StatsFunctions::SendAttributes(unsigned short pid) noexcept { Player *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); } -void StatsFunctions::sendSkills(unsigned short pid) noexcept +void StatsFunctions::SendSkills(unsigned short pid) noexcept { Player *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); } -void StatsFunctions::sendLevel(unsigned short pid) noexcept +void StatsFunctions::SendLevel(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, ); diff --git a/apps/openmw-mp/Script/Functions/Stats.hpp b/apps/openmw-mp/Script/Functions/Stats.hpp index d92dc26c0..64aaaab1b 100644 --- a/apps/openmw-mp/Script/Functions/Stats.hpp +++ b/apps/openmw-mp/Script/Functions/Stats.hpp @@ -6,146 +6,146 @@ #define OPENMW_STATS_HPP #define STATSFUNCTIONS \ - {"getName", StatsFunctions::getName},\ - {"setName", StatsFunctions::setName},\ + {"GetName", StatsFunctions::GetName},\ + {"SetName", StatsFunctions::SetName},\ \ - {"getRace", StatsFunctions::getRace},\ - {"setRace", StatsFunctions::setRace},\ + {"GetRace", StatsFunctions::GetRace},\ + {"SetRace", StatsFunctions::SetRace},\ \ - {"getHead", StatsFunctions::getHead},\ - {"setHead", StatsFunctions::setHead},\ + {"GetHead", StatsFunctions::GetHead},\ + {"SetHead", StatsFunctions::SetHead},\ \ - {"GetHair", StatsFunctions::getHairstyle},\ - {"SetHair", StatsFunctions::setHairstyle},\ + {"GetHair", StatsFunctions::GetHairstyle},\ + {"SetHair", StatsFunctions::SetHairstyle},\ \ - {"getIsMale", StatsFunctions::getIsMale},\ - {"setIsMale", StatsFunctions::setIsMale},\ + {"GetIsMale", StatsFunctions::GetIsMale},\ + {"SetIsMale", StatsFunctions::SetIsMale},\ \ - {"getLevel", StatsFunctions::getLevel},\ - {"setLevel", StatsFunctions::setLevel},\ - {"getLevelProgress", StatsFunctions::getLevelProgress},\ - {"setLevelProgress", StatsFunctions::setLevelProgress},\ + {"GetLevel", StatsFunctions::GetLevel},\ + {"SetLevel", StatsFunctions::SetLevel},\ + {"GetLevelProgress", StatsFunctions::GetLevelProgress},\ + {"SetLevelProgress", StatsFunctions::SetLevelProgress},\ \ - {"getBirthsign", StatsFunctions::getBirthsign},\ - {"setBirthsign", StatsFunctions::setBirthsign},\ + {"GetBirthsign", StatsFunctions::GetBirthsign},\ + {"SetBirthsign", StatsFunctions::SetBirthsign},\ \ - {"getAttributeCount", StatsFunctions::getAttributeCount},\ - {"getSkillCount", StatsFunctions::getSkillCount},\ - {"getAttributeId", StatsFunctions::getAttributeId},\ - {"getSkillId", StatsFunctions::getSkillId},\ - {"getAttributeName", StatsFunctions::getAttributeName},\ - {"getSkillName", StatsFunctions::getSkillName},\ + {"GetAttributeCount", StatsFunctions::GetAttributeCount},\ + {"GetSkillCount", StatsFunctions::GetSkillCount},\ + {"GetAttributeId", StatsFunctions::GetAttributeId},\ + {"GetSkillId", StatsFunctions::GetSkillId},\ + {"GetAttributeName", StatsFunctions::GetAttributeName},\ + {"GetSkillName", StatsFunctions::GetSkillName},\ \ - {"getAttributeBase", StatsFunctions::getAttributeBase},\ - {"setAttributeBase", StatsFunctions::setAttributeBase},\ - {"getAttributeCurrent", StatsFunctions::getAttributeCurrent},\ - {"setAttributeCurrent", StatsFunctions::setAttributeCurrent},\ + {"GetAttributeBase", StatsFunctions::GetAttributeBase},\ + {"SetAttributeBase", StatsFunctions::SetAttributeBase},\ + {"GetAttributeCurrent", StatsFunctions::GetAttributeCurrent},\ + {"SetAttributeCurrent", StatsFunctions::SetAttributeCurrent},\ \ - {"getSkillBase", StatsFunctions::getSkillBase},\ - {"setSkillBase", StatsFunctions::setSkillBase},\ - {"getSkillCurrent", StatsFunctions::getSkillCurrent},\ - {"setSkillCurrent", StatsFunctions::setSkillCurrent},\ - {"getSkillProgress", StatsFunctions::getSkillProgress},\ - {"setSkillProgress", StatsFunctions::setSkillProgress},\ + {"GetSkillBase", StatsFunctions::GetSkillBase},\ + {"SetSkillBase", StatsFunctions::SetSkillBase},\ + {"GetSkillCurrent", StatsFunctions::GetSkillCurrent},\ + {"SetSkillCurrent", StatsFunctions::SetSkillCurrent},\ + {"GetSkillProgress", StatsFunctions::GetSkillProgress},\ + {"SetSkillProgress", StatsFunctions::SetSkillProgress},\ \ - {"getHealthBase", StatsFunctions::getHealthBase},\ - {"setHealthBase", StatsFunctions::setHealthBase},\ - {"getHealthCurrent", StatsFunctions::getHealthCurrent},\ - {"setHealthCurrent", StatsFunctions::setHealthCurrent},\ + {"GetHealthBase", StatsFunctions::GetHealthBase},\ + {"SetHealthBase", StatsFunctions::SetHealthBase},\ + {"GetHealthCurrent", StatsFunctions::GetHealthCurrent},\ + {"SetHealthCurrent", StatsFunctions::SetHealthCurrent},\ \ - {"getMagickaBase", StatsFunctions::getMagickaBase},\ - {"setMagickaBase", StatsFunctions::setMagickaBase},\ - {"getMagickaCurrent", StatsFunctions::getMagickaCurrent},\ - {"setMagickaCurrent", StatsFunctions::setMagickaCurrent},\ + {"GetMagickaBase", StatsFunctions::GetMagickaBase},\ + {"SetMagickaBase", StatsFunctions::SetMagickaBase},\ + {"GetMagickaCurrent", StatsFunctions::GetMagickaCurrent},\ + {"SetMagickaCurrent", StatsFunctions::SetMagickaCurrent},\ \ - {"setFatigueBase", StatsFunctions::setFatigueBase},\ - {"getFatigueBase", StatsFunctions::getFatigueBase},\ - {"setFatigueCurrent", StatsFunctions::setFatigueCurrent},\ - {"getFatigueCurrent", StatsFunctions::getFatigueCurrent},\ + {"SetFatigueBase", StatsFunctions::SetFatigueBase},\ + {"GetFatigueBase", StatsFunctions::GetFatigueBase},\ + {"SetFatigueCurrent", StatsFunctions::SetFatigueCurrent},\ + {"GetFatigueCurrent", StatsFunctions::GetFatigueCurrent},\ \ - {"getSkillIncrease", StatsFunctions::getSkillIncrease},\ - {"setSkillIncrease", StatsFunctions::setSkillIncrease},\ + {"GetSkillIncrease", StatsFunctions::GetSkillIncrease},\ + {"SetSkillIncrease", StatsFunctions::SetSkillIncrease},\ \ - {"setCharGenStage", StatsFunctions::setCharGenStage},\ - {"resurrect", StatsFunctions::resurrect},\ - {"sendBaseInfo", StatsFunctions::sendBaseInfo},\ + {"SetCharGenStage", StatsFunctions::SetCharGenStage},\ + {"Resurrect", StatsFunctions::Resurrect},\ + {"SendBaseInfo", StatsFunctions::SendBaseInfo},\ \ - {"sendDynamicStats", StatsFunctions::sendDynamicStats},\ - {"sendAttributes", StatsFunctions::sendAttributes},\ - {"sendSkills", StatsFunctions::sendSkills},\ - {"sendLevel", StatsFunctions::sendLevel} + {"SendDynamicStats", StatsFunctions::SendDynamicStats},\ + {"SendAttributes", StatsFunctions::SendAttributes},\ + {"SendSkills", StatsFunctions::SendSkills},\ + {"SendLevel", StatsFunctions::SendLevel} class StatsFunctions { public: - static void setName(unsigned short pid, const char *name) noexcept; - static const char *getName(unsigned short pid) noexcept; + static void SetName(unsigned short pid, const char *name) noexcept; + static const char *GetName(unsigned short pid) noexcept; - static void setBirthsign(unsigned short pid, const char *name) noexcept; - static const char *getBirthsign(unsigned short pid) noexcept; + static void SetBirthsign(unsigned short pid, const char *name) noexcept; + static const char *GetBirthsign(unsigned short pid) noexcept; - static void setRace(unsigned short pid, const char *race) noexcept; - static const char *getRace(unsigned short pid) noexcept; + static void SetRace(unsigned short pid, const char *race) noexcept; + static const char *GetRace(unsigned short pid) noexcept; - static void setHead(unsigned short pid, const char *head) noexcept; - static const char *getHead(unsigned short pid) noexcept; + static void SetHead(unsigned short pid, const char *head) noexcept; + static const char *GetHead(unsigned short pid) noexcept; - static void setHairstyle(unsigned short pid, const char *style) noexcept; - static const char *getHairstyle(unsigned short pid) noexcept; + static void SetHairstyle(unsigned short pid, const char *style) noexcept; + static const char *GetHairstyle(unsigned short pid) noexcept; - static void setIsMale(unsigned short pid, int male) noexcept; - static int getIsMale(unsigned short pid) noexcept; + static void SetIsMale(unsigned short pid, int male) noexcept; + static int GetIsMale(unsigned short pid) noexcept; - static int getLevel(unsigned short pid) noexcept; - static void setLevel(unsigned short pid, int value) noexcept; - static int getLevelProgress(unsigned short pid) noexcept; - static void setLevelProgress(unsigned short pid, int value) noexcept; + static int GetLevel(unsigned short pid) noexcept; + static void SetLevel(unsigned short pid, int value) noexcept; + static int GetLevelProgress(unsigned short pid) noexcept; + static void SetLevelProgress(unsigned short pid, int value) noexcept; - static double getHealthBase(unsigned short pid) noexcept; - static void setHealthBase(unsigned short pid, double value) noexcept; - static double getHealthCurrent(unsigned short pid) noexcept; - static void setHealthCurrent(unsigned short pid, double value) noexcept; + static double GetHealthBase(unsigned short pid) noexcept; + static void SetHealthBase(unsigned short pid, double value) noexcept; + static double GetHealthCurrent(unsigned short pid) noexcept; + static void SetHealthCurrent(unsigned short pid, double value) noexcept; - static double getMagickaBase(unsigned short pid) noexcept; - static void setMagickaBase(unsigned short pid, double value) noexcept; - static double getMagickaCurrent(unsigned short pid) noexcept; - static void setMagickaCurrent(unsigned short pid, double value) noexcept; + static double GetMagickaBase(unsigned short pid) noexcept; + static void SetMagickaBase(unsigned short pid, double value) noexcept; + static double GetMagickaCurrent(unsigned short pid) noexcept; + static void SetMagickaCurrent(unsigned short pid, double value) noexcept; - static double getFatigueBase(unsigned short pid) noexcept; - static void setFatigueBase(unsigned short pid, double value) noexcept; - static double getFatigueCurrent(unsigned short pid) noexcept; - static void setFatigueCurrent(unsigned short pid, double value) noexcept; + static double GetFatigueBase(unsigned short pid) noexcept; + static void SetFatigueBase(unsigned short pid, double value) noexcept; + static double GetFatigueCurrent(unsigned short pid) noexcept; + static void SetFatigueCurrent(unsigned short pid, double value) noexcept; - static int getAttributeCount() noexcept; - static int getSkillCount() noexcept; - static int getAttributeId(const char *name) noexcept; - static int getSkillId(const char *name) noexcept; - static const char *getAttributeName(unsigned short attribute) noexcept; - static const char *getSkillName(unsigned short skill) noexcept; + static int GetAttributeCount() noexcept; + static int GetSkillCount() noexcept; + static int GetAttributeId(const char *name) noexcept; + static int GetSkillId(const char *name) noexcept; + static const char *GetAttributeName(unsigned short attribute) noexcept; + static const char *GetSkillName(unsigned short skill) noexcept; - static int getAttributeBase(unsigned short pid, unsigned short attribute) noexcept; - static void setAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept; - static int getAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept; - static void setAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept; + static int GetAttributeBase(unsigned short pid, unsigned short attribute) noexcept; + static void SetAttributeBase(unsigned short pid, unsigned short attribute, int value) noexcept; + static int GetAttributeCurrent(unsigned short pid, unsigned short attribute) noexcept; + static void SetAttributeCurrent(unsigned short pid, unsigned short attribute, int value) noexcept; - static int getSkillBase(unsigned short pid, unsigned short skill) noexcept; - static void setSkillBase(unsigned short pid, unsigned short skill, int value) noexcept; - static int getSkillCurrent(unsigned short pid, unsigned short skill) noexcept; - static void setSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept; - static double getSkillProgress(unsigned short pid, unsigned short skill) noexcept; - static void setSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept; + static int GetSkillBase(unsigned short pid, unsigned short skill) noexcept; + static void SetSkillBase(unsigned short pid, unsigned short skill, int value) noexcept; + static int GetSkillCurrent(unsigned short pid, unsigned short skill) noexcept; + static void SetSkillCurrent(unsigned short pid, unsigned short skill, int value) noexcept; + static double GetSkillProgress(unsigned short pid, unsigned short skill) noexcept; + static void SetSkillProgress(unsigned short pid, unsigned short skill, double value) noexcept; - static int getSkillIncrease(unsigned short pid, unsigned int pos) noexcept; - static void setSkillIncrease(unsigned short pid, unsigned int pos, int value) 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 resurrect(unsigned short pid); - static void setCharGenStage(unsigned short pid, int start, int end) noexcept; - static void sendBaseInfo(unsigned short pid) noexcept; + static void Resurrect(unsigned short pid); + static void SetCharGenStage(unsigned short pid, int start, int end) noexcept; + static void SendBaseInfo(unsigned short pid) noexcept; - static void sendDynamicStats(unsigned short pid) noexcept; - static void sendAttributes(unsigned short pid) noexcept; - static void sendSkills(unsigned short pid) noexcept; - static void sendLevel(unsigned short pid) noexcept; + static void SendDynamicStats(unsigned short pid) noexcept; + static void SendAttributes(unsigned short pid) noexcept; + static void SendSkills(unsigned short pid) noexcept; + static void SendLevel(unsigned short pid) noexcept; }; #endif //OPENMW_STATS_HPP diff --git a/apps/openmw-mp/Script/Functions/Translocations.cpp b/apps/openmw-mp/Script/Functions/Translocations.cpp index eca92a15d..f32c7be74 100644 --- a/apps/openmw-mp/Script/Functions/Translocations.cpp +++ b/apps/openmw-mp/Script/Functions/Translocations.cpp @@ -11,7 +11,7 @@ #include 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; *y = 0.00; @@ -25,7 +25,7 @@ void TranslocationFunctions::getPos(unsigned short pid, float *x, float *y, floa *z = player->Position()->pos[2]; } -double TranslocationFunctions::getPosX(unsigned short pid) noexcept +double TranslocationFunctions::GetPosX(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -33,7 +33,7 @@ double TranslocationFunctions::getPosX(unsigned short pid) noexcept return player->Position()->pos[0]; } -double TranslocationFunctions::getPosY(unsigned short pid) noexcept +double TranslocationFunctions::GetPosY(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -41,7 +41,7 @@ double TranslocationFunctions::getPosY(unsigned short pid) noexcept return player->Position()->pos[1]; } -double TranslocationFunctions::getPosZ(unsigned short pid) noexcept +double TranslocationFunctions::GetPosZ(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -49,7 +49,7 @@ double TranslocationFunctions::getPosZ(unsigned short pid) noexcept 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; *y = 0.00; @@ -63,7 +63,7 @@ void TranslocationFunctions::getAngle(unsigned short pid, float *x, float *y, fl *z = player->Position()->rot[2]; } -double TranslocationFunctions::getAngleX(unsigned short pid) noexcept +double TranslocationFunctions::GetAngleX(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -71,7 +71,7 @@ double TranslocationFunctions::getAngleX(unsigned short pid) noexcept return player->Position()->rot[0]; } -double TranslocationFunctions::getAngleY(unsigned short pid) noexcept +double TranslocationFunctions::GetAngleY(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -79,7 +79,7 @@ double TranslocationFunctions::getAngleY(unsigned short pid) noexcept return player->Position()->rot[1]; } -double TranslocationFunctions::getAngleZ(unsigned short pid) noexcept +double TranslocationFunctions::GetAngleZ(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -87,7 +87,7 @@ double TranslocationFunctions::getAngleZ(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -97,7 +97,7 @@ void TranslocationFunctions::setPos(unsigned short pid, double x, double y, doub 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; GET_PLAYER(pid, player, ); @@ -107,7 +107,7 @@ void TranslocationFunctions::setAngle(unsigned short pid, double x, double y, do player->Position()->rot[2] = z; } -const char* TranslocationFunctions::getCell(unsigned short pid) noexcept +const char* TranslocationFunctions::GetCell(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0); @@ -115,7 +115,7 @@ const char* TranslocationFunctions::getCell(unsigned short pid) noexcept 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; GET_PLAYER(pid, player,); @@ -135,7 +135,7 @@ void TranslocationFunctions::setCell(unsigned short pid, const char *name) noexc 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; GET_PLAYER(pid, player,); @@ -156,21 +156,21 @@ void TranslocationFunctions::setExterior(unsigned short pid, int x, int y) noexc player->getCell()->mData.mY = y; } -int TranslocationFunctions::getExteriorX(unsigned short pid) noexcept +int TranslocationFunctions::GetExteriorX(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player,0); return player->getCell()->mData.mX; } -int TranslocationFunctions::getExteriorY(unsigned short pid) noexcept +int TranslocationFunctions::GetExteriorY(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player,0); return player->getCell()->mData.mY; } -bool TranslocationFunctions::isInExterior(unsigned short pid) noexcept +bool TranslocationFunctions::IsInExterior(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, false); @@ -178,7 +178,7 @@ bool TranslocationFunctions::isInExterior(unsigned short pid) noexcept return player->getCell()->isExterior(); } -void TranslocationFunctions::sendPos(unsigned short pid) noexcept +void TranslocationFunctions::SendPos(unsigned short pid) noexcept { Player *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); } -void TranslocationFunctions::sendCell(unsigned short pid) noexcept +void TranslocationFunctions::SendCell(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, ); diff --git a/apps/openmw-mp/Script/Functions/Translocations.hpp b/apps/openmw-mp/Script/Functions/Translocations.hpp index 4c30ec9d1..72a8b493a 100644 --- a/apps/openmw-mp/Script/Functions/Translocations.hpp +++ b/apps/openmw-mp/Script/Functions/Translocations.hpp @@ -8,55 +8,55 @@ #include "../Types.hpp" #define TRANSLOCATIONFUNCTIONS \ - {"getPos", TranslocationFunctions::getPos},\ - {"getPosX", TranslocationFunctions::getPosX},\ - {"getPosY", TranslocationFunctions::getPosY},\ - {"getPosZ", TranslocationFunctions::getPosZ},\ + {"GetPos", TranslocationFunctions::GetPos},\ + {"GetPosX", TranslocationFunctions::GetPosX},\ + {"GetPosY", TranslocationFunctions::GetPosY},\ + {"GetPosZ", TranslocationFunctions::GetPosZ},\ \ - {"getAngle", TranslocationFunctions::getAngle},\ - {"getAngleX", TranslocationFunctions::getAngleX},\ - {"getAngleY", TranslocationFunctions::getAngleY},\ - {"getAngleZ", TranslocationFunctions::getAngleZ},\ + {"GetAngle", TranslocationFunctions::GetAngle},\ + {"GetAngleX", TranslocationFunctions::GetAngleX},\ + {"GetAngleY", TranslocationFunctions::GetAngleY},\ + {"GetAngleZ", TranslocationFunctions::GetAngleZ},\ \ - {"setPos", TranslocationFunctions::setPos},\ - {"setAngle", TranslocationFunctions::setAngle},\ + {"SetPos", TranslocationFunctions::SetPos},\ + {"SetAngle", TranslocationFunctions::SetAngle},\ \ - {"getCell", TranslocationFunctions::getCell},\ - {"setCell", TranslocationFunctions::setCell},\ - {"setExterior", TranslocationFunctions::setExterior},\ - {"getExteriorX", TranslocationFunctions::getExteriorX},\ - {"getExteriorY", TranslocationFunctions::getExteriorY},\ - {"isInExterior", TranslocationFunctions::isInExterior},\ + {"GetCell", TranslocationFunctions::GetCell},\ + {"SetCell", TranslocationFunctions::SetCell},\ + {"SetExterior", TranslocationFunctions::SetExterior},\ + {"GetExteriorX", TranslocationFunctions::GetExteriorX},\ + {"GetExteriorY", TranslocationFunctions::GetExteriorY},\ + {"IsInExterior", TranslocationFunctions::IsInExterior},\ \ - {"sendPos", TranslocationFunctions::sendPos},\ - {"sendCell", TranslocationFunctions::sendCell} + {"SendPos", TranslocationFunctions::SendPos},\ + {"SendCell", TranslocationFunctions::SendCell} class TranslocationFunctions { public: - static void getPos(unsigned short pid, float *x, float *y, float *z) noexcept; - static double getPosX(unsigned short pid) noexcept; - static double getPosY(unsigned short pid) noexcept; - static double getPosZ(unsigned short pid) noexcept; + static void GetPos(unsigned short pid, float *x, float *y, float *z) noexcept; + static double GetPosX(unsigned short pid) noexcept; + static double GetPosY(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 double getAngleX(unsigned short pid) noexcept; - static double getAngleY(unsigned short pid) noexcept; - static double getAngleZ(unsigned short pid) noexcept; + static void GetAngle(unsigned short pid, float *x, float *y, float *z) noexcept; + static double GetAngleX(unsigned short pid) noexcept; + static double GetAngleY(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 setAngle(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 const char *getCell(unsigned short pid) noexcept; - static void setCell(unsigned short pid, const char *name) noexcept; - static void setExterior(unsigned short pid, int x, int y) noexcept; - static int getExteriorX(unsigned short pid) noexcept; - static int getExteriorY(unsigned short pid) noexcept; - static bool isInExterior(unsigned short pid) noexcept; + static const char *GetCell(unsigned short pid) noexcept; + static void SetCell(unsigned short pid, const char *name) noexcept; + static void SetExterior(unsigned short pid, int x, int y) noexcept; + static int GetExteriorX(unsigned short pid) noexcept; + static int GetExteriorY(unsigned short pid) noexcept; + static bool IsInExterior(unsigned short pid) noexcept; - static void sendPos(unsigned short pid) noexcept; - static void sendCell(unsigned short pid) noexcept; + static void SendPos(unsigned short pid) noexcept; + static void SendCell(unsigned short pid) noexcept; }; #endif //OPENMW_TRANSLOCATIONS_HPP diff --git a/apps/openmw-mp/Script/Functions/World.cpp b/apps/openmw-mp/Script/Functions/World.cpp index 50888ff69..4987d3a1c 100644 --- a/apps/openmw-mp/Script/Functions/World.cpp +++ b/apps/openmw-mp/Script/Functions/World.cpp @@ -8,7 +8,7 @@ #include #include "World.hpp" -void WorldFunctions::setHour(unsigned short pid, double hour) noexcept +void WorldFunctions::SetHour(unsigned short pid, double hour) noexcept { Player *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); } -void WorldFunctions::setMonth(unsigned short pid, int month) noexcept +void WorldFunctions::SetMonth(unsigned short pid, int month) noexcept { Player *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; GET_PLAYER(pid, player,); diff --git a/apps/openmw-mp/Script/Functions/World.hpp b/apps/openmw-mp/Script/Functions/World.hpp index 6afcc48eb..6bffb268c 100644 --- a/apps/openmw-mp/Script/Functions/World.hpp +++ b/apps/openmw-mp/Script/Functions/World.hpp @@ -6,16 +6,16 @@ #define OPENMW_WORLD_HPP #define WORLDFUNCTIONS \ - {"setHour", WorldFunctions::setHour},\ - {"setMonth", WorldFunctions::setMonth},\ - {"setDay", WorldFunctions::setDay} + {"SetHour", WorldFunctions::SetHour},\ + {"SetMonth", WorldFunctions::SetMonth},\ + {"SetDay", WorldFunctions::SetDay} class WorldFunctions { public: - static void setHour(unsigned short pid, double hour) noexcept; - static void setMonth(unsigned short pid, int month) noexcept; - static void setDay(unsigned short pid, int day) noexcept; + static void SetHour(unsigned short pid, double hour) noexcept; + static void SetMonth(unsigned short pid, int month) noexcept; + static void SetDay(unsigned short pid, int day) noexcept; };