From 1f6fae4c70d653f3af83017910c91db21424179a Mon Sep 17 00:00:00 2001 From: Emagi Date: Tue, 6 May 2025 09:54:48 -0400 Subject: [PATCH] Docs code --- docs/code/Achievements.md | 56 ++ docs/code/AchievementsDB.md | 19 + docs/code/AltAdvancement.md | 31 ++ docs/code/AltAdvancementDB.md | 17 + docs/code/Appearances.md | 26 + docs/code/Bot.md | 35 ++ docs/code/BotBrain.md | 17 + docs/code/BotCommands.md | 52 ++ docs/code/BotDB.md | 28 + docs/code/CRC16.md | 14 + docs/code/Character.md | 14 + docs/code/Chat.md | 29 ++ docs/code/ChatChannel.md | 31 ++ docs/code/ChatDB.md | 14 + docs/code/ChestTrap.md | 38 ++ docs/code/ClientPacketFunctions.md | 21 + docs/code/Collections.md | 45 ++ docs/code/CollectionsDB.md | 29 ++ docs/code/Combat.md | 16 + docs/code/Commands.md | 215 ++++++++ docs/code/CommandsDB.md | 27 + docs/code/Common_Defines.md | 14 + docs/code/Common_Index.md | 84 +++ docs/code/Condition.md | 19 + docs/code/ConfigReader.md | 21 + docs/code/ConsoleCommands.md | 36 ++ docs/code/Crypto.md | 19 + docs/code/DataBuffer.md | 29 ++ docs/code/DatabaseNew.md | 27 + docs/code/DatabaseResult.md | 36 ++ docs/code/EQ2_Common_Structs.md | 34 ++ docs/code/EQEMuError.md | 17 + docs/code/EQPacket.md | 50 ++ docs/code/EQStream.md | 94 ++++ docs/code/EQStreamFactory.md | 27 + docs/code/Entity.md | 792 +++++++++++++++++++++++++++++ docs/code/Factions.md | 34 ++ docs/code/GlobalHeaders.md | 15 + docs/code/GroundSpawn.md | 28 + docs/code/Guild.md | 141 +++++ docs/code/GuildDB.md | 49 ++ docs/code/HTTPSClient.md | 22 + docs/code/HTTPSClientPool.md | 34 ++ docs/code/HeroicOp.md | 42 ++ docs/code/HeroicOpDB.md | 15 + docs/code/HeroicOpPackets.md | 22 + docs/code/HousingDB.md | 22 + docs/code/HousingPackets.md | 26 + docs/code/Items.md | 184 +++++++ docs/code/ItemsDB.md | 59 +++ docs/code/Items_CoE.md | 139 +++++ docs/code/Items_DoV.md | 141 +++++ docs/code/Items_ToV.md | 22 + docs/code/JsonParser.md | 15 + docs/code/LWorld.md | 72 +++ docs/code/Languages.md | 25 + docs/code/Log.md | 19 + docs/code/LogTypes.md | 22 + docs/code/LoginAccount.md | 25 + docs/code/LoginDatabase.md | 66 +++ docs/code/LoginServer.md | 31 ++ docs/code/LoginServer_Index.md | 6 + docs/code/LoginWeb.md | 16 + docs/code/Loot.md | 14 + docs/code/LootDB.md | 27 + docs/code/LuaFunctions.md | 587 +++++++++++++++++++++ docs/code/LuaInterface.md | 116 +++++ docs/code/MiscFunctions.md | 74 +++ docs/code/Mutex.md | 31 ++ docs/code/MutexHelper.md | 26 + docs/code/MutexList.md | 33 ++ docs/code/MutexMap.md | 29 ++ docs/code/MutexVector.md | 26 + docs/code/NPC.md | 71 +++ docs/code/NPC_AI.md | 56 ++ docs/code/Object.md | 19 + docs/code/PacketHeaders.md | 20 + docs/code/PacketStruct.md | 178 +++++++ docs/code/PeerManager.md | 77 +++ docs/code/Player.md | 379 ++++++++++++++ docs/code/PlayerGroups.md | 100 ++++ docs/code/Quests.md | 191 +++++++ docs/code/RC4.md | 15 + docs/code/RaceTypes.md | 25 + docs/code/RaceTypesDB.md | 14 + docs/code/Recipe.md | 108 ++++ docs/code/RecipeDB.md | 29 ++ docs/code/Rules.md | 52 ++ docs/code/RulesDB.md | 18 + docs/code/Sign.md | 46 ++ docs/code/Skills.md | 49 ++ docs/code/Spawn.md | 452 ++++++++++++++++ docs/code/SpawnLists.md | 17 + docs/code/SpellProcess.md | 81 +++ docs/code/Spells.md | 73 +++ docs/code/TCPConnection.md | 61 +++ docs/code/Titles.md | 28 + docs/code/Trade.md | 31 ++ docs/code/Tradeskills.md | 44 ++ docs/code/TradeskillsDB.md | 14 + docs/code/TradeskillsPackets.md | 34 ++ docs/code/Traits.md | 30 ++ docs/code/Transmute.md | 18 + docs/code/Variables.md | 18 + docs/code/VisualStates.md | 40 ++ docs/code/WebServer.md | 22 + docs/code/Widget.md | 66 +++ docs/code/World.md | 163 ++++++ docs/code/WorldDatabase.md | 406 +++++++++++++++ docs/code/WorldServer_Index.md | 164 ++++++ docs/code/WorldTCPConnection.md | 14 + docs/code/WorldWeb.md | 74 +++ docs/code/classes.md | 27 + docs/code/client.md | 376 ++++++++++++++ docs/code/database.md | 39 ++ docs/code/dbcore.md | 23 + docs/code/debug.md | 34 ++ docs/code/emu_opcodes.md | 18 + docs/code/emu_oplist.md | 22 + docs/code/index.md | 17 + docs/code/linked_list.md | 60 +++ docs/code/login_opcodes.md | 15 + docs/code/login_oplist.md | 15 + docs/code/login_structs.md | 21 + docs/code/map.md | 49 ++ docs/code/md5.md | 18 + docs/code/misc.md | 33 ++ docs/code/mob_movement_manager.md | 44 ++ docs/code/net.md | 39 ++ docs/code/op_codes.md | 14 + docs/code/opcodemgr.md | 32 ++ docs/code/packet_dump.md | 22 + docs/code/packet_functions.md | 27 + docs/code/pathfinder_interface.md | 17 + docs/code/pathfinder_nav_mesh.md | 20 + docs/code/pathfinder_null.md | 13 + docs/code/pathfinder_waypoint.md | 24 + docs/code/position.md | 42 ++ docs/code/queue.md | 19 + docs/code/races.md | 16 + docs/code/raycast_mesh.md | 22 + docs/code/region_map.md | 25 + docs/code/region_map_v1.md | 20 + docs/code/seperator.md | 27 + docs/code/servertalk.md | 69 +++ docs/code/sha512.md | 26 + docs/code/string_util.md | 46 ++ docs/code/timer.md | 33 ++ docs/code/types.md | 26 + docs/code/unix.md | 14 + docs/code/version.md | 14 + docs/code/xmlParser.md | 90 ++++ docs/code/zoneserver.md | 396 +++++++++++++++ 153 files changed, 9529 insertions(+) create mode 100644 docs/code/Achievements.md create mode 100644 docs/code/AchievementsDB.md create mode 100644 docs/code/AltAdvancement.md create mode 100644 docs/code/AltAdvancementDB.md create mode 100644 docs/code/Appearances.md create mode 100644 docs/code/Bot.md create mode 100644 docs/code/BotBrain.md create mode 100644 docs/code/BotCommands.md create mode 100644 docs/code/BotDB.md create mode 100644 docs/code/CRC16.md create mode 100644 docs/code/Character.md create mode 100644 docs/code/Chat.md create mode 100644 docs/code/ChatChannel.md create mode 100644 docs/code/ChatDB.md create mode 100644 docs/code/ChestTrap.md create mode 100644 docs/code/ClientPacketFunctions.md create mode 100644 docs/code/Collections.md create mode 100644 docs/code/CollectionsDB.md create mode 100644 docs/code/Combat.md create mode 100644 docs/code/Commands.md create mode 100644 docs/code/CommandsDB.md create mode 100644 docs/code/Common_Defines.md create mode 100644 docs/code/Common_Index.md create mode 100644 docs/code/Condition.md create mode 100644 docs/code/ConfigReader.md create mode 100644 docs/code/ConsoleCommands.md create mode 100644 docs/code/Crypto.md create mode 100644 docs/code/DataBuffer.md create mode 100644 docs/code/DatabaseNew.md create mode 100644 docs/code/DatabaseResult.md create mode 100644 docs/code/EQ2_Common_Structs.md create mode 100644 docs/code/EQEMuError.md create mode 100644 docs/code/EQPacket.md create mode 100644 docs/code/EQStream.md create mode 100644 docs/code/EQStreamFactory.md create mode 100644 docs/code/Entity.md create mode 100644 docs/code/Factions.md create mode 100644 docs/code/GlobalHeaders.md create mode 100644 docs/code/GroundSpawn.md create mode 100644 docs/code/Guild.md create mode 100644 docs/code/GuildDB.md create mode 100644 docs/code/HTTPSClient.md create mode 100644 docs/code/HTTPSClientPool.md create mode 100644 docs/code/HeroicOp.md create mode 100644 docs/code/HeroicOpDB.md create mode 100644 docs/code/HeroicOpPackets.md create mode 100644 docs/code/HousingDB.md create mode 100644 docs/code/HousingPackets.md create mode 100644 docs/code/Items.md create mode 100644 docs/code/ItemsDB.md create mode 100644 docs/code/Items_CoE.md create mode 100644 docs/code/Items_DoV.md create mode 100644 docs/code/Items_ToV.md create mode 100644 docs/code/JsonParser.md create mode 100644 docs/code/LWorld.md create mode 100644 docs/code/Languages.md create mode 100644 docs/code/Log.md create mode 100644 docs/code/LogTypes.md create mode 100644 docs/code/LoginAccount.md create mode 100644 docs/code/LoginDatabase.md create mode 100644 docs/code/LoginServer.md create mode 100644 docs/code/LoginServer_Index.md create mode 100644 docs/code/LoginWeb.md create mode 100644 docs/code/Loot.md create mode 100644 docs/code/LootDB.md create mode 100644 docs/code/LuaFunctions.md create mode 100644 docs/code/LuaInterface.md create mode 100644 docs/code/MiscFunctions.md create mode 100644 docs/code/Mutex.md create mode 100644 docs/code/MutexHelper.md create mode 100644 docs/code/MutexList.md create mode 100644 docs/code/MutexMap.md create mode 100644 docs/code/MutexVector.md create mode 100644 docs/code/NPC.md create mode 100644 docs/code/NPC_AI.md create mode 100644 docs/code/Object.md create mode 100644 docs/code/PacketHeaders.md create mode 100644 docs/code/PacketStruct.md create mode 100644 docs/code/PeerManager.md create mode 100644 docs/code/Player.md create mode 100644 docs/code/PlayerGroups.md create mode 100644 docs/code/Quests.md create mode 100644 docs/code/RC4.md create mode 100644 docs/code/RaceTypes.md create mode 100644 docs/code/RaceTypesDB.md create mode 100644 docs/code/Recipe.md create mode 100644 docs/code/RecipeDB.md create mode 100644 docs/code/Rules.md create mode 100644 docs/code/RulesDB.md create mode 100644 docs/code/Sign.md create mode 100644 docs/code/Skills.md create mode 100644 docs/code/Spawn.md create mode 100644 docs/code/SpawnLists.md create mode 100644 docs/code/SpellProcess.md create mode 100644 docs/code/Spells.md create mode 100644 docs/code/TCPConnection.md create mode 100644 docs/code/Titles.md create mode 100644 docs/code/Trade.md create mode 100644 docs/code/Tradeskills.md create mode 100644 docs/code/TradeskillsDB.md create mode 100644 docs/code/TradeskillsPackets.md create mode 100644 docs/code/Traits.md create mode 100644 docs/code/Transmute.md create mode 100644 docs/code/Variables.md create mode 100644 docs/code/VisualStates.md create mode 100644 docs/code/WebServer.md create mode 100644 docs/code/Widget.md create mode 100644 docs/code/World.md create mode 100644 docs/code/WorldDatabase.md create mode 100644 docs/code/WorldServer_Index.md create mode 100644 docs/code/WorldTCPConnection.md create mode 100644 docs/code/WorldWeb.md create mode 100644 docs/code/classes.md create mode 100644 docs/code/client.md create mode 100644 docs/code/database.md create mode 100644 docs/code/dbcore.md create mode 100644 docs/code/debug.md create mode 100644 docs/code/emu_opcodes.md create mode 100644 docs/code/emu_oplist.md create mode 100644 docs/code/index.md create mode 100644 docs/code/linked_list.md create mode 100644 docs/code/login_opcodes.md create mode 100644 docs/code/login_oplist.md create mode 100644 docs/code/login_structs.md create mode 100644 docs/code/map.md create mode 100644 docs/code/md5.md create mode 100644 docs/code/misc.md create mode 100644 docs/code/mob_movement_manager.md create mode 100644 docs/code/net.md create mode 100644 docs/code/op_codes.md create mode 100644 docs/code/opcodemgr.md create mode 100644 docs/code/packet_dump.md create mode 100644 docs/code/packet_functions.md create mode 100644 docs/code/pathfinder_interface.md create mode 100644 docs/code/pathfinder_nav_mesh.md create mode 100644 docs/code/pathfinder_null.md create mode 100644 docs/code/pathfinder_waypoint.md create mode 100644 docs/code/position.md create mode 100644 docs/code/queue.md create mode 100644 docs/code/races.md create mode 100644 docs/code/raycast_mesh.md create mode 100644 docs/code/region_map.md create mode 100644 docs/code/region_map_v1.md create mode 100644 docs/code/seperator.md create mode 100644 docs/code/servertalk.md create mode 100644 docs/code/sha512.md create mode 100644 docs/code/string_util.md create mode 100644 docs/code/timer.md create mode 100644 docs/code/types.md create mode 100644 docs/code/unix.md create mode 100644 docs/code/version.md create mode 100644 docs/code/xmlParser.md create mode 100644 docs/code/zoneserver.md diff --git a/docs/code/Achievements.md b/docs/code/Achievements.md new file mode 100644 index 0000000..ea4aac8 --- /dev/null +++ b/docs/code/Achievements.md @@ -0,0 +1,56 @@ +# File: `Achievements.h` + +## Classes + +- `AchievementRewards` +- `AchievementRequirements` +- `AchievementUpdateItems` +- `Achievement` +- `AchievementUpdate` +- `MasterAchievementList` +- `PlayerAchievementList` +- `PlayerAchievementUpdateList` + +## Functions + +- `void SetID(int32 id) {this->id = id;}` +- `void SetTitle(const char *title) {strncpy(this->title, title, sizeof(this->title));}` +- `void SetUncompletedText(const char *uncompleted_text) {strncpy(this->uncompleted_text, uncompleted_text, sizeof(this->uncompleted_text));}` +- `void SetCompletedText(const char *completed_text) {strncpy(this->completed_text, completed_text, sizeof(this->completed_text));}` +- `void SetCategory(const char *category) {strncpy(this->category, category, sizeof(this->category));}` +- `void SetExpansion(const char *expansion) {strncpy(this->expansion, expansion, sizeof(this->expansion));}` +- `void SetIcon(int16 icon) {this->icon = icon;}` +- `void SetPointValue(int32 point_value) {this->point_value = point_value;}` +- `void SetQtyReq(int32 qty_req) {this->qty_req = qty_req;}` +- `void SetHide(bool hide) {this->hide = hide;}` +- `void SetUnknown3a(int32 unknown3a) {this->unknown3a = unknown3a;}` +- `void SetUnknown3b(int32 unknown3b) {this->unknown3b = unknown3b;}` +- `void AddAchievementRequirement(struct AchievementRequirements *requirements);` +- `void AddAchievementReward(struct AchievementRewards *reward);` +- `int32 GetID() {return id;}` +- `int16 GetIcon() {return icon;}` +- `int32 GetPointValue() {return point_value;}` +- `int32 GetQtyReq() {return qty_req;}` +- `bool GetHide() {return hide;}` +- `int32 GetUnknown3a() {return unknown3a;}` +- `int32 GetUnknown3b() {return unknown3b;}` +- `void SetID(int32 id) {this->id = id;}` +- `void SetCompletedDate(int32 completed_date) {this->completed_date = completed_date;}` +- `void AddAchievementUpdateItems(struct AchievementUpdateItems *update_items);` +- `int32 GetID() {return id;}` +- `int32 GetCompletedDate() {return completed_date;}` +- `bool AddAchievement(Achievement *achievement);` +- `void ClearAchievements();` +- `int32 Size();` +- `void CreateMasterAchievementListPacket();` +- `bool AddAchievement(Achievement *achievement);` +- `void ClearAchievements();` +- `int32 Size();` +- `bool AddAchievementUpdate(AchievementUpdate *achievement_update);` +- `void ClearAchievementUpdates();` +- `int32 Size();` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/AchievementsDB.md b/docs/code/AchievementsDB.md new file mode 100644 index 0000000..f0a4038 --- /dev/null +++ b/docs/code/AchievementsDB.md @@ -0,0 +1,19 @@ +# File: `AchievementsDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadAchievements()` +- `int32 WorldDatabase::LoadAchievementRequirements(Achievement *achievement)` +- `int32 WorldDatabase::LoadAchievementRewards(Achievement *achievement)` +- `void WorldDatabase::LoadPlayerAchievements(Player *player) {` +- `int32 WorldDatabase::LoadPlayerAchievementsUpdates(Player *player) {` +- `int32 WorldDatabase::LoadPlayerAchievementsUpdateItems(AchievementUpdate *update, int32 player_id) {` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/AltAdvancement.md b/docs/code/AltAdvancement.md new file mode 100644 index 0000000..55c12b2 --- /dev/null +++ b/docs/code/AltAdvancement.md @@ -0,0 +1,31 @@ +# File: `AltAdvancement.h` + +## Classes + +- `AltAdvanceData` +- `MasterAAList` +- `TreeNodeData` +- `MasterAANodeList` + +## Functions + +- `void AddAltAdvancement(AltAdvanceData* data);` +- `int Size();` +- `void DestroyAltAdvancements();` +- `void DisplayAA(Client* client,int8 newtemplate,int8 changemode);` +- `void AddTreeNode(TreeNodeData* data);` +- `int Size();` +- `void DestroyTreeNodes();` + +## Notable Comments + +- /* +- */ +- // defines for AA tabs based on group # from DB +- /// Sorts the Alternate Advancements for the given client, creates and sends the OP_AdventureList packet. +- /// The Client calling this function +- /// EQ2Packet* +- /// Add Alternate Advancement data to the global list. +- /// The Alternate Advancement data to add. +- /// Get the total number of Alternate Advancements in the global list. +- /// Get the Alternate Advancement data for the given spell. diff --git a/docs/code/AltAdvancementDB.md b/docs/code/AltAdvancementDB.md new file mode 100644 index 0000000..2b1663c --- /dev/null +++ b/docs/code/AltAdvancementDB.md @@ -0,0 +1,17 @@ +# File: `AltAdvancementDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadAltAdvancements()` +- `void WorldDatabase::LoadTreeNodes()` +- `void WorldDatabase::LoadPlayerAA(Player *player)` + +## Notable Comments + +- /* +- */ +- //MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT `spell_id`, `group`, `icon`, `icon2`, `col`, `row`, `rank_cost`, `max_cost`, `rank_prereq_id`, `rank_prereq`, `class_req`, `tier`, `class_name`, `subclass_name`, `line_title` FROM spell_aa"); diff --git a/docs/code/Appearances.md b/docs/code/Appearances.md new file mode 100644 index 0000000..ec96aa0 --- /dev/null +++ b/docs/code/Appearances.md @@ -0,0 +1,26 @@ +# File: `Appearances.h` + +## Classes + +- `Appearance` +- `Appearances` + +## Functions + +- `int32 GetID() { return id; }` +- `int16 GetMinClientVersion() { return min_client; }` +- `string GetNameString() { return name; }` +- `void Reset(){` +- `void ClearAppearances(){` +- `void InsertAppearance(Appearance* a){` + +## Notable Comments + +- /* +- */ +- // Appearances must use a hash table because of the large amount that exists and the large spacing +- // between their ID's. String and character arrays could not be used for the first iterator because +- // it would require the same pointer to access it from the hash table, which is obviously not possible +- // since the text is from the client. +- // maximum amount of iterations it will attempt to find a entree +- // JA: someday add the min_client_version to the map to determine which appearance_id to set per client version diff --git a/docs/code/Bot.md b/docs/code/Bot.md new file mode 100644 index 0000000..ac80d7a --- /dev/null +++ b/docs/code/Bot.md @@ -0,0 +1,35 @@ +# File: `Bot.h` + +## Classes + +- `TradeItemInfo` +- `Bot` + +## Functions + +- `bool IsBot() { return true; }` +- `void GiveItem(int32 item_id);` +- `void GiveItem(Item* item);` +- `void RemoveItem(Item* item);` +- `void TradeItemAdded(Item* item);` +- `void AddItemToTrade(int8 slot);` +- `bool CheckTradeItems(map* list);` +- `void FinishTrade();` +- `void GetNewSpells();` +- `void SetCombatTarget(int32 target) { combat_target = target; }` +- `void MessageGroup(string msg);` +- `void SetRecast(Spell* spell, int32 time);` +- `bool ShouldMelee();` +- `void SetMainTank(Entity* tank) { main_tank = tank; }` +- `void Camp(bool immediate=false);` +- `void ChangeLevel(int16 old_level, int16 new_level);` +- `bool IsCamping() { return camping; }` +- `bool IsImmediateCamp() { return immediate_camp; }` +- `void Begin_Camp();` +- `bool CanEquipItem(Item* item);` +- `bool IsSpellReady(Spell* spell);` +- `int8 GetHealThreshold();` + +## Notable Comments + +- // First int32 = spell id (change to timer id later), second int32 is time the spell is available to cast again diff --git a/docs/code/BotBrain.md b/docs/code/BotBrain.md new file mode 100644 index 0000000..92db14e --- /dev/null +++ b/docs/code/BotBrain.md @@ -0,0 +1,17 @@ +# File: `BotBrain.h` + +## Classes + +- `BotBrain` + +## Functions + +- `void Think();` +- `bool ProcessSpell(Entity* target, float distance);` +- `bool ProcessOutOfCombatSpells();` +- `bool ProcessCombat();` +- `void SetTarget();` + +## Notable Comments + +_None detected_ diff --git a/docs/code/BotCommands.md b/docs/code/BotCommands.md new file mode 100644 index 0000000..0626a1c --- /dev/null +++ b/docs/code/BotCommands.md @@ -0,0 +1,52 @@ +# File: `BotCommands.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void Commands::Command_Bot(Client* client, Seperator* sep) {` +- `else if (strncasecmp("attack", sep->arg[0], 6) == 0) {` +- `else if (strncasecmp("spells", sep->arg[0], 6) == 0) {` +- `else if (strncasecmp("maintank", sep->arg[0], 8) == 0) {` +- `else if (strncasecmp("delete", sep->arg[0], 6) == 0) {` +- `else if (strncasecmp("follow", sep->arg[0], 6) == 0) {` +- `else if (strncasecmp("stopfollow", sep->arg[0], 10) == 0) {` +- `else if (strncasecmp("summon", sep->arg[0], 6) == 0) {` +- `else if (strncasecmp("test", sep->arg[0], 4) == 0) {` +- `void Commands::Command_Bot_Create(Client* client, Seperator* sep) {` +- `else if (result == NAMEINVALID_REPLY) {` +- `else if (result == NAMETAKEN_REPLY) {` +- `else if (result == NAMEFILTER_REPLY) {` +- `else if (result == UNKNOWNERROR_REPLY) {` +- `void Commands::Command_Bot_Customize(Client* client, Seperator* sep) {` +- `void Commands::Command_Bot_Spawn(Client* client, Seperator* sep) {` +- `else if (result == 1)` +- `else if (result == 2)` +- `else if (result == 3)` +- `else if (result == 4)` +- `else if (result == 5)` +- `else if (result == 6)` +- `void Commands::Command_Bot_List(Client* client, Seperator* sep) {` +- `void Commands::Command_Bot_Inv(Client* client, Seperator* sep) {` +- `else if (strncasecmp("list", sep->arg[0], 4) == 0) {` +- `else if (strncasecmp("remove", sep->arg[0], 6) == 0) {` +- `void Commands::Command_Bot_Settings(Client* client, Seperator* sep) {` +- `else if (strncasecmp("cloak", sep->arg[0], 5) == 0) {` +- `else if (strncasecmp("taunt", sep->arg[0], 5) == 0) {` +- `else if (strncasecmp("hood", sep->arg[0], 4) == 0) {` +- `void Commands::Command_Bot_Help(Client* client, Seperator* sep) {` +- `else if (strncasecmp("class", sep->arg[0], 5) == 0) {` + +## Notable Comments + +- //devn00b compile says this is no good, commenting out for now. +- //if(!member) +- // continue; +- // Check if bot is currently spawned and if so camp it out +- // Check if bot is currently spawned and if so camp it out +- // Check if bot is currently spawned and if so camp it out +- // Add Items +- /*if (bot && bot->GetOwner() == client->GetPlayer()) { +- //\\aITEM %u %u:%s\\/a diff --git a/docs/code/BotDB.md b/docs/code/BotDB.md new file mode 100644 index 0000000..e3be665 --- /dev/null +++ b/docs/code/BotDB.md @@ -0,0 +1,28 @@ +# File: `BotDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `int32 WorldDatabase::CreateNewBot(int32 char_id, string name, int8 race, int8 advClass, int8 gender, int16 model_id, int32& index) {` +- `void WorldDatabase::SaveBotAppearance(Bot* bot) {` +- `void WorldDatabase::SaveBotColors(int32 bot_id, const char* type, EQ2_Color color) {` +- `void WorldDatabase::SaveBotFloats(int32 bot_id, const char* type, float float1, float float2, float float3) {` +- `bool WorldDatabase::LoadBot(int32 char_id, int32 bot_index, Bot* bot) {` +- `void WorldDatabase::LoadBotAppearance(Bot* bot) {` +- `void WorldDatabase::SaveBotItem(int32 bot_id, int32 item_id, int8 slot) {` +- `void WorldDatabase::LoadBotEquipment(Bot* bot) {` +- `string WorldDatabase::GetBotList(int32 char_id) {` +- `void WorldDatabase::DeleteBot(int32 char_id, int32 bot_index) {` +- `void WorldDatabase::SetBotStartingItems(Bot* bot, int8 class_id, int8 race_id) {` + +## Notable Comments + +- //SaveBotColors(bot->BotID, "unknown_chest_color", ); +- //SaveBotColors(bot->BotID, "unknown_legs_color", ); +- //SaveBotColors(bot->BotID, "unknown9", ); +- //SaveBotColors(bot->BotID, "soga_unknown_chest_color", ); +- //SaveBotColors(bot->BotID, "soga_unknown_legs_color", ); +- //SaveBotColors(bot->BotID, "soga_unknown13", ); diff --git a/docs/code/CRC16.md b/docs/code/CRC16.md new file mode 100644 index 0000000..881bfad --- /dev/null +++ b/docs/code/CRC16.md @@ -0,0 +1,14 @@ +# File: `CRC16.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ diff --git a/docs/code/Character.md b/docs/code/Character.md new file mode 100644 index 0000000..c74863d --- /dev/null +++ b/docs/code/Character.md @@ -0,0 +1,14 @@ +# File: `Character.h` + +## Classes + +- `Character` + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ diff --git a/docs/code/Chat.md b/docs/code/Chat.md new file mode 100644 index 0000000..1714fd2 --- /dev/null +++ b/docs/code/Chat.md @@ -0,0 +1,29 @@ +# File: `Chat.h` + +## Classes + +- `Chat` + +## Functions + +- `void AddChannel(ChatChannel *channel);` +- `bool ChannelExists(const char *channel_name);` +- `bool HasPassword(const char *channel_name);` +- `bool PasswordMatches(const char *channel_name, const char *password);` +- `bool CreateChannel(const char *channel_name);` +- `bool CreateChannel(const char *channel_name, const char *password);` +- `bool IsInChannel(Client *client, const char *channel_name);` +- `bool JoinChannel(Client *client, const char *channel_name);` +- `bool LeaveChannel(Client *client, const char *channel_name);` +- `bool LeaveAllChannels(Client *client);` +- `bool TellChannel(Client *client, const char *channel_name, const char *message, const char* name = 0);` +- `bool SendChannelUserList(Client *client, const char *channel_name);` +- `int PushDiscordMsg(const char*, const char*);` + +## Notable Comments + +- /* +- */ +- /* +- */ +- //devn00b diff --git a/docs/code/ChatChannel.md b/docs/code/ChatChannel.md new file mode 100644 index 0000000..dd01255 --- /dev/null +++ b/docs/code/ChatChannel.md @@ -0,0 +1,31 @@ +# File: `ChatChannel.h` + +## Classes + +- `ChatChannel` + +## Functions + +- `void SetName(const char *name) {strncpy(this->name, name, CHAT_CHANNEL_MAX_NAME);}` +- `void SetPassword(const char *password) {strncpy(this->password, password, CHAT_CHANNEL_MAX_PASSWORD);}` +- `void SetType(ChatChannelType type) {this->type = type;}` +- `void SetLevelRestriction(int16 level_restriction) {this->level_restriction = level_restriction;}` +- `void SetRacesAllowed(int64 races) {this->races = races;}` +- `void SetClassesAllowed(int64 classes) {this->classes = classes;}` +- `ChatChannelType GetType() {return type;}` +- `bool HasPassword() {return password[0] != '\0';}` +- `bool PasswordMatches(const char *password) {return strncmp(this->password, password, CHAT_CHANNEL_MAX_PASSWORD) == 0;}` +- `bool CanJoinChannelByLevel(int16 level) {return level >= level_restriction;}` +- `bool CanJoinChannelByRace(int8 race_id) {return races == 0 || (1 << race_id) & races;}` +- `bool CanJoinChannelByClass(int8 class_id) {return classes == 0 || (1 << class_id) & classes;}` +- `bool IsInChannel(int32 character_id);` +- `bool JoinChannel(Client *client);` +- `bool LeaveChannel(Client *client);` +- `bool TellChannel(Client *client, const char *message, const char* name2 = 0);` +- `bool TellChannelClient(Client* to_client, const char* message, const char* name2 = 0);` +- `bool SendChannelUserList(Client *client);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/ChatDB.md b/docs/code/ChatDB.md new file mode 100644 index 0000000..62f2ddd --- /dev/null +++ b/docs/code/ChatDB.md @@ -0,0 +1,14 @@ +# File: `ChatDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadChannels() {` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/ChestTrap.md b/docs/code/ChestTrap.md new file mode 100644 index 0000000..638b47e --- /dev/null +++ b/docs/code/ChestTrap.md @@ -0,0 +1,38 @@ +# File: `ChestTrap.h` + +## Classes + +- `ChestTrap` +- `ChestTrapInfo` +- `ChestTrapList` + +## Functions + +- `int32 GetDBID() { return s_ChestTrapInfo.id; }` +- `sint32 GetApplicableZoneID() { return s_ChestTrapInfo.applicable_zone_id; }` +- `int32 GetMinChestDifficulty() { return s_ChestTrapInfo.min_chest_difficulty; }` +- `int32 GetMaxChestDifficulty() { return s_ChestTrapInfo.max_chest_difficulty; }` +- `int32 GetSpellID() { return s_ChestTrapInfo.spell_id; }` +- `int32 GetSpellTier() { return s_ChestTrapInfo.spell_tier; }` +- `int32 Size();` +- `void AddChestTrap(ChestTrap* trap);` +- `bool GetChestTrap(int32 id, ChestTrap::ChestTrapInfo* cti);` +- `bool GetNextTrap(int32 zoneid, int32 chest_difficulty, ChestTrap::ChestTrapInfo* cti);` +- `void Clear();` +- `bool GetNextChestTrap(ChestTrap::ChestTrapInfo* cti);` +- `bool IsListLoaded();` +- `void SetListLoaded(bool val);` +- `void AddChestTrapList(ChestTrapList* trap, int32 id);` +- `void SetCycleIterator(map::iterator itr);` +- `void ClearTraps();` +- `void ClearTrapList();` +- `void SetupMutexes();` +- `void InstantiateLists(bool parent);` +- `void shuffleMap(ChestTrapList* list);` + +## Notable Comments + +- //Constructors **must** always set all ChestTrapInfo as we don't memset so a data value will be wack if not set! +- // instantiate the parent lists for zone/difficulty/etc, later on we will do the inverse of each map, zone->difficulty and difficulty->zone +- // not to be called externally from ChestTrapList/ChestTrap +- // randomized maps so we just iterate the map for our next 'random' result diff --git a/docs/code/ClientPacketFunctions.md b/docs/code/ClientPacketFunctions.md new file mode 100644 index 0000000..02a3cce --- /dev/null +++ b/docs/code/ClientPacketFunctions.md @@ -0,0 +1,21 @@ +# File: `ClientPacketFunctions.h` + +## Classes + +- `HouseZone` +- `PlayerHouse` +- `HeroicOP` +- `ClientPacketFunctions` + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- /* Tradeskills (/Tradeskills/TradeskillsPackets.cpp) */ +- /* Housing (/Housing/HousingPackets.cpp) */ +- /* Heroic OP's (/HeroicOp/HeroicOpPackets.cpp) */ +- //UI updates for trigger count and damage remaining on maintained spells diff --git a/docs/code/Collections.md b/docs/code/Collections.md new file mode 100644 index 0000000..4550a36 --- /dev/null +++ b/docs/code/Collections.md @@ -0,0 +1,45 @@ +# File: `Collections.h` + +## Classes + +- `CollectionItem` +- `CollectionRewardItem` +- `Collection` +- `CollectionItem` +- `MasterCollectionList` +- `PlayerCollectionList` + +## Functions + +- `void SetID(int32 id) {this->id = id;}` +- `void SetName(const char *name) {strncpy(this->name, name, sizeof(this->name));}` +- `void SetCategory(const char *category) {strncpy(this->category, category, sizeof(this->category));}` +- `void SetLevel(int8 level) {this->level = level;}` +- `void SetCompleted(bool completed) {this->completed = completed;}` +- `void SetSaveNeeded(bool save_needed) {this->save_needed = save_needed;}` +- `void AddCollectionItem(struct CollectionItem *collection_item);` +- `void AddRewardItem(struct CollectionRewardItem *reward_item);` +- `void AddSelectableRewardItem(struct CollectionRewardItem *reward_item);` +- `void SetRewardCoin(int64 reward_coin) {this->reward_coin = reward_coin;}` +- `void SetRewardXP(int64 reward_xp) {this->reward_xp = reward_xp;}` +- `bool NeedsItem(Item *item);` +- `int32 GetID() {return id;}` +- `int8 GetLevel() {return level;}` +- `bool GetIsReadyToTurnIn();` +- `bool GetCompleted() {return completed;}` +- `bool GetSaveNeeded() {return save_needed;}` +- `int64 GetRewardCoin() {return reward_coin;}` +- `int64 GetRewardXP() {return reward_xp;}` +- `bool AddCollection(Collection *collection);` +- `void ClearCollections();` +- `int32 Size();` +- `bool NeedsItem(Item *item);` +- `bool AddCollection(Collection *collection);` +- `void ClearCollections();` +- `int32 Size();` +- `bool NeedsItem(Item *item);` +- `bool HasCollectionsToHandIn();` + +## Notable Comments + +_None detected_ diff --git a/docs/code/CollectionsDB.md b/docs/code/CollectionsDB.md new file mode 100644 index 0000000..ce996c5 --- /dev/null +++ b/docs/code/CollectionsDB.md @@ -0,0 +1,29 @@ +# File: `CollectionsDB.cpp` + +## Classes + +- `CollectionItem` +- `CollectionRewardItem` +- `CollectionItem` +- `CollectionItem` + +## Functions + +- `void WorldDatabase::LoadCollections()` +- `int32 WorldDatabase::LoadCollectionItems(Collection *collection)` +- `int32 WorldDatabase::LoadCollectionRewards(Collection *collection)` +- `else if (!strcasecmp(row[0], "Selectable"))` +- `else if (!strcasecmp(row[0], "Coin"))` +- `else if (!strcasecmp(row[0], "XP"))` +- `void WorldDatabase::LoadPlayerCollections(Player *player)` +- `void WorldDatabase::LoadPlayerCollectionItems(Player *player, Collection *collection)` +- `void WorldDatabase::SavePlayerCollections(Client *client)` +- `void WorldDatabase::SavePlayerCollection(Client *client, Collection *collection)` +- `void WorldDatabase::SavePlayerCollectionItems(Client *client, Collection *collection)` +- `void WorldDatabase::SavePlayerCollectionItem(Client *client, Collection *collection, int32 item_id)` + +## Notable Comments + +- /* +- */ +- //assert(item); diff --git a/docs/code/Combat.md b/docs/code/Combat.md new file mode 100644 index 0000000..46d0b08 --- /dev/null +++ b/docs/code/Combat.md @@ -0,0 +1,16 @@ +# File: `Combat.h` + +## Classes + +- `ZoneServer` +- `SpellProcess` +- `LuaSpell` + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ diff --git a/docs/code/Commands.md b/docs/code/Commands.md new file mode 100644 index 0000000..c52300a --- /dev/null +++ b/docs/code/Commands.md @@ -0,0 +1,215 @@ +# File: `Commands.h` + +## Classes + +- `Client` +- `Spawn` +- `ZoneServer` +- `ZoneInfo` +- `EQ2_CommandString` +- `EQ2_RemoteCommandString` +- `RemoteCommands` +- `Commands` + +## Functions + +- `void addCommand(EQ2_RemoteCommandString add){ commands.push_back(add); num_commands++;}` +- `void AddSubCommand(string command, EQ2_RemoteCommandString subcommand){` +- `bool validSubCommand(string command, string subcommand){` +- `void addZero(){` +- `void CheckAddSubCommand(string command, EQ2_RemoteCommandString subcommand){` +- `void AddDataCommand(EQ2_RemoteCommandString* command){` +- `int32 GetCommandHandler(const char* name){` +- `bool SetSpawnCommand(Client* client, Spawn* target, int8 type, const char* value, bool send_update = true, bool temporary = false, string* temp_value = 0, int8 index = 0);` +- `void UpdateDatabaseAppearance(Client* client, Spawn* target, string fieldName, sint8 r, sint8 g, sint8 b);` +- `bool SetZoneCommand(Client* client, int32 zone_id, ZoneServer* zone, int8 type, const char* value);` +- `void Process(int32 index, EQ2_16BitString* command_parms, Client* client, Spawn* targetOverride=NULL);` +- `int32 GetCommandHandler(const char* name){` +- `int32 GetSpawnSetType(string val);` +- `void Command_AcceptAdvancement(Client* client, Seperator* sep);` +- `void Command_AFK(Client* client, Seperator* sep);` +- `void Command_Appearance(Client* client, Seperator* sep, int handler);` +- `void Command_CancelMaintained(Client* client, Seperator* sep);` +- `void Command_Claim(Client* client, Seperator* sep);` +- `void Command_ClearAllQueued(Client* client);` +- `void Command_Create(Client* client, Seperator* sep);` +- `void Command_CreateFromRecipe(Client* client, Seperator* sep);` +- `void Command_Distance(Client* client);` +- `void Command_Duel(Client* client, Seperator* sep);` +- `void Command_DuelBet(Client* client, Seperator* sep);` +- `void Command_DuelAccept(Client* client, Seperator* sep);` +- `void Command_DuelDecline(Client* client, Seperator* sep);` +- `void Command_DuelSurrender(Client* client, Seperator* sep);` +- `void Command_DuelToggle(Client* client, Seperator* sep);` +- `void Command_EntityCommand(Client* client, Seperator* sep, int handler);` +- `void Command_Follow(Client* client, Seperator* sep);` +- `void Command_StopFollow(Client* client, Seperator* sep);` +- `void Command_Grid(Client* client, Seperator* sep);` +- `void Command_Guild(Client* client, Seperator* sep);` +- `void Command_CreateGuild(Client* client, Seperator* sep);` +- `void Command_SetGuildOfficerNote(Client* client, Seperator* sep);` +- `void Command_SetGuildMemberNote(Client* client, Seperator* sep);` +- `void Command_OfficerSay(Client* client, Seperator* sep);` +- `void Command_GuildSay(Client* client, Seperator* sep);` +- `void Command_Guilds(Client* client);` +- `void Command_GuildsAdd(Client* client, Seperator* sep);` +- `void Command_GuildsCreate(Client* client, Seperator* sep, bool prompted_dialog = false);` +- `void Command_GuildsDelete(Client* client, Seperator* sep);` +- `void Command_GuildsList(Client* client);` +- `void Command_GuildsRemove(Client* client, Seperator* sep);` +- `void Command_InspectPlayer(Client* client, Seperator* sep);` +- `void Command_Inventory(Client* client, Seperator* sep, EQ2_RemoteCommandString* command);` +- `void Command_Languages(Client* client, Seperator* sep);` +- `void Command_SetLanguage(Client* client, Seperator* sep);` +- `void Command_LastName(Client* client, Seperator* sep);` +- `void Command_ConfirmLastName(Client* client, Seperator* sep);` +- `void Command_Location(Client* client);` +- `void Command_LocationAdd(Client* client, Seperator* sep);` +- `void Command_LocationCreate(Client* client, Seperator* sep);` +- `void Command_LocationDelete(Client* client, Seperator* sep);` +- `void Command_LocationList(Client* client, Seperator* sep);` +- `void Command_LocationRemove(Client* client, Seperator* sep);` +- `void Command_Merchant(Client* client, Seperator* sep, int handler);` +- `void Command_Mood(Client* client, Seperator* sep);` +- `void Command_Modify(Client* client); // usage function` +- `void Command_ModifyCharacter(Client* client, Seperator* sep);` +- `void Command_ModifyFaction(Client* client, Seperator* sep);` +- `void Command_ModifyGuild(Client* client, Seperator* sep);` +- `void Command_ModifyItem(Client* client, Seperator* sep);` +- `void Command_ModifyQuest(Client* client, Seperator* sep);` +- `void Command_ModifySkill(Client* client, Seperator* sep);` +- `void Command_ModifySpawn(Client* client, Seperator* sep);` +- `void Command_ModifySpell(Client* client, Seperator* sep);` +- `void Command_ModifyZone(Client* client, Seperator* sep);` +- `void Command_MOTD(Client* client);` +- `void Command_Pet(Client* client, Seperator* sep);` +- `void Command_PetName(Client* client, Seperator* sep);` +- `void Command_NamePet(Client* client, Seperator* sep);` +- `void Command_Rename(Client* client, Seperator* sep);` +- `void Command_ConfirmRename(Client* client, Seperator* sep);` +- `void Command_PetOptions(Client* client, Seperator* sep);` +- `void Command_Random(Client* client, Seperator* sep);` +- `void Command_Randomize(Client* client, Seperator* sep);` +- `void Command_ReportBug(Client* client, Seperator* sep);` +- `void Command_ShowCloak(Client* client, Seperator* sep);` +- `void Command_ShowHelm(Client* client, Seperator* sep);` +- `void Command_ShowHood(Client* client, Seperator* sep);` +- `void Command_ShowHoodHelm(Client* client, Seperator* sep);` +- `void Command_ShowRanged(Client* client, Seperator* sep);` +- `void Command_Skills(Client* client, Seperator* sep, int handler);` +- `void Command_SpawnTemplate(Client* client, Seperator* sep);` +- `void Command_Speed(Client* client, Seperator* sep);` +- `void Command_StationMarketPlace(Client* client, Seperator* sep);` +- `void Command_StopEating(Client* client);` +- `void Command_StopDrinking(Client* client);` +- `void Command_Test(Client* client, EQ2_16BitString* command_parms);` +- `void Command_Title(Client* client);` +- `void Command_TitleList(Client* client);` +- `void Command_TitleSetPrefix(Client* client, Seperator* sep);` +- `void Command_TitleSetSuffix(Client* client, Seperator* sep);` +- `void Command_TitleFix(Client* client, Seperator* sep);` +- `void Command_Toggle_Anonymous(Client* client);` +- `void Command_Toggle_AutoConsume(Client* client, Seperator* sep);` +- `void Command_Toggle_BonusXP(Client* client);` +- `void Command_Toggle_CombatXP(Client* client);` +- `void Command_Toggle_GMHide(Client* client);` +- `void Command_Toggle_GMVanish(Client* client);` +- `void Command_Toggle_Illusions(Client* client, Seperator* sep);` +- `void Command_Toggle_LFG(Client* client);` +- `void Command_Toggle_LFW(Client* client);` +- `void Command_Toggle_QuestXP(Client* client);` +- `void Command_Toggle_Roleplaying(Client* client);` +- `void Command_Toggle_Duels(Client* client);` +- `void Command_Toggle_Trades(Client* client);` +- `void Command_Toggle_Guilds(Client* client);` +- `void Command_Toggle_Groups(Client* client);` +- `void Command_Toggle_Raids(Client* client);` +- `void Command_Toggle_LON(Client* client);` +- `void Command_Toggle_VoiceChat(Client* client);` +- `void Command_Track(Client* client);` +- `void Command_TradeStart(Client* client, Seperator* sep);` +- `void Command_TradeAccept(Client* client, Seperator* sep);` +- `void Command_TradeReject(Client* client, Seperator* sep);` +- `void Command_TradeCancel(Client* client, Seperator* sep);` +- `void Command_TradeSetCoin(Client* client, Seperator* sep);` +- `void Command_TradeAddCoin(Client* client, Seperator* sep, int handler);` +- `void Command_TradeRemoveCoin(Client* client, Seperator* sep, int handler);` +- `void Command_TradeAddItem(Client* client, Seperator* sep);` +- `void Command_TradeRemoveItem(Client* client, Seperator* sep);` +- `void Command_TryOn(Client* client, Seperator* sep);` +- `void Command_JoinChannel(Client *client, Seperator *sep);` +- `void Command_JoinChannelFromLoad(Client *client, Seperator *sep);` +- `void Command_TellChannel(Client *client, Seperator *sep);` +- `void Command_LeaveChannel(Client *client, Seperator *sep);` +- `void Command_WeaponStats(Client *client);` +- `void Command_WhoChannel(Client *client, Seperator *sep);` +- `void Command_ZoneSafeCoords(Client *client, Seperator *sep);` +- `void Command_ZoneDetails(Client *client, Seperator *sep);` +- `void Command_ZoneSet(Client *client, Seperator *sep);` +- `void Command_Rain(Client* client, Seperator* sep);` +- `void Command_Wind(Client* client, Seperator* sep);` +- `void Command_SendMerchantWindow(Client* client, Seperator* sep, bool sell = false);` +- `void Command_Weather(Client* client, Seperator* sep);` +- `void Command_Select(Client* client, Seperator* sep);` +- `void Command_ConsumeFood(Client* client, Seperator* sep);` +- `void Command_Aquaman(Client* client, Seperator* sep);` +- `void Command_Attune_Inv(Client* client, Seperator* sep);` +- `void Command_Player(Client* client, Seperator* sep);` +- `void Command_Player_Coins(Client* client, Seperator* sep);` +- `void Command_Reset_Zone_Timer(Client* client, Seperator* sep);` +- `void Command_AchievementAdd(Client* client, Seperator* sep);` +- `void Command_Editor(Client* client, Seperator* sep);` +- `void Command_AcceptResurrection(Client* client, Seperator* sep);` +- `void Command_DeclineResurrection(Client* client, Seperator* set);` +- `void Command_TargetItem(Client* client, Seperator* set);` +- `void Command_FindSpawn(Client* client, Seperator* set);` +- `void Command_MoveCharacter(Client* client, Seperator* set);` +- `void Command_Bot(Client* client, Seperator* sep);` +- `void Command_Bot_Create(Client* client, Seperator* sep);` +- `void Command_Bot_Customize(Client* client, Seperator* sep);` +- `void Command_Bot_Spawn(Client* client, Seperator* sep);` +- `void Command_Bot_List(Client* client, Seperator* sep);` +- `void Command_Bot_Inv(Client* client, Seperator* sep);` +- `void Command_Bot_Settings(Client* client, Seperator* sep);` +- `void Command_Bot_Help(Client* client, Seperator* sep);` +- `void Command_CancelEffect(Client* client, Seperator* sep);` +- `void Command_CurePlayer(Client* client, Seperator* sep);` +- `void Command_ShareQuest(Client* client, Seperator* sep);` +- `void Command_Yell(Client* client, Seperator* sep);` +- `void Command_SetAutoLootMode(Client* client, Seperator* sep);` +- `void Command_AutoAttack(Client* client, Seperator* sep);` +- `void Command_Assist(Client* client, Seperator* sep);` +- `void Command_Target(Client* client, Seperator* sep);` +- `void Command_Target_Pet(Client* client, Seperator* sep);` +- `void Command_WhoGroup(Client* client, Seperator* sep);` +- `void Command_WhoRaid(Client* client, Seperator* sep);` +- `void Command_RaidInvite(Client* client, Seperator* sep);` +- `void Command_Raid_Looter(Client* client, Seperator* sep);` +- `void Command_KickFromGroup(Client* client, Seperator* sep);` +- `void Command_KickFromRaid(Client* client, Seperator* sep);` +- `void Command_LeaveRaid(Client* client, Seperator* sep);` +- `void Command_Split(Client* client, Seperator* sep);` +- `void Command_RaidSay(Client* client, Seperator* sep);` +- `void Command_ReloadZoneInfo(Client* client, Seperator* sep);` +- `void Get_AA_Xml(Client* client, Seperator* sep);` +- `void Add_AA(Client* client, Seperator* sep);` +- `void Commit_AA_Profile(Client* client, Seperator* sep);` +- `void Begin_AA_Profile(Client* client, Seperator* sep);` +- `void Back_AA(Client* client, Seperator* sep);` +- `void Remove_AA(Client* client, Seperator* sep);` +- `void Switch_AA_Profile(Client* client, Seperator* sep);` +- `void Cancel_AA_Profile(Client* client, Seperator* sep);` +- `void Save_AA_Profile(Client* client, Seperator* sep);` + +## Notable Comments + +- /* +- */ +- // Combat related chat channels start here +- // End of combat chat channels +- // 106 is nothing, message sent with this channel won't display in the client +- // 108+ will crash the client DO NOT USE +- /* Using this in the /zone details command so that we do not have to store a whole zone in memory while changing zone attributes. Also, +- // TODO: cannot seem to use LogWrite in this .h file! +- // JA: New Command handlers +- //devn00b diff --git a/docs/code/CommandsDB.md b/docs/code/CommandsDB.md new file mode 100644 index 0000000..b1e57db --- /dev/null +++ b/docs/code/CommandsDB.md @@ -0,0 +1,27 @@ +# File: `CommandsDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `int32 WorldDatabase::SaveSpawnTemplate(int32 placement_id, const char* template_name)` +- `bool WorldDatabase::RemoveSpawnTemplate(int32 template_id)` +- `int32 WorldDatabase::CreateSpawnFromTemplateByID(Client* client, int32 template_id)` +- `int32 WorldDatabase::CreateSpawnFromTemplateByName(Client* client, const char* template_name)` +- `bool WorldDatabase::SaveZoneSafeCoords(int32 zone_id, float x, float y, float z, float heading)` +- `bool WorldDatabase::SaveSignZoneToCoords(int32 spawn_id, float x, float y, float z, float heading)` + +## Notable Comments + +- /* +- */ +- // find the spawn_location_id in the template we plan to duplicate +- // insert a new spawn_location_name record +- // get all spawn_location_entries that match the templates spawn_location_id value and insert as new +- // get all spawn_location_placements that match the templates spawn_location_id value and insert as new +- // Note: /spawn templates within current zone_id only, because of spawn_id issues (cannot template an Antonic spawn in Commonlands) +- // find the spawn_location_id in the template we plan to duplicate +- // insert a new spawn_location_name record +- // get all spawn_location_entries that match the templates spawn_location_id value and insert as new diff --git a/docs/code/Common_Defines.md b/docs/code/Common_Defines.md new file mode 100644 index 0000000..21a46d1 --- /dev/null +++ b/docs/code/Common_Defines.md @@ -0,0 +1,14 @@ +# File: `Common_Defines.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ diff --git a/docs/code/Common_Index.md b/docs/code/Common_Index.md new file mode 100644 index 0000000..14c4b3b --- /dev/null +++ b/docs/code/Common_Index.md @@ -0,0 +1,84 @@ +# Common Module + +Shared logic used by LoginServer and WorldServer, including networking, database access, and packet processing. + +## Files: + +- [Common_Defines.md](Common_Defines.md) +- [Condition.md](Condition.md) +- [Condition.md](Condition.md) +- [ConfigReader.md](ConfigReader.md) +- [ConfigReader.md](ConfigReader.md) +- [CRC16.md](CRC16.md) +- [CRC16.md](CRC16.md) +- [Crypto.md](Crypto.md) +- [Crypto.md](Crypto.md) +- [database.md](database.md) +- [database.md](database.md) +- [DatabaseNew.md](DatabaseNew.md) +- [DatabaseNew.md](DatabaseNew.md) +- [DatabaseResult.md](DatabaseResult.md) +- [DatabaseResult.md](DatabaseResult.md) +- [DataBuffer.md](DataBuffer.md) +- [dbcore.md](dbcore.md) +- [dbcore.md](dbcore.md) +- [debug.md](debug.md) +- [debug.md](debug.md) +- [emu_opcodes.md](emu_opcodes.md) +- [emu_opcodes.md](emu_opcodes.md) +- [emu_oplist.md](emu_oplist.md) +- [EQ2_Common_Structs.md](EQ2_Common_Structs.md) +- [EQEMuError.md](EQEMuError.md) +- [EQEMuError.md](EQEMuError.md) +- [EQPacket.md](EQPacket.md) +- [EQPacket.md](EQPacket.md) +- [EQStream.md](EQStream.md) +- [EQStream.md](EQStream.md) +- [EQStreamFactory.md](EQStreamFactory.md) +- [EQStreamFactory.md](EQStreamFactory.md) +- [GlobalHeaders.md](GlobalHeaders.md) +- [JsonParser.md](JsonParser.md) +- [JsonParser.md](JsonParser.md) +- [linked_list.md](linked_list.md) +- [Log.md](Log.md) +- [Log.md](Log.md) +- [login_oplist.md](login_oplist.md) +- [LogTypes.md](LogTypes.md) +- [md5.md](md5.md) +- [md5.md](md5.md) +- [misc.md](misc.md) +- [misc.md](misc.md) +- [MiscFunctions.md](MiscFunctions.md) +- [MiscFunctions.md](MiscFunctions.md) +- [Mutex.md](Mutex.md) +- [Mutex.md](Mutex.md) +- [opcodemgr.md](opcodemgr.md) +- [opcodemgr.md](opcodemgr.md) +- [op_codes.md](op_codes.md) +- [PacketStruct.md](PacketStruct.md) +- [PacketStruct.md](PacketStruct.md) +- [packet_dump.md](packet_dump.md) +- [packet_dump.md](packet_dump.md) +- [packet_functions.md](packet_functions.md) +- [packet_functions.md](packet_functions.md) +- [queue.md](queue.md) +- [RC4.md](RC4.md) +- [RC4.md](RC4.md) +- [seperator.md](seperator.md) +- [servertalk.md](servertalk.md) +- [sha512.md](sha512.md) +- [sha512.md](sha512.md) +- [string_util.md](string_util.md) +- [string_util.md](string_util.md) +- [TCPConnection.md](TCPConnection.md) +- [TCPConnection.md](TCPConnection.md) +- [timer.md](timer.md) +- [timer.md](timer.md) +- [types.md](types.md) +- [unix.md](unix.md) +- [unix.md](unix.md) +- [version.md](version.md) +- [xmlParser.md](xmlParser.md) +- [xmlParser.md](xmlParser.md) +- [WebServer.md](WebServer.md) +- [WebServer.md](WebServer.md) diff --git a/docs/code/Condition.md b/docs/code/Condition.md new file mode 100644 index 0000000..189f728 --- /dev/null +++ b/docs/code/Condition.md @@ -0,0 +1,19 @@ +# File: `Condition.h` + +## Classes + +- `Condition` + +## Functions + +- `void Signal();` +- `void SignalAll();` +- `void Wait();` + +## Notable Comments + +- /* +- */ +- //Sombody, someday needs to figure out how to implement a condition +- //system on windows... +- // bool TimedWait(unsigned long usec); diff --git a/docs/code/ConfigReader.md b/docs/code/ConfigReader.md new file mode 100644 index 0000000..8ed024e --- /dev/null +++ b/docs/code/ConfigReader.md @@ -0,0 +1,21 @@ +# File: `ConfigReader.h` + +## Classes + +- `ConfigReader` + +## Functions + +- `void addStruct(const char* name, int16 version, PacketStruct* new_struct);` +- `void loadDataStruct(PacketStruct* packet, XMLNode parentNode, bool array_packet = false);` +- `bool processXML_Elements(const char* fileName);` +- `int16 GetStructVersion(const char* name, int16 version);` +- `void DestroyStructs();` +- `void ReloadStructs();` +- `bool LoadFile(const char* name);` + +## Notable Comments + +- /* +- */ +- //vector structs; diff --git a/docs/code/ConsoleCommands.md b/docs/code/ConsoleCommands.md new file mode 100644 index 0000000..62da11a --- /dev/null +++ b/docs/code/ConsoleCommands.md @@ -0,0 +1,36 @@ +# File: `ConsoleCommands.h` + +## Classes + +- `ConsoleCommand` + +## Functions + +- `void ProcessConsoleInput(const char * command);` +- `bool ConsoleBanCommand(Seperator *sep);` +- `bool ConsoleUnbanCommand(Seperator *sep);` +- `bool ConsoleKickCommand(Seperator *sep);` +- `bool ConsoleAnnounceCommand(Seperator *sep);` +- `bool ConsoleBroadcastCommand(Seperator *sep);` +- `bool ConsoleChannelCommand(Seperator *sep);` +- `bool ConsoleTellCommand(Seperator *sep);` +- `bool ConsoleGuildCommand(Seperator *sep);` +- `bool ConsolePlayerCommand(Seperator *sep);` +- `bool ConsoleSetAdminPlayer(Seperator *sep);` +- `bool ConsoleWorldCommand(Seperator *sep);` +- `bool ConsoleZoneCommand(Seperator *sep);` +- `bool ConsoleGetMOTDCommand(Seperator *sep);` +- `bool ConsoleSetMOTDCommand(Seperator *sep);` +- `bool ConsoleWhoCommand(Seperator *sep);` +- `bool ConsoleReloadCommand(Seperator *sep);` +- `bool ConsoleShutdownCommand(Seperator *sep);` +- `bool ConsoleCancelShutdownCommand(Seperator *sep);` +- `bool ConsoleExitCommand(Seperator *sep);` +- `bool ConsoleRulesCommand(Seperator *sep);` +- `bool ConsoleTestCommand(Seperator *sep);` + +## Notable Comments + +- /* +- */ +- // = 70 chars diff --git a/docs/code/Crypto.md b/docs/code/Crypto.md new file mode 100644 index 0000000..f340eee --- /dev/null +++ b/docs/code/Crypto.md @@ -0,0 +1,19 @@ +# File: `Crypto.h` + +## Classes + +- `Crypto` + +## Functions + +- `void RC4Encrypt(uchar* text, int32 size);` +- `void RC4Decrypt(uchar* text, int32 size);` +- `int64 getRC4Key() { return rc4_key; }` +- `void setRC4Key(int64 key) {` +- `bool isEncrypted(){ return encrypted; }` +- `void setEncrypted(bool in_val){ encrypted = in_val; }` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/DataBuffer.md b/docs/code/DataBuffer.md new file mode 100644 index 0000000..2cce6b1 --- /dev/null +++ b/docs/code/DataBuffer.md @@ -0,0 +1,29 @@ +# File: `DataBuffer.h` + +## Classes + +- `DataBuffer` + +## Functions + +- `int32 getDataSize(){ return buffer.length(); }` +- `void CreateEQ2Color(EQ2_Color& color){` +- `int32 GetLoadPos(){` +- `int32 GetLoadLen(){` +- `void SetLoadPos(int32 new_pos){` +- `void CreateEQ2Color(EQ2_Color* color){` +- `void InitializeGetData(){` +- `void InitializeLoadData(uchar* input, int32 size){` +- `void LoadSkip(int8 bytes){` +- `void AddZeros(int16 num){` +- `void AddCharArray(char* array, string* datastring = 0){` +- `void AddCharArray(char* array, int16 size, string* datastring = 0){` +- `void AddData(string data, string* datastring = 0){` +- `void Clear() { buffer.clear(); }` + +## Notable Comments + +- /* +- */ +- *tmp *= -1; +- *output = (Type*)get_buffer; diff --git a/docs/code/DatabaseNew.md b/docs/code/DatabaseNew.md new file mode 100644 index 0000000..41eb111 --- /dev/null +++ b/docs/code/DatabaseNew.md @@ -0,0 +1,27 @@ +# File: `DatabaseNew.h` + +## Classes + +- `DatabaseNew` + +## Functions + +- `bool Connect();` +- `bool Connect(const char *host, const char *user, const char *password, const char *database, unsigned int port = 3306);` +- `bool Query(const char *query, ...);` +- `bool Select(DatabaseResult *result, const char *query, ...);` +- `int32 LastInsertID();` +- `long AffectedRows();` +- `string EscapeStr(const char *str, size_t len);` +- `string EscapeStr(const char *str);` +- `string EscapeStr(string str);` +- `bool QueriesFromFile(const char *file);` +- `void SetIgnoredErrno(unsigned int db_errno);` +- `void RemoveIgnoredErrno(unsigned int db_errno);` +- `bool IsIgnoredErrno(unsigned int db_errno);` +- `void PingNewDB();` + +## Notable Comments + +- //these two must free() the return char* after it's used in a query +- //does not need free() diff --git a/docs/code/DatabaseResult.md b/docs/code/DatabaseResult.md new file mode 100644 index 0000000..ddaa97f --- /dev/null +++ b/docs/code/DatabaseResult.md @@ -0,0 +1,36 @@ +# File: `DatabaseResult.h` + +## Classes + +- `DatabaseResult` + +## Functions + +- `bool StoreResult(MYSQL_RES* result, uint8 field_count, uint8 row_count);` +- `bool Next();` +- `bool IsNull(unsigned int index);` +- `bool IsNullStr(const char *field_name);` +- `int8 GetInt8(unsigned int index);` +- `int8 GetInt8Str(const char *field_name);` +- `sint8 GetSInt8(unsigned int index);` +- `sint8 GetSInt8Str(const char *field_name);` +- `int16 GetInt16(unsigned int index);` +- `int16 GetInt16Str(const char *field_name);` +- `sint16 GetSInt16(unsigned int index);` +- `sint16 GetSInt16Str(const char *field_name);` +- `int32 GetInt32(unsigned int index);` +- `int32 GetInt32Str(const char *field_name);` +- `sint32 GetSInt32(unsigned int index);` +- `sint32 GetSInt32Str(const char *field_name);` +- `int64 GetInt64(unsigned int index);` +- `int64 GetInt64Str(const char *field_name);` +- `sint64 GetSInt64(unsigned int index);` +- `sint64 GetSInt64Str(const char *field_name);` +- `float GetFloat(unsigned int index);` +- `float GetFloatStr(const char *field_name);` +- `char GetChar(unsigned int index);` +- `char GetCharStr(const char *field_name);` + +## Notable Comments + +_None detected_ diff --git a/docs/code/EQ2_Common_Structs.md b/docs/code/EQ2_Common_Structs.md new file mode 100644 index 0000000..85f595c --- /dev/null +++ b/docs/code/EQ2_Common_Structs.md @@ -0,0 +1,34 @@ +# File: `EQ2_Common_Structs.h` + +## Classes + +- `KeyGen_Struct` +- `KeyGen_End_Struct` +- `LoginByNumRequest_Struct` +- `LS_LoginResponse` +- `EQ2_EquipmentItem` +- `EQ2_Equipment` +- `CharFeatures` +- `PositionData` +- `AppearanceData` +- `Player_Update` +- `Player_Update283` +- `Player_Update1096` +- `Player_Update1144` + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- /*0000*/ int32 activity; +- /*0004*/ float unknown2; // 1 +- /*0008*/ float direction1; +- /*0012*/ float unknown3[8]; +- /*0044*/ float speed; +- /*0048*/ float side_speed; +- /*0052*/ float vert_speed; +- /*0056*/ float orig_x; diff --git a/docs/code/EQEMuError.md b/docs/code/EQEMuError.md new file mode 100644 index 0000000..b9c3a9a --- /dev/null +++ b/docs/code/EQEMuError.md @@ -0,0 +1,17 @@ +# File: `EQEMuError.h` + +## Classes + +_None detected_ + +## Functions + +- `void AddEQEMuError(eEQEMuError iError, bool iExitNow = false);` +- `void AddEQEMuError(char* iError, bool iExitNow = false);` +- `int32 CheckEQEMuError();` +- `void CheckEQEMuErrorAndPause();` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/EQPacket.md b/docs/code/EQPacket.md new file mode 100644 index 0000000..2b31ad8 --- /dev/null +++ b/docs/code/EQPacket.md @@ -0,0 +1,50 @@ +# File: `EQPacket.h` + +## Classes + +- `OpcodeManager` +- `EQStream` +- `EQPacket` +- `EQApplicationPacket` +- `EQProtocolPacket` +- `EQ2Packet` +- `EQApplicationPacket` + +## Functions + +- `void DumpRawHeader(uint16 seq=0xffff, FILE *to = stdout) const;` +- `void DumpRawHeaderNoTime(uint16 seq=0xffff, FILE *to = stdout) const;` +- `void DumpRaw(FILE *to = stdout) const;` +- `void setVersion(int16 new_version){ version = new_version; }` +- `void setSrcInfo(uint32 sip, uint16 sport) { src_ip=sip; src_port=sport; }` +- `void setDstInfo(uint32 dip, uint16 dport) { dst_ip=dip; dst_port=dport; }` +- `void setTimeInfo(uint32 ts_sec, uint32 ts_usec) { timestamp.tv_sec=ts_sec; timestamp.tv_usec=ts_usec; }` +- `void copyInfo(const EQPacket *p) { src_ip=p->src_ip; src_port=p->src_port; dst_ip=p->dst_ip; dst_port=p->dst_port; timestamp.tv_sec=p->timestamp.tv_sec; timestamp.tv_usec=p->timestamp.tv_usec; }` +- `uint32 Size() const { return size+2; }` +- `uint16 GetRawOpcode() const { return(opcode); }` +- `void SetProtocolOpcode(int16 new_opcode){` +- `bool combine(const EQProtocolPacket *rhs);` +- `uint32 serialize (unsigned char *dest, int8 offset = 0) const;` +- `bool AppCombine(EQ2Packet* rhs);` +- `int8 PreparePacket(int16 MaxLen);` +- `bool combine(const EQApplicationPacket *rhs);` +- `uint32 serialize (unsigned char *dest) const;` +- `uint32 Size() const { return size+app_opcode_size; }` +- `void SetOpcodeSize(uint8 s) { app_opcode_size=s; }` +- `void SetOpcode(EmuOpcode op);` +- `void DumpPacketHex(const EQApplicationPacket* app);` +- `void DumpPacket(const EQProtocolPacket* app);` +- `void DumpPacketAscii(const EQApplicationPacket* app);` +- `void DumpPacket(const EQApplicationPacket* app, bool iShowInfo = false);` +- `void DumpPacketBin(const EQApplicationPacket* app);` + +## Notable Comments + +- /* +- */ +- //no reason to have this method in zone or world +- //bool dont_combine; +- //caching version of get +- //this is just a cache so we dont look it up several times on Get() +- //this constructor should only be used by EQProtocolPacket, as it +- //assumes the first two bytes of buf are the opcode. diff --git a/docs/code/EQStream.md b/docs/code/EQStream.md new file mode 100644 index 0000000..659aad8 --- /dev/null +++ b/docs/code/EQStream.md @@ -0,0 +1,94 @@ +# File: `EQStream.h` + +## Classes + +- `SessionRequest` +- `SessionResponse` +- `ClientSessionStats` +- `ServerSessionStats` +- `OpcodeManager` +- `EQStreamFactory` +- `EQStream` + +## Functions + +- `char GetChar(uchar in);` +- `void WriteToFile(char* pFormat, ...);` +- `void WritePackets(const char* opcodeName, uchar* data, int32 size, bool outgoing);` +- `void WritePackets(EQ2Packet* app, bool outgoing);` +- `void SetLastSeqSent(uint32);` +- `long GetMaxAckReceived();` +- `long GetNextAckToSend();` +- `long GetLastAckSent();` +- `void SetMaxAckReceived(uint32 seq);` +- `void SetNextAckToSend(uint32);` +- `void SetLastAckSent(uint32);` +- `bool CheckCombineQueue();` +- `int8 EQ2_Compress(EQ2Packet* app, int8 offset = 3);` +- `int16 GetClientVersion(){ return client_version; }` +- `void SetClientVersion(int16 version){ client_version = version; }` +- `void ResetSessionAttempts() { reconnectAttempt = 0; }` +- `bool HasSessionAttempts() { return reconnectAttempt>0; }` +- `void init(bool resetSession = true);` +- `void SetMaxLen(uint32 length) { MaxLen=length; }` +- `int8 getTimeoutDelays(){ return timeout_delays; }` +- `void addTimeoutDelay(){ timeout_delays++; }` +- `void EQ2QueuePacket(EQ2Packet* app, bool attempted_combine = false);` +- `void PreparePacket(EQ2Packet* app, int8 offset = 0);` +- `void UnPreparePacket(EQ2Packet* app);` +- `void EncryptPacket(EQ2Packet* app, int8 compress_offset, int8 offset);` +- `void FlushCombinedPacket();` +- `void SendPacket(EQApplicationPacket *p);` +- `void QueuePacket(EQProtocolPacket *p);` +- `void SendPacket(EQProtocolPacket *p);` +- `void NonSequencedPush(EQProtocolPacket *p);` +- `void SequencedPush(EQProtocolPacket *p);` +- `void CheckResend(int eq_fd);` +- `void AckPackets(uint16 seq);` +- `void Write(int eq_fd);` +- `void SetActive(bool val) { streamactive = val; }` +- `void WritePacket(int fd,EQProtocolPacket *p);` +- `void EncryptPacket(uchar* data, int16 size);` +- `uint32 GetKey() { return Key; }` +- `void SetKey(uint32 k) { Key=k; }` +- `void SetSession(uint32 s) { Session=s; }` +- `void SetLastPacketTime(uint32 t) {LastPacket=t;}` +- `void Process(const unsigned char *data, const uint32 length);` +- `void ProcessPacket(EQProtocolPacket *p, EQProtocolPacket* lastp=NULL);` +- `bool ProcessEmbeddedPacket(uchar* pBuffer, uint16 length, int8 opcode = OP_Packet);` +- `bool HandleEmbeddedPacket(EQProtocolPacket *p, int16 offset = 2, int16 length = 0);` +- `void SendSessionResponse();` +- `void SendSessionRequest();` +- `void SendDisconnect(bool setstate = true);` +- `void SendAck(uint16 seq);` +- `void SendOutOfOrderAck(uint16 seq);` +- `bool CheckTimeout(uint32 now, uint32 timeout=30) { return (LastPacket && (now-LastPacket) > timeout); }` +- `bool Stale(uint32 now, uint32 timeout=30) { return (LastPacket && (now-LastPacket) > timeout); }` +- `void InboundQueuePush(EQApplicationPacket *p);` +- `void InboundQueueClear();` +- `void OutboundQueueClear();` +- `bool HasOutgoingData();` +- `void SendKeyRequest();` +- `int16 processRSAKey(EQProtocolPacket *p, uint16 subpacket_length = 0);` +- `void RemoveData() { InboundQueueClear(); OutboundQueueClear(); if (CombinedAppPacket) delete CombinedAppPacket; }` +- `void Close() { SendDisconnect(); }` +- `bool CheckActive() { return (GetState()==ESTABLISHED); }` +- `bool CheckClosed() { return GetState()==CLOSED; }` +- `void SetOpcodeSize(uint8 s) { app_opcode_size = s; }` +- `void SetStreamType(EQStreamType t);` +- `void ProcessQueue();` +- `void Decay();` +- `void AdjustRates(uint32 average_delta);` + +## Notable Comments + +- /* +- */ +- //Deltas are in ms, representing round trip times +- /*000*/ uint16 RequestID; +- /*002*/ uint32 last_local_delta; +- /*006*/ uint32 average_delta; +- /*010*/ uint32 low_delta; +- /*014*/ uint32 high_delta; +- /*018*/ uint32 last_remote_delta; +- /*022*/ uint64 packets_sent; diff --git a/docs/code/EQStreamFactory.md b/docs/code/EQStreamFactory.md new file mode 100644 index 0000000..db0b98a --- /dev/null +++ b/docs/code/EQStreamFactory.md @@ -0,0 +1,27 @@ +# File: `EQStreamFactory.h` + +## Classes + +- `EQStreamFactory` + +## Functions + +- `void CheckTimeout(bool remove_all = false);` +- `void Push(EQStream *s);` +- `bool loadPublicKey();` +- `bool Open();` +- `bool Open(unsigned long port) { Port=port; return Open(); }` +- `void Close();` +- `void ReaderLoop();` +- `void WriterLoop();` +- `void CombinePacketLoop();` +- `void Stop() { StopReader(); StopWriter(); StopCombinePacket(); }` +- `void StopReader() { MReaderRunning.lock(); ReaderRunning=false; MReaderRunning.unlock(); }` +- `void StopWriter() { MWriterRunning.lock(); WriterRunning=false; MWriterRunning.unlock(); WriterWork.Signal(); }` +- `void StopCombinePacket() { MCombinePacketRunning.lock(); CombinePacketRunning=false; MCombinePacketRunning.unlock(); }` +- `void SignalWriter() { WriterWork.Signal(); }` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/Entity.md b/docs/code/Entity.md new file mode 100644 index 0000000..81aa661 --- /dev/null +++ b/docs/code/Entity.md @@ -0,0 +1,792 @@ +# File: `Entity.h` + +## Classes + +- `Entity` +- `NPC` +- `Trade` +- `LuaSpell` +- `GroupMemberInfo` +- `BonusValues` +- `MaintainedEffects` +- `SpellEffects` +- `DetrimentalEffects` +- `InfoStruct` +- `WardInfo` +- `Proc` +- `ThreatTransfer` +- `Entity` + +## Functions + +- `void SetInfoStruct(InfoStruct* oldStruct)` +- `std::lock_guard lk(classMutex);` +- `std::string get_name() { std::lock_guard lk(classMutex); return name_; }` +- `int8 get_class1() { std::lock_guard lk(classMutex); return class1_; }` +- `int8 get_class2() { std::lock_guard lk(classMutex); return class2_; }` +- `int8 get_class3() { std::lock_guard lk(classMutex); return class3_; }` +- `int8 get_race() { std::lock_guard lk(classMutex); return race_; }` +- `int8 get_gender() { std::lock_guard lk(classMutex); return gender_; }` +- `int16 get_level() { std::lock_guard lk(classMutex); return level_; }` +- `int16 get_max_level() { std::lock_guard lk(classMutex); return max_level_; }` +- `int16 get_effective_level() { std::lock_guard lk(classMutex); return effective_level_; }` +- `int16 get_tradeskill_level() { std::lock_guard lk(classMutex); return tradeskill_level_; }` +- `int16 get_tradeskill_max_level() { std::lock_guard lk(classMutex); return tradeskill_max_level_; }` +- `int8 get_cur_concentration() { std::lock_guard lk(classMutex); return cur_concentration_; }` +- `int8 get_max_concentration() { std::lock_guard lk(classMutex); return max_concentration_; }` +- `int8 get_max_concentration_base() { std::lock_guard lk(classMutex); return max_concentration_base_; }` +- `int16 get_cur_attack() { std::lock_guard lk(classMutex); return cur_attack_; }` +- `int16 get_attack_base() { std::lock_guard lk(classMutex); return attack_base_; }` +- `int16 get_cur_mitigation() { std::lock_guard lk(classMutex); return cur_mitigation_; }` +- `int16 get_max_mitigation() { std::lock_guard lk(classMutex); return max_mitigation_; }` +- `int16 get_mitigation_base() { std::lock_guard lk(classMutex); return mitigation_base_; }` +- `sint16 get_mitigation_modifier() { std::lock_guard lk(classMutex); return mitigation_modifier_; }` +- `int16 get_avoidance_display() { std::lock_guard lk(classMutex); return avoidance_display_; }` +- `float get_cur_avoidance() { std::lock_guard lk(classMutex); return cur_avoidance_; }` +- `int16 get_base_avoidance_pct() { std::lock_guard lk(classMutex); return base_avoidance_pct_; }` +- `int16 get_avoidance_base() { std::lock_guard lk(classMutex); return avoidance_base_; }` +- `float get_parry() { std::lock_guard lk(classMutex); return parry_; }` +- `float get_parry_base() { std::lock_guard lk(classMutex); return parry_base_; }` +- `int16 get_max_avoidance() { std::lock_guard lk(classMutex); return max_avoidance_; }` +- `float get_deflection() { std::lock_guard lk(classMutex); return deflection_; }` +- `int16 get_deflection_base() { std::lock_guard lk(classMutex); return deflection_base_; }` +- `float get_block() { std::lock_guard lk(classMutex); return block_; }` +- `int16 get_block_base() { std::lock_guard lk(classMutex); return block_base_; }` +- `float get_str() { std::lock_guard lk(classMutex); return str_; }` +- `float get_sta() { std::lock_guard lk(classMutex); return sta_; }` +- `float get_agi() { std::lock_guard lk(classMutex); return agi_; }` +- `float get_wis() { std::lock_guard lk(classMutex); return wis_; }` +- `float get_intel() { std::lock_guard lk(classMutex); return intel_; }` +- `float get_str_base() { std::lock_guard lk(classMutex); return str_base_; }` +- `float get_sta_base() { std::lock_guard lk(classMutex); return sta_base_; }` +- `float get_agi_base() { std::lock_guard lk(classMutex); return agi_base_; }` +- `float get_wis_base() { std::lock_guard lk(classMutex); return wis_base_; }` +- `float get_intel_base() { std::lock_guard lk(classMutex); return intel_base_; }` +- `int16 get_heat() { std::lock_guard lk(classMutex); return heat_; }` +- `int16 get_cold() { std::lock_guard lk(classMutex); return cold_; }` +- `int16 get_magic() { std::lock_guard lk(classMutex); return magic_; }` +- `int16 get_mental() { std::lock_guard lk(classMutex); return mental_; }` +- `int16 get_divine() { std::lock_guard lk(classMutex); return divine_; }` +- `int16 get_disease() { std::lock_guard lk(classMutex); return disease_; }` +- `int16 get_poison() { std::lock_guard lk(classMutex); return poison_; }` +- `int16 get_disease_base() { std::lock_guard lk(classMutex); return disease_base_; }` +- `int16 get_cold_base() { std::lock_guard lk(classMutex); return cold_base_; }` +- `int16 get_divine_base() { std::lock_guard lk(classMutex); return divine_base_; }` +- `int16 get_magic_base() { std::lock_guard lk(classMutex); return magic_base_; }` +- `int16 get_mental_base() { std::lock_guard lk(classMutex); return mental_base_; }` +- `int16 get_heat_base() { std::lock_guard lk(classMutex); return heat_base_; }` +- `int16 get_poison_base() { std::lock_guard lk(classMutex); return poison_base_; }` +- `int16 get_elemental_base() { std::lock_guard lk(classMutex); return elemental_base_; }` +- `int16 get_noxious_base() { std::lock_guard lk(classMutex); return noxious_base_; }` +- `int16 get_arcane_base() { std::lock_guard lk(classMutex); return arcane_base_; }` +- `int32 get_coin_copper() { std::lock_guard lk(classMutex); return coin_copper_; }` +- `int32 get_coin_silver() { std::lock_guard lk(classMutex); return coin_silver_; }` +- `int32 get_coin_gold() { std::lock_guard lk(classMutex); return coin_gold_; }` +- `int32 get_coin_plat() { std::lock_guard lk(classMutex); return coin_plat_; }` +- `int32 get_bank_coin_copper() { std::lock_guard lk(classMutex); return bank_coin_copper_; }` +- `int32 get_bank_coin_silver() { std::lock_guard lk(classMutex); return bank_coin_silver_; }` +- `int32 get_bank_coin_gold() { std::lock_guard lk(classMutex); return bank_coin_gold_; }` +- `int32 get_bank_coin_plat() { std::lock_guard lk(classMutex); return bank_coin_plat_; }` +- `int32 get_status_points() { std::lock_guard lk(classMutex); return status_points_; }` +- `std::string get_deity() { std::lock_guard lk(classMutex); return deity_; }` +- `int32 get_weight() { std::lock_guard lk(classMutex); return weight_; }` +- `int32 get_max_weight() { std::lock_guard lk(classMutex); return max_weight_; }` +- `int8 get_tradeskill_class1() { std::lock_guard lk(classMutex); return tradeskill_class1_; }` +- `int8 get_tradeskill_class2() { std::lock_guard lk(classMutex); return tradeskill_class2_; }` +- `int8 get_tradeskill_class3() { std::lock_guard lk(classMutex); return tradeskill_class3_; }` +- `int32 get_account_age_base() { std::lock_guard lk(classMutex); return account_age_base_; }` +- `int8 get_account_age_bonus(int8 field) { std::lock_guard lk(classMutex); return account_age_bonus_[field]; }` +- `int16 get_absorb() { std::lock_guard lk(classMutex); return absorb_; }` +- `int32 get_xp() { std::lock_guard lk(classMutex); return xp_; }` +- `int32 get_xp_needed() { std::lock_guard lk(classMutex); return xp_needed_; }` +- `float get_xp_debt() { std::lock_guard lk(classMutex); return xp_debt_; }` +- `int16 get_xp_yellow() { std::lock_guard lk(classMutex); return xp_yellow_; }` +- `int16 get_xp_yellow_vitality_bar() { std::lock_guard lk(classMutex); return xp_yellow_vitality_bar_; }` +- `int16 get_xp_blue_vitality_bar() { std::lock_guard lk(classMutex); return xp_blue_vitality_bar_; }` +- `int16 get_xp_blue() { std::lock_guard lk(classMutex); return xp_blue_; }` +- `int32 get_ts_xp() { std::lock_guard lk(classMutex); return ts_xp_; }` +- `int32 get_ts_xp_needed() { std::lock_guard lk(classMutex); return ts_xp_needed_; }` +- `int16 get_tradeskill_exp_yellow() { std::lock_guard lk(classMutex); return tradeskill_exp_yellow_; }` +- `int16 get_tradeskill_exp_blue() { std::lock_guard lk(classMutex); return tradeskill_exp_blue_; }` +- `int32 get_flags() { std::lock_guard lk(classMutex); return flags_; }` +- `int32 get_flags2() { std::lock_guard lk(classMutex); return flags2_; }` +- `float get_xp_vitality() { std::lock_guard lk(classMutex); return xp_vitality_; }` +- `float get_tradeskill_xp_vitality() { std::lock_guard lk(classMutex); return tradeskill_xp_vitality_; }` +- `int16 get_mitigation_skill1() { std::lock_guard lk(classMutex); return mitigation_skill1_; }` +- `int16 get_mitigation_skill2() { std::lock_guard lk(classMutex); return mitigation_skill2_; }` +- `int16 get_mitigation_skill3() { std::lock_guard lk(classMutex); return mitigation_skill3_; }` +- `int16 get_mitigation_pve() { std::lock_guard lk(classMutex); return mitigation_pve_; }` +- `int16 get_mitigation_pvp() { std::lock_guard lk(classMutex); return mitigation_pvp_; }` +- `float get_ability_modifier() { std::lock_guard lk(classMutex); return ability_modifier_; }` +- `float get_critical_mitigation() { std::lock_guard lk(classMutex); return critical_mitigation_; }` +- `float get_block_chance() { std::lock_guard lk(classMutex); return block_chance_; }` +- `float get_uncontested_parry() { std::lock_guard lk(classMutex); return uncontested_parry_; }` +- `float get_uncontested_block() { std::lock_guard lk(classMutex); return uncontested_block_; }` +- `float get_uncontested_dodge() { std::lock_guard lk(classMutex); return uncontested_dodge_; }` +- `float get_uncontested_riposte() { std::lock_guard lk(classMutex); return uncontested_riposte_; }` +- `float get_crit_chance() { std::lock_guard lk(classMutex); return crit_chance_; }` +- `float get_crit_bonus() { std::lock_guard lk(classMutex); return crit_bonus_; }` +- `float get_potency() { std::lock_guard lk(classMutex); return potency_; }` +- `float get_hate_mod() { std::lock_guard lk(classMutex); return hate_mod_; }` +- `float get_reuse_speed() { std::lock_guard lk(classMutex); return reuse_speed_; }` +- `float get_casting_speed() { std::lock_guard lk(classMutex); return casting_speed_; }` +- `float get_recovery_speed() { std::lock_guard lk(classMutex); return recovery_speed_; }` +- `float get_spell_reuse_speed() { std::lock_guard lk(classMutex); return spell_reuse_speed_; }` +- `float get_spell_multi_attack() { std::lock_guard lk(classMutex); return spell_multi_attack_; }` +- `float get_dps() { std::lock_guard lk(classMutex); return dps_; }` +- `float get_dps_multiplier() { std::lock_guard lk(classMutex); return dps_multiplier_; }` +- `float get_attackspeed() { std::lock_guard lk(classMutex); return attackspeed_; }` +- `float get_haste() { std::lock_guard lk(classMutex); return haste_; }` +- `float get_multi_attack() { std::lock_guard lk(classMutex); return multi_attack_; }` +- `float get_flurry() { std::lock_guard lk(classMutex); return flurry_; }` +- `float get_melee_ae() { std::lock_guard lk(classMutex); return melee_ae_; }` +- `float get_strikethrough() { std::lock_guard lk(classMutex); return strikethrough_; }` +- `float get_accuracy() { std::lock_guard lk(classMutex); return accuracy_; }` +- `float get_offensivespeed() { std::lock_guard lk(classMutex); return offensivespeed_; }` +- `float get_rain() { std::lock_guard lk(classMutex); return rain_; }` +- `float get_wind() { std::lock_guard lk(classMutex); return wind_; }` +- `sint8 get_alignment() { std::lock_guard lk(classMutex); return alignment_; }` +- `int32 get_pet_id() { std::lock_guard lk(classMutex); return pet_id_; }` +- `std::string get_pet_name() { std::lock_guard lk(classMutex); return pet_name_; }` +- `float get_pet_health_pct() { std::lock_guard lk(classMutex); return pet_health_pct_; }` +- `float get_pet_power_pct() { std::lock_guard lk(classMutex); return pet_power_pct_; }` +- `int8 get_pet_movement() { std::lock_guard lk(classMutex); return pet_movement_; }` +- `int8 get_pet_behavior() { std::lock_guard lk(classMutex); return pet_behavior_; }` +- `int32 get_vision() { std::lock_guard lk(classMutex); return vision_; }` +- `int8 get_breathe_underwater() { std::lock_guard lk(classMutex); return breathe_underwater_; }` +- `std::string get_biography() { std::lock_guard lk(classMutex); return biography_; }` +- `float get_drunk() { std::lock_guard lk(classMutex); return drunk_; }` +- `sint16 get_power_regen() { std::lock_guard lk(classMutex); return power_regen_; }` +- `sint16 get_hp_regen() { std::lock_guard lk(classMutex); return hp_regen_; }` +- `int8 get_power_regen_override() { std::lock_guard lk(classMutex); return power_regen_override_; }` +- `int8 get_hp_regen_override() { std::lock_guard lk(classMutex); return hp_regen_override_; }` +- `int8 get_water_type() { std::lock_guard lk(classMutex); return water_type_; }` +- `int8 get_flying_type() { std::lock_guard lk(classMutex); return flying_type_; }` +- `int8 get_no_interrupt() { std::lock_guard lk(classMutex); return no_interrupt_; }` +- `int8 get_interaction_flag() { std::lock_guard lk(classMutex); return interaction_flag_; }` +- `int8 get_tag1() { std::lock_guard lk(classMutex); return tag1_; }` +- `int16 get_mood() { std::lock_guard lk(classMutex); return mood_; }` +- `int32 get_range_last_attack_time() { std::lock_guard lk(classMutex); return range_last_attack_time_; }` +- `int32 get_primary_last_attack_time() { std::lock_guard lk(classMutex); return primary_last_attack_time_; }` +- `int32 get_secondary_last_attack_time() { std::lock_guard lk(classMutex); return secondary_last_attack_time_; }` +- `int16 get_primary_attack_delay() { std::lock_guard lk(classMutex); return primary_attack_delay_; }` +- `int16 get_secondary_attack_delay() { std::lock_guard lk(classMutex); return secondary_attack_delay_; }` +- `int16 get_ranged_attack_delay() { std::lock_guard lk(classMutex); return ranged_attack_delay_; }` +- `int8 get_primary_weapon_type() { std::lock_guard lk(classMutex); return primary_weapon_type_; }` +- `int8 get_secondary_weapon_type() { std::lock_guard lk(classMutex); return secondary_weapon_type_; }` +- `int8 get_ranged_weapon_type() { std::lock_guard lk(classMutex); return ranged_weapon_type_; }` +- `int32 get_primary_weapon_damage_low() { std::lock_guard lk(classMutex); return primary_weapon_damage_low_; }` +- `int32 get_primary_weapon_damage_high() { std::lock_guard lk(classMutex); return primary_weapon_damage_high_; }` +- `int32 get_secondary_weapon_damage_low() { std::lock_guard lk(classMutex); return secondary_weapon_damage_low_; }` +- `int32 get_secondary_weapon_damage_high() { std::lock_guard lk(classMutex); return secondary_weapon_damage_high_; }` +- `int32 get_ranged_weapon_damage_low() { std::lock_guard lk(classMutex); return ranged_weapon_damage_low_; }` +- `int32 get_ranged_weapon_damage_high() { std::lock_guard lk(classMutex); return ranged_weapon_damage_high_; }` +- `int8 get_wield_type() { std::lock_guard lk(classMutex); return wield_type_; }` +- `int8 get_attack_type() { std::lock_guard lk(classMutex); return attack_type_; }` +- `int16 get_primary_weapon_delay() { std::lock_guard lk(classMutex); return primary_weapon_delay_; }` +- `int16 get_secondary_weapon_delay() { std::lock_guard lk(classMutex); return secondary_weapon_delay_; }` +- `int16 get_ranged_weapon_delay() { std::lock_guard lk(classMutex); return ranged_weapon_delay_; }` +- `int8 get_override_primary_weapon() { std::lock_guard lk(classMutex); return override_primary_weapon_; }` +- `int8 get_override_secondary_weapon() { std::lock_guard lk(classMutex); return override_secondary_weapon_; }` +- `int8 get_override_ranged_weapon() { std::lock_guard lk(classMutex); return override_ranged_weapon_; }` +- `int8 get_friendly_target_npc() { std::lock_guard lk(classMutex); return friendly_target_npc_; }` +- `int32 get_last_claim_time() { std::lock_guard lk(classMutex); return last_claim_time_; }` +- `int8 get_engaged_encounter() { std::lock_guard lk(classMutex); return engaged_encounter_; }` +- `int8 get_lockable_encounter() { std::lock_guard lk(classMutex); return lockable_encounter_; }` +- `int8 get_first_world_login() { std::lock_guard lk(classMutex); return first_world_login_; }` +- `int8 get_reload_player_spells() { std::lock_guard lk(classMutex); return reload_player_spells_; }` +- `int8 get_group_loot_method() { std::lock_guard lk(classMutex); return group_loot_method_; }` +- `int8 get_group_loot_items_rarity() { std::lock_guard lk(classMutex); return group_loot_items_rarity_; }` +- `int8 get_group_auto_split() { std::lock_guard lk(classMutex); return group_auto_split_; }` +- `int8 get_group_default_yell() { std::lock_guard lk(classMutex); return group_default_yell_; }` +- `int8 get_group_autolock() { std::lock_guard lk(classMutex); return group_autolock_; }` +- `int8 get_group_lock_method() { std::lock_guard lk(classMutex); return group_lock_method_; }` +- `int8 get_group_solo_autolock() { std::lock_guard lk(classMutex); return group_solo_autolock_; }` +- `int8 get_group_auto_loot_method() { std::lock_guard lk(classMutex); return group_auto_loot_method_; }` +- `int8 get_assist_auto_attack() { std::lock_guard lk(classMutex); return assist_auto_attack_; }` +- `std::string get_action_state() { std::lock_guard lk(classMutex); return action_state_; }` +- `std::string get_combat_action_state() { std::lock_guard lk(classMutex); return combat_action_state_; }` +- `float get_max_spell_reduction() { std::lock_guard lk(classMutex); return max_spell_reduction_; }` +- `int8 get_max_spell_reduction_override() { std::lock_guard lk(classMutex); return max_spell_reduction_override_; }` +- `void set_name(std::string value) { std::lock_guard lk(classMutex); name_ = value; }` +- `void set_deity(std::string value) { std::lock_guard lk(classMutex); deity_ = value; }` +- `void set_class1(int8 value) { std::lock_guard lk(classMutex); class1_ = value; }` +- `void set_class2(int8 value) { std::lock_guard lk(classMutex); class2_ = value; }` +- `void set_class3(int8 value) { std::lock_guard lk(classMutex); class3_ = value; }` +- `void set_race(int8 value) { std::lock_guard lk(classMutex); race_ = value; }` +- `void set_gender(int8 value) { std::lock_guard lk(classMutex); gender_ = value; }` +- `void set_level(int16 value) { std::lock_guard lk(classMutex); level_ = value; }` +- `void set_max_level(int16 value) { std::lock_guard lk(classMutex); max_level_ = value; }` +- `void set_effective_level(int16 value) { std::lock_guard lk(classMutex); effective_level_ = value; }` +- `void set_cur_concentration(int8 value) { std::lock_guard lk(classMutex); cur_concentration_ = value; }` +- `void set_max_concentration(int8 value) { std::lock_guard lk(classMutex); max_concentration_ = value; }` +- `void set_max_concentration_base(int8 value) { std::lock_guard lk(classMutex); max_concentration_base_ = value; }` +- `void add_cur_concentration(int8 value) { std::lock_guard lk(classMutex); cur_concentration_ += value; }` +- `void add_max_concentration(int8 value) { std::lock_guard lk(classMutex); max_concentration_ += value; }` +- `void set_cur_attack(int16 value) { std::lock_guard lk(classMutex); cur_attack_ = value; }` +- `void set_attack_base(int16 value) { std::lock_guard lk(classMutex); attack_base_ = value; }` +- `void set_cur_mitigation(int16 value) { std::lock_guard lk(classMutex); cur_mitigation_ = value; }` +- `void set_max_mitigation(int16 value) { std::lock_guard lk(classMutex); max_mitigation_ = value; }` +- `void set_mitigation_base(int16 value) { std::lock_guard lk(classMutex); mitigation_base_ = value; }` +- `void add_mitigation_base(int16 value) { std::lock_guard lk(classMutex); mitigation_base_ += value; }` +- `void set_mitigation_modifier(sint16 value) { std::lock_guard lk(classMutex); mitigation_modifier_ = value; }` +- `void set_avoidance_display(int16 value) { std::lock_guard lk(classMutex); avoidance_display_ = value; }` +- `void set_cur_avoidance(float value) { std::lock_guard lk(classMutex); cur_avoidance_ = value; }` +- `void set_base_avoidance_pct(int16 value) { std::lock_guard lk(classMutex); base_avoidance_pct_ = value; }` +- `void set_avoidance_base(int16 value) { std::lock_guard lk(classMutex); avoidance_base_ = value; }` +- `void set_max_avoidance(int16 value) { std::lock_guard lk(classMutex); max_avoidance_ = value; }` +- `void set_parry(float value) { std::lock_guard lk(classMutex); parry_ = value; }` +- `void set_parry_base(float value) { std::lock_guard lk(classMutex); parry_base_ = value; }` +- `void set_deflection(int16 value) { std::lock_guard lk(classMutex); deflection_ = value; }` +- `void set_deflection_base(float value) { std::lock_guard lk(classMutex); deflection_base_ = value; }` +- `void set_block(float value) { std::lock_guard lk(classMutex); block_ = value; }` +- `void set_block_base(int16 value) { std::lock_guard lk(classMutex); block_base_ = value; }` +- `void set_str(float value) { std::lock_guard lk(classMutex); str_ = value; }` +- `void set_sta(float value) { std::lock_guard lk(classMutex); sta_ = value; }` +- `void set_agi(float value) { std::lock_guard lk(classMutex); agi_ = value; }` +- `void set_wis(float value) { std::lock_guard lk(classMutex); wis_ = value; }` +- `void set_intel(float value) { std::lock_guard lk(classMutex); intel_ = value; }` +- `void add_str(float value) { std::lock_guard lk(classMutex); if(str_ + value < 0.0f) str_ = 0.0f; else str_ += value; }` +- `void add_sta(float value) { std::lock_guard lk(classMutex); if(sta_ + value < 0.0f) sta_ = 0.0f; else sta_ += value; }` +- `void add_agi(float value) { std::lock_guard lk(classMutex); if(agi_ + value < 0.0f) agi_ = 0.0f; else agi_ += value; }` +- `void add_wis(float value) { std::lock_guard lk(classMutex); if(wis_ + value < 0.0f) wis_ = 0.0f; else wis_ += value; }` +- `void add_intel(float value) { std::lock_guard lk(classMutex); if(intel_ + value < 0.0f) intel_ = 0.0f; else intel_ += value; }` +- `void set_str_base(float value) { std::lock_guard lk(classMutex); str_base_ = value; }` +- `void set_sta_base(float value) { std::lock_guard lk(classMutex); sta_base_ = value; }` +- `void set_agi_base(float value) { std::lock_guard lk(classMutex); agi_base_ = value; }` +- `void set_wis_base(float value) { std::lock_guard lk(classMutex); wis_base_ = value; }` +- `void set_intel_base(float value) { std::lock_guard lk(classMutex); intel_base_ = value; }` +- `void set_heat(int16 value) { std::lock_guard lk(classMutex); heat_ = value; }` +- `void set_cold(int16 value) { std::lock_guard lk(classMutex); cold_ = value; }` +- `void set_magic(int16 value) { std::lock_guard lk(classMutex); magic_ = value; }` +- `void set_mental(int16 value) { std::lock_guard lk(classMutex); mental_ = value; }` +- `void set_divine(int16 value) { std::lock_guard lk(classMutex); divine_ = value; }` +- `void set_disease(int16 value) { std::lock_guard lk(classMutex); disease_ = value; }` +- `void set_poison(int16 value) { std::lock_guard lk(classMutex); poison_ = value; }` +- `void add_heat(sint16 value) { std::lock_guard lk(classMutex); if((sint32)heat_ + value < 0) heat_ = 0; else heat_ += value; }` +- `void add_cold(sint16 value) { std::lock_guard lk(classMutex); if((sint32)cold_ + value < 0) cold_ = 0; else cold_ += value; }` +- `void add_magic(sint16 value) { std::lock_guard lk(classMutex); if((sint32)magic_ + value < 0) magic_ = 0; else magic_ += value; }` +- `void add_mental(sint16 value) { std::lock_guard lk(classMutex); if((sint32)mental_ + value < 0) mental_ = 0; else mental_ += value; }` +- `void add_divine(sint16 value) { std::lock_guard lk(classMutex); if((sint32)divine_ + value < 0) divine_ = 0; else divine_ += value; }` +- `void add_disease(sint16 value) { std::lock_guard lk(classMutex); if((sint32)disease_ + value < 0) disease_ = 0; else disease_ += value; }` +- `void add_poison(sint16 value) { std::lock_guard lk(classMutex); if((sint32)poison_ + value < 0) poison_ = 0; else poison_ += value; }` +- `void set_disease_base(int16 value) { std::lock_guard lk(classMutex); disease_base_ = value; }` +- `void set_cold_base(int16 value) { std::lock_guard lk(classMutex); cold_base_ = value; }` +- `void set_divine_base(int16 value) { std::lock_guard lk(classMutex); divine_base_ = value; }` +- `void set_magic_base(int16 value) { std::lock_guard lk(classMutex); magic_base_ = value; }` +- `void set_mental_base(int16 value) { std::lock_guard lk(classMutex); mental_base_ = value; }` +- `void set_heat_base(int16 value) { std::lock_guard lk(classMutex); heat_base_ = value; }` +- `void set_poison_base(int16 value) { std::lock_guard lk(classMutex); poison_base_ = value; }` +- `void set_elemental_base(int16 value) { std::lock_guard lk(classMutex); elemental_base_ = value; }` +- `void set_noxious_base(int16 value) { std::lock_guard lk(classMutex); noxious_base_ = value; }` +- `void set_arcane_base(int16 value) { std::lock_guard lk(classMutex); arcane_base_ = value; }` +- `void set_tradeskill_level(int16 value) { std::lock_guard lk(classMutex); tradeskill_level_ = value; }` +- `void set_tradeskill_max_level(int16 value) { std::lock_guard lk(classMutex); tradeskill_max_level_ = value; }` +- `void set_tradeskill_class1(int8 value) { std::lock_guard lk(classMutex); tradeskill_class1_ = value; }` +- `void set_tradeskill_class2(int8 value) { std::lock_guard lk(classMutex); tradeskill_class2_ = value; }` +- `void set_tradeskill_class3(int8 value) { std::lock_guard lk(classMutex); tradeskill_class3_ = value; }` +- `void set_account_age_base(int32 value) { std::lock_guard lk(classMutex); account_age_base_ = value; }` +- `void set_xp_vitality(float value) { std::lock_guard lk(classMutex); xp_vitality_ = value; }` +- `void add_xp_vitality(float value) { std::lock_guard lk(classMutex); xp_vitality_ += value; }` +- `void set_tradeskill_xp_vitality(float value) { std::lock_guard lk(classMutex); tradeskill_xp_vitality_ = value; }` +- `void set_absorb(int16 value) { std::lock_guard lk(classMutex); absorb_ = value; }` +- `void set_xp(int32 value) { std::lock_guard lk(classMutex); xp_ = value; }` +- `void set_xp_needed(int32 value) { std::lock_guard lk(classMutex); xp_needed_ = value; }` +- `void set_xp_debt(float value) { std::lock_guard lk(classMutex); if(std::isnan(value)) value = 0.0f; xp_debt_ = value; }` +- `void set_xp_yellow(int16 value) { std::lock_guard lk(classMutex); xp_yellow_ = value; }` +- `void set_xp_blue(int16 value) { std::lock_guard lk(classMutex); xp_blue_ = value; }` +- `void set_xp_yellow_vitality_bar(int16 value) { std::lock_guard lk(classMutex); xp_yellow_vitality_bar_ = value; }` +- `void set_xp_blue_vitality_bar(int16 value) { std::lock_guard lk(classMutex); xp_blue_vitality_bar_ = value; }` +- `void set_ts_xp(int32 value) { std::lock_guard lk(classMutex); ts_xp_ = value; }` +- `void set_ts_xp_needed(int32 value) { std::lock_guard lk(classMutex); ts_xp_needed_ = value; }` +- `void set_tradeskill_exp_yellow(int16 value) { std::lock_guard lk(classMutex); tradeskill_exp_yellow_ = value; }` +- `void set_tradeskill_exp_blue(int16 value) { std::lock_guard lk(classMutex); tradeskill_exp_blue_ = value; }` +- `void set_flags(int32 value) { std::lock_guard lk(classMutex); flags_ = value; }` +- `void set_flags2(int32 value) { std::lock_guard lk(classMutex); flags2_ = value; }` +- `void set_coin_plat(int32 value) { std::lock_guard lk(classMutex); coin_plat_ = value; }` +- `void set_coin_gold(int32 value) { std::lock_guard lk(classMutex); coin_gold_ = value; }` +- `void set_coin_silver(int32 value) { std::lock_guard lk(classMutex); coin_silver_ = value; }` +- `void set_coin_copper(int32 value) { std::lock_guard lk(classMutex); coin_copper_ = value; }` +- `void add_coin_plat(int32 value) { std::lock_guard lk(classMutex); if((sint64)coin_plat_ + value < 0) coin_plat_ = 0; else coin_plat_ += value; }` +- `void add_coin_gold(int32 value) { std::lock_guard lk(classMutex); if((sint64)coin_gold_ + value < 0) coin_gold_ = 0; else coin_gold_ += value; }` +- `void add_coin_silver(int32 value) { std::lock_guard lk(classMutex); if((sint64)coin_silver_ + value < 0) coin_silver_ = 0; else coin_silver_ += value; }` +- `void add_coin_copper(int32 value) { std::lock_guard lk(classMutex); if((sint64)coin_copper_ + value < 0) coin_copper_ = 0; else coin_copper_ += value; }` +- `void set_bank_coin_plat(int32 value) { std::lock_guard lk(classMutex); bank_coin_plat_ = value; }` +- `void set_bank_coin_gold(int32 value) { std::lock_guard lk(classMutex); bank_coin_gold_ = value; }` +- `void set_bank_coin_silver(int32 value) { std::lock_guard lk(classMutex); bank_coin_silver_ = value; }` +- `void set_bank_coin_copper(int32 value) { std::lock_guard lk(classMutex); bank_coin_copper_ = value; }` +- `void add_bank_coin_plat(int32 value) { std::lock_guard lk(classMutex); if((sint64)bank_coin_plat_ + value < 0) bank_coin_plat_ = 0; else bank_coin_plat_ += value; }` +- `void add_bank_coin_gold(int32 value) { std::lock_guard lk(classMutex); if((sint64)bank_coin_gold_ + value < 0) bank_coin_gold_ = 0; else bank_coin_gold_ += value; }` +- `void add_bank_coin_silver(int32 value) { std::lock_guard lk(classMutex); if((sint64)bank_coin_silver_ + value < 0) bank_coin_silver_ = 0; else bank_coin_silver_ += value; }` +- `void add_bank_coin_copper(int32 value) { std::lock_guard lk(classMutex); if((sint64)bank_coin_copper_ + value < 0) bank_coin_copper_ = 0; else bank_coin_copper_ += value; }` +- `void set_status_points(int32 value) { std::lock_guard lk(classMutex); status_points_ = value; }` +- `void add_status_points(int32 value) { std::lock_guard lk(classMutex); if((sint64)status_points_ + value < 0) status_points_ = 0; else status_points_ += value; }` +- `bool subtract_status_points(int32 value) { std::lock_guard lk(classMutex); if(value > status_points_) return false; status_points_ -= value; return true; }` +- `void set_mitigation_skill1(int16 value) { std::lock_guard lk(classMutex); mitigation_skill1_ = value; }` +- `void set_mitigation_skill2(int16 value) { std::lock_guard lk(classMutex); mitigation_skill2_ = value; }` +- `void set_mitigation_skill3(int16 value) { std::lock_guard lk(classMutex); mitigation_skill3_ = value; }` +- `void set_mitigation_pve(int16 value) { std::lock_guard lk(classMutex); mitigation_pve_ = value; }` +- `void set_mitigation_pvp(int16 value) { std::lock_guard lk(classMutex); mitigation_pvp_ = value; }` +- `void add_mitigation_skill1(int16 value) { std::lock_guard lk(classMutex); if((sint32)mitigation_skill1_ + value < 0) mitigation_skill1_ = 0; else mitigation_skill1_ += value; }` +- `void add_mitigation_skill2(int16 value) { std::lock_guard lk(classMutex); if((sint32)mitigation_skill2_ + value < 0) mitigation_skill2_ = 0; else mitigation_skill2_ += value; }` +- `void add_mitigation_skill3(int16 value) { std::lock_guard lk(classMutex); if((sint32)mitigation_skill3_ + value < 0) mitigation_skill3_ = 0; else mitigation_skill3_ += value; }` +- `void set_ability_modifier(float value) { std::lock_guard lk(classMutex); ability_modifier_ = value; }` +- `void add_ability_modifier(float value) { std::lock_guard lk(classMutex); if(ability_modifier_ + value < 0.0f) ability_modifier_ = 0.0f; else ability_modifier_ += value; }` +- `void set_critical_mitigation(float value) { std::lock_guard lk(classMutex); critical_mitigation_ = value; }` +- `void add_critical_mitigation(float value) { std::lock_guard lk(classMutex); if(critical_mitigation_ + value < 0.0f) critical_mitigation_ = 0.0f; else critical_mitigation_ += value; }` +- `void set_block_chance(float value) { std::lock_guard lk(classMutex); block_chance_ = value; }` +- `void set_uncontested_parry(float value) { std::lock_guard lk(classMutex); uncontested_parry_ = value; }` +- `void set_uncontested_block(float value) { std::lock_guard lk(classMutex); uncontested_block_ = value; }` +- `void set_uncontested_dodge(float value) { std::lock_guard lk(classMutex); uncontested_dodge_ = value; }` +- `void set_uncontested_riposte(float value) { std::lock_guard lk(classMutex); uncontested_riposte_ = value; }` +- `void set_crit_chance(float value) { std::lock_guard lk(classMutex); crit_chance_ = value; }` +- `void set_crit_bonus(float value) { std::lock_guard lk(classMutex); crit_bonus_ = value; }` +- `void set_potency(float value) { std::lock_guard lk(classMutex); potency_ = value; }` +- `void set_hate_mod(float value) { std::lock_guard lk(classMutex); hate_mod_ = value; }` +- `void set_reuse_speed(float value) { std::lock_guard lk(classMutex); reuse_speed_ = value; }` +- `void set_casting_speed(float value) { std::lock_guard lk(classMutex); casting_speed_ = value; }` +- `void set_recovery_speed(float value) { std::lock_guard lk(classMutex); recovery_speed_ = value; }` +- `void set_spell_reuse_speed(float value) { std::lock_guard lk(classMutex); spell_reuse_speed_ = value; }` +- `void set_spell_multi_attack(float value) { std::lock_guard lk(classMutex); spell_multi_attack_ = value; }` +- `void set_dps(float value) { std::lock_guard lk(classMutex); dps_ = value; }` +- `void set_dps_multiplier(float value) { std::lock_guard lk(classMutex); dps_multiplier_ = value; }` +- `void set_attackspeed(float value) { std::lock_guard lk(classMutex); attackspeed_ = value; }` +- `void set_haste(float value) { std::lock_guard lk(classMutex); haste_ = value; }` +- `void set_multi_attack(float value) { std::lock_guard lk(classMutex); multi_attack_ = value; }` +- `void set_flurry(float value) { std::lock_guard lk(classMutex); flurry_ = value; }` +- `void set_melee_ae(float value) { std::lock_guard lk(classMutex); melee_ae_ = value; }` +- `void set_strikethrough(float value) { std::lock_guard lk(classMutex); strikethrough_ = value; }` +- `void set_accuracy(float value) { std::lock_guard lk(classMutex); accuracy_ = value; }` +- `void set_offensivespeed(float value) { std::lock_guard lk(classMutex); offensivespeed_ = value; }` +- `void set_rain(float value) { std::lock_guard lk(classMutex); if(value > 1.0f) value = 1.0f; else if(value < 0.0f) value = 0.0f; rain_ = value; }` +- `void set_wind(float value) { std::lock_guard lk(classMutex); if(value > 1.0f) value = 1.0f; else if(value < 0.0f) value = 0.0f; wind_ = value; }` +- `void add_block_chance(float value) { std::lock_guard lk(classMutex); if(block_chance_ + value < 0.0f) block_chance_ = 0.0f; else block_chance_ += value; }` +- `void add_uncontested_parry(float value) { std::lock_guard lk(classMutex); if(uncontested_parry_ + value < 0.0f) uncontested_parry_ = 0.0f; else uncontested_parry_ += value; }` +- `void add_uncontested_block(float value) { std::lock_guard lk(classMutex); if(uncontested_block_ + value < 0.0f) uncontested_block_ = 0.0f; else uncontested_block_ += value; }` +- `void add_uncontested_dodge(float value) { std::lock_guard lk(classMutex); if(uncontested_dodge_ + value < 0.0f) uncontested_dodge_ = 0.0f; else uncontested_dodge_ += value; }` +- `void add_uncontested_riposte(float value) { std::lock_guard lk(classMutex); if(uncontested_riposte_ + value < 0.0f) uncontested_riposte_ = 0.0f; else uncontested_riposte_ += value; }` +- `void add_crit_chance(float value) { std::lock_guard lk(classMutex); if(crit_chance_ + value < 0.0f) crit_chance_ = 0.0f; else crit_chance_ += value; }` +- `void add_crit_bonus(float value) { std::lock_guard lk(classMutex); if(crit_bonus_ + value < 0.0f) crit_bonus_ = 0.0f; else crit_bonus_ += value; }` +- `void add_potency(float value) { std::lock_guard lk(classMutex); if(potency_ + value < 0.0f) potency_ = 0.0f; else potency_ += value; }` +- `void add_hate_mod(float value) { std::lock_guard lk(classMutex); if(hate_mod_ + value < 0.0f) hate_mod_ = 0.0f; else hate_mod_ += value; }` +- `void add_reuse_speed(float value) { std::lock_guard lk(classMutex); reuse_speed_ += value; }` +- `void add_casting_speed(float value) { std::lock_guard lk(classMutex); casting_speed_ += value; }` +- `void add_recovery_speed(float value) { std::lock_guard lk(classMutex); recovery_speed_ += value; }` +- `void add_spell_reuse_speed(float value) { std::lock_guard lk(classMutex); spell_reuse_speed_ += value; }` +- `void add_spell_multi_attack(float value) { std::lock_guard lk(classMutex); spell_multi_attack_ += value; }` +- `void add_dps(float value) { std::lock_guard lk(classMutex); if(dps_ + value < 0.0f) dps_ = 0.0f; else dps_ += value; }` +- `void add_dps_multiplier(float value) { std::lock_guard lk(classMutex); if(dps_multiplier_ + value < 0.0f) dps_multiplier_ = 0.0f; else dps_multiplier_ += value; }` +- `void add_attackspeed(float value) { std::lock_guard lk(classMutex); if(attackspeed_ + value < 0.0f) attackspeed_ = 0.0f; else attackspeed_ += value; }` +- `void add_haste(float value) { std::lock_guard lk(classMutex); if(haste_ + value < 0.0f) haste_ = 0.0f; else haste_ += value; }` +- `void add_multi_attack(float value) { std::lock_guard lk(classMutex); if(multi_attack_ + value < 0.0f) multi_attack_ = 0.0f; else multi_attack_ += value; }` +- `void add_flurry(float value) { std::lock_guard lk(classMutex); if(flurry_ + value < 0.0f) flurry_ = 0.0f; else flurry_ += value; }` +- `void add_melee_ae(float value) { std::lock_guard lk(classMutex); if(melee_ae_ + value < 0.0f) melee_ae_ = 0.0f; else melee_ae_ += value; }` +- `void add_strikethrough(float value) { std::lock_guard lk(classMutex); if(strikethrough_ + value < 0.0f) strikethrough_ = 0.0f; else strikethrough_ += value; }` +- `void add_accuracy(float value) { std::lock_guard lk(classMutex); if(accuracy_ + value < 0.0f) accuracy_ = 0.0f; else accuracy_ += value; }` +- `void add_offensivespeed(float value) { std::lock_guard lk(classMutex); if(offensivespeed_ + value < 0.0f) offensivespeed_ = 0.0f; else offensivespeed_ += value; }` +- `void add_rain(float value) { std::lock_guard lk(classMutex); if(rain_ + value < 0.0f) rain_ = 0.0f; else rain_ += value; }` +- `void add_wind(float value) { std::lock_guard lk(classMutex); if(wind_ + value < 0.0f) wind_ = 0.0f; else wind_ += value; }` +- `void set_alignment(int8 value) { std::lock_guard lk(classMutex); alignment_ = value; }` +- `void set_pet_id(int32 value) { std::lock_guard lk(classMutex); pet_id_ = value; }` +- `void set_pet_name(std::string value) { std::lock_guard lk(classMutex); pet_name_ = value; }` +- `void set_pet_movement(int8 value) { std::lock_guard lk(classMutex); pet_movement_ = value; }` +- `void set_pet_behavior(int8 value) { std::lock_guard lk(classMutex); pet_behavior_ = value; }` +- `void set_pet_health_pct(float value) { std::lock_guard lk(classMutex); pet_health_pct_ = value; }` +- `void set_pet_power_pct(float value) { std::lock_guard lk(classMutex); pet_power_pct_ = value; }` +- `void set_weight(int32 value) { std::lock_guard lk(classMutex); weight_ = value; }` +- `void set_max_weight(int32 value) { std::lock_guard lk(classMutex); max_weight_ = value; }` +- `void set_vision(int32 value) { std::lock_guard lk(classMutex); vision_ = value; }` +- `void set_breathe_underwater(int8 value) { std::lock_guard lk(classMutex); breathe_underwater_ = value; }` +- `void set_drunk(float value) { std::lock_guard lk(classMutex); drunk_ = value; }` +- `void set_biography(std::string value) { std::lock_guard lk(classMutex); biography_ = value; }` +- `void set_power_regen(sint16 value) { std::lock_guard lk(classMutex); power_regen_ = value; }` +- `void set_hp_regen(sint16 value) { std::lock_guard lk(classMutex); hp_regen_ = value; }` +- `void set_power_regen_override(int8 value) { std::lock_guard lk(classMutex); power_regen_override_ = value; }` +- `void set_hp_regen_override(int8 value) { std::lock_guard lk(classMutex); hp_regen_override_ = value; }` +- `void set_water_type(int8 value) { std::lock_guard lk(classMutex); water_type_ = value; }` +- `void set_flying_type(int8 value) { std::lock_guard lk(classMutex); flying_type_ = value; }` +- `void set_no_interrupt(int8 value) { std::lock_guard lk(classMutex); no_interrupt_ = value; }` +- `void set_interaction_flag(int8 value) { std::lock_guard lk(classMutex); interaction_flag_ = value; }` +- `void set_tag1(int8 value) { std::lock_guard lk(classMutex); tag1_ = value; }` +- `void set_mood(int16 value) { std::lock_guard lk(classMutex); mood_ = value; }` +- `void set_range_last_attack_time(int32 value) { std::lock_guard lk(classMutex); range_last_attack_time_ = value; }` +- `void set_primary_last_attack_time(int32 value) { std::lock_guard lk(classMutex); primary_last_attack_time_ = value; }` +- `void set_secondary_last_attack_time(int32 value) { std::lock_guard lk(classMutex); secondary_last_attack_time_ = value; }` +- `void set_primary_attack_delay(int16 value) { std::lock_guard lk(classMutex); primary_attack_delay_ = value; }` +- `void set_secondary_attack_delay(int16 value) { std::lock_guard lk(classMutex); secondary_attack_delay_ = value; }` +- `void set_ranged_attack_delay(int16 value) { std::lock_guard lk(classMutex); ranged_attack_delay_ = value; }` +- `void set_primary_weapon_type(int8 value) { std::lock_guard lk(classMutex); primary_weapon_type_ = value; }` +- `void set_secondary_weapon_type(int8 value) { std::lock_guard lk(classMutex); secondary_weapon_type_ = value; }` +- `void set_ranged_weapon_type(int8 value) { std::lock_guard lk(classMutex); ranged_weapon_type_ = value; }` +- `void set_primary_weapon_damage_low(int32 value) { std::lock_guard lk(classMutex); primary_weapon_damage_low_ = value; }` +- `void set_primary_weapon_damage_high(int32 value) { std::lock_guard lk(classMutex); primary_weapon_damage_high_ = value; }` +- `void set_secondary_weapon_damage_low(int32 value) { std::lock_guard lk(classMutex); secondary_weapon_damage_low_ = value; }` +- `void set_secondary_weapon_damage_high(int32 value) { std::lock_guard lk(classMutex); secondary_weapon_damage_high_ = value; }` +- `void set_ranged_weapon_damage_low(int32 value) { std::lock_guard lk(classMutex); ranged_weapon_damage_low_ = value; }` +- `void set_ranged_weapon_damage_high(int32 value) { std::lock_guard lk(classMutex); ranged_weapon_damage_high_ = value; }` +- `void set_wield_type(int8 value) { std::lock_guard lk(classMutex); wield_type_ = value; }` +- `void set_attack_type(int8 value) { std::lock_guard lk(classMutex); attack_type_ = value; }` +- `void set_primary_weapon_delay(int16 value) { std::lock_guard lk(classMutex); primary_weapon_delay_ = value; }` +- `void set_secondary_weapon_delay(int16 value) { std::lock_guard lk(classMutex); secondary_weapon_delay_ = value; }` +- `void set_ranged_weapon_delay(int16 value) { std::lock_guard lk(classMutex); ranged_weapon_delay_ = value; }` +- `void set_override_primary_weapon(int8 value) { std::lock_guard lk(classMutex); override_primary_weapon_ = value; }` +- `void set_override_secondary_weapon(int8 value) { std::lock_guard lk(classMutex); override_secondary_weapon_ = value; }` +- `void set_override_ranged_weapon(int8 value) { std::lock_guard lk(classMutex); override_ranged_weapon_ = value; }` +- `void set_friendly_target_npc(int8 value) { std::lock_guard lk(classMutex); friendly_target_npc_ = value; }` +- `void set_last_claim_time(int32 value) { std::lock_guard lk(classMutex); last_claim_time_ = value; }` +- `void set_engaged_encounter(int8 value) { std::lock_guard lk(classMutex); engaged_encounter_ = value; }` +- `void set_lockable_encounter(int8 value) { std::lock_guard lk(classMutex); lockable_encounter_ = value; }` +- `void set_first_world_login(int8 value) { std::lock_guard lk(classMutex); first_world_login_ = value; }` +- `void set_reload_player_spells(int8 value) { std::lock_guard lk(classMutex); reload_player_spells_ = value; }` +- `void set_group_loot_method(int8 value) { std::lock_guard lk(classMutex); group_loot_method_ = value; }` +- `void set_group_loot_items_rarity(int8 value) { std::lock_guard lk(classMutex); group_loot_items_rarity_ = value; }` +- `void set_group_auto_split(int8 value) { std::lock_guard lk(classMutex); group_auto_split_ = value; }` +- `void set_group_default_yell(int8 value) { std::lock_guard lk(classMutex); group_default_yell_ = value; }` +- `void set_group_autolock(int8 value) { std::lock_guard lk(classMutex); group_autolock_ = value; }` +- `void set_group_lock_method(int8 value) { std::lock_guard lk(classMutex); group_lock_method_ = value; }` +- `void set_group_solo_autolock(int8 value) { std::lock_guard lk(classMutex); group_solo_autolock_ = value; }` +- `void set_group_auto_loot_method(int8 value) { std::lock_guard lk(classMutex); group_auto_loot_method_ = value; }` +- `void set_assist_auto_attack(int8 value) { std::lock_guard lk(classMutex); assist_auto_attack_ = value; }` +- `void set_action_state(std::string value) { std::lock_guard lk(classMutex); action_state_ = value; }` +- `void set_combat_action_state(std::string value) { std::lock_guard lk(classMutex); combat_action_state_ = value; }` +- `void set_max_spell_reduction(float value) { std::lock_guard lk(classMutex); max_spell_reduction_ = value; }` +- `void set_max_spell_reduction_override(int8 value) { std::lock_guard lk(classMutex); max_spell_reduction_override_ = value; }` +- `void ResetEffects(Spawn* spawn)` +- `void DeleteSpellEffects(bool removeClient = false);` +- `void RemoveSpells(bool unfriendlyOnly = false);` +- `void MapInfoStruct();` +- `void AddDetrimentalSpell(LuaSpell* spell, int32 override_expire_timestamp = 0);` +- `void RemoveDetrimentalSpell(LuaSpell* spell);` +- `void SetDeity(int8 new_deity){` +- `int8 GetDeity(){ return deity; }` +- `bool IsEntity(){ return true; }` +- `float CalculateSkillStatChance(char* skill, int16 item_stat, float max_cap = 0.0f, float modifier = 0.0f, bool add_to_skill = false);` +- `float CalculateSkillWithBonus(char* skillName, int16 item_stat, bool chance_skill_increase);` +- `float GetRuleSkillMaxBonus();` +- `void CalculateBonuses();` +- `float CalculateLevelStatBonus(int16 stat_value);` +- `void CalculateApplyWeight();` +- `void SetRegenValues(int16 effective_level);` +- `float CalculateBonusMod();` +- `float CalculateDPSMultiplier();` +- `float CalculateCastingSpeedMod();` +- `int16 GetStr();` +- `int16 GetSta();` +- `int16 GetInt();` +- `int16 GetWis();` +- `int16 GetAgi();` +- `int16 GetPrimaryStat();` +- `int16 GetHeatResistance();` +- `int16 GetColdResistance();` +- `int16 GetMagicResistance();` +- `int16 GetMentalResistance();` +- `int16 GetDivineResistance();` +- `int16 GetDiseaseResistance();` +- `int16 GetPoisonResistance();` +- `int16 GetStrBase();` +- `int16 GetStaBase();` +- `int16 GetIntBase();` +- `int16 GetWisBase();` +- `int16 GetAgiBase();` +- `int16 GetHeatResistanceBase();` +- `int16 GetColdResistanceBase();` +- `int16 GetMagicResistanceBase();` +- `int16 GetMentalResistanceBase();` +- `int16 GetDivineResistanceBase();` +- `int16 GetDiseaseResistanceBase();` +- `int16 GetPoisonResistanceBase();` +- `int8 GetConcentrationCurrent();` +- `int8 GetConcentrationMax();` +- `sint8 GetAlignment();` +- `void SetAlignment(sint8 new_value);` +- `bool HasMoved(bool include_heading);` +- `void SetHPRegen(int16 new_val);` +- `int16 GetHPRegen();` +- `void DoRegenUpdate();` +- `int32 GetFlags() { return info_struct.get_flags(); }` +- `int32 GetFlags2() { return info_struct.get_flags2(); }` +- `bool query_flags(int flag) {` +- `float GetMaxSpeed();` +- `void SetMaxSpeed(float val);` +- `int32 GetRangeLastAttackTime();` +- `void SetRangeLastAttackTime(int32 time);` +- `int16 GetRangeAttackDelay();` +- `int16 GetRangeWeaponDelay();` +- `void SetRangeWeaponDelay(int16 new_delay);` +- `void SetRangeAttackDelay(int16 new_delay);` +- `int32 GetPrimaryLastAttackTime();` +- `int16 GetPrimaryAttackDelay();` +- `void SetPrimaryAttackDelay(int16 new_delay);` +- `void SetPrimaryLastAttackTime(int32 new_time);` +- `void SetPrimaryWeaponDelay(int16 new_delay);` +- `int32 GetSecondaryLastAttackTime();` +- `int16 GetSecondaryAttackDelay();` +- `void SetSecondaryAttackDelay(int16 new_delay);` +- `void SetSecondaryLastAttackTime(int32 new_time);` +- `void SetSecondaryWeaponDelay(int16 new_delay);` +- `int32 GetPrimaryWeaponMinDamage();` +- `int32 GetPrimaryWeaponMaxDamage();` +- `int32 GetSecondaryWeaponMinDamage();` +- `int32 GetSecondaryWeaponMaxDamage();` +- `int32 GetRangedWeaponMinDamage();` +- `int32 GetRangedWeaponMaxDamage();` +- `int8 GetPrimaryWeaponType();` +- `int8 GetSecondaryWeaponType();` +- `int8 GetRangedWeaponType();` +- `int8 GetWieldType();` +- `int16 GetPrimaryWeaponDelay();` +- `int16 GetSecondaryWeaponDelay();` +- `bool IsDualWield();` +- `bool BehindTarget(Spawn* target);` +- `bool FlankingTarget(Spawn* target);` +- `void GetWeaponDamage(Item* item, int32* low_damage, int32* high_damage);` +- `void ChangePrimaryWeapon();` +- `void ChangeSecondaryWeapon();` +- `void ChangeRangedWeapon();` +- `void UpdateWeapons();` +- `int32 GetStrengthDamage();` +- `bool AttackAllowed(Entity* target, float distance = 0, bool range_attack = false);` +- `bool PrimaryWeaponReady();` +- `bool SecondaryWeaponReady();` +- `bool RangeWeaponReady();` +- `void MeleeAttack(Spawn* victim, float distance, bool primary, bool multi_attack = false);` +- `void RangeAttack(Spawn* victim, float distance, Item* weapon, Item* ammo, bool multi_attack = false);` +- `bool SpellAttack(Spawn* victim, float distance, LuaSpell* luaspell, int8 damage_type, int32 low_damage, int32 high_damage, int8 crit_mod = 0, bool no_calcs = false, int8 override_packet_type = 0, bool take_power = false);` +- `bool ProcAttack(Spawn* victim, int8 damage_type, int32 low_damage, int32 high_damage, string name, string success_msg, string effect_msg);` +- `bool SpellHeal(Spawn* target, float distance, LuaSpell* luaspell, string heal_type, int32 low_heal, int32 high_heal, int8 crit_mod = 0, bool no_calcs = false, string custom_spell_name="");` +- `int8 DetermineHit(Spawn* victim, int8 type, int8 damage_type, float ToHitBonus, bool is_caster_spell, LuaSpell* lua_spell = nullptr);` +- `float GetDamageTypeResistPercentage(int8 damage_type);` +- `bool DamageSpawn(Entity* victim, int8 type, int8 damage_type, int32 low_damage, int32 high_damage, const char* spell_name, int8 crit_mod = 0, bool is_tick = false, bool no_damage_calcs = false, bool ignore_attacker = false, bool take_power = false, LuaSpell* spell = 0);` +- `float CalculateMitigation(int8 type = DAMAGE_PACKET_TYPE_SIMPLE_DAMAGE, int8 damage_type = 0, int16 attacker_level = 0, bool for_pvp = false);` +- `void AddHate(Entity* attacker, sint32 hate);` +- `bool CheckInterruptSpell(Entity* attacker);` +- `bool CheckFizzleSpell(LuaSpell* spell);` +- `void KillSpawn(Spawn* dead, int8 type = 0, int8 damage_type = 0, int16 kill_blow_type = 0);` +- `void HandleDeathExperienceDebt(Spawn* killer);` +- `void SetAttackDelay(bool primary = false, bool ranged = false);` +- `float CalculateAttackSpeedMod();` +- `bool EngagedInCombat();` +- `bool IsCasting();` +- `void IsCasting(bool val);` +- `void SetMount(int16 mount_id, int8 red = 0xFF, int8 green = 0xFF, int8 blue = 0xFF, bool setUpdateFlags = true)` +- `void SetEquipment(Item* item, int8 slot = 255);` +- `void SetEquipment(int8 slot, int16 type, int8 red, int8 green, int8 blue, int8 h_r, int8 h_g, int8 h_b){` +- `std::lock_guard lk(MEquipment);` +- `void SetHairType(int16 new_val, bool setUpdateFlags = true){` +- `void SetHairColor1(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetHairColor2(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetSogaHairColor1(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetSogaHairColor2(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetHairHighlightColor(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetSogaHairHighlightColor(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetHairColor(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetSogaHairColor(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetHairTypeHighlightColor(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetSogaHairTypeHighlightColor(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetFacialHairType(int16 new_val, bool setUpdateFlags = true){` +- `void SetFacialHairColor(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetSogaFacialHairColor(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetFacialHairHighlightColor(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetSogaFacialHairHighlightColor(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetWingType(int16 new_val, bool setUpdateFlags = true){` +- `void SetWingColor1(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetWingColor2(EQ2_Color new_val, bool setUpdateFlags = true){` +- `void SetChestType(int16 new_val, bool setUpdateFlags = true){` +- `void SetLegsType(int16 new_val, bool setUpdateFlags = true){` +- `void SetSogaHairType(int16 new_val, bool setUpdateFlags = true){` +- `void SetSogaFacialHairType(int16 new_val, bool setUpdateFlags = true){` +- `void SetSogaChestType(int16 new_val, bool setUpdateFlags = true){` +- `void SetSogaLegType(int16 new_val, bool setUpdateFlags = true){` +- `void SetSkinColor(EQ2_Color color){` +- `void SetSogaSkinColor(EQ2_Color color){` +- `void SetModelColor(EQ2_Color color){` +- `void SetSogaModelColor(EQ2_Color color){` +- `void SetCombatVoice(int16 val, bool setUpdateFlags = true) {` +- `void SetEmoteVoice(int16 val, bool setUpdateFlags = true) {` +- `int16 GetCombatVoice(){ return features.combat_voice; }` +- `int16 GetEmoteVoice(){ return features.emote_voice; }` +- `int16 GetMount(){ return features.mount_model_type; }` +- `void SetMountSaddleColor(EQ2_Color* color){` +- `void SetMountColor(EQ2_Color* color){` +- `void SetEyeColor(EQ2_Color eye_color){` +- `void SetSogaEyeColor(EQ2_Color eye_color){` +- `int16 GetHairType(){` +- `int16 GetFacialHairType(){` +- `int16 GetWingType(){` +- `int16 GetChestType(){` +- `int16 GetLegsType(){` +- `int16 GetSogaHairType(){` +- `int16 GetSogaFacialHairType(){` +- `int16 GetSogaChestType(){` +- `int16 GetSogaLegType(){` +- `void AddSpellBonus(LuaSpell* spell, int16 type, float value, int64 class_req =0, vector race_req = vector(), vector faction_req = vector());` +- `bool CheckSpellBonusRemoval(LuaSpell* spell, int16 type);` +- `void RemoveSpellBonus(const LuaSpell* spell, bool remove_all = false);` +- `void RemoveAllSpellBonuses();` +- `void CalculateSpellBonuses(ItemStatsValues* stats);` +- `void AddMezSpell(LuaSpell* spell);` +- `void RemoveMezSpell(LuaSpell* spell);` +- `void RemoveAllMezSpells();` +- `bool IsMezzed();` +- `void AddStifleSpell(LuaSpell* spell);` +- `void RemoveStifleSpell(LuaSpell* spell);` +- `bool IsStifled();` +- `void AddDazeSpell(LuaSpell* spell);` +- `void RemoveDazeSpell(LuaSpell* spell);` +- `bool IsDazed();` +- `void AddStunSpell(LuaSpell* spell);` +- `void RemoveStunSpell(LuaSpell* spell);` +- `bool IsStunned();` +- `bool IsMezzedOrStunned() {return IsMezzed() || IsStunned();}` +- `void AddRootSpell(LuaSpell* spell);` +- `void RemoveRootSpell(LuaSpell* spell);` +- `bool IsRooted();` +- `void AddFearSpell(LuaSpell* spell);` +- `void RemoveFearSpell(LuaSpell* spell);` +- `bool IsFeared();` +- `void AddSnareSpell(LuaSpell* spell);` +- `void RemoveSnareSpell(LuaSpell* spell);` +- `void SetSnareValue(LuaSpell* spell, float snare_val);` +- `bool IsSnared();` +- `float GetHighestSnare();` +- `bool HasControlEffect(int8 type);` +- `void HaltMovement();` +- `void SetCombatPet(Entity* pet) { this->pet = pet; }` +- `void SetCharmedPet(Entity* pet) { charmedPet = pet; }` +- `void SetDeityPet(Entity* pet) { deityPet = pet; }` +- `void SetCosmeticPet(Entity* pet) { cosmeticPet = pet; }` +- `bool HasPet() { return (pet || charmedPet) ? true : false; }` +- `void HideDeityPet(bool val);` +- `void HideCosmeticPet(bool val);` +- `void DismissPet(Entity* pet, bool from_death = false, bool spawnListLocked = false);` +- `void DismissAllPets(bool from_death = false, bool spawnListLocked = false);` +- `void SetOwner(Entity* owner) { if (owner) { this->owner = owner->GetID(); } else { owner = 0; } }` +- `int8 GetPetType() { return m_petType; }` +- `void SetPetType(int8 val) { m_petType = val; }` +- `void SetPetSpellID(int32 val) { m_petSpellID = val; }` +- `int32 GetPetSpellID() { return m_petSpellID; }` +- `void SetPetSpellTier(int8 val) { m_petSpellTier = val; }` +- `int8 GetPetSpellTier() { return m_petSpellTier; }` +- `bool IsDismissing() { return m_petDismissing; }` +- `void SetDismissing(bool val) { m_petDismissing = val; }` +- `void AddWard(int32 spellID, WardInfo* ward);` +- `void RemoveWard(int32 spellID);` +- `int32 CheckWards(Entity* attacker, int32 damage, int8 damage_type);` +- `void AddProc(int8 type, float chance, Item* item = 0, LuaSpell* spell = 0, int8 damage_type = 0, int8 hp_ratio = 0, bool below_health = false, bool target_health = false, bool extended_version = false);` +- `void RemoveProc(Item* item = 0, LuaSpell* spell = 0);` +- `void CheckProcs(int8 type, Spawn* target);` +- `void ClearProcs();` +- `float GetSpeed();` +- `float GetAirSpeed();` +- `float GetBaseSpeed() { return base_speed; }` +- `void SetSpeed(float val, bool override_ = false) { if ((base_speed == 0.0f && val > 0.0f) || override_) base_speed = val; speed = val; }` +- `void SetSpeedMultiplier(float val) { speed_multiplier = val; }` +- `void SetThreatTransfer(ThreatTransfer* transfer);` +- `int8 GetTraumaCount();` +- `int8 GetArcaneCount();` +- `int8 GetNoxiousCount();` +- `int8 GetElementalCount();` +- `int8 GetCurseCount();` +- `int8 GetDetTypeCount(int8 det_type);` +- `int8 GetDetCount();` +- `bool HasCurableDetrimentType(int8 det_type);` +- `void ClearAllDetriments();` +- `void CureDetrimentByType(int8 cure_count, int8 det_type, string cure_name, Entity* caster, int8 cure_level = 0);` +- `void CureDetrimentByControlEffect(int8 cure_count, int8 det_type, string cure_name, Entity* caster, int8 cure_level = 0);` +- `void RemoveEffectsFromLuaSpell(LuaSpell* spell);` +- `void CancelAllStealth();` +- `bool IsStealthed();` +- `bool IsInvis();` +- `void AddInvisSpell(LuaSpell* spell);` +- `void AddStealthSpell(LuaSpell* spell);` +- `void RemoveStealthSpell(LuaSpell* spell);` +- `void RemoveInvisSpell(LuaSpell* spell);` +- `void AddWaterwalkSpell(LuaSpell* spell);` +- `void AddWaterjumpSpell(LuaSpell* spell);` +- `void RemoveWaterwalkSpell(LuaSpell* spell);` +- `void RemoveWaterjumpSpell(LuaSpell* spell);` +- `void AddAOEImmunity(LuaSpell* spell);` +- `bool IsAOEImmune();` +- `void RemoveAOEImmunity(LuaSpell* spell);` +- `void AddStunImmunity(LuaSpell* spell);` +- `void RemoveStunImmunity(LuaSpell* spell);` +- `bool IsStunImmune();` +- `void AddStifleImmunity(LuaSpell* spell);` +- `void RemoveStifleImmunity(LuaSpell* spell);` +- `bool IsStifleImmune();` +- `void AddMezImmunity(LuaSpell* spell);` +- `void RemoveMezImmunity(LuaSpell* spell);` +- `bool IsMezImmune();` +- `void AddRootImmunity(LuaSpell* spell);` +- `void RemoveRootImmunity(LuaSpell* spell);` +- `bool IsRootImmune();` +- `void AddFearImmunity(LuaSpell* spell);` +- `void RemoveFearImmunity(LuaSpell* spell);` +- `bool IsFearImmune();` +- `void AddDazeImmunity(LuaSpell* spell);` +- `void RemoveDazeImmunity(LuaSpell* spell);` +- `bool IsDazeImmune();` +- `void AddImmunity(LuaSpell* spell, int8 type);` +- `void RemoveImmunity(LuaSpell* spell, int8 type);` +- `bool IsImmune(int8 type);` +- `void AddFlightSpell(LuaSpell* spell);` +- `void RemoveFlightSpell(LuaSpell* spell);` +- `void AddSafefallSpell(LuaSpell* spell);` +- `void RemoveSafefallSpell(LuaSpell* spell);` +- `void AddGlideSpell(LuaSpell* spell);` +- `void RemoveGlideSpell(LuaSpell* spell);` +- `void SetGroupMemberInfo(GroupMemberInfo* info) { group_member_info = info; }` +- `void UpdateGroupMemberInfo(bool inGroupMgrLock=false, bool groupMembersLocked=false);` +- `void CustomizeAppearance(PacketStruct* packet);` +- `bool IsAggroed() {` +- `bool HasSeeInvisSpell() { return hasSeeInvisSpell; }` +- `void SetSeeInvisSpell(bool val) { hasSeeInvisSpell = val; }` +- `bool HasSeeHideSpell() { return hasSeeHideSpell; }` +- `void SetSeeHideSpell(bool val) { hasSeeHideSpell = val; }` +- `void SetInfoStruct(InfoStruct* struct_) { info_struct.SetInfoStruct(struct_); }` +- `std::string GetInfoStructString(std::string field);` +- `int8 GetInfoStructInt8(std::string field);` +- `int16 GetInfoStructInt16(std::string field);` +- `int32 GetInfoStructInt32(std::string field);` +- `int64 GetInfoStructInt64(std::string field);` +- `sint8 GetInfoStructSInt8(std::string field);` +- `sint16 GetInfoStructSInt16(std::string field);` +- `sint32 GetInfoStructSInt32(std::string field);` +- `sint64 GetInfoStructSInt64(std::string field);` +- `int64 GetInfoStructUInt(std::string field);` +- `sint64 GetInfoStructSInt(std::string field);` +- `float GetInfoStructFloat(std::string field);` +- `bool SetInfoStructString(std::string field, std::string value);` +- `bool SetInfoStructUInt(std::string field, int64 value);` +- `bool SetInfoStructSInt(std::string field, sint64 value);` +- `bool SetInfoStructFloat(std::string field, float value);` +- `float CalculateSpellDamageReduction(float spellDamage, int16 competitorLevel);` +- `sint32 CalculateHateAmount(Spawn* target, sint32 amt);` +- `sint32 CalculateHealAmount(Spawn* target, sint32 amt, int8 crit_mod, bool* crit, bool skip_crit_mod = false);` +- `sint32 CalculateDamageAmount(Spawn* target, sint32 damage, int8 base_type, int8 damage_type, LuaSpell* spell);` +- `sint32 CalculateDamageAmount(Spawn* target, sint32 damage, int8 base_type, int8 damage_type, int8 spell_target_type);` +- `sint32 CalculateFormulaByStat(sint32 value, int16 stat);` +- `int32 CalculateFormulaByStat(int32 value, int16 stat);` +- `int32 CalculateFormulaBonus(int32 value, float percent_bonus);` +- `float CalculateSpellDamageReduction(float spellDamage, float resistancePercentage, int16 attackerLevel);` +- `float GetStat(int32 item_stat) {` +- `bool IsEngagedInEncounter(Spawn** res = nullptr);` +- `bool IsEngagedBySpawnID(int32 id);` +- `void SendControlEffectDetailsToClient(Client* client);` +- `std::string GetControlEffectName(int8 control_effect_type) {` +- `void TerminateTrade();` +- `void CalculateMaxReduction();` +- `bool CastProc(Proc* proc, int8 type, Spawn* target);` + +## Notable Comments + +- /* +- */ +- // neutral? +- //mutable std::shared_mutex mutex_; +- //SpellEffects* & get_spell_effects() { std::lock_guard lk(classMutex); return spell_effects_; } +- //MaintainedEffects* & get_maintained_effects() { std::lock_guard lk(classMutex); return maintained_effects_; } +- // crash client if float values above 1.0 are sent +- // maintained via their own mutex +- // when PacketStruct is fixed for C++17 this should become a shared_mutex and handle read/write lock +- //class Spell; diff --git a/docs/code/Factions.md b/docs/code/Factions.md new file mode 100644 index 0000000..65bae3e --- /dev/null +++ b/docs/code/Factions.md @@ -0,0 +1,34 @@ +# File: `Factions.h` + +## Classes + +- `Faction` +- `MasterFactionList` +- `PlayerFaction` + +## Functions + +- `void Clear() {` +- `sint32 GetDefaultFactionValue(int32 faction_id){` +- `void AddFaction(Faction* faction){` +- `sint32 GetIncreaseAmount(int32 faction_id){` +- `sint32 GetDecreaseAmount(int32 faction_id){` +- `int32 GetFactionCount(){` +- `void AddHostileFaction(int32 faction_id, int32 hostile_faction_id){` +- `void AddFriendlyFaction(int32 faction_id, int32 friendly_faction_id){` +- `sint32 GetMaxValue(sint8 con);` +- `sint32 GetMinValue(sint8 con);` +- `sint32 GetFactionValue(int32 faction_id);` +- `bool ShouldIncrease(int32 faction_id);` +- `bool ShouldDecrease(int32 faction_id);` +- `bool IncreaseFaction(int32 faction_id, int32 amount = 0);` +- `bool DecreaseFaction(int32 faction_id, int32 amount = 0);` +- `bool SetFactionValue(int32 faction_id, sint32 value);` +- `sint8 GetCon(int32 faction_id);` +- `int8 GetPercent(int32 faction_id);` +- `bool ShouldAttack(int32 faction_id);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/GlobalHeaders.md b/docs/code/GlobalHeaders.md new file mode 100644 index 0000000..8612230 --- /dev/null +++ b/docs/code/GlobalHeaders.md @@ -0,0 +1,15 @@ +# File: `GlobalHeaders.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- //Character Creation Replies, put in globals so name filter can return proper responses diff --git a/docs/code/GroundSpawn.md b/docs/code/GroundSpawn.md new file mode 100644 index 0000000..2553fc8 --- /dev/null +++ b/docs/code/GroundSpawn.md @@ -0,0 +1,28 @@ +# File: `GroundSpawn.h` + +## Classes + +- `GroundSpawn` + +## Functions + +- `bool IsGroundSpawn(){ return true; }` +- `int8 GetNumberHarvests();` +- `void SetNumberHarvests(int8 val);` +- `int8 GetAttemptsPerHarvest();` +- `void SetAttemptsPerHarvest(int8 val);` +- `int32 GetGroundSpawnEntryID();` +- `void SetGroundSpawnEntryID(int32 val);` +- `void ProcessHarvest(Client* client);` +- `void SetCollectionSkill(const char* val);` +- `string GetHarvestMessageName(bool present_tense = false, bool failure = false);` +- `string GetHarvestSpellType();` +- `string GetHarvestSpellName();` +- `void HandleUse(Client* client, string type);` +- `void SetRandomizeHeading(bool val) { randomize_heading = val; }` +- `bool GetRandomizeHeading() { return randomize_heading; }` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/Guild.md b/docs/code/Guild.md new file mode 100644 index 0000000..e5b980c --- /dev/null +++ b/docs/code/Guild.md @@ -0,0 +1,141 @@ +# File: `Guild.h` + +## Classes + +- `ZoneServer` +- `Client` +- `Player` +- `PointHistory` +- `GuildMember` +- `GuildEvent` +- `GuildBankEvent` +- `Bank` +- `Guild` +- `GuildList` + +## Functions + +- `void SetID(int32 id_in) {id = id_in;}` +- `void SetName(const char* name, bool send_packet = true);` +- `void SetLevel(int8 level, bool send_packet = true);` +- `void SetFormedDate(int32 formed_date_in) {formed_date = formed_date_in;}` +- `void SetMOTD(const char *motd, bool send_packet = true);` +- `int32 GetID() const {return id;}` +- `int8 GetLevel() const {return level;}` +- `int32 GetFormedDate() const {return formed_date;}` +- `void SetEXPCurrent(int64 exp, bool send_packet = true);` +- `void AddEXPCurrent(sint64 exp, bool send_packet = true);` +- `int64 GetEXPCurrent() const {return exp_current;}` +- `void SetEXPToNextLevel(int64 exp, bool send_packet = true);` +- `int64 GetEXPToNextLevel() const {return exp_to_next_level;}` +- `void SetRecruitingShortDesc(const char* new_desc, bool send_packet = true);` +- `string GetRecruitingShortDesc() const {return recruiting_short_desc;}` +- `void SetRecruitingFullDesc(const char* new_desc, bool send_packet = true);` +- `string GetRecruitingFullDesc() const {return recruiting_full_desc;}` +- `void SetRecruitingMinLevel(int8 new_level, bool send_packet = true);` +- `int8 GetRecruitingMinLevel() const {return recruiting_min_level;}` +- `void SetRecruitingPlayStyle(int8 new_play_style, bool send_packet = true);` +- `int8 GetRecruitingPlayStyle() const {return recruiting_play_style;}` +- `bool SetRecruitingDescTag(int8 index, int8 tag, bool send_packet = true);` +- `int8 GetRecruitingDescTag(int8 index);` +- `bool SetPermission(int8 rank, int8 permission, int8 value, bool send_packet = true, bool save_needed = true);` +- `int8 GetPermission(int8 rank, int8 permission);` +- `bool SetEventFilter(int8 event_id, int8 category, int8 value, bool send_packet = true, bool save_needed = true);` +- `int8 GetEventFilter(int8 event_id, int8 category);` +- `int32 GetNumUniqueAccounts();` +- `int32 GetNumRecruiters();` +- `int32 GetNextRecruiterID();` +- `int64 GetNextEventID();` +- `bool SetRankName(int8 rank, const char* name, bool send_packet = true);` +- `bool SetRecruitingFlag(int8 flag, int8 value, bool send_packet = true);` +- `int8 GetRecruitingFlag(int8 flag);` +- `bool SetGuildRecruiter(Client* client, const char* name, bool value, bool send_packet = true);` +- `bool SetGuildRecruiterDescription(Client* client, const char* description, bool send_packet = true);` +- `bool ToggleGuildRecruiterAdventureClass(Client* client, bool send_packet = true);` +- `bool SetGuildMemberNote(const char* name, const char* note, bool send_packet = true);` +- `bool SetGuildOfficerNote(const char* name, const char* note, bool send_packet = true);` +- `bool AddNewGuildMember(Client* client, const char* invited_by = 0, int8 rank = GUILD_RANK_RECRUIT);` +- `bool AddNewGuildMember(int32 characterID, const char *invited_by, int32 join_timestamp, int8 rank);` +- `bool AddGuildMember(GuildMember* guild_member);` +- `void RemoveGuildMember(int32 character_id, bool send_packet = true);` +- `void RemoveAllGuildMembers();` +- `bool DemoteGuildMember(Client* client, const char* name, bool send_packet = true);` +- `bool PromoteGuildMember(Client* client, const char* name, bool send_packet = true);` +- `int32 KickGuildMember(Client* client, const char* name, bool send_packet = true);` +- `bool InvitePlayer(Client* client, const char* name, bool send_packet = true);` +- `bool AddPointsToAll(Client* client, float points, const char* comment = 0, bool send_packet = true);` +- `bool AddPointsToAllOnline(Client* client, float points, const char* comment = 0, bool send_packet = true);` +- `bool AddPointsToGroup(Client* client, float points, const char* comment = 0, bool send_packet = true);` +- `bool AddPointsToRaid(Client* client, float points, const char* comment = 0, bool send_packet = true);` +- `bool AddPointsToGuildMember(Client* client, float points, const char* name, const char* comment = 0, bool send_packet = true);` +- `bool AddPointHistory(GuildMember* guild_member, int32 date, const char* modified_by, float points, const char* comment = 0, bool new_point_history = true);` +- `void ViewGuildMemberPoints(Client* client, const char* name);` +- `bool ChangeMemberFlag(Client* client, int8 member_flag, int8 value, bool send_packet = true);` +- `bool UpdateGuildMemberInfo(Player* player);` +- `bool UpdateGuildStatus(Player *player, int32 Status);` +- `void AddGuildEvent(int64 event_id, int32 type, const char* description, int32 date, int8 locked);` +- `void AddNewGuildEvent(int32 type, const char* description, int32 date, bool send_packet = true, ...);` +- `bool LockGuildEvent(int64 event_id, bool lock, bool send_packet = true);` +- `bool DeleteGuildEvent(int64 event_id, bool send_packet = true);` +- `void SendGuildMOTD(Client* client);` +- `void SendGuildEventList();` +- `void SendGuildEventList(Client* client);` +- `void SendGuildEventDetails();` +- `void SendGuildEventDetails(Client* client);` +- `void SendAllGuildEvents();` +- `void SendAllGuildEvents(Client* client);` +- `void SendOldGuildEvent(Client* client, GuildEvent* guild_event);` +- `void SendNewGuildEvent(GuildEvent* guild_event);` +- `void SendNewGuildEvent(Client* client, GuildEvent* guild_event);` +- `void SendGuildEventAction(int8 action, GuildEvent* guild_event);` +- `void SendGuildEventAction(Client* client, int8 action, GuildEvent* guild_event);` +- `void SendGuildBankEventList();` +- `void SendGuildBankEventList(Client* client);` +- `void SendGuildUpdate();` +- `void SendGuildUpdate(Client* client);` +- `void SendGuildMemberList();` +- `void SendGuildMemberList(Client* client);` +- `void SendGuildMember(Player* player, bool include_zone = true);` +- `void SendGuildMember(GuildMember* gm, bool include_zone = true);` +- `void SendGuildMember(Client* client, GuildMember* gm, bool include_zone = true);` +- `void SendGuildModification(float points, vector* character_ids);` +- `void SendGuildModification(Client* client, float points, vector* character_ids);` +- `void GuildMemberLogin(Client *client, bool first_login = false);` +- `void GuildMemberLogoff(Player *player);` +- `void SendGuildMemberLeave(int32 character_id);` +- `void SendGuildMemberLeave(Client* client, int32 character_id);` +- `void SendGuildRecruitingDetails(Client* client);` +- `void SendGuildRecruitingImages(Client* client);` +- `void SendGuildRecruiterInfo(Client* client, Player* player);` +- `bool HandleGuildSay(Client* sender, const char* message);` +- `void HandleGuildSay(std::string senderName, const char* message, int8 language);` +- `bool HandleOfficerSay(Client* sender, const char* message);` +- `void HandleOfficerSay(std::string senderName, const char* message, int8 language);` +- `void SendMessageToGuild(int8 event_type, const char* message, ...);` +- `void SendGuildChatMessage(const char* message, ...);` +- `void SetSaveNeeded(bool val) {save_needed = val;}` +- `bool GetSaveNeeded() {return save_needed;}` +- `void SetMemberSaveNeeded(bool val) {member_save_needed = val;}` +- `bool GetMemberSaveNeeded() {return member_save_needed;}` +- `void SetEventsSaveNeeded(bool val) {events_save_needed = val;}` +- `bool GetEventsSaveNeeded() {return events_save_needed;}` +- `void SetRanksSaveNeeded(bool val) {ranks_save_needed = val;}` +- `bool GetRanksSaveNeeded() {return ranks_save_needed;}` +- `void SetEventFiltersSaveNeeded(bool val) {event_filters_save_needed = val;}` +- `bool GetEventFiltersSaveNeeded() {return event_filters_save_needed;}` +- `void SetPointsHistorySaveNeeded(bool val) {points_history_save_needed = val;}` +- `bool GetPointsHistorySaveNeeded() {return points_history_save_needed;}` +- `void SetRecruitingSaveNeeded(bool val) {recruiting_save_needed = val;}` +- `bool GetRecruitingSaveNeeded() {return recruiting_save_needed;}` +- `int8 GetRecruitingLookingForPacketValue();` +- `int32 GetPermissionsPacketValue(int8 rank, int32 start, int32 end);` +- `int32 GetEventFilterPacketValue(int8 category, int32 start, int32 end);` +- `bool AddGuild(Guild* guild);` +- `bool RemoveGuild(Guild* guild, bool delete_data = false);` +- `bool RemoveGuild(int32 guild_id, bool delete_data = false);` +- `int32 GetNumGuilds() {return guild_list.size();}` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/GuildDB.md b/docs/code/GuildDB.md new file mode 100644 index 0000000..cf277f1 --- /dev/null +++ b/docs/code/GuildDB.md @@ -0,0 +1,49 @@ +# File: `GuildDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadGuilds() {` +- `void WorldDatabase::LoadGuild(int32 guild_id) {` +- `int32 WorldDatabase::LoadGuildMembers(Guild* guild) {` +- `else if (high >= 'a' && high <= 'f')` +- `else if (low >= 'a' && low <= 'f')` +- `void WorldDatabase::LoadGuildEvents(Guild* guild) {` +- `void WorldDatabase::LoadGuildRanks(Guild* guild) {` +- `void WorldDatabase::LoadGuildEventFilters(Guild* guild) {` +- `void WorldDatabase::LoadGuildPointsHistory(Guild* guild, GuildMember* guild_member) {` +- `void WorldDatabase::LoadGuildRecruiting(Guild* guild) {` +- `void WorldDatabase::SaveGuild(Guild* guild, bool new_guild) {` +- `void WorldDatabase::SaveGuildMembers(Guild* guild) {` +- `void WorldDatabase::SaveGuildEvents(Guild* guild) {` +- `void WorldDatabase::SaveGuildRanks(Guild* guild) {` +- `void WorldDatabase::SaveGuildEventFilters(Guild* guild) {` +- `void WorldDatabase::SaveGuildPointsHistory(Guild* guild) {` +- `void WorldDatabase::SaveGuildRecruiting(Guild* guild) {` +- `void WorldDatabase::DeleteGuild(Guild* guild) {` +- `void WorldDatabase::DeleteGuildMember(Guild* guild, int32 character_id) {` +- `void WorldDatabase::DeleteGuildEvent(Guild* guild, int64 event_id) {` +- `void WorldDatabase::DeleteGuildPointHistory(Guild* guild, int32 character_id, PointHistory* point_history) {` +- `void WorldDatabase::ArchiveGuildEvent(Guild* guild, GuildEvent* guild_event) {` +- `void WorldDatabase::SaveHiddenGuildEvent(Guild* guild, GuildEvent* guild_event) {` +- `int32 WorldDatabase::GetGuildIDByCharacterID(int32 char_id) {` +- `return atoul(row[0]);` +- `void WorldDatabase::LoadGuildDefaultRanks(Guild* guild) {` +- `void WorldDatabase::LoadGuildDefaultEventFilters(Guild* guild) {` +- `bool WorldDatabase::AddNewPlayerToServerGuild(int32 account_id, int32 char_id)` + +## Notable Comments + +- /* +- */ +- *cpy++ = low | (high << 4); +- /*for (int16 i = 0; i < gm->recruiter_picture_data_size; i++) +- // Check if this servers rule allow auto-joining Server guild +- // if so, what is the guild ID of the default server guild? +- // guild was not valid, abort! +- // guild was found, so what default Rank to make the players? if not set, use 7 (recruit) +- // assuming all is good, insert the new guild member here... +- //gm->adventure_class = player->GetAdventureClass(); diff --git a/docs/code/HTTPSClient.md b/docs/code/HTTPSClient.md new file mode 100644 index 0000000..6aff1ac --- /dev/null +++ b/docs/code/HTTPSClient.md @@ -0,0 +1,22 @@ +# File: `HTTPSClient.h` + +## Classes + +- `HTTPSClient` + +## Functions + +- `std::string sendRequest(const std::string& server, const std::string& port, const std::string& target);` +- `std::string sendPostRequest(const std::string& server, const std::string& port, const std::string& target, const std::string& jsonPayload);` +- `std::string getServer() const { return server; }` +- `std::string getPort() const { return port; }` +- `void parseAndStoreCookies(const http::response& res);` +- `std::shared_ptr createSSLContext(); // New helper function` +- `std::string buildCookieHeader() const;` + +## Notable Comments + +- /* +- */ +- // Send a request with stored cookies and return response as string +- // Send a POST request with a JSON payload and return response as string diff --git a/docs/code/HTTPSClientPool.md b/docs/code/HTTPSClientPool.md new file mode 100644 index 0000000..b30029a --- /dev/null +++ b/docs/code/HTTPSClientPool.md @@ -0,0 +1,34 @@ +# File: `HTTPSClientPool.h` + +## Classes + +- `pair_hash` +- `HTTPSClientPool` + +## Functions + +- `std::size_t operator()(const std::pair& pair) const {` +- `return std::hash()(pair.first) ^ std::hash()(pair.second);` +- `void init(const std::string& cert, const std::string& key);` +- `void addPeerClient(const std::string& peerId, const std::string& server, const std::string& port, const std::string& authEndpoint);` +- `std::shared_ptr getOrCreateClient(const std::string& id, const std::string& server, const std::string& port);` +- `boost::property_tree::ptree sendRequestToPeer(const std::string& peerId, const std::string& target);` +- `boost::property_tree::ptree sendPostRequestToPeer(const std::string& peerId, const std::string& target, const std::string& jsonPayload);` +- `void pollPeerHealthData(std::shared_ptr client, const std::string& id, const std::string& server, const std::string& port);` +- `void startPolling(); // Starts asynchronous polling of peers` +- `void stopPolling(); // Stops the polling process` +- `void sendPostRequestToPeerAsync(const std::string& peerId, const std::string& server, const std::string& port, const std::string& target, const std::string& payload);` +- `void workerFunction();` +- `bool isPolling() { return running; }` +- `std::shared_ptr getClient(const std::string& peerId);` +- `void pollPeerHealth(const std::string& server, const std::string& port); // Polls individual peer` + +## Notable Comments + +- /* +- */ +- // init cert and key file +- // Pre-authenticate and add a client to the pool +- // Send a request to a peer by ID and parse response as a ptree +- // Sends a POST request asynchronously by adding it to the task queue +- // Worker thread function diff --git a/docs/code/HeroicOp.md b/docs/code/HeroicOp.md new file mode 100644 index 0000000..dfb0052 --- /dev/null +++ b/docs/code/HeroicOp.md @@ -0,0 +1,42 @@ +# File: `HeroicOp.h` + +## Classes + +- `HeroicOPStarter` +- `HeroicOPWheel` +- `HeroicOP` +- `MasterHeroicOPList` + +## Functions + +- `void SetComplete(int8 val) { m_complete = val; }` +- `void SetStage(int8 val) { m_currentStage = val; }` +- `void SetWheel(HeroicOPWheel* val);` +- `void SetStartTime(int32 val) { m_startTime = val; }` +- `void SetTotalTime(float val) { m_totalTime = val; }` +- `void SetTarget(int32 val);` +- `int8 GetComplete() { return m_complete; }` +- `int8 GetStage() { return m_currentStage; }` +- `int32 GetStartTime() { return m_startTime; }` +- `float GetTotalTime() { return m_totalTime; }` +- `int32 GetTarget() { return m_target; }` +- `bool HasShifted() { return m_shifted; }` +- `bool UpdateHeroicOP(int16 icon);` +- `void ResetStage() { m_currentStage = 0; }` +- `void AddStarterChain(HeroicOPStarter* starter);` +- `bool ShiftWheel();` +- `void AddStarter(int8 start_class, HeroicOPStarter* starter);` +- `void AddWheel(int32 starter_id, HeroicOPWheel* wheel);` + +## Notable Comments + +- /* +- */ +- /// Sets the complete flag for this Heroic OP +- /// The value to set the complete flag to, 1 = failed 2 = finished +- /// Sets the current stage of the starter chain or the wheel chain is at +- /// The stage to set this Heroic OP to +- /// Sets the wheel for this Heroic OP +- /// The wheel we are setting the Heroic OP to +- /// Sets the start time for the wheel +- /// Value to set the start time to diff --git a/docs/code/HeroicOpDB.md b/docs/code/HeroicOpDB.md new file mode 100644 index 0000000..8ee454f --- /dev/null +++ b/docs/code/HeroicOpDB.md @@ -0,0 +1,15 @@ +# File: `HeroicOpDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadHOStarters() {` +- `void WorldDatabase::LoadHOWheel() {` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/HeroicOpPackets.md b/docs/code/HeroicOpPackets.md new file mode 100644 index 0000000..f40b155 --- /dev/null +++ b/docs/code/HeroicOpPackets.md @@ -0,0 +1,22 @@ +# File: `HeroicOpPackets.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void ClientPacketFunctions::SendHeroicOPUpdate(Client* client, HeroicOP* ho) {` + +## Notable Comments + +- /* +- */ +- // This is not displayed in the wheel so set it to 0xFFFF +- // If completed set special values +- // Set the icons for the whee; +- // Flag the icons that are completed +- // This will make the ui element vanish +- // Only set this once +- /* +- */ diff --git a/docs/code/HousingDB.md b/docs/code/HousingDB.md new file mode 100644 index 0000000..a863073 --- /dev/null +++ b/docs/code/HousingDB.md @@ -0,0 +1,22 @@ +# File: `HousingDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadHouseZones() {` +- `int64 WorldDatabase::AddPlayerHouse(int32 char_id, int32 house_id, int32 instance_id, int32 upkeep_due) {` +- `void WorldDatabase::SetHouseUpkeepDue(int32 char_id, int32 house_id, int32 instance_id, int32 upkeep_due) {` +- `void WorldDatabase::UpdateHouseEscrow(int32 house_id, int32 instance_id, int64 amount_coins, int32 amount_status) {` +- `void WorldDatabase::RemovePlayerHouse(int32 char_id, int32 house_id) {` +- `void WorldDatabase::LoadPlayerHouses() {` +- `void WorldDatabase::LoadDeposits(PlayerHouse* ph)` +- `void WorldDatabase::LoadHistory(PlayerHouse* ph)` +- `void WorldDatabase::AddHistory(PlayerHouse* house, char* name, char* reason, int32 timestamp, int64 amount, int32 status, int8 pos_flag)` +- `HouseHistory h(Timer::GetUnixTimeStamp(), amount, string(name), string(reason), status, pos_flag);` + +## Notable Comments + +_None detected_ diff --git a/docs/code/HousingPackets.md b/docs/code/HousingPackets.md new file mode 100644 index 0000000..09b8027 --- /dev/null +++ b/docs/code/HousingPackets.md @@ -0,0 +1,26 @@ +# File: `HousingPackets.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void ClientPacketFunctions::SendHousePurchase(Client* client, HouseZone* hz, int32 spawnID) {` +- `void ClientPacketFunctions::SendHousingList(Client* client) {` +- `void ClientPacketFunctions::SendBaseHouseWindow(Client* client, HouseZone* hz, PlayerHouse* ph, int32 spawnID) {` +- `void ClientPacketFunctions::SendHouseVisitWindow(Client* client, vector houses) {` +- `void ClientPacketFunctions::SendLocalizedTextMessage(Client* client)` + +## Notable Comments + +- //req.append(std::to_string(static_cast(hz->guild_level))); +- //req.append(std::to_string(static_cast(hz->guild_level))) +- //packet->PrintPacket(); +- // this packet must be sent first otherwise it blocks out the enter house option after paying upkeep +- // this seems to be some kind of timestamp, if we keep updating then in conjunction with upkeep_due +- // in SendBaseHouseWindow/WS_PlayerHouseBaseScreen being a >0 number we can access 'enter house' +- // if we don't send this then the enter house option won't be available if upkeep is paid +- // need this to enable the "enter house" button +- // temp - set priv level to owner for now +- // temp - set house type to personal house for now diff --git a/docs/code/Items.md b/docs/code/Items.md new file mode 100644 index 0000000..f7a25be --- /dev/null +++ b/docs/code/Items.md @@ -0,0 +1,184 @@ +# File: `Items.h` + +## Classes + +- `MasterItemList` +- `Player` +- `Entity` +- `ItemStatsValues` +- `ItemCore` +- `ItemStat` +- `ItemSet` +- `Classifications` +- `ItemLevelOverride` +- `ItemClass` +- `ItemAppearance` +- `QuestRewardData` +- `PlayerItemList` +- `Item` +- `ItemStatString` +- `Generic_Info` +- `Armor_Info` +- `Adornment_Info` +- `Weapon_Info` +- `Shield_Info` +- `Ranged_Info` +- `Bag_Info` +- `Food_Info` +- `Bauble_Info` +- `Book_Info` +- `Book_Info_Pages` +- `Skill_Info` +- `HouseItem_Info` +- `HouseContainer_Info` +- `RecipeBook_Info` +- `ItemSet_Info` +- `Thrown_Info` +- `ItemEffect` +- `BookPage` +- `MasterItemList` +- `PlayerItemList` +- `EquipmentItemList` + +## Functions + +- `void AddEffect(string effect, int8 percentage, int8 subbulletflag);` +- `void AddBookPage(int8 page, string page_text,int8 valign, int8 halign);` +- `int32 GetMaxSellValue();` +- `void SetMaxSellValue(int32 val);` +- `void SetItem(Item* old_item);` +- `int16 GetOverrideLevel(int8 adventure_class, int8 tradeskill_class);` +- `void AddLevelOverride(int8 adventure_class, int8 tradeskill_class, int16 level);` +- `void AddLevelOverride(ItemLevelOverride* class_);` +- `bool CheckClassLevel(int8 adventure_class, int8 tradeskill_class, int16 level);` +- `bool CheckClass(int8 adventure_class, int8 tradeskill_class);` +- `bool CheckArchetypeAdvClass(int8 adventure_class, map* adv_class_levels = 0);` +- `bool CheckArchetypeAdvSubclass(int8 adventure_class, map* adv_class_levels = 0);` +- `bool CheckLevel(int8 adventure_class, int8 tradeskill_class, int16 level);` +- `void SetAppearance(int16 type, int8 red, int8 green, int8 blue, int8 highlight_red, int8 highlight_green, int8 highlight_blue);` +- `void SetAppearance(ItemAppearance* appearance);` +- `void AddStat(ItemStat* in_stat);` +- `bool HasStat(uint32 statID, std::string statName = std::string(""));` +- `void DeleteItemSets();` +- `void AddSet(ItemSet* in_set);` +- `void AddStatString(ItemStatString* in_stat);` +- `void AddStat(int8 type, int16 subtype, float value, int8 level, char* name = 0);` +- `void AddSet(int32 item_id, int32 item_crc, int16 item_icon, int32 item_stack_size, int32 item_list_color, std::string name, int8 language);` +- `void SetWeaponType(int8 type);` +- `int8 GetWeaponType();` +- `bool HasSlot(int8 slot, int8 slot2 = 255);` +- `bool HasAdorn0();` +- `bool HasAdorn1();` +- `bool HasAdorn2();` +- `bool IsNormal();` +- `bool IsWeapon();` +- `bool IsArmor();` +- `bool IsDualWieldAble(Client* client, Item* item, int8 slot = -1);` +- `bool IsRanged();` +- `bool IsBag();` +- `bool IsFood();` +- `bool IsBauble();` +- `bool IsSkill();` +- `bool IsHouseItem();` +- `bool IsHouseContainer();` +- `bool IsShield();` +- `bool IsAdornment();` +- `bool IsAmmo();` +- `bool IsBook();` +- `bool IsChainArmor();` +- `bool IsClothArmor();` +- `bool IsCollectable();` +- `bool IsCloak();` +- `bool IsCrushWeapon();` +- `bool IsFoodFood();` +- `bool IsFoodDrink();` +- `bool IsJewelry();` +- `bool IsLeatherArmor();` +- `bool IsMisc();` +- `bool IsPierceWeapon();` +- `bool IsPlateArmor();` +- `bool IsPoison();` +- `bool IsPotion();` +- `bool IsRecipeBook();` +- `bool IsSalesDisplay();` +- `bool IsSlashWeapon();` +- `bool IsSpellScroll();` +- `bool IsTinkered();` +- `bool IsTradeskill();` +- `bool IsThrown();` +- `bool IsHarvest();` +- `bool IsBodyDrop();` +- `void SetItemScript(string name);` +- `int32 CalculateRepairCost();` +- `string CreateItemLink(int16 client_Version, bool bUseUniqueID=false);` +- `void SetItemType(int8 in_type);` +- `void serialize(PacketStruct* packet, bool show_name = false, Player* player = 0, int16 packet_type = 0, int8 subtype = 0, bool loot_item = false, bool inspect = false);` +- `bool CheckFlag(int32 flag);` +- `bool CheckFlag2(int32 flag);` +- `void AddSlot(int8 slot_id);` +- `void SetSlots(int32 slots);` +- `int16 GetIcon(int16 version);` +- `void AddItem(Item* item);` +- `bool IsBag(int32 item_id);` +- `void RemoveAll();` +- `int32 GetItemStatIDByName(std::string name);` +- `std::string GetItemStatNameByID(int32 id);` +- `void AddMappedItemStat(int32 id, std::string lower_case_name);` +- `void AddBrokerItemMapRange(int32 min_version, int32 max_version, int64 client_bitmask, int64 server_bitmask);` +- `int32 SetMaxItemIndex();` +- `bool SharedBankAddAllowed(Item* item);` +- `bool HasItem(int32 id, bool include_bank = false);` +- `void MoveItem(Item* item, sint32 inv_slot, int16 slot, int8 appearance_type, bool erase_old); // erase old was true` +- `bool MoveItem(sint32 to_bag_id, int16 from_index, sint8 to, int8 appearance_type, int8 charges);` +- `void EraseItem(Item* item);` +- `sint32 GetAllStackCountItemFromID(int32 item_id, int8 count = 0, bool include_bank = false, bool lock = true);` +- `bool AssignItemToFreeSlot(Item* item);` +- `int16 GetNumberOfFreeSlots();` +- `int16 GetNumberOfItems();` +- `int32 GetWeight();` +- `bool HasFreeSlot();` +- `bool HasFreeBagSlot();` +- `void DestroyItem(int16 index);` +- `void RemoveItem(Item* item, bool delete_item = false);` +- `bool AddItem(Item* item);` +- `bool HasFreeBankSlot();` +- `int8 FindFreeBankSlot();` +- `bool GetFirstFreeSlot(sint32* bag_id, sint16* slot);` +- `bool GetFirstFreeBankSlot(sint32* bag_id, sint16* slot);` +- `bool AddOverflowItem(Item* item);` +- `void RemoveOverflowItem(Item* item);` +- `void ResetPackets();` +- `int32 CheckSlotConflict(Item* tmp, bool check_lore_only = false, bool lock_mutex = true, int16* lore_stack_count = 0);` +- `int32 GetItemCountInBag(Item* bag);` +- `int16 GetFirstNewItem();` +- `int16 GetNewItemByIndex(int16 in_index);` +- `void AddItemToPacket(PacketStruct* packet, Player* player, Item* item, int16 i, bool overflow = false, int16 new_index = 0);` +- `void Stack(Item* orig_item, Item* item);` +- `void ResetPackets();` +- `bool HasItem(int32 id);` +- `int8 GetNumberOfItems();` +- `int32 GetWeight();` +- `void SetItem(int8 slot_id, Item* item, bool locked = false);` +- `void RemoveItem(int8 slot, bool delete_item = false);` +- `bool AddItem(int8 slot, Item* item);` +- `bool CheckEquipSlot(Item* tmp, int8 slot);` +- `bool CanItemBeEquippedInSlot(Item* tmp, int8 slot);` +- `int8 GetFreeSlot(Item* tmp, int8 slot_id = 255, int16 version = 0);` +- `int32 CheckSlotConflict(Item* tmp, bool check_lore_only = false, int16* lore_stack_count = 0);` +- `int8 GetSlotByItem(Item* item);` +- `void SendEquippedItems(Player* player);` +- `void SetAppearanceType(int8 type) { AppearanceType = type; }` +- `int8 GetAppearanceType() { return AppearanceType; }` + +## Notable Comments + +- /* +- */ +- // FLAGS +- // FLAGS2 +- //DOV defines everything till 13 is the same +- //#define ITEM_TYPE_BOOK 13 +- //#define ITEM_TYPE_ADORNMENT 14 +- //#define ITEM_TYPE_PATTERN 15 +- //#define ITEM_TYPE_ARMORSET 16 +- //#define ITEM_STAT_VS_HEAT 203 //just so no build error diff --git a/docs/code/ItemsDB.md b/docs/code/ItemsDB.md new file mode 100644 index 0000000..085f325 --- /dev/null +++ b/docs/code/ItemsDB.md @@ -0,0 +1,59 @@ +# File: `ItemsDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadDataFromRow(DatabaseResult* result, Item* item)` +- `int32 WorldDatabase::LoadSkillItems(int32 item_id)` +- `int32 WorldDatabase::LoadShields(int32 item_id)` +- `int32 WorldDatabase::LoadAdornments(int32 item_id)` +- `int32 WorldDatabase::LoadClassifications()` +- `int32 WorldDatabase::LoadBaubles(int32 item_id)` +- `int32 WorldDatabase::LoadBooks(int32 item_id)` +- `int32 WorldDatabase::LoadItemsets(int32 item_id)` +- `int32 WorldDatabase::LoadHouseItem(int32 item_id)` +- `int32 WorldDatabase::LoadRecipeBookItems(int32 item_id)` +- `int32 WorldDatabase::LoadHouseContainers(int32 item_id){` +- `int32 WorldDatabase::LoadArmor(int32 item_id)` +- `int32 WorldDatabase::LoadBags(int32 item_id)` +- `int32 WorldDatabase::LoadFoods(int32 item_id)` +- `int32 WorldDatabase::LoadRangeWeapons(int32 item_id)` +- `int32 WorldDatabase::LoadThrownWeapons(int32 item_id)` +- `int32 WorldDatabase::LoadWeapons(int32 item_id)` +- `int32 WorldDatabase::LoadItemAppearances(int32 item_id)` +- `int32 WorldDatabase::LoadItemEffects(int32 item_id)` +- `int32 WorldDatabase::LoadBookPages(int32 item_id)` +- `int32 WorldDatabase::LoadItemLevelOverride(int32 item_id)` +- `int32 WorldDatabase::LoadItemStats(int32 item_id)` +- `else if(row[4])` +- `int32 WorldDatabase::LoadItemModStrings(int32 item_id)` +- `void WorldDatabase::LoadBrokerItemStats()` +- `void WorldDatabase::ReloadItemList(int32 item_id)` +- `void WorldDatabase::LoadItemList(int32 item_id)` +- `int32 WorldDatabase::LoadNextUniqueItemID()` +- `return strtoul(row[0], NULL, 0);` +- `else if(!result)` +- `void WorldDatabase::SaveItems(Client* client)` +- `else if(item->save_needed)` +- `else if(item->save_needed) {` +- `else if(item->save_needed) {` +- `void WorldDatabase::SaveItem(int32 account_id, int32 char_id, Item* item, const char* type)` +- `void WorldDatabase::DeleteItem(int32 char_id, Item* item, const char* type)` +- `void WorldDatabase::LoadCharacterItemList(int32 account_id, int32 char_id, Player* player, int16 version)` +- `else if (strncasecmp(row[0], "APPEARANCE", 10) == 0)` + +## Notable Comments + +- /* +- */ +- // handle new database class til all functions are converted +- // this is too much on top of already having the top level load item debug msg +- // LogWrite(ITEM__DEBUG, 5, "Items", "\tSetting details for item ID: %i", result->GetInt32Str("id")); +- // add more Flags/Flags2 here +- //LogWrite(ITEM__DEBUG, 0, "Items", "\tItem Adornment for item_id: %u", id); +- //LogWrite(ITEM__DEBUG, 0, "Items", "\ttype: %i, Duration: %i, item_types_: %i, slot_type: %i", ITEM_TYPE_ADORNMENT, atoi(row[1]), atoi(row[2]), atoi(row[3])); +- //LogWrite(ITEM__DEBUG, 0, "Items", "\ttype: %i, Duration: %i, item_types_: %i, slot_type: %i",item->generic_info.item_type, item->adornment_info->duration, item->adornment_info->item_types, item->adornment_info->slot_type); +- //if (database_new.Select(&result, "SELECT id, itemset_item_id, item_id, item_icon,item_stack_size,item_list_color,language_type FROM item_details_itemset")) diff --git a/docs/code/Items_CoE.md b/docs/code/Items_CoE.md new file mode 100644 index 0000000..ffb077b --- /dev/null +++ b/docs/code/Items_CoE.md @@ -0,0 +1,139 @@ +# File: `Items_CoE.h` + +## Classes + +- `MasterItemList` +- `Player` +- `ItemStatsValues` +- `ItemCore` +- `ItemStat` +- `ItemLevelOverride` +- `ItemClass` +- `ItemAppearance` +- `PlayerItemList` +- `Item` +- `ItemStatString` +- `Generic_Info` +- `Armor_Info` +- `Weapon_Info` +- `Shield_Info` +- `Ranged_Info` +- `Bag_Info` +- `Food_Info` +- `Bauble_Info` +- `Book_Info` +- `Skill_Info` +- `House_Info` +- `HouseContainer_Info` +- `RecipeBook_Info` +- `Thrown_Info` +- `ItemEffect` +- `MasterItemList` +- `PlayerItemList` +- `OverFlowItemList` +- `EquipmentItemList` + +## Functions + +- `void AddEffect(string effect, int8 percentage, int8 subbulletflag);` +- `int32 GetMaxSellValue();` +- `void SetMaxSellValue(int32 val);` +- `void SetItem(Item* old_item);` +- `int16 GetOverrideLevel(int8 adventure_class, int8 tradeskill_class);` +- `void AddLevelOverride(int8 adventure_class, int8 tradeskill_class, int16 level);` +- `void AddLevelOverride(ItemLevelOverride* class_);` +- `bool CheckClassLevel(int8 adventure_class, int8 tradeskill_class, int16 level);` +- `bool CheckClass(int8 adventure_class, int8 tradeskill_class);` +- `bool CheckLevel(int8 adventure_class, int8 tradeskill_class, int16 level);` +- `void SetAppearance(int16 type, int8 red, int8 green, int8 blue, int8 highlight_red, int8 highlight_green, int8 highlight_blue);` +- `void SetAppearance(ItemAppearance* appearance);` +- `void AddStat(ItemStat* in_stat);` +- `void AddStatString(ItemStatString* in_stat);` +- `void AddStat(int8 type, int16 subtype, float value, char* name = 0);` +- `void SetWeaponType(int8 type);` +- `int8 GetWeaponType();` +- `bool HasSlot(int8 slot, int8 slot2 = 255);` +- `bool IsNormal();` +- `bool IsWeapon();` +- `bool IsArmor();` +- `bool IsRanged();` +- `bool IsBag();` +- `bool IsFood();` +- `bool IsBauble();` +- `bool IsSkill();` +- `bool IsHouseItem();` +- `bool IsHouseContainer();` +- `bool IsShield();` +- `bool IsAdornment();` +- `bool IsAmmo();` +- `bool IsBook();` +- `bool IsChainArmor();` +- `bool IsClothArmor();` +- `bool IsCollectable();` +- `bool IsCloak();` +- `bool IsCrushWeapon();` +- `bool IsFoodFood();` +- `bool IsFoodDrink();` +- `bool IsJewelry();` +- `bool IsLeatherArmor();` +- `bool IsMisc();` +- `bool IsPierceWeapon();` +- `bool IsPlateArmor();` +- `bool IsPoison();` +- `bool IsPotion();` +- `bool IsRecipeBook();` +- `bool IsSalesDisplay();` +- `bool IsSlashWeapon();` +- `bool IsSpellScroll();` +- `bool IsTinkered();` +- `bool IsTradeskill();` +- `bool IsThrown();` +- `void SetItemScript(string name);` +- `int32 CalculateRepairCost();` +- `void SetItemType(int8 in_type);` +- `void serialize(PacketStruct* packet, bool show_name = false, Player* player = 0, int16 packet_type = 0, int8 subtype = 0, bool loot_item = false);` +- `bool CheckFlag(int32 flag);` +- `void AddSlot(int8 slot_id);` +- `void SetSlots(int32 slots);` +- `void AddItem(Item* item);` +- `bool IsBag(int32 item_id);` +- `void RemoveAll();` +- `bool SharedBankAddAllowed(Item* item);` +- `bool HasItem(int32 id, bool include_bank = false);` +- `void MoveItem(Item* item, sint32 inv_slot, int16 slot, bool erase_old = true);` +- `bool MoveItem(sint32 to_bag_id, int16 from_index, sint8 to, int8 charges);` +- `bool AssignItemToFreeSlot(Item* item);` +- `int16 GetNumberOfFreeSlots();` +- `int16 GetNumberOfItems();` +- `bool HasFreeSlot();` +- `bool HasFreeBagSlot();` +- `void DestroyItem(int16 index);` +- `void RemoveItem(Item* item, bool delete_item = false);` +- `void AddItem(Item* item);` +- `bool HasFreeBankSlot();` +- `int8 FindFreeBankSlot();` +- `void Stack(Item* orig_item, Item* item);` +- `bool OverFlowSlotFull();` +- `int8 GetNextOverFlowSlot();` +- `bool AddItem(Item* item);` +- `bool HasItem(int32 id);` +- `int8 GetNumberOfItems();` +- `void SetItem(int8 slot_id, Item* item);` +- `void RemoveItem(int8 slot, bool delete_item = false);` +- `bool AddItem(int8 slot, Item* item);` +- `bool CheckEquipSlot(Item* tmp, int8 slot);` +- `bool CanItemBeEquippedInSlot(Item* tmp, int8 slot);` +- `int8 GetFreeSlot(Item* tmp, int8 slot_id = 255);` + +## Notable Comments + +- /* +- */ +- //#define ITEM_STAT_VS_SLASH 200 +- //#define ITEM_STAT_VS_CRUSH 201 +- //#define ITEM_STAT_VS_PIERCE 202 +- //#define ITEM_STAT_VS_HEAT 203 +- //#define ITEM_STAT_VS_COLD 204 +- //#define ITEM_STAT_VS_MAGIC 205 +- //#define ITEM_STAT_VS_MENTAL 206 +- //#define ITEM_STAT_VS_DIVINE 207 diff --git a/docs/code/Items_DoV.md b/docs/code/Items_DoV.md new file mode 100644 index 0000000..675b4ba --- /dev/null +++ b/docs/code/Items_DoV.md @@ -0,0 +1,141 @@ +# File: `Items_DoV.h` + +## Classes + +- `MasterItemList` +- `Player` +- `Entity` +- `ItemStatsValues` +- `ItemCore` +- `ItemStat` +- `ItemLevelOverride` +- `ItemClass` +- `ItemAppearance` +- `PlayerItemList` +- `Item` +- `ItemStatString` +- `Generic_Info` +- `Armor_Info` +- `Weapon_Info` +- `Shield_Info` +- `Ranged_Info` +- `Bag_Info` +- `Food_Info` +- `Bauble_Info` +- `Book_Info` +- `Skill_Info` +- `House_Info` +- `HouseContainer_Info` +- `RecipeBook_Info` +- `Thrown_Info` +- `ItemEffect` +- `MasterItemList` +- `PlayerItemList` +- `OverFlowItemList` +- `EquipmentItemList` + +## Functions + +- `void AddEffect(string effect, int8 percentage, int8 subbulletflag);` +- `int32 GetMaxSellValue();` +- `void SetMaxSellValue(int32 val);` +- `void SetItem(Item* old_item);` +- `int16 GetOverrideLevel(int8 adventure_class, int8 tradeskill_class);` +- `void AddLevelOverride(int8 adventure_class, int8 tradeskill_class, int16 level);` +- `void AddLevelOverride(ItemLevelOverride* class_);` +- `bool CheckClassLevel(int8 adventure_class, int8 tradeskill_class, int16 level);` +- `bool CheckClass(int8 adventure_class, int8 tradeskill_class);` +- `bool CheckLevel(int8 adventure_class, int8 tradeskill_class, int16 level);` +- `void SetAppearance(int16 type, int8 red, int8 green, int8 blue, int8 highlight_red, int8 highlight_green, int8 highlight_blue);` +- `void SetAppearance(ItemAppearance* appearance);` +- `void AddStat(ItemStat* in_stat);` +- `void AddStatString(ItemStatString* in_stat);` +- `void AddStat(int8 type, int16 subtype, float value, char* name = 0);` +- `void SetWeaponType(int8 type);` +- `int8 GetWeaponType();` +- `bool HasSlot(int8 slot, int8 slot2 = 255);` +- `bool IsNormal();` +- `bool IsWeapon();` +- `bool IsArmor();` +- `bool IsRanged();` +- `bool IsBag();` +- `bool IsFood();` +- `bool IsBauble();` +- `bool IsSkill();` +- `bool IsHouseItem();` +- `bool IsHouseContainer();` +- `bool IsShield();` +- `bool IsAdornment();` +- `bool IsAmmo();` +- `bool IsBook();` +- `bool IsChainArmor();` +- `bool IsClothArmor();` +- `bool IsCollectable();` +- `bool IsCloak();` +- `bool IsCrushWeapon();` +- `bool IsFoodFood();` +- `bool IsFoodDrink();` +- `bool IsJewelry();` +- `bool IsLeatherArmor();` +- `bool IsMisc();` +- `bool IsPierceWeapon();` +- `bool IsPlateArmor();` +- `bool IsPoison();` +- `bool IsPotion();` +- `bool IsRecipeBook();` +- `bool IsSalesDisplay();` +- `bool IsSlashWeapon();` +- `bool IsSpellScroll();` +- `bool IsTinkered();` +- `bool IsTradeskill();` +- `bool IsThrown();` +- `void SetItemScript(string name);` +- `int32 CalculateRepairCost();` +- `void SetItemType(int8 in_type);` +- `void serialize(PacketStruct* packet, bool show_name = false, Player* player = 0, int16 packet_type = 0, int8 subtype = 0, bool loot_item = false);` +- `bool CheckFlag(int32 flag);` +- `void AddSlot(int8 slot_id);` +- `void SetSlots(int32 slots);` +- `void AddItem(Item* item);` +- `bool IsBag(int32 item_id);` +- `void RemoveAll();` +- `bool SharedBankAddAllowed(Item* item);` +- `bool HasItem(int32 id, bool include_bank = false);` +- `void MoveItem(Item* item, sint32 inv_slot, int16 slot, bool erase_old = true);` +- `bool MoveItem(sint32 to_bag_id, int16 from_index, sint8 to, int8 charges);` +- `bool AssignItemToFreeSlot(Item* item);` +- `int16 GetNumberOfFreeSlots();` +- `int16 GetNumberOfItems();` +- `bool HasFreeSlot();` +- `bool HasFreeBagSlot();` +- `void DestroyItem(int16 index);` +- `void RemoveItem(Item* item, bool delete_item = false);` +- `void AddItem(Item* item);` +- `bool HasFreeBankSlot();` +- `int8 FindFreeBankSlot();` +- `bool GetFirstFreeSlot(sint32* bag_id, sint16* slot);` +- `void Stack(Item* orig_item, Item* item);` +- `bool OverFlowSlotFull();` +- `int8 GetNextOverFlowSlot();` +- `bool AddItem(Item* item);` +- `bool HasItem(int32 id);` +- `int8 GetNumberOfItems();` +- `void SetItem(int8 slot_id, Item* item);` +- `void RemoveItem(int8 slot, bool delete_item = false);` +- `bool AddItem(int8 slot, Item* item);` +- `bool CheckEquipSlot(Item* tmp, int8 slot);` +- `bool CanItemBeEquippedInSlot(Item* tmp, int8 slot);` +- `int8 GetFreeSlot(Item* tmp, int8 slot_id = 255);` + +## Notable Comments + +- /* +- */ +- //#define ITEM_STAT_VS_HEAT 203 //just so no build error +- //#define ITEM_STAT_VS_MAGIC 205 //just so no build error +- //#define ITEM_STAT_VS_POISON 209 //just so no build error +- //#define ITEM_STAT_VS_DROWNING 210 //just so no build error +- //#define ITEM_STAT_VS_FALLING 211 //just so no build error +- //#define ITEM_STAT_VS_PAIN 212 //just so no build error +- //#define ITEM_STAT_VS_MELEE 213 //just so no build error +- //#define ITEM_STAT_HPREGEN 600 diff --git a/docs/code/Items_ToV.md b/docs/code/Items_ToV.md new file mode 100644 index 0000000..81c3ae5 --- /dev/null +++ b/docs/code/Items_ToV.md @@ -0,0 +1,22 @@ +# File: `Items_ToV.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- //Item Stat defines for ToV Client +- //Stat type 6 (blue stats) +- //End of stat type 6 (blue stats) +- //Item stat type 5 (health,power,savagery,dissonance,concentration) +- //End of stat type 5 +- //Item stat type 3 (damage mods) +- //End of item stat 3 +- // Other stats not listed above (not sent from the server), never send these to the client diff --git a/docs/code/JsonParser.md b/docs/code/JsonParser.md new file mode 100644 index 0000000..01d18f8 --- /dev/null +++ b/docs/code/JsonParser.md @@ -0,0 +1,15 @@ +# File: `JsonParser.h` + +## Classes + +- `JsonParser` + +## Functions + +- `std::string getValue(const std::string &path) const {` +- `bool IsLoaded() { return is_loaded; }` +- `void parseTree(const boost::property_tree::ptree &tree, const std::string &path);` + +## Notable Comments + +_None detected_ diff --git a/docs/code/LWorld.md b/docs/code/LWorld.md new file mode 100644 index 0000000..7812f64 --- /dev/null +++ b/docs/code/LWorld.md @@ -0,0 +1,72 @@ +# File: `LWorld.h` + +## Classes + +- `LWorld` +- `LWorldList` + +## Functions + +- `void ServerUpdateLoop(void* tmp);` +- `bool Process();` +- `void SendPacket(ServerPacket* pack);` +- `void Message(const char* to, const char* message, ...);` +- `bool SetupWorld(char* in_worldname, char* in_worldaddress, char* in_account, char* in_password, char* in_version);` +- `void UpdateStatus(sint32 in_status, sint32 in_players, sint32 in_zones, int8 in_level) {` +- `void UpdateWorldList(LWorld* to = 0);` +- `void SetRemoteInfo(int32 in_ip, int32 in_accountid, char* in_account, char* in_name, char* in_address, int32 in_status, int32 in_adminid, sint32 in_players, sint32 in_zones);` +- `bool IsLocked() { return status==-2; }` +- `void ShowDownActive(bool show){ show_down_active = show; }` +- `void ShowDown(bool show){ pshowdown = show; }` +- `int8 GetWorldStatus();` +- `void ChangeToPlaceholder();` +- `void Kick(const char* message = ERROR_GHOST, bool iSetKickedFlag = true);` +- `void SetID(int32 new_id) { ID = new_id; }` +- `void SendDeleteCharacter( int32 char_id, int32 account_id );` +- `bool IsDevelServer(){ return devel_server; }` +- `void Add(LWorld* worldserver);` +- `void AddInitiateWorld ( LWorld* world );` +- `void Process();` +- `void ReceiveData();` +- `void SendPacket(ServerPacket* pack, LWorld* butnotme = 0);` +- `void SendPacketLocal(ServerPacket* pack, LWorld* butnotme = 0);` +- `void SendPacketLogin(ServerPacket* pack, LWorld* butnotme = 0);` +- `void SendWorldChanged(int32 server_id, bool sendtoallclients=false, Client* sendto = 0);` +- `void UpdateWorldList(LWorld* to = 0);` +- `void UpdateWorldStats();` +- `void KickGhost(ConType in_type, int32 in_accountid = 0, LWorld* ButNotMe = 0);` +- `void KickGhostIP(int32 ip, LWorld* NotMe = 0, int16 iClientPort = 0);` +- `void RemoveByLink(TCPConnection* in_link, int32 in_id = 0, LWorld* ButNotMe = 0);` +- `void RemoveByID(int32 in_id);` +- `void SendWorldStatus(LWorld* chat, char* adminname);` +- `void ConnectUplink();` +- `bool Init();` +- `void InitWorlds();` +- `void Shutdown();` +- `bool WriteXML();` +- `int32 GetCount(ConType type);` +- `void PopulateWorldList(http::response& res);` +- `void ListWorldsToConsole();` +- `void AddServerEquipmentUpdates(LWorld* world, map updates);` +- `void ProcessLSEquipUpdates();` +- `void RequestServerEquipUpdates(LWorld* world);` +- `void SetUpdateServerList ( bool var ) { UpdateServerList = var; }` +- `bool ContinueServerUpdates(){ return server_update_thread; }` +- `void ResetServerUpdates(){server_update_thread = true;}` +- `void ProcessServerUpdates();` +- `void RequestServerUpdates(LWorld* world);` +- `void AddServerZoneUpdates(LWorld* world, map updates);` +- `int32 GetNextID() { return NextID++; }` + +## Notable Comments + +- /* +- */ +- // we don't want the server list to update unless something has changed +- //devn00b temp +- //devn00b temp +- // JohnAdams: login appearances, copied from above +- // +- /// +- // holds the world server list so we don't have to create it for every character +- // logging in diff --git a/docs/code/Languages.md b/docs/code/Languages.md new file mode 100644 index 0000000..965509f --- /dev/null +++ b/docs/code/Languages.md @@ -0,0 +1,25 @@ +# File: `Languages.h` + +## Classes + +- `Language` +- `MasterLanguagesList` +- `PlayerLanguagesList` + +## Functions + +- `void SetID(int32 id) {this->id = id;}` +- `void SetName(const char *name) {strncpy(this->name, name, sizeof(this->name));}` +- `void SetSaveNeeded(bool save_needed) {this->save_needed = save_needed;}` +- `int32 GetID() {return id;}` +- `bool GetSaveNeeded() {return save_needed;}` +- `void Clear();` +- `int32 Size();` +- `void AddLanguage(Language* language);` +- `void Clear();` +- `void Add(Language* language);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/Log.md b/docs/code/Log.md new file mode 100644 index 0000000..344b341 --- /dev/null +++ b/docs/code/Log.md @@ -0,0 +1,19 @@ +# File: `Log.h` + +## Classes + +- `LogTypeStatus` + +## Functions + +- `void LogStart();` +- `void LogStop();` +- `int8 GetLoggerLevel(LogType type);` +- `void LogWrite(LogType type, int8 log_level, const char *cat_text, const char *fmt, ...);` +- `void ColorizeLog(int color, char *date, const char *display_name, const char *category, string buffer);` +- `bool LogParseConfigs();` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/LogTypes.md b/docs/code/LogTypes.md new file mode 100644 index 0000000..147a226 --- /dev/null +++ b/docs/code/LogTypes.md @@ -0,0 +1,22 @@ +# File: `LogTypes.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- /* +- */ +- /*** SYSTEM Loggers ******************************************************************************/ +- // Logging specific to general events within the World code +- // LoginServer and MiniLogin events +- // PatchServer (DB auto-patcher) events +- // PacketParser events +- // World/Login/Patcher/Parser Initialization loggers diff --git a/docs/code/LoginAccount.md b/docs/code/LoginAccount.md new file mode 100644 index 0000000..7e697a5 --- /dev/null +++ b/docs/code/LoginAccount.md @@ -0,0 +1,25 @@ +# File: `LoginAccount.h` + +## Classes + +- `LoginAccount` + +## Functions + +- `bool SaveAccount(LoginAccount* acct);` +- `void setName(const char* in_name) { strcpy(name, in_name); }` +- `void setPassword(const char* in_pass) { strcpy(password, in_pass); }` +- `void setAuthenticated(bool in_auth) { authenticated=in_auth; }` +- `void setAccountID(int32 id){ account_id = id; }` +- `void addCharacter(CharSelectProfile* profile){` +- `void removeCharacter(PacketStruct* profile);` +- `void removeCharacter(char* name, int16 version);` +- `void serializeCharacter(uchar* buffer, CharSelectProfile* profile);` +- `void flushCharacters ( );` +- `int32 getLoginAccountID(){ return account_id; }` +- `bool getLoginAuthenticated() { return authenticated; }` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/LoginDatabase.md b/docs/code/LoginDatabase.md new file mode 100644 index 0000000..58461a0 --- /dev/null +++ b/docs/code/LoginDatabase.md @@ -0,0 +1,66 @@ +# File: `LoginDatabase.h` + +## Classes + +- `LoginDatabase` + +## Functions + +- `void FixBugReport();` +- `void UpdateAccountIPAddress(int32 account_id, int32 address);` +- `void UpdateWorldIPAddress(int32 world_id, int32 address);` +- `void SaveBugReport(int32 world_id, char* category, char* subcategory, char* causes_crash, char* reproducible, char* summary, char* description, char* version, char* player, int32 account_id, char* spawn_name, int32 spawn_id, int32 zone_id);` +- `int32 GetAccountIDByName(const char* name);` +- `int32 CheckServerAccount(char* name, char* passwd);` +- `bool IsServerAccountDisabled(char* name);` +- `bool IsIPBanned(char* ipaddr);` +- `void GetServerAccounts(vector* server_list);` +- `bool VerifyDelete(int32 account_id, int32 character_id, const char* name);` +- `void SetServerZoneDescriptions(int32 server_id, map zone_descriptions);` +- `int32 GetServer(int32 accountID, int32 charID, string name);` +- `void LoadCharacters(LoginAccount* acct, int16 version);` +- `void CheckCharacterTimeStamps(LoginAccount* acct);` +- `string GetCharacterName(int32 char_id , int32 server_id, int32 account_id);` +- `void SaveCharacterColors(int32 char_id, char* type, EQ2_Color color);` +- `void SaveCharacterFloats(int32 char_id, char* type, float float1, float float2, float float3, float multiplier=100.0f);` +- `int16 GetAppearanceID(string name);` +- `void DeactivateCharID(int32 server_id, int32 char_id, int32 exception_id);` +- `int32 SaveCharacter(PacketStruct* create, LoginAccount* acct, int32 world_charid, int32 client_version);` +- `void LoadAppearanceData(int32 char_id, PacketStruct* char_select_packet);` +- `bool UpdateCharacterTimeStamp(int32 account_id, int32 character_id, int32 timestamp_update, int32 server_id);` +- `bool UpdateCharacterLevel(int32 account_id, int32 character_id, int8 in_level, int32 server_id);` +- `bool UpdateCharacterRace(int32 account_id, int32 character_id, int16 in_racetype, int8 in_race, int32 server_id);` +- `bool UpdateCharacterClass(int32 account_id, int32 character_id, int8 in_class, int32 server_id);` +- `bool UpdateCharacterName(int32 account_id, int32 character_id, char* newName, int32 server_id);` +- `bool UpdateCharacterZone(int32 account_id, int32 character_id, int32 zone_id, int32 server_id);` +- `bool UpdateCharacterGender(int32 account_id, int32 character_id, int8 in_gender, int32 server_id);` +- `int32 GetRaceID(char* name);` +- `void UpdateRaceID(char* name);` +- `bool DeleteCharacter(int32 account_id, int32 character_id, int32 server_id);` +- `void SaveClientLog(const char* type, const char* message, const char* player_name, int16 version);` +- `bool CheckVersion(char* version);` +- `void GetLatestTableVersions(LatestTableVersions* table_versions);` +- `bool VerifyDataTable(char* name);` +- `sint16 GetDataVersion(char* name);` +- `void SetZoneInformation(int32 server_id, int32 zone_id, int32 version, PacketStruct* packet);` +- `string GetZoneDescription(char* name);` +- `string GetColumnNames(char* name);` +- `void UpdateWorldServerStats( LWorld* world, sint32 status);` +- `bool ResetWorldServerStatsConnectedTime( LWorld* world );` +- `void RemoveOldWorldServerStats();` +- `void ResetWorldStats();` +- `bool ConnectNewDatabase();` +- `void SetServerEquipmentAppearances(int32 server_id, map equip_updates); // JohnAdams: login appearances` +- `int32 GetLoginCharacterIDFromWorldCharID(int32 server_id, int32 char_id); // JohnAdams: login appearances` +- `void RemoveDeletedCharacterData();` +- `int8 GetMaxCharsSetting();` +- `int16 GetAccountBonus(int32 acct_id);` +- `void UpdateWorldVersion(int32 world_id, char* version);` +- `void UpdateAccountClientDataVersion(int32 account_id, int16 version);` +- `void SaveCharacterPicture(int32 account_id, int32 character_id, int32 server_id, int16 picture_size, uchar* picture);` + +## Notable Comments + +- /* +- */ +- //devn00b temp diff --git a/docs/code/LoginServer.md b/docs/code/LoginServer.md new file mode 100644 index 0000000..6343038 --- /dev/null +++ b/docs/code/LoginServer.md @@ -0,0 +1,31 @@ +# File: `LoginServer.h` + +## Classes + +- `LoginServer` + +## Functions + +- `void AutoInitLoginServer(void *tmp);` +- `bool InitLoginServer();` +- `bool Process();` +- `bool Connect(const char* iAddress = 0, int16 iPort = 0);` +- `bool ConnectToUpdateServer(const char* iAddress = 0, int16 iPort = 0);` +- `void SendInfo();` +- `void SendStatus();` +- `void GetLatestTables();` +- `void SendPacket(ServerPacket* pack) { tcpc->SendPacket(pack); }` +- `int8 GetState() { return tcpc->GetState(); }` +- `bool Connected() { return tcpc->Connected(); }` +- `void SendFilterNameResponse ( int8 resp , int32 acct_id , int32 char_id );` +- `void SendDeleteCharacter ( CharacterTimeStamp_Struct* cts );` +- `int32 DetermineCharacterLoginRequest ( UsertoWorldRequest_Struct* utwr, ZoneChangeDetails* details, std::string name);` +- `void SendCharApprovedLogin(int8 response, std::string peerAddress, std::string peerInternalAddress, std::string clientIP, int16 peerPort, int32 account_id, int32 char_id, int32 key, int32 world_id, int32 from_id);` +- `void InitLoginServerVariables();` +- `void SendImmediateEquipmentUpdatesForChar(int32 char_id);` +- `bool CanReconnect() { return pTryReconnect; }` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/LoginServer_Index.md b/docs/code/LoginServer_Index.md new file mode 100644 index 0000000..9c5f99c --- /dev/null +++ b/docs/code/LoginServer_Index.md @@ -0,0 +1,6 @@ +# LoginServer Module Index + +This module handles login server logic, client handling, packet processing, and account sessions. + +## Classes and Components + diff --git a/docs/code/LoginWeb.md b/docs/code/LoginWeb.md new file mode 100644 index 0000000..9e1c7f7 --- /dev/null +++ b/docs/code/LoginWeb.md @@ -0,0 +1,16 @@ +# File: `LoginWeb.cpp` + +## Classes + +- `in_addr` + +## Functions + +- `void NetConnection::Web_loginhandle_status(const http::request& req, http::response& res) {` +- `std::string uptime_str("Days: " + std::to_string(days) + ", " + "Hours: " + std::to_string(hours) + ", " + "Minutes: " + std::to_string(minutes) + ", " + "Seconds: " + std::to_string(seconds));` +- `void NetConnection::Web_loginhandle_worlds(const http::request& req, http::response& res) {` +- `void LWorldList::PopulateWorldList(http::response& res) {` + +## Notable Comments + +_None detected_ diff --git a/docs/code/Loot.md b/docs/code/Loot.md new file mode 100644 index 0000000..5207548 --- /dev/null +++ b/docs/code/Loot.md @@ -0,0 +1,14 @@ +# File: `Loot.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ diff --git a/docs/code/LootDB.md b/docs/code/LootDB.md new file mode 100644 index 0000000..00a1005 --- /dev/null +++ b/docs/code/LootDB.md @@ -0,0 +1,27 @@ +# File: `LootDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadLoot(ZoneServer* zone)` +- `void WorldDatabase::LoadGlobalLoot(ZoneServer* zone) {` +- `else if (strcmp(type, "Racial") == 0) {` +- `else if (strcmp(type, "Zone") == 0) {` +- `bool WorldDatabase::LoadSpawnLoot(ZoneServer* zone, Spawn* spawn)` +- `void WorldDatabase::AddLootTableToSpawn(Spawn* spawn, int32 loottable_id) {` +- `bool WorldDatabase::RemoveSpawnLootTable(Spawn* spawn, int32 loottable_id) {` + +## Notable Comments + +- /* +- */ +- // First, clear previous loot tables... +- // Load loottable from DB +- // Now, load Loot Drops for configured loot tables +- // Finally, load loot tables into spawns that are set to use these loot tables +- // Load global loot lists +- // Finally, load loot tables into spawns that are set to use these loot tables +- //No error just in case ppl try doing stupid stuff diff --git a/docs/code/LuaFunctions.md b/docs/code/LuaFunctions.md new file mode 100644 index 0000000..b2ef03a --- /dev/null +++ b/docs/code/LuaFunctions.md @@ -0,0 +1,587 @@ +# File: `LuaFunctions.h` + +## Classes + +_None detected_ + +## Functions + +- `vector ParseString(string strVal, char delim=',');` +- `int EQ2Emu_lua_SetCurrentHP(lua_State* state);` +- `int EQ2Emu_lua_SetMaxHP(lua_State* state);` +- `int EQ2Emu_lua_SetMaxHPBase(lua_State* state);` +- `int EQ2Emu_lua_SetCurrentPower(lua_State* state);` +- `int EQ2Emu_lua_SetMaxPower(lua_State* state);` +- `int EQ2Emu_lua_SetMaxPowerBase(lua_State* state);` +- `int EQ2Emu_lua_ModifyMaxHP(lua_State* state);` +- `int EQ2Emu_lua_ModifyMaxPower(lua_State* state);` +- `int EQ2Emu_lua_SetHeading(lua_State* state);` +- `int EQ2Emu_lua_SetModelType(lua_State* state);` +- `int EQ2Emu_lua_SetAdventureClass(lua_State* state);` +- `int EQ2Emu_lua_SetTradeskillClass(lua_State* state);` +- `int EQ2Emu_lua_SetMount(lua_State* state);` +- `int EQ2Emu_lua_SetMountColor(lua_State* state);` +- `int EQ2Emu_lua_SetSpeed(lua_State* state);` +- `int EQ2Emu_lua_SetPosition(lua_State* state);` +- `int EQ2Emu_lua_AddSpellBonus(lua_State* state);` +- `int EQ2Emu_lua_RemoveSpellBonus(lua_State* state);` +- `int EQ2Emu_lua_AddSkillBonus(lua_State* state);` +- `int EQ2Emu_lua_RemoveSkillBonus(lua_State* state);` +- `int EQ2Emu_lua_AddControlEffect(lua_State* state);` +- `int EQ2Emu_lua_RemoveControlEffect(lua_State* state);` +- `int EQ2Emu_lua_HasControlEffect(lua_State* state);` +- `int EQ2Emu_lua_GetBaseAggroRadius(lua_State* state);` +- `int EQ2Emu_lua_GetAggroRadius(lua_State* state);` +- `int EQ2Emu_lua_SetAggroRadius(lua_State* state);` +- `int EQ2Emu_lua_SetDeity(lua_State* state);` +- `int EQ2Emu_lua_GetDeity(lua_State* state);` +- `int EQ2Emu_lua_SetInt(lua_State* state);` +- `int EQ2Emu_lua_SetWis(lua_State* state);` +- `int EQ2Emu_lua_SetSta(lua_State* state);` +- `int EQ2Emu_lua_SetStr(lua_State* state);` +- `int EQ2Emu_lua_SetAgi(lua_State* state);` +- `int EQ2Emu_lua_SetIntBase(lua_State* state);` +- `int EQ2Emu_lua_SetWisBase(lua_State* state);` +- `int EQ2Emu_lua_SetStaBase(lua_State* state);` +- `int EQ2Emu_lua_SetStrBase(lua_State* state);` +- `int EQ2Emu_lua_SetAgiBase(lua_State* state);` +- `int EQ2Emu_lua_SetLootCoin(lua_State* state);` +- `int EQ2Emu_lua_HasCoin(lua_State* state);` +- `int EQ2Emu_lua_SetQuestYellow(lua_State* state);` +- `int EQ2Emu_lua_GetLevel(lua_State* state);` +- `int EQ2Emu_lua_GetDifficulty(lua_State* state);` +- `int EQ2Emu_lua_GetCurrentHP(lua_State* state);` +- `int EQ2Emu_lua_GetMaxHP(lua_State* state);` +- `int EQ2Emu_lua_GetMaxHPBase(lua_State* state);` +- `int EQ2Emu_lua_GetCurrentPower(lua_State* state);` +- `int EQ2Emu_lua_GetName(lua_State* state);` +- `int EQ2Emu_lua_GetMaxPower(lua_State* state);` +- `int EQ2Emu_lua_GetMaxPowerBase(lua_State* state);` +- `int EQ2Emu_lua_GetDistance(lua_State* state);` +- `int EQ2Emu_lua_GetX(lua_State* state);` +- `int EQ2Emu_lua_GetY(lua_State* state);` +- `int EQ2Emu_lua_GetZ(lua_State* state);` +- `int EQ2Emu_lua_GetHeading(lua_State* state);` +- `int EQ2Emu_lua_GetModelType(lua_State* state);` +- `int EQ2Emu_lua_GetRace(lua_State* state);` +- `int EQ2Emu_lua_GetRaceName(lua_State* state);` +- `int EQ2Emu_lua_GetMount(lua_State* state);` +- `int EQ2Emu_lua_GetClass(lua_State* state);` +- `int EQ2Emu_lua_GetClassName(lua_State* state);` +- `int EQ2Emu_lua_GetArchetypeName(lua_State* state);` +- `int EQ2Emu_lua_GetSpeed(lua_State* state);` +- `int EQ2Emu_lua_HasMoved(lua_State* state);` +- `int EQ2Emu_lua_GetInt(lua_State* state);` +- `int EQ2Emu_lua_GetWis(lua_State* state);` +- `int EQ2Emu_lua_GetSta(lua_State* state);` +- `int EQ2Emu_lua_GetStr(lua_State* state);` +- `int EQ2Emu_lua_GetAgi(lua_State* state);` +- `int EQ2Emu_lua_GetIntBase(lua_State* state);` +- `int EQ2Emu_lua_GetWisBase(lua_State* state);` +- `int EQ2Emu_lua_GetStaBase(lua_State* state);` +- `int EQ2Emu_lua_GetStrBase(lua_State* state);` +- `int EQ2Emu_lua_GetAgiBase(lua_State* state);` +- `int EQ2Emu_lua_GetLootCoin(lua_State* state);` +- `int EQ2Emu_lua_GetSpawn(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnFromList(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnListSize(lua_State* state);` +- `int EQ2Emu_lua_CreateSpawnList(lua_State* state);` +- `int EQ2Emu_lua_AddSpawnToSpawnList(lua_State* state);` +- `int EQ2Emu_lua_RemoveSpawnFromSpawnList(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnListBySpawnID(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnListByRailID(lua_State* state);` +- `int EQ2Emu_lua_GetPassengerSpawnList(lua_State* state);` +- `int EQ2Emu_lua_GetVariableValue(lua_State* state);` +- `int EQ2Emu_lua_GetCoinMessage(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnByGroupID(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnByLocationID(lua_State* state);` +- `int EQ2Emu_lua_GetID(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnID(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnGroupID(lua_State* state);` +- `int EQ2Emu_lua_SetSpawnGroupID(lua_State* state);` +- `int EQ2Emu_lua_AddSpawnToGroup(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnLocationID(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnLocationPlacementID(lua_State* state);` +- `int EQ2Emu_lua_GetFactionAmount(lua_State* state);` +- `int EQ2Emu_lua_SetFactionID(lua_State* state);` +- `int EQ2Emu_lua_GetFactionID(lua_State* state);` +- `int EQ2Emu_lua_ChangeFaction(lua_State* state);` +- `int EQ2Emu_lua_GetGender(lua_State* state);` +- `int EQ2Emu_lua_GetTarget(lua_State* state);` +- `int EQ2Emu_lua_HasFreeSlot(lua_State* state);` +- `int EQ2Emu_lua_HasItemEquipped(lua_State* state);` +- `int EQ2Emu_lua_GetEquippedItemBySlot(lua_State* state);` +- `int EQ2Emu_lua_GetEquippedItemByID(lua_State* state);` +- `int EQ2Emu_lua_SetEquippedItemByID(lua_State* state);` +- `int EQ2Emu_lua_SetEquippedItem(lua_State* state);` +- `int EQ2Emu_lua_UnequipSlot(lua_State* state);` +- `int EQ2Emu_lua_SetEquipment(lua_State* state);` +- `int EQ2Emu_lua_GetItemByID(lua_State* state);` +- `int EQ2Emu_lua_GetItemType(lua_State* state);` +- `int EQ2Emu_lua_GetItemEffectType(lua_State* state);` +- `int EQ2Emu_lua_GetSpellName(lua_State* state);` +- `int EQ2Emu_lua_SetAttackable(lua_State* state);` +- `int EQ2Emu_lua_SendStateCommand(lua_State* state);` +- `int EQ2Emu_lua_SpawnSet(lua_State* state);` +- `int EQ2Emu_lua_KillSpawn(lua_State* state);` +- `int EQ2Emu_lua_KillSpawnByDistance(lua_State* state);` +- `int EQ2Emu_lua_SpawnSetByDistance(lua_State* state);` +- `int EQ2Emu_lua_SetRequiredQuest(lua_State* state);` +- `int EQ2Emu_lua_SetRequiredHistory(lua_State* state);` +- `int EQ2Emu_lua_Despawn(lua_State* state);` +- `int EQ2Emu_lua_ChangeHandIcon(lua_State* state);` +- `int EQ2Emu_lua_SetVisualFlag(lua_State* state);` +- `int EQ2Emu_lua_SetInfoFlag(lua_State* state);` +- `int EQ2Emu_lua_AddHate(lua_State* state);` +- `int EQ2Emu_lua_GetZone(lua_State* state);` +- `int EQ2Emu_lua_GetZoneName(lua_State* state);` +- `int EQ2Emu_lua_GetZoneID(lua_State* state);` +- `int EQ2Emu_lua_Zone(lua_State* state);` +- `int EQ2Emu_lua_ModifyPower(lua_State* state);` +- `int EQ2Emu_lua_ModifyHP(lua_State* state);` +- `int EQ2Emu_lua_ModifyTotalPower(lua_State* state);` +- `int EQ2Emu_lua_ModifyTotalHP(lua_State* state);` +- `int EQ2Emu_lua_SpellHeal(lua_State* state);` +- `int EQ2Emu_lua_SpellHealPct(lua_State* state);` +- `int EQ2Emu_lua_AddItem(lua_State* state);` +- `int EQ2Emu_lua_SummonItem(lua_State* state);` +- `int EQ2Emu_lua_RemoveItem(lua_State* state);` +- `int EQ2Emu_lua_HasItem(lua_State* state);` +- `int EQ2Emu_lua_Spawn(lua_State* state);` +- `int EQ2Emu_lua_AddSpawnAccess(lua_State* state);` +- `int EQ2Emu_lua_CastSpell(lua_State* state);` +- `int EQ2Emu_lua_SpellDamage(lua_State* state);` +- `int EQ2Emu_lua_SpellDamageExt(lua_State* state);` +- `int EQ2Emu_lua_FaceTarget(lua_State* state);` +- `int EQ2Emu_lua_MoveToLocation(lua_State* state);` +- `int EQ2Emu_lua_ClearRunningLocations(lua_State* state);` +- `int EQ2Emu_lua_Say(lua_State* state);` +- `int EQ2Emu_lua_Shout(lua_State* state);` +- `int EQ2Emu_lua_SayOOC(lua_State* state);` +- `int EQ2Emu_lua_Emote(lua_State* state);` +- `int EQ2Emu_lua_IsPlayer(lua_State* state);` +- `int EQ2Emu_lua_GetCharacterID(lua_State* state);` +- `int EQ2Emu_lua_MovementLoopAdd(lua_State* state);` +- `int EQ2Emu_lua_GetCurrentZoneSafeLocation(lua_State* state);` +- `int EQ2Emu_lua_PlayFlavor(lua_State* state);` +- `int EQ2Emu_lua_PlayFlavorID(lua_State* state);` +- `int EQ2Emu_lua_PlaySound(lua_State* state);` +- `int EQ2Emu_lua_PlayVoice(lua_State* state);` +- `int EQ2Emu_lua_PlayAnimation(lua_State* state);` +- `int EQ2Emu_lua_PlayAnimationString(lua_State* state);` +- `int EQ2Emu_lua_AddLootItem(lua_State* state);` +- `int EQ2Emu_lua_HasLootItem(lua_State* state);` +- `int EQ2Emu_lua_RemoveLootItem(lua_State* state);` +- `int EQ2Emu_lua_AddLootCoin(lua_State* state);` +- `int EQ2Emu_lua_GiveLoot(lua_State* state);` +- `int EQ2Emu_lua_HasPendingLoot(lua_State* state);` +- `int EQ2Emu_lua_HasPendingLootItem(lua_State* state);` +- `int EQ2Emu_lua_CreateConversation(lua_State* state);` +- `int EQ2Emu_lua_AddConversationOption(lua_State* state);` +- `int EQ2Emu_lua_StartConversation(lua_State* state);` +- `int EQ2Emu_lua_StartDialogConversation(lua_State* state);` +- `int EQ2Emu_lua_CloseConversation(lua_State* state);` +- `int EQ2Emu_lua_CloseItemConversation(lua_State* state);` +- `int EQ2Emu_lua_SetPlayerProximityFunction(lua_State* state);` +- `int EQ2Emu_lua_SetLocationProximityFunction(lua_State* state);` +- `int EQ2Emu_lua_IsBindAllowed(lua_State* state);` +- `int EQ2Emu_lua_IsGateAllowed(lua_State* state);` +- `int EQ2Emu_lua_Bind(lua_State* state);` +- `int EQ2Emu_lua_Gate(lua_State* state);` +- `int EQ2Emu_lua_IsAlive(lua_State* state);` +- `int EQ2Emu_lua_IsSpawnGroupAlive(lua_State* state);` +- `int EQ2Emu_lua_IsInCombat(lua_State* state);` +- `int EQ2Emu_lua_SendMessage(lua_State* state);` +- `int EQ2Emu_lua_SendPopUpMessage(lua_State* state);` +- `int EQ2Emu_lua_SetServerControlFlag(lua_State* state);` +- `int EQ2Emu_lua_ToggleTracking(lua_State* state);` +- `int EQ2Emu_lua_AddPrimaryEntityCommand(lua_State* state);` +- `int EQ2Emu_lua_AddSpellBookEntry(lua_State* state);` +- `int EQ2Emu_lua_DeleteSpellBook(lua_State* state);` +- `int EQ2Emu_lua_RemoveSpellBookEntry(lua_State* state);` +- `int EQ2Emu_lua_SendNewAdventureSpells(lua_State* state);` +- `int EQ2Emu_lua_SendNewTradeskillSpells(lua_State* state);` +- `int EQ2Emu_lua_HasSpell(lua_State* state);` +- `int EQ2Emu_lua_Attack(lua_State* state);` +- `int EQ2Emu_lua_ApplySpellVisual(lua_State* state);` +- `int EQ2Emu_lua_Interrupt(lua_State* state);` +- `int EQ2Emu_lua_Stealth(lua_State* state);` +- `int EQ2Emu_lua_IsStealthed(lua_State* state);` +- `int EQ2Emu_lua_IsInvis(lua_State* state);` +- `int EQ2Emu_lua_AddSpawnIDAccess(lua_State* state);` +- `int EQ2Emu_lua_RemoveSpawnIDAccess(lua_State* state);` +- `int EQ2Emu_lua_HasRecipeBook(lua_State* state);` +- `int EQ2Emu_lua_SpawnMove(lua_State* state);` +- `int EQ2Emu_lua_AddTransportSpawn(lua_State* state);` +- `int EQ2Emu_lua_IsTransportSpawn(lua_State* state);` +- `int EQ2Emu_lua_PerformCameraShake(lua_State* state);` +- `int EQ2Emu_lua_SetStepComplete(lua_State* state);` +- `int EQ2Emu_lua_AddStepProgress(lua_State* state);` +- `int EQ2Emu_lua_GetTaskGroupStep(lua_State* state);` +- `int EQ2Emu_lua_QuestStepIsComplete(lua_State* state);` +- `int EQ2Emu_lua_GetQuestStep(lua_State* state);` +- `int EQ2Emu_lua_RegisterQuest(lua_State* state);` +- `int EQ2Emu_lua_OfferQuest(lua_State* state);` +- `int EQ2Emu_lua_SetQuestPrereqLevel(lua_State* state);` +- `int EQ2Emu_lua_AddQuestPrereqQuest(lua_State* state);` +- `int EQ2Emu_lua_AddQuestPrereqItem(lua_State* state);` +- `int EQ2Emu_lua_AddQuestPrereqFaction(lua_State* state);` +- `int EQ2Emu_lua_AddQuestPrereqClass(lua_State* state);` +- `int EQ2Emu_lua_AddQuestPrereqRace(lua_State* state);` +- `int EQ2Emu_lua_AddQuestPrereqModelType(lua_State* state);` +- `int EQ2Emu_lua_AddQuestPrereqTradeskillLevel(lua_State* state);` +- `int EQ2Emu_lua_AddQuestPrereqTradeskillClass(lua_State* state);` +- `int EQ2Emu_lua_HasQuestRewardItem(lua_State* state);` +- `int EQ2Emu_lua_AddQuestRewardItem(lua_State* state);` +- `int EQ2Emu_lua_AddQuestSelectableRewardItem(lua_State* state);` +- `int EQ2Emu_lua_AddQuestRewardCoin(lua_State* state);` +- `int EQ2Emu_lua_AddQuestRewardFaction(lua_State* state);` +- `int EQ2Emu_lua_SetQuestRewardStatus(lua_State* state);` +- `int EQ2Emu_lua_SetStatusTmpReward(lua_State* state);` +- `int EQ2Emu_lua_SetCoinTmpReward(lua_State* state);` +- `int EQ2Emu_lua_SetQuestRewardComment(lua_State* state);` +- `int EQ2Emu_lua_SetQuestRewardExp(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStep(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepKillLogic(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepKill(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepKillByRace(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepChat(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepObtainItem(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepZoneLoc(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepLocation(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepLoc(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepSpell(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepCraft(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepHarvest(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepCompleteAction(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepProgressAction(lua_State* state);` +- `int EQ2Emu_lua_SetQuestCompleteAction(lua_State* state);` +- `int EQ2Emu_lua_GiveQuestReward(lua_State* state);` +- `int EQ2Emu_lua_UpdateQuestTaskGroupDescription(lua_State* state);` +- `int EQ2Emu_lua_UpdateQuestStepDescription(lua_State* state);` +- `int EQ2Emu_lua_UpdateQuestDescription(lua_State* state);` +- `int EQ2Emu_lua_UpdateQuestZone(lua_State* state);` +- `int EQ2Emu_lua_SetCompletedDescription(lua_State* state);` +- `int EQ2Emu_lua_ProvidesQuest(lua_State* state);` +- `int EQ2Emu_lua_HasQuest(lua_State* state);` +- `int EQ2Emu_lua_HasPendingQuest(lua_State* state);` +- `int EQ2Emu_lua_HasCompletedQuest(lua_State* state);` +- `int EQ2Emu_lua_QuestIsComplete(lua_State* state);` +- `int EQ2Emu_lua_QuestReturnNPC(lua_State* state);` +- `int EQ2Emu_lua_GetQuest(lua_State* state);` +- `int EQ2Emu_lua_AddTimer(lua_State* state);` +- `int EQ2Emu_lua_StopTimer(lua_State* state);` +- `int EQ2Emu_lua_Harvest(lua_State* state);` +- `int EQ2Emu_lua_SetCompleteFlag(lua_State* state);` +- `int EQ2Emu_lua_CanReceiveQuest(lua_State* state);` +- `int EQ2Emu_lua_HasCollectionsToHandIn(lua_State *state);` +- `int EQ2Emu_lua_HandInCollections(lua_State *state);` +- `int EQ2Emu_lua_UseWidget(lua_State* state);` +- `int EQ2Emu_lua_SummonPet(lua_State* state);` +- `int EQ2Emu_lua_Charm(lua_State* state);` +- `int EQ2Emu_lua_SetSpellList(lua_State* state);` +- `int EQ2Emu_lua_GetPet(lua_State* state);` +- `int EQ2Emu_lua_GetGroup(lua_State* state);` +- `int EQ2Emu_lua_CreateOptionWindow(lua_State* state);` +- `int EQ2Emu_lua_AddOptionWindowOption(lua_State* state);` +- `int EQ2Emu_lua_SendOptionWindow(lua_State* state);` +- `int EQ2Emu_lua_GetTradeskillClass(lua_State* state);` +- `int EQ2Emu_lua_GetTradeskillLevel(lua_State* state);` +- `int EQ2Emu_lua_GetTradeskillClassName(lua_State* state);` +- `int EQ2Emu_lua_SetTradeskillLevel(lua_State* state);` +- `int EQ2Emu_lua_SummonDeityPet(lua_State* state);` +- `int EQ2Emu_lua_SummonCosmeticPet(lua_State* state);` +- `int EQ2Emu_lua_DismissPet(lua_State* state);` +- `int EQ2Emu_lua_GetCharmedPet(lua_State* state);` +- `int EQ2Emu_lua_GetDeityPet(lua_State* state);` +- `int EQ2Emu_lua_GetCosmeticPet(lua_State* state);` +- `int EQ2Emu_lua_SetQuestFeatherColor(lua_State* state);` +- `int EQ2Emu_lua_RemoveSpawnAccess(lua_State* state);` +- `int EQ2Emu_lua_SpawnByLocationID(lua_State* state);` +- `int EQ2Emu_lua_SpawnGroupByID(lua_State* state);` +- `int EQ2Emu_lua_CastEntityCommand(lua_State* state);` +- `int EQ2Emu_lua_SetLuaBrain(lua_State* state);` +- `int EQ2Emu_lua_SetBrainTick(lua_State* state);` +- `int EQ2Emu_lua_SetFollowTarget(lua_State* state);` +- `int EQ2Emu_lua_GetFollowTarget(lua_State* state);` +- `int EQ2Emu_lua_ToggleFollow(lua_State* state);` +- `int EQ2Emu_lua_IsFollowing(lua_State* state);` +- `int EQ2Emu_lua_SetTempVariable(lua_State* state);` +- `int EQ2Emu_lua_GetTempVariable(lua_State* state);` +- `int EQ2Emu_lua_GiveQuestItem(lua_State*state);` +- `int EQ2Emu_lua_SetQuestRepeatable(lua_State* state);` +- `int EQ2Emu_lua_AddWaypoint(lua_State* state);` +- `int EQ2Emu_lua_RemoveWaypoint(lua_State* state);` +- `int EQ2Emu_lua_SendWaypoints(lua_State* state);` +- `int EQ2Emu_lua_AddWard(lua_State* state);` +- `int EQ2Emu_lua_AddToWard(lua_State* state);` +- `int EQ2Emu_lua_RemoveWard(lua_State* state);` +- `int EQ2Emu_lua_GetWardAmountLeft(lua_State* state);` +- `int EQ2Emu_lua_GetWardValue(lua_State* state);` +- `int EQ2Emu_lua_SetTarget(lua_State* state);` +- `int EQ2Emu_lua_IsPet(lua_State* state);` +- `int EQ2Emu_lua_GetOwner(lua_State* state);` +- `int EQ2Emu_lua_SetInCombat(lua_State* state);` +- `int EQ2Emu_lua_CompareSpawns(lua_State* state);` +- `int EQ2Emu_lua_ClearRunback(lua_State* state);` +- `int EQ2Emu_lua_Runback(lua_State* state);` +- `int EQ2Emu_lua_GetRunbackDistance(lua_State* state);` +- `int EQ2Emu_lua_IsCasting(lua_State* state);` +- `int EQ2Emu_lua_IsMezzed(lua_State* state);` +- `int EQ2Emu_lua_IsStunned(lua_State* state);` +- `int EQ2Emu_lua_IsMezzedOrStunned(lua_State* state);` +- `int EQ2Emu_lua_ClearEncounter(lua_State* state);` +- `int EQ2Emu_lua_ClearHate(lua_State* state);` +- `int EQ2Emu_lua_GetMostHated(lua_State* state);` +- `int EQ2Emu_lua_GetEncounterSize(lua_State* state);` +- `int EQ2Emu_lua_HasRecovered(lua_State* state);` +- `int EQ2Emu_lua_ProcessMelee(lua_State* state);` +- `int EQ2Emu_lua_ProcessSpell(lua_State* state);` +- `int EQ2Emu_lua_GetEncounter(lua_State* state);` +- `int EQ2Emu_lua_GetHateList(lua_State* state);` +- `int EQ2Emu_lua_HasGroup(lua_State* state);` +- `int EQ2Emu_lua_HasSpellEffect(lua_State* state);` +- `int EQ2Emu_lua_SetSuccessTimer(lua_State* state);` +- `int EQ2Emu_lua_SetFailureTimer(lua_State* state);` +- `int EQ2Emu_lua_IsGroundSpawn(lua_State* state);` +- `int EQ2Emu_lua_CanHarvest(lua_State* state);` +- `int EQ2Emu_lua_SummonDumbFirePet(lua_State* state);` +- `int EQ2Emu_lua_GetSkillValue(lua_State* state);` +- `int EQ2Emu_lua_GetSkillMaxValue(lua_State* state);` +- `int EQ2Emu_lua_GetSkillName(lua_State* state);` +- `int EQ2Emu_lua_SetSkillMaxValue(lua_State* state);` +- `int EQ2Emu_lua_SetSkillValue(lua_State* state);` +- `int EQ2Emu_lua_GetSkill(lua_State* state);` +- `int EQ2Emu_lua_GetSkillIDByName(lua_State* state);` +- `int EQ2Emu_lua_HasSkill(lua_State* state);` +- `int EQ2Emu_lua_AddSkill(lua_State* state);` +- `int EQ2Emu_lua_RemoveSkill(lua_State* state);` +- `int EQ2Emu_lua_IncreaseSkillCapsByType(lua_State* state);` +- `int EQ2Emu_lua_AddProc(lua_State* state);` +- `int EQ2Emu_lua_AddProcExt(lua_State* state);` +- `int EQ2Emu_lua_RemoveProc(lua_State* state);` +- `int EQ2Emu_lua_Knockback(lua_State* state);` +- `int EQ2Emu_lua_IsEpic(lua_State* state);` +- `int EQ2Emu_lua_IsHeroic(lua_State* state);` +- `int EQ2Emu_lua_ProcDamage(lua_State* state);` +- `int EQ2Emu_lua_LastSpellAttackHit(lua_State* state);` +- `int EQ2Emu_lua_IsBehind(lua_State* state);` +- `int EQ2Emu_lua_IsFlanking(lua_State* state);` +- `int EQ2Emu_lua_InFront(lua_State* state);` +- `int EQ2Emu_lua_AddSpellTimer(lua_State* state);` +- `int EQ2Emu_lua_SetItemCount(lua_State* state);` +- `int EQ2Emu_lua_GetItemCount(lua_State* state);` +- `int EQ2Emu_lua_Resurrect(lua_State* state);` +- `int EQ2Emu_lua_BreatheUnderwater(lua_State* state);` +- `int EQ2Emu_lua_BlurVision(lua_State* state);` +- `int EQ2Emu_lua_SetVision(lua_State* state);` +- `int EQ2Emu_lua_GetItemSkillReq(lua_State* state);` +- `int EQ2Emu_lua_SetSpeedMultiplier(lua_State* state);` +- `int EQ2Emu_lua_SetIllusion(lua_State* state);` +- `int EQ2Emu_lua_ResetIllusion(lua_State* state);` +- `int EQ2Emu_lua_AddThreatTransfer(lua_State* state);` +- `int EQ2Emu_lua_RemoveThreatTransfer(lua_State* state);` +- `int EQ2Emu_lua_CureByType(lua_State* state);` +- `int EQ2Emu_lua_CureByControlEffect(lua_State* state);` +- `int EQ2Emu_lua_AddSpawnSpellBonus(lua_State* state);` +- `int EQ2Emu_lua_RemoveSpawnSpellBonus(lua_State* state);` +- `int EQ2Emu_lua_CancelSpell(lua_State* state);` +- `int EQ2Emu_lua_RemoveStealth(lua_State* state);` +- `int EQ2Emu_lua_RemoveInvis(lua_State* state);` +- `int EQ2Emu_lua_StartHeroicOpportunity(lua_State* state);` +- `int EQ2Emu_lua_CopySpawnAppearance(lua_State* state);` +- `int EQ2Emu_lua_RemoveTriggerFromSpell(lua_State* state);` +- `int EQ2Emu_lua_GetSpellTriggerCount(lua_State* state);` +- `int EQ2Emu_lua_SetSpellTriggerCount(lua_State* state);` +- `int EQ2Emu_lua_HasSpellImmunity(lua_State* state);` +- `int EQ2Emu_lua_AddImmunitySpell(lua_State* state);` +- `int EQ2Emu_lua_RemoveImmunitySpell(lua_State* state);` +- `int EQ2Emu_lua_SetSpellSnareValue(lua_State* state);` +- `int EQ2Emu_lua_CheckRaceType(lua_State* state);` +- `int EQ2Emu_lua_GetRaceType(lua_State* state);` +- `int EQ2Emu_lua_GetRaceBaseType(lua_State* state);` +- `int EQ2Emu_lua_GetQuestFlags(lua_State* state);` +- `int EQ2Emu_lua_SetQuestFlags(lua_State* state);` +- `int EQ2Emu_lua_SetQuestTimer(lua_State* state);` +- `int EQ2Emu_lua_RemoveQuestStep(lua_State* state);` +- `int EQ2Emu_lua_ResetQuestStep(lua_State* state);` +- `int EQ2Emu_lua_SetQuestTimerComplete(lua_State* state);` +- `int EQ2Emu_lua_AddQuestStepFailureAction(lua_State* state);` +- `int EQ2Emu_lua_SetStepFailed(lua_State* state);` +- `int EQ2Emu_lua_GetQuestCompleteCount(lua_State* state);` +- `int EQ2Emu_lua_SetServerVariable(lua_State* state);` +- `int EQ2Emu_lua_GetServerVariable(lua_State* state);` +- `int EQ2Emu_lua_HasLanguage(lua_State* state);` +- `int EQ2Emu_lua_AddLanguage(lua_State* state);` +- `int EQ2Emu_lua_IsNight(lua_State* state);` +- `int EQ2Emu_lua_AddMultiFloorLift(lua_State* state);` +- `int EQ2Emu_lua_StartAutoMount(lua_State* state);` +- `int EQ2Emu_lua_EndAutoMount(lua_State* state);` +- `int EQ2Emu_lua_IsOnAutoMount(lua_State* state);` +- `int EQ2Emu_lua_SetPlayerHistory(lua_State* state);` +- `int EQ2Emu_lua_GetPlayerHistory(lua_State* state);` +- `int EQ2Emu_lua_SetGridID(lua_State* state);` +- `int EQ2Emu_lua_GetQuestStepProgress(lua_State* state);` +- `int EQ2Emu_lua_SetPlayerLevel(lua_State* state);` +- `int EQ2Emu_lua_AddCoin(lua_State* state);` +- `int EQ2Emu_lua_RemoveCoin(lua_State* state);` +- `int EQ2Emu_lua_GetPlayersInZone(lua_State* state);` +- `int EQ2Emu_lua_SetSpawnAnimation(lua_State* state);` +- `int EQ2Emu_lua_GetClientVersion(lua_State* state);` +- `int EQ2Emu_lua_GetItemID(lua_State* state);` +- `int EQ2Emu_lua_IsEntity(lua_State* state);` +- `int EQ2Emu_lua_GetOrigX(lua_State* state);` +- `int EQ2Emu_lua_GetOrigY(lua_State* state);` +- `int EQ2Emu_lua_GetOrigZ(lua_State* state);` +- `int EQ2Emu_lua_GetPCTOfHP(lua_State* state);` +- `int EQ2Emu_lua_GetPCTOfPower(lua_State* state);` +- `int EQ2Emu_lua_GetBoundZoneID(lua_State* state);` +- `int EQ2Emu_lua_Evac(lua_State* state);` +- `int EQ2Emu_lua_GetSpellTier(lua_State* state);` +- `int EQ2Emu_lua_GetSpellID(lua_State* state);` +- `int EQ2Emu_lua_StartTransmute(lua_State* state);` +- `int EQ2Emu_lua_CompleteTransmute(lua_State* state);` +- `int EQ2Emu_lua_ProcHate(lua_State* state);` +- `int EQ2Emu_lua_GiveExp(lua_State* state);` +- `int EQ2Emu_lua_DisplayText(lua_State* state);` +- `int EQ2Emu_lua_ShowLootWindow(lua_State* state);` +- `int EQ2Emu_lua_GetRandomSpawnByID(lua_State* state);` +- `int EQ2Emu_lua_AddPrimaryEntityCommandAllSpawns(lua_State* state);` +- `int EQ2Emu_lua_InstructionWindow(lua_State* state);` +- `int EQ2Emu_lua_InstructionWindowClose(lua_State* state);` +- `int EQ2Emu_lua_InstructionWindowGoal(lua_State* state);` +- `int EQ2Emu_lua_ShowWindow(lua_State* state);` +- `int EQ2Emu_lua_FlashWindow(lua_State* state);` +- `int EQ2Emu_lua_EnableGameEvent(lua_State* state);` +- `int EQ2Emu_lua_GetTutorialStep(lua_State* state);` +- `int EQ2Emu_lua_SetTutorialStep(lua_State* state);` +- `int EQ2Emu_lua_CheckLOS(lua_State* state);` +- `int EQ2Emu_lua_CheckLOSByCoordinates(lua_State* state);` +- `int EQ2Emu_lua_SetZoneExpansionFlag(lua_State* state);` +- `int EQ2Emu_lua_GetZoneExpansionFlag(lua_State* state);` +- `int EQ2Emu_lua_SetZoneHolidayFlag(lua_State* state);` +- `int EQ2Emu_lua_GetZoneHolidayFlag(lua_State* state);` +- `int EQ2Emu_lua_SetCanBind(lua_State* state);` +- `int EQ2Emu_lua_GetCanBind(lua_State* state);` +- `int EQ2Emu_lua_GetCanGate(lua_State* state);` +- `int EQ2Emu_lua_SetCanGate(lua_State* state);` +- `int EQ2Emu_lua_GetCanEvac(lua_State* state);` +- `int EQ2Emu_lua_SetCanEvac(lua_State* state);` +- `int EQ2Emu_lua_AddSpawnProximity(lua_State* state);` +- `int EQ2Emu_lua_CanSeeInvis(lua_State* state);` +- `int EQ2Emu_lua_SetSeeInvis(lua_State* state);` +- `int EQ2Emu_lua_SetSeeHide(lua_State* state);` +- `int EQ2Emu_lua_SetAccessToEntityCommand(lua_State* state);` +- `int EQ2Emu_lua_SetAccessToEntityCommandByCharID(lua_State* state);` +- `int EQ2Emu_lua_RemovePrimaryEntityCommand(lua_State* state);` +- `int EQ2Emu_lua_SendUpdateDefaultCommand(lua_State* state);` +- `int EQ2Emu_lua_SendTransporters(lua_State* state);` +- `int EQ2Emu_lua_SetTemporaryTransportID(lua_State* state);` +- `int EQ2Emu_lua_GetTemporaryTransportID(lua_State* state);` +- `int EQ2Emu_lua_GetAlignment(lua_State* state);` +- `int EQ2Emu_lua_SetAlignment(lua_State* state);` +- `int EQ2Emu_lua_GetSpell(lua_State* state);` +- `int EQ2Emu_lua_GetSpellData(lua_State* state);` +- `int EQ2Emu_lua_SetSpellData(lua_State* state);` +- `int EQ2Emu_lua_CastCustomSpell(lua_State* state);` +- `int EQ2Emu_lua_SetSpellDataIndex(lua_State* state);` +- `int EQ2Emu_lua_GetSpellDataIndex(lua_State* state);` +- `int EQ2Emu_lua_SetSpellDisplayEffect(lua_State* state);` +- `int EQ2Emu_lua_GetSpellDisplayEffect(lua_State* state);` +- `int EQ2Emu_lua_InWater(lua_State* state);` +- `int EQ2Emu_lua_InLava(lua_State* state);` +- `int EQ2Emu_lua_DamageSpawn(lua_State* state);` +- `int EQ2Emu_lua_IsInvulnerable(lua_State* state);` +- `int EQ2Emu_lua_SetInvulnerable(lua_State* state);` +- `int EQ2Emu_lua_GetRuleFlagBool(lua_State* state);` +- `int EQ2Emu_lua_GetRuleFlagInt32(lua_State* state);` +- `int EQ2Emu_lua_GetRuleFlagFloat(lua_State* state);` +- `int EQ2Emu_lua_GetAAInfo(lua_State* state);` +- `int EQ2Emu_lua_SetAAInfo(lua_State* state);` +- `int EQ2Emu_lua_AddMasterTitle(lua_State* state);` +- `int EQ2Emu_lua_AddCharacterTitle(lua_State* state);` +- `int EQ2Emu_lua_SetCharacterTitleSuffix(lua_State* state);` +- `int EQ2Emu_lua_SetCharacterTitlePrefix(lua_State* state);` +- `int EQ2Emu_lua_ResetCharacterTitleSuffix(lua_State* state);` +- `int EQ2Emu_lua_ResetCharacterTitlePrefix(lua_State* state);` +- `int EQ2Emu_lua_GetInfoStructString(lua_State* state);` +- `int EQ2Emu_lua_GetInfoStructUInt(lua_State* state);` +- `int EQ2Emu_lua_GetInfoStructSInt(lua_State* state);` +- `int EQ2Emu_lua_GetInfoStructFloat(lua_State* state);` +- `int EQ2Emu_lua_SetInfoStructString(lua_State* state);` +- `int EQ2Emu_lua_SetInfoStructUInt(lua_State* state);` +- `int EQ2Emu_lua_SetInfoStructSInt(lua_State* state);` +- `int EQ2Emu_lua_SetInfoStructFloat(lua_State* state);` +- `int EQ2Emu_lua_SetCharSheetChanged(lua_State* state);` +- `int EQ2Emu_lua_AddPlayerMail(lua_State* state);` +- `int EQ2Emu_lua_AddPlayerMailByCharID(lua_State* state);` +- `int EQ2Emu_lua_OpenDoor(lua_State* state);` +- `int EQ2Emu_lua_CloseDoor(lua_State* state);` +- `int EQ2Emu_lua_IsOpen(lua_State* state);` +- `int EQ2Emu_lua_MakeRandomInt(lua_State* state);` +- `int EQ2Emu_lua_MakeRandomFloat(lua_State* state);` +- `int EQ2Emu_lua_AddIconValue(lua_State* state);` +- `int EQ2Emu_lua_RemoveIconValue(lua_State* state);` +- `int EQ2Emu_lua_GetShardID(lua_State* state);` +- `int EQ2Emu_lua_GetShardCharID(lua_State* state);` +- `int EQ2Emu_lua_GetShardCreatedTimestamp(lua_State* state);` +- `int EQ2Emu_lua_DeleteDBShardID(lua_State* state);` +- `int EQ2Emu_lua_PauseMovement(lua_State* state);` +- `int EQ2Emu_lua_StopMovement(lua_State* state);` +- `int EQ2Emu_lua_GetArrowColor(lua_State* state);` +- `int EQ2Emu_lua_GetTSArrowColor(lua_State* state);` +- `int EQ2Emu_lua_GetSpawnByRailID(lua_State* state);` +- `int EQ2Emu_lua_SetRailID(lua_State* state);` +- `int EQ2Emu_lua_IsZoneLoading(lua_State* state);` +- `int EQ2Emu_lua_IsRunning(lua_State* state);` +- `int EQ2Emu_lua_GetZoneLockoutTimer(lua_State* state);` +- `int EQ2Emu_lua_SetWorldTime(lua_State* state);` +- `int EQ2Emu_lua_GetWorldTimeYear(lua_State* state);` +- `int EQ2Emu_lua_GetWorldTimeMonth(lua_State* state);` +- `int EQ2Emu_lua_GetWorldTimeHour(lua_State* state);` +- `int EQ2Emu_lua_GetWorldTimeMinute(lua_State* state);` +- `int EQ2Emu_lua_SendTimeUpdate(lua_State* state);` +- `int EQ2Emu_lua_SetLootTier(lua_State* state);` +- `int EQ2Emu_lua_GetLootTier(lua_State* state);` +- `int EQ2Emu_lua_SetLootDropType(lua_State* state);` +- `int EQ2Emu_lua_GetLootDropType(lua_State* state);` +- `int EQ2Emu_lua_DamageEquippedItems(lua_State* state);` +- `int EQ2Emu_lua_CreateWidgetRegion(lua_State* state);` +- `int EQ2Emu_lua_RemoveRegion(lua_State* state);` +- `int EQ2Emu_lua_SetPlayerPOVGhost(lua_State* state);` +- `int EQ2Emu_lua_SetCastOnAggroComplete(lua_State* state);` +- `int EQ2Emu_lua_IsCastOnAggroComplete(lua_State* state);` +- `int EQ2Emu_lua_AddRecipeBookToPlayer(lua_State* state);` +- `int EQ2Emu_lua_RemoveRecipeFromPlayer(lua_State* state);` +- `int EQ2Emu_lua_ReplaceWidgetFromClient(lua_State* state);` +- `int EQ2Emu_lua_RemoveWidgetFromSpawnMap(lua_State* state);` +- `int EQ2Emu_lua_RemoveWidgetFromZoneMap(lua_State* state);` +- `int EQ2Emu_lua_SendHearCast(lua_State* state);` +- `int EQ2Emu_lua_GetCharacterFlag(lua_State* state);` +- `int EQ2Emu_lua_ToggleCharacterFlag(lua_State* state);` +- `int EQ2Emu_lua_GetSpellInitialTarget(lua_State* state);` +- `int EQ2Emu_lua_GetSpellCaster(lua_State* state);` +- `int EQ2Emu_lua_GetCasterSpellLevel(lua_State* state);` +- `int EQ2Emu_lua_GetSpellTargets(lua_State* state);` +- `int EQ2Emu_lua_DespawnByLocationID(lua_State* state);` +- `int EQ2Emu_lua_AddRespawn(lua_State* state);` +- `int EQ2Emu_lua_CreatePersistedRespawn(lua_State* state);` +- `int EQ2Emu_lua_CreateChoiceWindow(lua_State* state);` +- `int EQ2Emu_lua_ClearChoice(lua_State* state);` +- `int EQ2Emu_lua_GetChoiceSpawnID(lua_State* state);` +- `int EQ2Emu_lua_GetZonePlayerMinLevel(lua_State* state);` +- `int EQ2Emu_lua_GetZonePlayerMaxLevel(lua_State* state);` +- `int EQ2Emu_lua_GetZonePlayerAvgLevel(lua_State* state);` +- `int EQ2Emu_lua_GetZonePlayerFirstLevel(lua_State* state);` +- `int EQ2Emu_lua_GetSpellRequiredLevel(lua_State* state);` + +## Notable Comments + +- /* +- */ +- //Sets +- //Gets +- //Misc +- //int EQ2Emu_lua_StartItemConversation(lua_State* state); +- //Quest Stuff +- //Combat AI related diff --git a/docs/code/LuaInterface.md b/docs/code/LuaInterface.md new file mode 100644 index 0000000..6353096 --- /dev/null +++ b/docs/code/LuaInterface.md @@ -0,0 +1,116 @@ +# File: `LuaInterface.h` + +## Classes + +- `ConversationOption` +- `OptionWindowOption` +- `LuaSpell` +- `LUAUserData` +- `LUAConversationOptionWrapper` +- `LUAOptionWindowWrapper` +- `LUASpawnWrapper` +- `LUAZoneWrapper` +- `LUAQuestWrapper` +- `LUAItemWrapper` +- `LUASkillWrapper` +- `LUASpellWrapper` +- `LuaInterface` + +## Functions + +- `bool IsConversationOption();` +- `bool IsOptionWindow();` +- `bool IsSpawn();` +- `bool IsZone();` +- `bool IsQuest();` +- `bool IsItem();` +- `bool IsSkill();` +- `bool IsSpell();` +- `int GetNumberOfArgs(lua_State* state);` +- `bool LoadItemScript(string name);` +- `bool LoadItemScript(const char* name);` +- `bool LoadSpawnScript(string name);` +- `bool LoadSpawnScript(const char* name);` +- `bool LoadZoneScript(string name);` +- `bool LoadZoneScript(const char* name);` +- `bool LoadRegionScript(string name);` +- `bool LoadRegionScript(const char* name);` +- `void RemoveSpell(LuaSpell* spell, bool call_remove_function = true, bool can_delete = true, string reason = "", bool removing_all_spells = false, bool return_after_call_remove = false, Spawn* overrideTarget = nullptr);` +- `int8 GetInt8Value(lua_State* state, int8 arg_num = 1);` +- `int16 GetInt16Value(lua_State* state, int8 arg_num = 1);` +- `int32 GetInt32Value(lua_State* state, int8 arg_num = 1);` +- `sint32 GetSInt32Value(lua_State* state, int8 arg_num = 1);` +- `int64 GetInt64Value(lua_State* state, int8 arg_num = 1);` +- `sint64 GetSInt64Value(lua_State* state, int8 arg_num = 1);` +- `float GetFloatValue(lua_State* state, int8 arg_num = 1);` +- `string GetStringValue(lua_State* state, int8 arg_num = 1);` +- `bool GetBooleanValue(lua_State*state, int8 arg_num = 1);` +- `void Process();` +- `void SetInt32Value(lua_State* state, int32 value);` +- `void SetSInt32Value(lua_State* state, sint32 value);` +- `void SetInt64Value(lua_State* state, int64 value);` +- `void SetSInt64Value(lua_State* state, sint64 value);` +- `void SetFloatValue(lua_State* state, float value);` +- `void SetBooleanValue(lua_State* state, bool value);` +- `void SetStringValue(lua_State* state, const char* value);` +- `void SetSpawnValue(lua_State* state, Spawn* spawn);` +- `void SetSkillValue(lua_State* state, Skill* skill);` +- `void SetItemValue(lua_State* state, Item* item);` +- `void SetQuestValue(lua_State* state, Quest* quest);` +- `void SetZoneValue(lua_State* state, ZoneServer* zone);` +- `void SetSpellValue(lua_State* state, LuaSpell* spell);` +- `void SetConversationValue(lua_State* state, vector* conversation);` +- `void SetOptionWindowValue(lua_State* state, vector* optionWindow);` +- `std::string AddSpawnPointers(LuaSpell* spell, bool first_cast, bool precast = false, const char* function = 0, SpellScriptTimer* timer = 0, bool passLuaSpell=false, Spawn* altTarget = 0);` +- `void RemoveCurrentSpell(lua_State* state, LuaSpell* cur_spell, bool needsLock = true, bool removeCurSpell = true, bool removeSpellScript = true);` +- `bool CallSpellProcess(LuaSpell* spell, int8 num_parameters, std::string functionCalled);` +- `void UseItemScript(const char* name, lua_State* state, bool val);` +- `void UseSpawnScript(const char* name, lua_State* state, bool val);` +- `void UseZoneScript(const char* name, lua_State* state, bool val);` +- `void UseRegionScript(const char* name, lua_State* state, bool val);` +- `void RemoveSpawnScript(const char* name);` +- `bool RunItemScript(string script_name, const char* function_name, Item* item, Spawn* spawn = 0, Spawn* target = 0, sint64* returnValue = 0);` +- `bool RunItemScriptWithReturnString(string script_name, const char* function_name, Item* item, Spawn* spawn = 0, std::string* returnValue = 0);` +- `bool CallItemScript(lua_State* state, int8 num_parameters, std::string* returnValue = 0);` +- `bool CallItemScript(lua_State* state, int8 num_parameters, sint64* returnValue = 0);` +- `bool RunSpawnScript(string script_name, const char* function_name, Spawn* npc, Spawn* spawn = 0, const char* message = 0, bool is_door_open = false, sint32 input_value = 0, sint32* return_value = 0);` +- `bool CallSpawnScript(lua_State* state, int8 num_parameters);` +- `bool RunZoneScript(string script_name, const char* function_name, ZoneServer* zone, Spawn* spawn = 0, int32 int32_arg1 = 0, const char* str_arg1 = 0, Spawn* spawn_arg1 = 0, int32 int32_arg2 = 0, const char* str_arg2 = 0, Spawn* spawn_arg2 = 0);` +- `bool RunZoneScriptWithReturn(string script_name, const char* function_name, ZoneServer* zone, Spawn* spawn, int32 int32_arg1, int32 int32_arg2, int32 int32_arg3, int32* returnValue = 0);` +- `bool CallScriptInt32(lua_State* state, int8 num_parameters, int32* returnValue = 0);` +- `bool CallScriptSInt32(lua_State* state, int8 num_parameters, sint32* returnValue = 0);` +- `bool RunRegionScript(string script_name, const char* function_name, ZoneServer* zone, Spawn* spawn = 0, sint32 int32_arg1 = 0, int32* returnValue = 0);` +- `bool CallRegionScript(lua_State* state, int8 num_parameters, int32* returnValue);` +- `void ResetFunctionStack(lua_State* state);` +- `void DestroySpells();` +- `void DestroySpawnScripts();` +- `void DestroyItemScripts();` +- `void DestroyQuests(bool reload = false);` +- `void DestroyZoneScripts();` +- `void DestroyRegionScripts();` +- `void SimpleLogError(const char* error);` +- `void LogError(const char* error, ...);` +- `bool CallQuestFunction(Quest* quest, const char* function, Spawn* player, int32 step_id = 0xFFFFFFFF, int32* returnValue = 0);` +- `void RemoveDebugClients(Client* client);` +- `void UpdateDebugClients(Client* client);` +- `void ProcessErrorMessage(const char* message);` +- `void AddUserDataPtr(LUAUserData* data, void* data_ptr = 0);` +- `void DeleteUserDataPtrs(bool all);` +- `void DeletePendingSpells(bool all);` +- `void DeletePendingSpell(LuaSpell* spell);` +- `void SetLuaSystemReloading(bool val) { lua_system_reloading = val; }` +- `bool IsLuaSystemReloading() { return lua_system_reloading; }` +- `void AddPendingSpellDelete(LuaSpell* spell);` +- `void AddCustomSpell(LuaSpell* spell);` +- `void RemoveCustomSpell(int32 id);` +- `void FindCustomSpellLock() { MCustomSpell.readlock(); }` +- `void FindCustomSpellUnlock() { MCustomSpell.releasereadlock(); }` +- `int32 GetFreeCustomSpellID();` +- `void SetLuaUserDataStale(void* ptr);` +- `void RegisterFunctions(lua_State* state);` + +## Notable Comments + +- /* +- */ +- //Bitmask Values diff --git a/docs/code/MiscFunctions.md b/docs/code/MiscFunctions.md new file mode 100644 index 0000000..5ded415 --- /dev/null +++ b/docs/code/MiscFunctions.md @@ -0,0 +1,74 @@ +# File: `MiscFunctions.h` + +## Classes + +- `InitWinsock` +- `VersionRange` + +## Functions + +- `int32 hextoi(char* num);` +- `int64 hextoi64(char* num);` +- `sint32 filesize(FILE* fp);` +- `int32 ResolveIP(const char* hostname, char* errbuf = 0);` +- `void CoutTimestamp(bool ms = true);` +- `string loadInt32String(uchar* buffer, int16 buffer_size, int16* pos, EQ2_32BitString* eq_string = NULL);` +- `string loadInt16String(uchar* buffer, int16 buffer_size, int16* pos, EQ2_16BitString* eq_string = NULL);` +- `string loadInt8String(uchar* buffer, int16 buffer_size, int16* pos, EQ2_8BitString* eq_string = NULL);` +- `sint16 storeInt32String(uchar* buffer, int16 buffer_size, string in_str);` +- `sint16 storeInt16String(uchar* buffer, int16 buffer_size, string in_str);` +- `sint16 storeInt8String(uchar* buffer, int16 buffer_size, string in_str);` +- `int MakeRandomInt(int low, int high);` +- `float MakeRandomFloat(float low, float high);` +- `float TransformToFloat(sint16 data, int8 bits);` +- `sint16 TransformFromFloat(float data, int8 bits);` +- `int32 GenerateEQ2Color(float r, float g, float b);` +- `int32 GenerateEQ2Color(float* rgb[3]);` +- `void SetColor(EQ2_Color* color, long data);` +- `int8 MakeInt8(uchar* data, int16* size);` +- `int8 MakeInt8(float* input);` +- `bool Unpack(int32 srcLen, uchar* data, uchar* dst, int16 dstLen, int16 version = 0, bool reverse = true);` +- `bool Unpack(uchar* data, uchar* dst, int16 dstLen, int16 version = 0, bool reverse = true);` +- `int32 Pack(uchar* data, uchar* src, int16 srcLen, int16 dstLen, int16 version = 0, bool reverse = true);` +- `void Reverse(uchar* input, int32 srcLen);` +- `void Encode(uchar* dst, uchar* src, int16 len);` +- `void Decode(uchar* dst, uchar* src, int16 len);` +- `string ToUpper(string input);` +- `string ToLower(string input);` +- `int32 ParseIntValue(string input);` +- `int64 ParseLongLongValue(string input);` +- `void MovementDecode(uchar* dst, uchar* newval, uchar* orig, int16 len);` +- `int8 DoOverLoad(int32 val, uchar* data);` +- `int8 CheckOverLoadSize(int32 val);` +- `int32 CountWordsInString(const char* text);` +- `bool IsNumber(const char *num);` +- `void PrintSep(Seperator *sep, const char *name = 0);` +- `string GetDeviceName(string device);` +- `int32 GetDeviceID(string device);` +- `int16 GetItemPacketType(int32 version);` +- `int16 GetOpcodeVersion(int16 version);` +- `void SleepMS(int32 milliseconds);` +- `size_t strlcpy(char *dst, const char *src, size_t size);` +- `float short_to_float(const ushort x);` +- `uint32 float_to_int(const float x);` +- `uint32 as_uint(const float x);` +- `float as_float(const uint32 x);` +- `int64 getCurrentTimestamp();` +- `bool INIReadBool(FILE *f, const char *section, const char *property, bool *out);` +- `bool INIReadInt(FILE *f, const char *section, const char *property, int *out);` +- `void init(T** iVar, T* iSetTo = 0)` +- `int32 GetMinVersion() { return min_version; }` +- `int32 GetMaxVersion() { return max_version; }` + +## Notable Comments + +- /* +- */ +- //int MakeAnyLenString(char** ret, const char* format, ...); +- //char* strn0cpy(char* dest, const char* source, int32 size); +- // return value =true if entire string(source) fit, false if it was truncated +- //bool strn0cpyt(char* dest, const char* source, int32 size); +- //void CreateEQ2Color(EQ2_Color* color, uchar* data, int16* size); +- ///Gets the packet type for the given version +- ///The client version +- ///Gets the opcode version_range1 from the clients version diff --git a/docs/code/Mutex.md b/docs/code/Mutex.md new file mode 100644 index 0000000..2bfccb2 --- /dev/null +++ b/docs/code/Mutex.md @@ -0,0 +1,31 @@ +# File: `Mutex.h` + +## Classes + +- `CriticalSection` +- `Mutex` +- `LockMutex` + +## Functions + +- `void lock();` +- `void unlock();` +- `bool trylock();` +- `void lock();` +- `void unlock();` +- `bool trylock();` +- `void readlock(const char* function = 0, int32 line = 0);` +- `void releasereadlock(const char* function = 0, int32 line = 0);` +- `bool tryreadlock(const char* function = 0);` +- `void writelock(const char* function = 0, int32 line = 0);` +- `void releasewritelock(const char* function = 0, int32 line = 0);` +- `bool trywritelock(const char* function = 0);` +- `void waitReaders(const char* function = 0, int32 line = 0);` +- `void SetName(string in_name);` +- `void unlock();` +- `void lock();` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/MutexHelper.md b/docs/code/MutexHelper.md new file mode 100644 index 0000000..2f6538d --- /dev/null +++ b/docs/code/MutexHelper.md @@ -0,0 +1,26 @@ +# File: `MutexHelper.h` + +## Classes + +- `IsPointer` +- `Locker` +- `IsPointer` +- `DeleteData` +- `HandleDeletes` + +## Functions + +- `void lock(){` +- `void unlock(){` +- `void SetData(int type, KeyT key, ValueT value, unsigned int time){` +- `void DeleteKey(){` +- `void DeleteValue(){` +- `int GetType(){` +- `void AddPendingDelete(T value, unsigned int time){` +- `void CheckDeletes(bool force = false){` + +## Notable Comments + +- /* +- */ +- // pthread_mutex_destroy(&CSMutex); diff --git a/docs/code/MutexList.md b/docs/code/MutexList.md new file mode 100644 index 0000000..6ed2f44 --- /dev/null +++ b/docs/code/MutexList.md @@ -0,0 +1,33 @@ +# File: `MutexList.h` + +## Classes + +- `MutexList` +- `iterator` + +## Functions + +- `bool HasNext(){` +- `bool Next(){` +- `return Next();` +- `void SetChanging(){` +- `void SetNotChanging(){` +- `void AddAccess(){` +- `void RemoveAccess(){` +- `iterator begin(){` +- `return iterator(this);` +- `void clear(bool erase_all = false){` +- `bool PendingContains(T key){` +- `return count(key); //only occurs whenever we change to changing state at the same time as a reading state` +- `void RemoveData(T key, int32 erase_time = 0){` +- `void Remove(T key, bool erase = false, int32 erase_time = 0){` +- `void Add(T key){` +- `bool update(bool force = false){` + +## Notable Comments + +- /* +- */ +- /*if(list.has_pending_data) +- //if(access_count > 5) +- // cout << "Possible error.\n"; diff --git a/docs/code/MutexMap.md b/docs/code/MutexMap.md new file mode 100644 index 0000000..fc09cc7 --- /dev/null +++ b/docs/code/MutexMap.md @@ -0,0 +1,29 @@ +# File: `MutexMap.h` + +## Classes + +- `MutexMap` +- `iterator` + +## Functions + +- `bool HasNext(){` +- `bool Next(){` +- `return Next();` +- `int count(KeyT key, bool include_pending = false){` +- `void clear(bool delete_all = false){` +- `void deleteData(KeyT key, int8 type, int32 erase_time = 0){` +- `void erase(KeyT key, bool erase_key = false, bool erase_value = false, int32 erase_time = 0){` +- `iterator begin(){` +- `return iterator(this);` +- `void Put(KeyT key, ValueT value){` +- `void AddAccess(){` +- `void RemoveAccess(){` +- `void SetChanging(){` +- `void SetNotChanging(){` +- `void update(bool force = false){` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/MutexVector.md b/docs/code/MutexVector.md new file mode 100644 index 0000000..9d792ab --- /dev/null +++ b/docs/code/MutexVector.md @@ -0,0 +1,26 @@ +# File: `MutexVector.h` + +## Classes + +- `MutexVector` +- `iterator` + +## Functions + +- `bool HasNext(){` +- `bool Next(){` +- `return Next();` +- `void update(){` +- `iterator begin(){` +- `return iterator(this);` +- `void clear(){` +- `void Remove(T key, bool erase = false, unsigned int erase_time = 0){` +- `void Add(T key){` +- `T Get(unsigned int index){` + +## Notable Comments + +- /* +- */ +- //if(access_count > 5) +- // cout << "Possible error.\n"; diff --git a/docs/code/NPC.md b/docs/code/NPC.md new file mode 100644 index 0000000..0595ccf --- /dev/null +++ b/docs/code/NPC.md @@ -0,0 +1,71 @@ +# File: `NPC.h` + +## Classes + +- `Brain` +- `NPCSpell` +- `NPC` + +## Functions + +- `void Initialize();` +- `void SetAppearanceID(int32 id){ appearance_id = id; }` +- `int32 GetAppearanceID(){ return appearance_id; }` +- `bool IsNPC(){ return true; }` +- `void StartRunback(bool reset_hp_on_runback = false);` +- `void InCombat(bool val);` +- `bool HandleUse(Client* client, string type);` +- `void SetRandomize(int32 value) {appearance.randomize = value;}` +- `void AddRandomize(sint32 value) {appearance.randomize += value;}` +- `int32 GetRandomize() {return appearance.randomize;}` +- `bool CheckSameAppearance(string name, int16 id);` +- `void Randomize(NPC* npc, int32 flags);` +- `int8 GetAttackType();` +- `void SetAIStrategy(int8 strategy);` +- `int8 GetAIStrategy();` +- `void SetPrimarySpellList(int32 id);` +- `int32 GetPrimarySpellList();` +- `void SetSecondarySpellList(int32 id);` +- `int32 GetSecondarySpellList();` +- `void SetPrimarySkillList(int32 id);` +- `int32 GetPrimarySkillList();` +- `void SetSecondarySkillList(int32 id);` +- `int32 GetSecondarySkillList();` +- `void SetEquipmentListID(int32 id);` +- `int32 GetEquipmentListID();` +- `void SetAggroRadius(float radius, bool overrideBaseValue = false);` +- `float GetAggroRadius();` +- `float GetBaseAggroRadius() { return base_aggro_radius; }` +- `void SetCastPercentage(int8 percentage);` +- `int8 GetCastPercentage();` +- `void SetSkills(map* in_skills);` +- `void SetSpells(vector* in_spells);` +- `void SetRunbackLocation(float x, float y, float z, int32 gridid, bool set_hp_runback = false);` +- `float GetRunbackDistance();` +- `void Runback(float distance=0.0f, bool stopFollowing = true);` +- `void ClearRunback();` +- `void AddSkillBonus(int32 spell_id, int32 skill_id, float value);` +- `void SetMaxPetLevel(int8 val) { m_petMaxLevel = val; }` +- `int8 GetMaxPetLevel() { return m_petMaxLevel; }` +- `void ProcessCombat();` +- `void SetBrain(Brain* brain);` +- `int32 GetShardID() { return m_ShardID; }` +- `void SetShardID(int32 shardid) { m_ShardID = shardid; }` +- `int32 GetShardCharID() { return m_ShardCharID; }` +- `void SetShardCharID(int32 charid) { m_ShardCharID = charid; }` +- `sint64 GetShardCreatedTimestamp() { return m_ShardCreatedTimestamp; }` +- `void SetShardCreatedTimestamp(sint64 timestamp) { m_ShardCreatedTimestamp = timestamp; }` +- `bool HasSpells() { return has_spells; }` + +## Notable Comments + +- /* +- */ +- // Randomize Appearances +- // Randomize appearance id (spawn_npcs table values) +- //#define RANDOMIZE_LEGS_TYPE 32 // spare! +- // Randomize parameters (npc_appearances, sInt values) +- // Randomize colors/hues (npc_appearances, RGB values) +- // All Flags On: 33554431 +- /// Sets the brain this NPC should use +- /// The brain this npc should use diff --git a/docs/code/NPC_AI.md b/docs/code/NPC_AI.md new file mode 100644 index 0000000..8c632b9 --- /dev/null +++ b/docs/code/NPC_AI.md @@ -0,0 +1,56 @@ +# File: `NPC_AI.h` + +## Classes + +- `Brain` +- `CombatPetBrain` +- `NonCombatPetBrain` +- `BlankBrain` +- `LuaBrain` +- `DumbFirePetBrain` + +## Functions + +- `int16 Tick() { return m_tick; }` +- `void SetTick(int16 time) { m_tick = time; }` +- `int32 LastTick() { return m_lastTick; }` +- `void SetLastTick(int32 time) { m_lastTick = time; }` +- `sint32 GetHate(Entity* entity);` +- `void ClearHate();` +- `void ClearHate(Entity* entity);` +- `sint8 GetHatePercentage(Entity* entity);` +- `void SendHateList(Client* client);` +- `bool BrainCastSpell(Spell* spell, Spawn* cast_on, bool calculate_run_loc = true);` +- `bool CheckBuffs();` +- `void ProcessMelee(Entity* target, float distance);` +- `void AddToEncounter(Entity* entity);` +- `bool CheckLootAllowed(Entity* entity);` +- `int8 GetEncounterSize();` +- `void ClearEncounter();` +- `void SendEncounterList(Client* client);` +- `bool PlayerInEncounter() { return m_playerInEncounter; }` +- `bool IsPlayerInEncounter(int32 char_id);` +- `bool IsEntityInEncounter(int32 id, bool skip_read_lock = false);` +- `int32 CountPlayerBotInEncounter();` +- `bool AddToEncounter(int32 id);` +- `bool HasRecovered();` +- `void MoveCloser(Spawn* target);` +- `void Think();` +- `void Think();` +- `void Think();` +- `void Think();` +- `void Think();` +- `void AddHate(Entity* entity, sint32 hate);` + +## Notable Comments + +- /* +- */ +- /// The main loop for the brain. This will do all the AI work +- /* Timer related functions */ +- /// Gets the time between calls to Think() +- /// Time in miliseconds between calls to Think() +- /// Sets the time between calls to Think() +- /// Time in miliseconds +- /// Gets the timestamp of the last call to Think() +- /// Timestamp of the last call to Think() diff --git a/docs/code/Object.md b/docs/code/Object.md new file mode 100644 index 0000000..ef2a7b7 --- /dev/null +++ b/docs/code/Object.md @@ -0,0 +1,19 @@ +# File: `Object.h` + +## Classes + +- `Object` + +## Functions + +- `void SetClickable(bool click){` +- `void SetZone(char* zone){` +- `bool IsObject(){ return true; }` +- `void HandleUse(Client* client, string command);` +- `void SetDeviceID(int8 val) { m_deviceID = val; }` +- `int8 GetDeviceID() { return m_deviceID; }` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/PacketHeaders.md b/docs/code/PacketHeaders.md new file mode 100644 index 0000000..43b843b --- /dev/null +++ b/docs/code/PacketHeaders.md @@ -0,0 +1,20 @@ +# File: `PacketHeaders.h` + +## Classes + +- `CharSelectProfile` +- `LS_CharSelectList` +- `LS_DeleteCharacterRequest` + +## Functions + +- `void SaveData(int16 in_version);` +- `void Data();` +- `void addChar(uchar* data, int16 size);` +- `void loadData(int32 account, vector charlist, int16 version);` +- `void loadData(EQApplicationPacket* packet);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/PacketStruct.md b/docs/code/PacketStruct.md new file mode 100644 index 0000000..473e210 --- /dev/null +++ b/docs/code/PacketStruct.md @@ -0,0 +1,178 @@ +# File: `PacketStruct.h` + +## Classes + +- `Item` +- `Player` +- `DataStruct` +- `PacketStruct` + +## Functions + +- `void SetType(const char* new_type, int8* output_type);` +- `void SetType(int8 new_type);` +- `void SetName(const char* new_name);` +- `void SetLength(int32 new_length);` +- `void SetArraySizeVariable(const char* new_name);` +- `void SetDefaultValue(int8 new_val);` +- `void SetMaxArraySize(int8 size);` +- `void SetOversized(int8 val);` +- `void SetOversizedByte(int8 val);` +- `void SetAddToStruct(bool val);` +- `void SetAddType(int8 new_type);` +- `void SetPackedIndex(int8 new_index);` +- `void SetPackedSizeVariable(const char* new_name);` +- `void SetPacked(const char* value);` +- `void SetItemSize(int32 val);` +- `void SetIfSetVariable(const char* variable);` +- `void SetIfNotSetVariable(const char* variable);` +- `void SetIfEqualsVariable(const char* variable);` +- `void SetIfNotEqualsVariable(const char* variable);` +- `void SetIfFlagSetVariable(const char* variable);` +- `void SetIfFlagNotSetVariable(const char* variable);` +- `void SetIsSet(bool val);` +- `void SetIsOptional(bool val);` +- `int8 GetPackedIndex();` +- `int8 GetDefaultValue();` +- `int8 GetOversized();` +- `int8 GetOversizedByte();` +- `int8 GetMaxArraySize();` +- `int8 GetType();` +- `int8 GetType2();` +- `string GetStringName();` +- `int32 GetLength();` +- `bool AddToStruct();` +- `int8 GetAddType();` +- `int32 GetItemSize();` +- `bool GetIfSet();` +- `bool GetIfNotSet();` +- `bool GetIfEquals();` +- `bool GetIfNotEquals();` +- `bool GetIfFlagSet();` +- `bool GetIfFlagNotSet();` +- `bool IsSet();` +- `bool IsOptional();` +- `int32 GetDataSizeInBytes();` +- `string AppendVariable(string orig, const char* val);` +- `void AddIfSetVariable(const char* val) {` +- `void AddIfNotSetVariable(const char* val) {` +- `void add(DataStruct* data);` +- `void reAddAll(int32 length);` +- `void add(PacketStruct* packet_struct);` +- `void addPacketArrays(PacketStruct* packet);` +- `void deletePacketArrays(PacketStruct* packet);` +- `void deleteDataStructs(vector* data_structs);` +- `void setSmallStringByName(const char* name, const char* text, int32 index = 0);` +- `void setMediumStringByName(const char* name, const char* text, int32 index = 0);` +- `void setLargeStringByName(const char* name, const char* text, int32 index = 0);` +- `void setSmallString(DataStruct* data_struct, const char* text, int32 index = 0);` +- `void setMediumString(DataStruct* data_struct, const char* text, int32 index = 0);` +- `void setLargeString(DataStruct* data_struct, const char* text, int32 index = 0);` +- `void renameSubstructArray(const char* substruct, int32 index);` +- `void setArrayAddToPacketByName(const char* name, bool new_val, int32 index1 = 0, int32 index2 = 0) {` +- `void setAddToPacketByName(const char* name, bool new_val, int32 index = 0) {` +- `void setAddTypePacketByName(const char* name, int8 new_val, int32 index = 0) {` +- `bool IsSubPacket();` +- `void IsSubPacket(bool new_val);` +- `int32 GetSubPacketSize();` +- `void SetSubPacketSize(int32 new_size);` +- `void SetOpcodeType(const char* opcodeType);` +- `int32 GetArraySizeByName(const char* name, int32 index);` +- `int32 GetArraySize(DataStruct* data_struct, int32 index);` +- `int32 GetArraySize(const char* name, int32 index);` +- `void LoadFromPacketStruct(PacketStruct* packet, char* substruct_name = 0);` +- `bool GetVariableIsSet(const char* name);` +- `bool GetVariableIsNotSet(const char* name);` +- `int8 getType_int8_ByName(const char* name, int32 index = 0, bool force = false);` +- `int16 getType_int16_ByName(const char* name, int32 index = 0, bool force = false);` +- `int32 getType_int32_ByName(const char* name, int32 index = 0, bool force = false);` +- `int64 getType_int64_ByName(const char* name, int32 index = 0, bool force = false);` +- `sint8 getType_sint8_ByName(const char* name, int32 index = 0, bool force = false);` +- `sint16 getType_sint16_ByName(const char* name, int32 index = 0, bool force = false);` +- `sint32 getType_sint32_ByName(const char* name, int32 index = 0, bool force = false);` +- `sint64 getType_sint64_ByName(const char* name, int32 index = 0, bool force = false);` +- `float getType_float_ByName(const char* name, int32 index = 0, bool force = false);` +- `double getType_double_ByName(const char* name, int32 index = 0, bool force = false);` +- `char getType_char_ByName(const char* name, int32 index = 0, bool force = false);` +- `EQ2_8BitString getType_EQ2_8BitString_ByName(const char* name, int32 index = 0, bool force = false);` +- `EQ2_16BitString getType_EQ2_16BitString_ByName(const char* name, int32 index = 0, bool force = false);` +- `EQ2_32BitString getType_EQ2_32BitString_ByName(const char* name, int32 index = 0, bool force = false);` +- `EQ2_Color getType_EQ2_Color_ByName(const char* name, int32 index = 0, bool force = false);` +- `EQ2_EquipmentItem getType_EQ2_EquipmentItem_ByName(const char* name, int32 index = 0, bool force = false);` +- `int8 getType_int8(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `int16 getType_int16(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `int32 getType_int32(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `int64 getType_int64(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `sint8 getType_sint8(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `sint16 getType_sint16(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `sint32 getType_sint32(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `sint64 getType_sint64(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `float getType_float(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `double getType_double(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `char getType_char(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `EQ2_8BitString getType_EQ2_8BitString(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `EQ2_16BitString getType_EQ2_16BitString(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `EQ2_32BitString getType_EQ2_32BitString(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `EQ2_Color getType_EQ2_Color(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `EQ2_EquipmentItem getType_EQ2_EquipmentItem(DataStruct* data_struct, int32 index = 0, bool force = false);` +- `void setDataType(DataStruct* data_struct, char data, int32 index);` +- `void setDataType(DataStruct* data_struct, int8 data, int32 index);` +- `void setDataType(DataStruct* data_struct, int16 data, int32 index);` +- `void setDataType(DataStruct* data_struct, int32 data, int32 index);` +- `void setDataType(DataStruct* data_struct, int64 data, int32 index);` +- `void setDataType(DataStruct* data_struct, sint8 data, int32 index);` +- `void setDataType(DataStruct* data_struct, sint16 data, int32 index);` +- `void setDataType(DataStruct* data_struct, sint32 data, int32 index);` +- `void setDataType(DataStruct* data_struct, sint64 data, int32 index);` +- `void setDataType(DataStruct* data_struct, float data, int32 index);` +- `void setDataType(DataStruct* data_struct, double data, int32 index);` +- `void setData(DataStruct* data_struct, EQ2_8BitString* input_string, int32 index, bool use_second_type = false);` +- `void setData(DataStruct* data_struct, EQ2_16BitString* input_string, int32 index, bool use_second_type = false);` +- `void setData(DataStruct* data_struct, EQ2_32BitString* input_string, int32 index, bool use_second_type = false);` +- `else if (type_to_use == DATA_STRUCT_EQ2_16BIT_STRING) {` +- `void UpdateArrayByArrayLengthName(const char* name, int32 index, int32 size);` +- `void UpdateArrayByArrayLength(DataStruct* data_struct, int32 index, int32 size);` +- `bool StructLoadData(DataStruct* data_struct, void* data, int32 len, bool useType2 = false, bool create_color = false);` +- `bool LoadPacketData(uchar* data, int32 data_len, bool create_color = false);` +- `bool CheckFlagExists(const char* name);` +- `void setColorByName(const char* name, EQ2_Color* data, int32 index = 0) {` +- `void setColorByName(const char* name, EQ2_Color data, int32 index = 0) {` +- `void setColor(DataStruct* data_struct, EQ2_Color data, int32 index = 0) {` +- `void setColorByName(const char* name, int8 red, int8 green, int8 blue, int32 index = 0) {` +- `void setColor(DataStruct* data, int8 red, int8 green, int8 blue, int32 index);` +- `void setEquipmentByName(DataStruct* data_struct, EQ2_EquipmentItem data, int32 index = 0) {` +- `void setItem(DataStruct* ds, Item* item, Player* player, int32 index, sint8 offset = 0, bool loot_item = false, bool make_empty_item_packet = false, bool inspect = false);` +- `void setItemByName(const char* name, Item* item, Player* player, int32 index = 0, sint8 offset = 0, bool loot_item = false, bool make_empty_item_packet = false, bool inspect = false);` +- `void setItemArrayDataByName(const char* name, Item* item, Player* player, int32 index1 = 0, int32 index2 = 0, sint8 offset = 0, bool loot_item = false, bool make_empty_item_packet = false, bool inspect = false);` +- `void setEquipmentByName(const char* name, EQ2_EquipmentItem data, int32 index = 0) {` +- `void setEquipmentByName(const char* name, EQ2_EquipmentItem* data, int32 size) {` +- `void setEquipmentByName(const char* name, int32 type, int8 c_red, int8 c_blue, int8 c_green, int8 h_red, int8 h_blue, int8 h_green, int32 index = 0) {` +- `void setEquipment(DataStruct* data, int16 type, int8 c_red, int8 c_blue, int8 c_green, int8 h_red, int8 h_blue, int8 h_green, int32 index);` +- `void remove(DataStruct* data);` +- `void remove(const char* name);` +- `void remove(int32 position);` +- `void serializePacket(bool clear = true);` +- `void AddSerializedData(DataStruct* data, int32 index = 0, string* datastring = 0);` +- `int32 GetVersion() { return version; }` +- `void SetVersion(int32 in_version) { version = in_version; }` +- `bool SetOpcode(const char* new_opcode);` +- `EmuOpcode GetOpcode() { return opcode; }` +- `int16 GetOpcodeValue(int16 client_version);` +- `void SetName(const char* in_name) { name = string(in_name); }` +- `bool LoadedSuccessfully() { return loadedSuccessfully; }` +- `bool IsStringValueType(string in_name, int32 index);` +- `bool IsColorValueType(string in_name, int32 index);` +- `int32 GetTotalPacketSize();` +- `void PrintPacket();` +- `string GetSQLQuery(const char* table_name);` +- `void AddPackedData();` +- `void ResetData();` +- `void AddFlag(const char* name);` + +## Notable Comments + +- /* +- */ +- // Need to figure out why type2 always seems to be 205 +- // since only items use type2 for now just hardcoded the value needed (BAD!!!) +- //type_to_use = DATA_STRUCT_SINT16; // 9; diff --git a/docs/code/PeerManager.md b/docs/code/PeerManager.md new file mode 100644 index 0000000..2b79d08 --- /dev/null +++ b/docs/code/PeerManager.md @@ -0,0 +1,77 @@ +# File: `PeerManager.h` + +## Classes + +- `Client` +- `HealthCheck` +- `GroupOptions` +- `GroupMemberInfo` +- `WhoAllPeerPlayer` +- `GuildMember` +- `ZoneChangeDetails` +- `Peer` +- `PeerManager` + +## Functions + +- `void updateStatus(HealthStatus newStatus);` +- `std::chrono::duration timeSinceLastCheck() const;` +- `: zone_tree(std::make_shared()),` +- `: id(std::move(peerId)), peeringStatus(status), worldAddr(std::move(client_address)),` +- `std::string getZoneDataAsJson() const {` +- `std::lock_guard lock(dataMutex);` +- `std::string getClientDataAsJson() const {` +- `std::lock_guard lock(dataMutex);` +- `void addPeer(std::string id, PeeringStatus status, std::string client_address, std::string client_internal_address, int16 client_port, std::string web_address, int16 web_port);` +- `void updateHealth(const std::string& id, HealthStatus newStatus);` +- `void updatePriority(const std::string& id, int16 priority);` +- `void updateZoneTree(const std::string& id, const boost::property_tree::ptree& newTree);` +- `void updateClientTree(const std::string& id, const boost::property_tree::ptree& newTree);` +- `bool IsClientConnectedPeer(int32 account_id);` +- `std::string GetCharacterPeerId(std::string charName);` +- `void SendPeersChannelMessage(int32 group_id, std::string fromName, std::string message, int16 channel, int32 language_id = 0);` +- `void SendPeersGuildChannelMessage(int32 guild_id, std::string fromName, std::string message, int16 channel, int32 language_id = 0);` +- `void sendZonePeerList(Client* client);` +- `std::string getZonePeerId(const std::string& inc_zone_name, int32 inc_zone_id, int32 inc_instance_id, ZoneChangeDetails* opt_details = nullptr, bool only_always_loaded = false, int32 matchDuplicatedId = 0);` +- `int32 getZoneHighestDuplicateId(const std::string& inc_zone_name, int32 inc_zone_id, bool increment_new_value = true);` +- `void setZonePeerData(ZoneChangeDetails* opt_details);` +- `void setPrimary(const std::string& id);` +- `bool hasPrimary();` +- `bool hasPriorityPeer(int16 priority);` +- `std::string getPriorityPeer();` +- `void updatePeer(const std::string& web_address, int16 web_port, const std::string& client_address, const std::string& client_internal_address, int16 client_port, bool is_primary = false);` +- `std::string isPeer(const std::string& web_address, int16 web_port);` +- `HealthStatus getPeerStatus(const std::string& web_address, int16 web_port);` +- `bool hasPeers();` +- `std::string assignUniqueNameForSecondary(const std::string& baseName, std::string client_address, std::string client_internal_address, int16 client_port, std::string web_address, int16 web_port);` +- `std::optional getHealthyPeer() const;` +- `std::shared_ptr getHealthyPeerPtr() const;` +- `std::shared_ptr getHealthyPrimaryPeerPtr() const;` +- `std::shared_ptr getHealthyPeerWithLeastClients() const;` +- `std::shared_ptr getPeerById(const std::string& id) const;` +- `int32 getUniqueGroupId();` +- `bool sendPrimaryNewGroupRequest(std::string leader, std::string member, int32 entity_id, GroupOptions* options);` +- `void sendPeersGroupMember(int32 group_id, GroupMemberInfo* info, bool is_update = false, std::string peerId = "");` +- `void sendPeersRemoveGroupMember(int32 group_id, std::string name, int32 char_id, bool is_client);` +- `void populateGroupOptions(boost::property_tree::ptree& root, GroupOptions* options);` +- `void sendPeersDisbandGroup(int32 group_id);` +- `bool sendPrimaryCreateGuildRequest(std::string guild_name, std::string leader_name, bool prompted_dialog = false, int32 spawnID = 0);` +- `void sendPeersAddGuildMember(int32 character_id, int32 guild_id, std::string invited_by, int32 join_timestamp, int8 rank);` +- `void sendPeersRemoveGuildMember(int32 character_id, int32 guild_id, std::string removed_by);` +- `void sendPeersCreateGuild(int32 guild_id);` +- `void sendPeersGuildPermission(int32 guild_id, int8 rank, int8 permission, int8 value_);` +- `void sendPeersGuildEventFilter(int32 guild_id, int8 event_id, int8 category, int8 value_);` +- `void SetPeerErrorState(std::string address, std::string port);` +- `void handlePrimaryConflict(const std::string& reconnectingPeerId);` +- `std::shared_ptr getCurrentPrimary();` +- `void sendPeersMessage(const std::string& endpoint, int32 command, int32 sub_command = 0);` +- `void sendZonePlayerList(std::vector* queries, std::vector* peer_list, bool isGM);` +- `bool GetClientGuildDetails(int32 matchCharID, GuildMember* member_details);` + +## Notable Comments + +- /* +- */ +- // Default constructor +- // Example function to output data as JSON string (for debug or logging) +- // Example function to output data as JSON string (for debug or logging) diff --git a/docs/code/Player.md b/docs/code/Player.md new file mode 100644 index 0000000..72e5f71 --- /dev/null +++ b/docs/code/Player.md @@ -0,0 +1,379 @@ +# File: `Player.h` + +## Classes + +- `HistoryData` +- `LUAHistory` +- `SpellBookEntry` +- `GMTagFilter` +- `QuickBarItem` +- `LoginAppearances` +- `SpawnQueueState` +- `PlayerLoginAppearance` +- `InstanceData` +- `CharacterInstances` +- `Player` +- `PlayerGroup` +- `GroupMemberInfo` +- `Statistic` +- `Mail` +- `PlayerInfo` +- `PlayerControlFlags` +- `Player` + +## Functions + +- `void AddEquipmentToUpdate(int8 slot_id, LoginAppearances* equip)` +- `void DeleteEquipmentFromUpdate(int8 slot_id, LoginAppearances* equip)` +- `void RemoveEquipmentUpdates()` +- `void AddInstance(int32 db_id, int32 instance_id, int32 last_success_timestamp, int32 last_failure_timestamp, int32 success_lockout_time, int32 failure_lockout_time, int32 zone_id, int8 zone_instancetype, string zone_name);` +- `void RemoveInstances();` +- `bool RemoveInstanceByZoneID(int32 zone_id);` +- `bool RemoveInstanceByInstanceID(int32 instance_id);` +- `vector GetLockoutInstances();` +- `vector GetPersistentInstances();` +- `void ProcessInstanceTimers(Player* player);` +- `int32 GetInstanceCount();` +- `void CalculateXPPercentages();` +- `void CalculateTSXPPercentages();` +- `void SetHouseZone(int32 id);` +- `void SetBindZone(int32 id);` +- `void SetBindX(float x);` +- `void SetBindY(float y);` +- `void SetBindZ(float z);` +- `void SetBindHeading(float heading);` +- `void SetAccountAge(int32 days);` +- `int32 GetHouseZoneID();` +- `int32 GetBindZoneID();` +- `float GetBindZoneX();` +- `float GetBindZoneY();` +- `float GetBindZoneZ();` +- `float GetBindZoneHeading();` +- `float GetBoatX() { return boat_x_offset; }` +- `float GetBoatY() { return boat_y_offset; }` +- `float GetBoatZ() { return boat_z_offset; }` +- `int32 GetBoatSpawn();` +- `void SetBoatX(float x) { boat_x_offset = x; }` +- `void SetBoatY(float y) { boat_y_offset = y; }` +- `void SetBoatZ(float z) { boat_z_offset = z; }` +- `void SetBoatSpawn(Spawn* boat);` +- `void RemoveOldPackets();` +- `void SetPlayerControlFlag(int8 param, int8 param_value, bool is_active);` +- `bool ControlFlagsChanged();` +- `void SendControlFlagUpdates(Client* client);` +- `void SetClient(Client* client) { this->client = client; }` +- `void SetCharSheetChanged(bool val);` +- `bool GetCharSheetChanged();` +- `void SetRaidSheetChanged(bool val);` +- `bool GetRaidSheetChanged();` +- `void AddFriend(const char* name, bool save);` +- `bool IsFriend(const char* name);` +- `void RemoveFriend(const char* name);` +- `void AddIgnore(const char* name, bool save);` +- `bool IsIgnored(const char* name);` +- `void RemoveIgnore(const char* name);` +- `void AddPlayerDiscoveredPOI(int32 location_id);` +- `void SetArtLevel(int8 new_lvl){` +- `bool WasSentSpawn(int32 spawn_id);` +- `bool IsSendingSpawn(int32 spawn_id);` +- `bool IsRemovingSpawn(int32 spawn_id);` +- `bool SetSpawnSentState(Spawn* spawn, SpawnState state);` +- `void CheckSpawnStateQueue();` +- `void SetSideSpeed(float side_speed, bool updateFlags = true) {` +- `float GetSideSpeed() {` +- `void SetVertSpeed(float vert_speed, bool updateFlags = true) {` +- `float GetVertSpeed() {` +- `void SetClientHeading1(float heading, bool updateFlags = true) {` +- `float GetClientHeading1() {` +- `void SetClientHeading2(float heading, bool updateFlags = true) {` +- `float GetClientHeading2() {` +- `void SetClientPitch(float pitch, bool updateFlags = true) {` +- `float GetClientPitch() {` +- `int8 GetTutorialStep() {` +- `void SetTutorialStep(int8 val) {` +- `void AddMaintainedSpell(LuaSpell* spell);` +- `void AddSpellEffect(LuaSpell* spell, int32 override_expire_time = 0);` +- `void RemoveMaintainedSpell(LuaSpell* spell);` +- `void RemoveSpellEffect(LuaSpell* spell);` +- `void AddQuickbarItem(int32 bar, int32 slot, int32 type, int16 icon, int16 icon_type, int32 id, int8 tier, int32 unique_id, const char* text, bool update = true);` +- `void RemoveQuickbarItem(int32 bar, int32 slot, bool update = true);` +- `void MoveQuickbarItem(int32 id, int32 new_slot);` +- `void ClearQuickbarItems();` +- `bool DamageEquippedItems(int8 amount = 10, Client* client = 0);` +- `bool CanEquipItem(Item* item, int8 slot);` +- `void SetEquippedItemAppearances();` +- `int16 ConvertSlotToClient(int8 slot, int16 version);` +- `int16 ConvertSlotFromClient(int8 slot, int16 version);` +- `int16 GetNumSlotsEquip(int16 version);` +- `int8 GetMaxBagSlots(int16 version);` +- `void SendQuestRequiredSpawns(int32 quest_id);` +- `void SendHistoryRequiredSpawns(int32 event_id);` +- `int32 GetStepProgress(int32 quest_id, int32 step_id);` +- `bool AddItem(Item* item, AddItemType type = AddItemType::NOT_SET);` +- `bool AddItemToBank(Item* item);` +- `int16 GetSpellSlotMappingCount();` +- `int16 GetSpellPacketCount();` +- `bool GetQuestStepComplete(int32 quest_id, int32 step_id);` +- `int16 GetQuestStep(int32 quest_id);` +- `int16 GetTaskGroupStep(int32 quest_id);` +- `int8 GetSpellTier(int32 id);` +- `void SetSpellStatus(Spell* spell, int8 status);` +- `void RemoveSpellStatus(Spell* spell, int8 status);` +- `int32 GetCharacterID();` +- `void SetCharacterID(int32 new_id);` +- `bool UpdateQuickbarNeeded();` +- `void ResetQuickbarNeeded();` +- `void set_character_flag(int flag);` +- `void reset_character_flag(int flag);` +- `void toggle_character_flag(int flag);` +- `bool get_character_flag(int flag);` +- `void AddCoins(int64 val);` +- `bool RemoveCoins(int64 val);` +- `bool HasCoins(int64 val);` +- `void AddSkill(int32 skill_id, int16 current_val, int16 max_val, bool save_needed = false);` +- `void RemovePlayerSkill(int32 skill_id, bool save = false);` +- `void RemoveSkillFromDB(Skill* skill, bool save = false);` +- `void AddSpellBookEntry(int32 spell_id, int8 tier, sint32 slot, int32 type, int32 timer, bool save_needed = false);` +- `sint32 GetFreeSpellBookSlot(int32 type);` +- `vector GetSpellBookSpellIDBySkill(int32 skill_id);` +- `void UpdateInventory(int32 bag_id);` +- `bool IsPlayer(){ return true; }` +- `int32 GetCoinsCopper();` +- `int32 GetCoinsSilver();` +- `int32 GetCoinsGold();` +- `int32 GetCoinsPlat();` +- `int32 GetBankCoinsCopper();` +- `int32 GetBankCoinsSilver();` +- `int32 GetBankCoinsGold();` +- `int32 GetBankCoinsPlat();` +- `int32 GetStatusPoints();` +- `float GetXPVitality();` +- `float GetTSXPVitality();` +- `bool AdventureXPEnabled();` +- `bool TradeskillXPEnabled();` +- `void SetNeededXP(int32 val);` +- `void SetNeededXP();` +- `void SetXP(int32 val);` +- `void SetNeededTSXP(int32 val);` +- `void SetNeededTSXP();` +- `void SetTSXP(int32 val);` +- `int32 GetNeededXP();` +- `float GetXPDebt();` +- `int32 GetXP();` +- `int32 GetNeededTSXP();` +- `int32 GetTSXP();` +- `bool AddXP(int32 xp_amount);` +- `bool AddTSXP(int32 xp_amount);` +- `bool DoubleXPEnabled();` +- `float CalculateXP(Spawn* victim);` +- `float CalculateTSXP(int8 level);` +- `void CalculateOfflineDebtRecovery(int32 unix_timestamp);` +- `void InCombat(bool val, bool range = false);` +- `void PrepareIncomingMovementPacket(int32 len, uchar* data, int16 version);` +- `void AddSpawnInfoPacketForXOR(int32 spawn_id, uchar* packet, int16 packet_size);` +- `void AddSpawnVisPacketForXOR(int32 spawn_id, uchar* packet, int16 packet_size);` +- `void AddSpawnPosPacketForXOR(int32 spawn_id, uchar* packet, int16 packet_size);` +- `int32 GetTempInfoXorSize() { return info_xor_size; }` +- `int32 GetTempVisXorSize() { return vis_xor_size; }` +- `int32 GetTempPosXorSize() { return pos_xor_size; }` +- `bool CheckPlayerInfo();` +- `void CalculateLocation();` +- `void SetSpawnDeleteTime(int32 id, int32 time);` +- `int32 GetSpawnDeleteTime(int32 id);` +- `void ClearRemovalTimers();` +- `void ClearEverything();` +- `bool IsResurrecting();` +- `void SetResurrecting(bool val);` +- `int8 GetTSArrowColor(int8 level);` +- `int16 GetIndexForSpawn(Spawn* spawn);` +- `bool WasSpawnRemoved(Spawn* spawn);` +- `void RemoveSpawn(Spawn* spawn, bool delete_spawn = true);` +- `bool ShouldSendSpawn(Spawn* spawn);` +- `void SetLevel(int16 level, bool setUpdateFlags = true);` +- `int32 GetIDWithPlayerSpawn(Spawn* spawn){` +- `int16 GetNextSpawnIndex(Spawn* spawn, bool set_lock = true);` +- `bool SetSpawnMap(Spawn* spawn);` +- `void SetSpawnMapIndex(Spawn* spawn, int32 index)` +- `int16 SetSpawnMapAndIndex(Spawn* spawn);` +- `void RemoveQuest(int32 id, bool delete_quest);` +- `bool HasQuestUpdateRequirement(Spawn* spawn);` +- `void CheckQuestsCraftUpdate(Item* item, int32 qty);` +- `void CheckQuestsHarvestUpdate(Item* item, int32 qty);` +- `bool CheckQuestRemoveFlag(Spawn* spawn);` +- `int8 CheckQuestFlag(Spawn* spawn);` +- `bool UpdateQuestReward(int32 quest_id, QuestRewardData* qrd);` +- `bool AcceptQuestReward(int32 item_id, int32 selectable_item_id);` +- `bool SendQuestStepUpdate(int32 quest_id, int32 quest_step_id, bool display_quest_helper);` +- `void SendQuest(int32 quest_id);` +- `void UpdateQuestCompleteCount(int32 quest_id);` +- `void GetQuestTemporaryRewards(int32 quest_id, std::vector* items);` +- `void AddQuestTemporaryReward(int32 quest_id, int32 item_id, int16 item_count);` +- `bool CheckQuestRequired(Spawn* spawn);` +- `void AddQuestRequiredSpawn(Spawn* spawn, int32 quest_id);` +- `void AddHistoryRequiredSpawn(Spawn* spawn, int32 event_id);` +- `bool HasQuestBeenCompleted(int32 quest_id);` +- `int32 GetQuestCompletedCount(int32 quest_id);` +- `void AddCompletedQuest(Quest* quest);` +- `bool HasActiveQuest(int32 quest_id);` +- `bool HasAnyQuest(int32 quest_id);` +- `void SetFactionValue(int32 faction_id, sint32 value){` +- `vector GetQuestIDs();` +- `bool HasPendingLootItems(int32 id);` +- `bool HasPendingLootItem(int32 id, int32 item_id);` +- `void RemovePendingLootItem(int32 id, int32 item_id);` +- `void RemovePendingLootItems(int32 id);` +- `void AddPendingLootItems(int32 id, vector* items);` +- `int16 GetTierUp(int16 tier);` +- `bool HasSpell(int32 spell_id, int8 tier = 255, bool include_higher_tiers = false, bool include_possible_scribe = false);` +- `bool HasRecipeBook(int32 recipe_id);` +- `void AddPlayerStatistic(int32 stat_id, sint32 stat_value, int32 stat_date);` +- `void UpdatePlayerStatistic(int32 stat_id, sint32 stat_value, bool overwrite = false);` +- `sint64 GetPlayerStatisticValue(int32 stat_id);` +- `void WritePlayerStatistics();` +- `void SetGroup(PlayerGroup* group);` +- `bool IsGroupMember(Entity* player);` +- `void SetGroupInformation(PacketStruct* packet);` +- `void ResetSavedSpawns();` +- `bool IsReturningFromLD();` +- `void SetReturningFromLD(bool val);` +- `bool CheckLevelStatus(int16 new_level);` +- `int16 GetLastMovementActivity();` +- `void DestroyQuests();` +- `string GetAwayMessage() const { return away_message; }` +- `void SetAwayMessage(string val) { away_message = val; }` +- `void SetRangeAttack(bool val);` +- `bool GetRangeAttack();` +- `bool AddMail(Mail* mail);` +- `void DeleteMail(bool from_database = false);` +- `void DeleteMail(int32 mail_id, bool from_database = false);` +- `void SetIsTracking(bool val) { is_tracking = val; }` +- `bool GetIsTracking() const { return is_tracking; }` +- `void SetBiography(string new_biography) { biography = new_biography; }` +- `string GetBiography() const { return biography; }` +- `void SetPlayerAdventureClass(int8 new_class);` +- `void SetGuild(Guild* new_guild) { guild = new_guild; }` +- `void AddSkillBonus(int32 spell_id, int32 skill_id, float value);` +- `bool CheckChangeInvisHistory(Entity* target);` +- `void UpdateTargetInvisHistory(int32 targetID, bool canSeeStatus);` +- `void RemoveTargetInvisHistory(int32 targetID);` +- `bool HasFreeBankSlot();` +- `int8 FindFreeBankSlot();` +- `void SetPendingCollectionReward(Collection *collection) { pending_collection_reward = collection; }` +- `void AddPendingSelectableItemReward(int32 source_id, Item* item) {` +- `void AddPendingItemReward(Item* item) {` +- `bool HasPendingItemRewards() { return (pending_item_rewards.size() > 0 || pending_selectable_item_rewards.size() > 0); }` +- `void ClearPendingSelectableItemRewards(int32 source_id, bool all = false) {` +- `void ClearPendingItemRewards() { //the client doesn't send any reference to where the pending rewards came from, so if they collect one, we should just them all of them at once` +- `void DeleteSpellBook(int8 type_selection = 0);` +- `void RemoveSpellBookEntry(int32 spell_id, bool remove_passives_from_list = true);` +- `void ResortSpellBook(int32 sort_by, int32 order, int32 pattern, int32 maxlvl_only, int32 book_type);` +- `void GetSpellBookSlotSort(int32 pattern, int32* i, int8* page_book_count, int32* last_start_point);` +- `int8 GetSpellSlot(int32 spell_id);` +- `void AddTitle(sint32 title_id, const char *name, int8 prefix, bool save_needed = false);` +- `void AddAAEntry(int16 template_id, int8 tab_id, int32 aa_id, int16 order, int8 treeid);` +- `void AddLanguage(int32 id, const char *name, bool save_needed = false);` +- `bool HasLanguage(int32 id);` +- `bool HasLanguage(const char* name);` +- `bool CanReceiveQuest(int32 quest_id, int8* ret = 0);` +- `float GetBoatX() { if (info) return info->GetBoatX(); return 0; }` +- `float GetBoatY() { if (info) return info->GetBoatY(); return 0; }` +- `float GetBoatZ() { if (info) return info->GetBoatZ(); return 0; }` +- `int32 GetBoatSpawn() { if (info) return info->GetBoatSpawn(); return 0; }` +- `void SetBoatX(float x) { if (info) info->SetBoatX(x); }` +- `void SetBoatY(float y) { if (info) info->SetBoatY(y); }` +- `void SetBoatZ(float z) { if (info) info->SetBoatZ(z); }` +- `void SetBoatSpawn(Spawn* boat) { if (info) info->SetBoatSpawn(boat); }` +- `void SetPendingDeletion(bool val) { pending_deletion = val; }` +- `bool GetPendingDeletion() { return pending_deletion; }` +- `float GetPosPacketSpeed() { return pos_packet_speed; }` +- `bool ControlFlagsChanged();` +- `void SetPlayerControlFlag(int8 param, int8 param_value, bool is_active);` +- `void SendControlFlagUpdates(Client* client);` +- `void ApplyPassiveSpells();` +- `void RemoveAllPassives();` +- `int32 GetCurrentRecipe() { return current_recipe; }` +- `void SetCurrentRecipe(int32 val) { current_recipe = val; }` +- `void ResetPetInfo();` +- `void ProcessCombat();` +- `void UpdatePlayerHistory(int8 type, int8 subtype, int32 value, int32 value2 = 0);` +- `bool DiscoveredLocation(int32 locationID);` +- `void LoadPlayerHistory(int8 type, int8 subtype, HistoryData* hd);` +- `void SaveHistory();` +- `void LockAllSpells();` +- `void UnlockAllSpells(bool modify_recast = false, Spell* exception = 0);` +- `void LockSpell(Spell* spell, int16 recast);` +- `void UnlockSpell(Spell* spell);` +- `void LockTSSpells();` +- `void UnlockTSSpells();` +- `void QueueSpell(Spell* spell);` +- `void UnQueueSpell(Spell* spell);` +- `void SetSpawnInfoStruct(PacketStruct* packet) { safe_delete(spawn_info_struct); spawn_info_struct = packet; }` +- `void SetSpawnVisStruct(PacketStruct* packet) { safe_delete(spawn_vis_struct); spawn_vis_struct = packet; }` +- `void SetSpawnPosStruct(PacketStruct* packet) { safe_delete(spawn_pos_struct); spawn_pos_struct = packet; }` +- `void SetSpawnHeaderStruct(PacketStruct* packet) { safe_delete(spawn_header_struct); spawn_header_struct = packet; }` +- `void SetSpawnFooterStruct(PacketStruct* packet) { safe_delete(spawn_footer_struct); spawn_footer_struct = packet; }` +- `void SetSignFooterStruct(PacketStruct* packet) { safe_delete(sign_footer_struct); sign_footer_struct = packet; }` +- `void SetWidgetFooterStruct(PacketStruct* packet) { safe_delete(widget_footer_struct); widget_footer_struct = packet; }` +- `void SetTempMount(int32 id) { tmp_mount_model = id; }` +- `int32 GetTempMount() { return tmp_mount_model; }` +- `void SetTempMountColor(EQ2_Color* color) { tmp_mount_color = *color; }` +- `EQ2_Color GetTempMountColor() { return tmp_mount_color; }` +- `void SetTempMountSaddleColor(EQ2_Color* color) { tmp_mount_saddle_color = *color; }` +- `EQ2_Color GetTempMountSaddleColor() { return tmp_mount_saddle_color; }` +- `void LoadLUAHistory(int32 event_id, LUAHistory* history);` +- `void SaveLUAHistory();` +- `void UpdateLUAHistory(int32 event_id, int32 value, int32 value2);` +- `bool HasGMVision() { return gm_vision; }` +- `void SetGMVision(bool val) { gm_vision = val; }` +- `void StopCombat(int8 type=0) {` +- `void DismissAllPets();` +- `void SaveSpellEffects();` +- `void SetSaveSpellEffects(bool val) { stop_save_spell_effects = val; }` +- `bool StopSaveSpellEffects() { return stop_save_spell_effects; }` +- `void MentorTarget();` +- `void SetMentorStats(int32 effective_level, int32 target_char_id = 0, bool update_stats = true);` +- `bool ResetMentorship() {` +- `void EnableResetMentorship() {` +- `bool SerializeItemPackets(EquipmentItemList* equipList, vector* packets, Item* item, int16 version, Item* to_item = 0);` +- `void AddGMVisualFilter(int32 filter_type, int32 filter_value, char* filter_search_str, int16 visual_tag);` +- `int16 MatchGMVisualFilter(int32 filter_type, int32 filter_value, char* filter_search_str, bool in_vismutex_lock = false);` +- `void ClearGMVisualFilters();` +- `int GetPVPAlignment();` +- `int32 GetCurrentLanguage() { return current_language_id; }` +- `void SetCurrentLanguage(int32 language_id) { current_language_id = language_id; }` +- `void SetActiveReward(bool val) { active_reward = val; }` +- `bool IsActiveReward() { return active_reward; }` +- `bool IsSpawnInRangeList(int32 spawn_id);` +- `void SetSpawnInRangeList(int32 spawn_id, bool in_range);` +- `void ProcessSpawnRangeUpdates();` +- `void CalculatePlayerHPPower(int16 new_level = 0);` +- `bool IsAllowedCombatEquip(int8 slot = 255, bool send_message = false);` +- `void SetActiveFoodUniqueID(int32 unique_id, bool update_db = true);` +- `void SetActiveDrinkUniqueID(int32 unique_id, bool update_db = true);` +- `int32 GetActiveFoodUniqueID() { return active_food_unique_id; }` +- `int32 GetActiveDrinkUniqueID() { return active_drink_unique_id; }` +- `void InitXPTable();` +- `void RemovePlayerStatistics();` +- `void AddPassiveSpell(int32 id, int8 tier);` +- `void RemovePassive(int32 id, int8 tier, bool remove_from_list = true);` +- `void HandleHistoryNone(int8 subtype, int32 value, int32 value2);` +- `void HandleHistoryDeath(int8 subtype, int32 value, int32 value2);` +- `void HandleHistoryDiscovery(int8 subtype, int32 value, int32 value2);` +- `void HandleHistoryXP(int8 subtype, int32 value, int32 value2);` +- `void ModifySpellStatus(SpellBookEntry* spell, sint16 value, bool modify_recast = true, int16 recast = 0);` +- `void AddSpellStatus(SpellBookEntry* spell, sint16 value, bool modify_recast = true, int16 recast = 0);` +- `void RemoveSpellStatus(SpellBookEntry* spell, sint16 value, bool modify_recast = true, int16 recast = 0);` +- `void SetSpellEntryRecast(SpellBookEntry* spell, bool modify_recast, int16 recast);` + +## Notable Comments + +- /* +- */ +- /* Character History Type Defines */ +- /* Spell Status */ +- /* Character History Sub Type Defines */ +- /// Character history data, should match the `character_history` table in the DB +- /// History set through the LUA system +- //LoginAppearances data; +- //data.equip_type = equip->equip_type; +- //appearanceList[slot_id] = data; diff --git a/docs/code/PlayerGroups.md b/docs/code/PlayerGroups.md new file mode 100644 index 0000000..29e4ccd --- /dev/null +++ b/docs/code/PlayerGroups.md @@ -0,0 +1,100 @@ +# File: `PlayerGroups.h` + +## Classes + +- `GroupOptions` +- `GroupMemberInfo` +- `PlayerGroup` +- `PlayerGroupManager` + +## Functions + +- `bool AddMember(Entity* member, bool is_leader);` +- `bool RemoveMember(Entity* member);` +- `bool RemoveMember(std::string name, bool is_client, int32 charID);` +- `void Disband();` +- `void SendGroupUpdate(Client* exclude = 0, bool forceRaidUpdate = false);` +- `int32 Size() { return m_members.size(); }` +- `void SimpleGroupMessage(const char* message);` +- `void SendGroupMessage(int8 type, const char* message, ...);` +- `void GroupChatMessage(Spawn* from, int32 language, const char* message, int16 channel = CHANNEL_GROUP_SAY);` +- `void GroupChatMessage(std::string fromName, int32 language, const char* message, int16 channel = CHANNEL_GROUP_SAY);` +- `bool MakeLeader(Entity* new_leader);` +- `std::string GetLeaderName();` +- `bool ShareQuestWithGroup(Client* quest_sharer, Quest* quest);` +- `void RemoveClientReference(Client* remove);` +- `void UpdateGroupMemberInfo(Entity* ent, bool groupMembersLocked = false);` +- `void SetDefaultGroupOptions(GroupOptions* options = nullptr);` +- `bool GetDefaultGroupOptions(GroupOptions* options);` +- `int8 GetLastLooterIndex() { return group_options.last_looted_index; }` +- `void SetNextLooterIndex(int8 new_index) { group_options.last_looted_index = new_index; }` +- `int32 GetID() { return m_id; }` +- `void GetRaidGroups(std::vector* groups);` +- `void ReplaceRaidGroups(std::vector* groups);` +- `bool IsInRaidGroup(int32 groupID, bool isLeaderGroup = false);` +- `void AddGroupToRaid(int32 groupID);` +- `void RemoveGroupFromRaid(int32 groupID);` +- `bool IsGroupRaid();` +- `void ClearGroupRaid();` +- `bool AddGroupMember(int32 group_id, Entity* member, bool is_leader = false);` +- `bool AddGroupMemberFromPeer(int32 group_id, GroupMemberInfo* info);` +- `bool RemoveGroupMember(int32 group_id, Entity* member);` +- `bool RemoveGroupMember(int32 group_id, std::string name, bool is_client, int32 charID);` +- `int32 NewGroup(Entity* leader, GroupOptions* goptions, int32 override_group_id = 0);` +- `void RemoveGroup(int32 group_id);` +- `int8 Invite(Player* leader, Entity* member);` +- `bool AddInvite(Player* leader, Entity* member);` +- `int8 AcceptInvite(Entity* member, int32* group_override_id = nullptr, bool auto_add_group = true);` +- `void DeclineInvite(Entity* member);` +- `bool IsGroupIDValid(int32 group_id);` +- `void SendGroupUpdate(int32 group_id, Client* exclude = 0, bool forceRaidUpdate = false);` +- `void GroupHardLock(const char* function = 0, int32 line = 0U) { MGroups.lock(); }` +- `void GroupLock(const char* function = 0, int32 line = 0U) { MGroups.lock_shared(); }` +- `void ReleaseGroupHardLock(const char* function = 0, int32 line = 0U) { MGroups.unlock(); }` +- `void ReleaseGroupLock(const char* function = 0, int32 line = 0U) { MGroups.unlock_shared(); }` +- `void ClearPendingInvite(Entity* member);` +- `std::string HasPendingInvite(Entity* member);` +- `void RemoveGroupBuffs(int32 group_id, Client* client);` +- `int32 GetGroupSize(int32 group_id);` +- `void SendGroupQuests(int32 group_id, Client* client);` +- `bool HasGroupCompletedQuest(int32 group_id, int32 quest_id);` +- `void SimpleGroupMessage(int32 group_id, const char* message);` +- `void SendGroupMessage(int32 group_id, int8 type, const char* message, ...);` +- `void GroupMessage(int32 group_id, const char* message, ...);` +- `void GroupChatMessage(int32 group_id, Spawn* from, int32 language, const char* message, int16 channel = CHANNEL_GROUP_SAY);` +- `void GroupChatMessage(int32 group_id, std::string fromName, int32 language, const char* message, int16 channel = CHANNEL_GROUP_SAY);` +- `void SendGroupChatMessage(int32 group_id, int16 channel, const char* message, ...);` +- `bool MakeLeader(int32 group_id, Entity* new_leader);` +- `void UpdateGroupBuffs();` +- `bool IsInGroup(int32 group_id, Entity* member);` +- `bool IsSpawnInGroup(int32 group_id, string name); // used in follow` +- `void UpdateGroupMemberInfoFromPeer(int32 group_id, std::string name, bool is_client, GroupMemberInfo* updateinfo);` +- `void SendPeerGroupData(std::string peerId);` +- `void ClearGroupRaid(int32 groupID);` +- `void RemoveGroupFromRaid(int32 groupID, int32 targetGroupID);` +- `bool IsInRaidGroup(int32 groupID, int32 targetGroupID, bool isLeaderGroup = false);` +- `bool GetDefaultGroupOptions(int32 group_id, GroupOptions* options);` +- `void GetRaidGroups(int32 group_id, std::vector* groups);` +- `void ReplaceRaidGroups(int32 groupID, std::vector* newGroups);` +- `void SetGroupOptions(int32 groupID, GroupOptions* options);` +- `void SendWhoGroupMembers(Client* client, int32 groupID);` +- `void SendWhoRaidMembers(Client* client, int32 groupID);` +- `int8 AcceptRaidInvite(std::string acceptorName, int32 groupID);` +- `bool SendRaidInvite(Client* sender, Entity* target);` +- `void SplitWithGroupOrRaid(Client* client, int32 coin_plat, int32 coin_gold, int32 coin_silver, int32 coin_copper);` +- `bool IdentifyMemberInGroupOrRaid(ZoneChangeDetails* details, Client* client, int32 zoneID, int32 instanceID = 0);` +- `void ClearGroupRaidLooterFlag(int32 groupID);` +- `void EstablishRaidLevelRange(Client* client, int32* min_level, int32* max_level, int32* avg_level, int32* first_level);` + +## Notable Comments + +- /* +- */ +- // GroupOptions isn't used yet +- /// All the generic info for the group window, plus a client pointer for players +- /// Represents a players group in game +- /// Adds a new member to the players group +- /// Entity to add to the group, can be a Player or NPC +- /// True if the member was added +- /// Removes a member from the players group +- /// Entity to remove from the player group diff --git a/docs/code/Quests.md b/docs/code/Quests.md new file mode 100644 index 0000000..9e36327 --- /dev/null +++ b/docs/code/Quests.md @@ -0,0 +1,191 @@ +# File: `Quests.h` + +## Classes + +- `QuestFactionPrereq` +- `Location` +- `QuestStep` +- `Player` +- `Spell` +- `Quest` +- `MasterQuestList` + +## Functions + +- `bool CheckStepKillRaceReqUpdate(Spawn* spawn);` +- `bool CheckStepReferencedID(int32 id);` +- `bool CheckStepLocationUpdate(float char_x, float char_y, float char_z, int32 zone_id);` +- `int32 AddStepProgress(int32 val);` +- `void SetStepProgress(int32 val);` +- `int32 GetStepProgress();` +- `int8 GetStepType();` +- `bool Complete();` +- `void SetComplete();` +- `void ResetTaskGroup();` +- `void SetDescription(string desc);` +- `int16 GetQuestCurrentQuantity();` +- `int16 GetQuestNeededQuantity();` +- `int16 GetIcon();` +- `void SetIcon(int16 in_icon);` +- `void SetUpdateTargetName(const char* name);` +- `void SetUpdateName(const char* name);` +- `int32 GetStepID();` +- `int32 GetItemID();` +- `bool WasUpdated();` +- `void WasUpdated(bool val);` +- `float GetPercentage();` +- `void SetTaskGroup(string val) { task_group = val; }` +- `void RegisterQuest(string in_name, string in_type, string in_zone, int8 in_level, string in_desc);` +- `void SetPrereqLevel(int8 lvl);` +- `void SetPrereqTSLevel(int8 lvl);` +- `void SetPrereqMaxLevel(int8 lvl) {prereq_max_level = lvl;}` +- `void SetPrereqMaxTSLevel(int8 lvl) {prereq_max_tslevel = lvl;}` +- `void AddPrereqClass(int8 class_id);` +- `void AddPrereqTradeskillClass(int8 class_id);` +- `void AddPrereqModelType(int16 model_type);` +- `void AddPrereqRace(int8 race);` +- `void AddPrereqQuest(int32 quest_id);` +- `void AddPrereqFaction(int32 faction_id, sint32 min, sint32 max = 0);` +- `void AddPrereqItem(Item* item);` +- `void AddRewardItem(Item* item);` +- `void AddTmpRewardItem(Item* item);` +- `void GetTmpRewardItemsByID(std::vector* items);` +- `void AddRewardItemVec(vector* items, Item* item, bool combine_items = true);` +- `void AddSelectableRewardItem(Item* item);` +- `void AddRewardCoins(int32 copper, int32 silver, int32 gold, int32 plat);` +- `void AddRewardCoinsMax(int64 coins);` +- `void AddRewardFaction(int32 faction_id, sint32 amount);` +- `void SetRewardStatus(int32 amount);` +- `void SetRewardComment(string comment);` +- `void SetRewardXP(int32 xp);` +- `void SetRewardTSXP(int32 xp) { reward_tsexp = xp; }` +- `bool AddQuestStep(QuestStep* step);` +- `bool SetStepComplete(int32 step);` +- `bool AddStepProgress(int32 step_id, int32 progress);` +- `int16 GetQuestStep();` +- `int32 GetStepProgress(int32 step_id);` +- `int16 GetTaskGroupStep();` +- `bool QuestStepIsActive(int16 quest_step_id);` +- `bool CheckQuestReferencedSpawns(Spawn* spawn);` +- `bool CheckQuestKillUpdate(Spawn* spawn, bool update = true);` +- `bool CheckQuestChatUpdate(int32 id, bool update = true);` +- `bool CheckQuestItemUpdate(int32 id, int8 quantity = 1);` +- `bool CheckQuestLocationUpdate(float char_x, float char_y, float char_z, int32 zone_id);` +- `bool CheckQuestSpellUpdate(Spell* spell);` +- `bool CheckQuestRefIDUpdate(int32 id, int32 quantity = 1);` +- `int8 GetQuestLevel();` +- `int8 GetVisible();` +- `int32 GetQuestID();` +- `void SetQuestID(int32 in_id);` +- `int8 GetPrereqLevel();` +- `int8 GetPrereqTSLevel();` +- `int8 GetPrereqMaxLevel() {return prereq_max_level;}` +- `int8 GetPrereqMaxTSLevel() {return prereq_max_tslevel;}` +- `void GiveQuestReward(Player* player);` +- `void AddCompleteAction(int32 step, string action);` +- `void AddProgressAction(int32 step, string action);` +- `void SetName(string in_name);` +- `void SetType(string in_type);` +- `void SetLevel(int8 in_level);` +- `void SetEncounterLevel(int8 level) {enc_level = level;}` +- `void SetDescription(string desc);` +- `void SetStepDescription(int32 step, string desc);` +- `void SetTaskGroupDescription(int32 step, string desc, bool display_bullets);` +- `void SetStatusTmpReward(int32 status) { tmp_reward_status = status; }` +- `int64 GetStatusTmpReward() { return tmp_reward_status; }` +- `void SetCoinTmpReward(int64 coins) { tmp_reward_coins = coins; }` +- `int64 GetCoinTmpReward() { return tmp_reward_coins; }` +- `int64 GetCoinsReward();` +- `int64 GetCoinsRewardMax();` +- `int64 GetGeneratedCoin();` +- `void SetGeneratedCoin(int64 coin);` +- `int8 GetLevel();` +- `int8 GetEncounterLevel() { return enc_level; }` +- `void SetZone(string in_zone);` +- `int8 GetDay();` +- `int8 GetMonth();` +- `int8 GetYear();` +- `int32 GetStatusPoints();` +- `void SetDay(int8 value);` +- `void SetMonth(int8 value);` +- `void SetYear(int8 value);` +- `bool GetQuestStepCompleted(int32 step_id);` +- `void SetCompleteAction(string action);` +- `void SetQuestGiver(int32 id);` +- `int32 GetQuestGiver();` +- `void SetQuestReturnNPC(int32 id);` +- `int32 GetQuestReturnNPC();` +- `void SetPlayer(Player* in_player);` +- `bool GetCompleted();` +- `bool HasSentLastUpdate() { return has_sent_last_update; }` +- `void SetSentLastUpdate(bool val) { has_sent_last_update = val; }` +- `void SetCompletedDescription(string desc);` +- `int32 GetExpReward();` +- `int32 GetTSExpReward() { return reward_tsexp; }` +- `bool GetDeleted();` +- `void SetDeleted(bool val);` +- `bool GetUpdateRequired();` +- `void SetUpdateRequired(bool val);` +- `void SetTurnedIn(bool val);` +- `bool GetTurnedIn();` +- `bool GetSaveNeeded(){ return needs_save; }` +- `void SetSaveNeeded(bool val){ needs_save = val; }` +- `void SetFeatherColor(int8 val) { m_featherColor = val; }` +- `int8 GetFeatherColor() { return m_featherColor; }` +- `void SetRepeatable(bool val) { m_repeatable = val; }` +- `bool IsRepeatable() { return m_repeatable; }` +- `void SetTracked(bool val) { m_tracked = val; }` +- `bool GetTracked() { return m_tracked; }` +- `bool IsTracked() { return m_tracked && !m_hidden; }` +- `void SetCompletedFlag(bool val);` +- `bool GetCompletedFlag() {return completed_flag;}` +- `bool GetYellowName() {return yellow_name;}` +- `void SetYellowName(bool val) {yellow_name = val;}` +- `bool CheckCategoryYellow();` +- `void SetQuestFlags(int32 flags) { m_questFlags = flags; SetSaveNeeded(true); }` +- `int32 GetQuestFlags() { return m_questFlags; }` +- `bool IsHidden() { return m_hidden; }` +- `void SetHidden(bool val) { m_hidden = val; SetSaveNeeded(true); }` +- `void SetStatusEarned(int32 status_) { m_status = status_; SetSaveNeeded(true); }` +- `int32 GetStatusEarned() { return m_status; }` +- `int32 GetStepTimer() { return m_timestamp; }` +- `void SetStepTimer(int32 duration);` +- `void SetTimerStep(int32 step) { m_timerStep = step; }` +- `int32 GetTimerStep() { return m_timerStep; }` +- `void AddFailedAction(int32 step, string action);` +- `void StepFailed(int32 step);` +- `bool RemoveQuestStep(int32 step, Client* client);` +- `int16 GetCompleteCount() { return m_completeCount; }` +- `void SetCompleteCount(int16 val) { m_completeCount = val; }` +- `void IncrementCompleteCount() { m_completeCount += 1; }` +- `void SetQuestTemporaryState(bool tempState, std::string customDescription = string(""));` +- `bool GetQuestTemporaryState() { return quest_state_temporary; }` +- `std::string GetQuestTemporaryDescription() { return quest_temporary_description; }` +- `void SetQuestShareableFlag(int32 flag) { quest_shareable_flag = flag; }` +- `void SetCanDeleteQuest(bool newval) { can_delete_quest = newval; }` +- `void SetHideReward(bool newval) { hide_reward = newval; }` +- `void SetStatusToEarnMin(int32 value_) { status_to_earn_min = value_; }` +- `void SetStatusToEarnMax(int32 value_) { status_to_earn_max = value_; }` +- `int32 GetStatusToEarnMin() { return status_to_earn_min; }` +- `int32 GetStatusToEarnMax() { return status_to_earn_max; }` +- `int32 GetQuestShareableFlag() { return quest_shareable_flag; }` +- `bool CanDeleteQuest() { return can_delete_quest; }` +- `bool GetHideReward() { return hide_reward; }` +- `bool CanShareQuestCriteria(Client* quest_sharer, bool display_client_msg = true);` +- `void AddQuest(int32 id, Quest* quest){` +- `void Reload();` +- `void LockQuests();` +- `void UnlockQuests();` + +## Notable Comments + +- /* +- */ +- ///Sets the custom flags for use in lua +- ///Value to set the flags to +- ///Gets the custom lua flags +- ///The current flags (int32) +- ///Checks to see if the quest is hidden +- ///True if the quest is hidden +- ///Sets the quest hidden flag +- ///Value to set the hidden flag to diff --git a/docs/code/RC4.md b/docs/code/RC4.md new file mode 100644 index 0000000..326197f --- /dev/null +++ b/docs/code/RC4.md @@ -0,0 +1,15 @@ +# File: `RC4.h` + +## Classes + +- `RC4` + +## Functions + +- `void Init(int64 nKey);` +- `void Cypher(uchar* pData, int32 nLen);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/RaceTypes.md b/docs/code/RaceTypes.md new file mode 100644 index 0000000..a0763dd --- /dev/null +++ b/docs/code/RaceTypes.md @@ -0,0 +1,25 @@ +# File: `RaceTypes.h` + +## Classes + +- `RaceTypeStructure` +- `MasterRaceTypeList` + +## Functions + +- `bool AddRaceType(int16 model_id, int16 race_type_id, const char* category, const char* subcategory, const char* modelname, bool allow_override = false);` +- `int16 GetRaceType(int16 model_id);` +- `int16 GetRaceBaseType(int16 model_id);` + +## Notable Comments + +- */ +- //FLYINGSNAKE Defined in natural as well, think is a better fit there then here +- /// Add a race type define to the list +- /// The id of the model +- /// The id of the race type +- /// The category of the race type +- /// The subcategory of the race type +- /// The model name of the model id +- /// Gets the race type for the given model +- /// The model id to get the race type for diff --git a/docs/code/RaceTypesDB.md b/docs/code/RaceTypesDB.md new file mode 100644 index 0000000..35013a9 --- /dev/null +++ b/docs/code/RaceTypesDB.md @@ -0,0 +1,14 @@ +# File: `RaceTypesDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadRaceTypes() {` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/Recipe.md b/docs/code/Recipe.md new file mode 100644 index 0000000..7d7cf57 --- /dev/null +++ b/docs/code/Recipe.md @@ -0,0 +1,108 @@ +# File: `Recipe.h` + +## Classes + +- `Item` +- `RecipeComp` +- `RecipeProducts` +- `Recipe` +- `MasterRecipeList` +- `MasterRecipeBookList` +- `PlayerRecipeList` +- `PlayerRecipeBookList` + +## Functions + +- `void SetID(int32 id) {this->id = id;}` +- `void SetSoeID(int32 soe_id) { this->soe_id = soe_id; }` +- `void SetBookID(int32 book_id) {this->book_id = book_id;}` +- `void SetName(const char *name) {strncpy(this->name, name, sizeof(this->name));}` +- `void SetDescription(const char* description) { strncpy(this->description, description, sizeof(this->description)); }` +- `void SetBookName(const char *book_name) {strncpy(this->book_name, book_name, sizeof(this->book_name));}` +- `void SetBook(const char *book) {strncpy(this->book, book, sizeof(this->book));}` +- `void SetDevice(const char *device) {strncpy(this->device, device, sizeof(this->device));}` +- `void SetLevel(int8 level) {this->level = level;}` +- `void SetTier(int8 tier) {this->tier = tier;}` +- `void SetIcon(int16 icon) {this->icon = icon;}` +- `void SetSkill(int32 skill) {this->skill = skill;}` +- `void SetTechnique(int32 technique) {this->technique = technique;}` +- `void SetKnowledge(int32 knowledge) {this->knowledge = knowledge;}` +- `void SetClasses(int32 classes) {this->classes = classes;}` +- `void SetDevice_Sub_Type(int8 device_sub_type) {this->device_sub_type = device_sub_type;}` +- `void SetUnknown1(int8 unknown1) {this->unknown1 = unknown1;}` +- `void SetUnknown2(int32 unknown2) {this->unknown2 = unknown2;}` +- `void SetUnknown3(int32 unknown3) {this->unknown3 = unknown3;}` +- `void SetUnknown4(int32 unknown4) {this->unknown4 = unknown4;}` +- `void SetProductID(int32 itemID) { product_item_id = itemID; }` +- `void SetProductQuantity(int8 qty) { product_qty = qty; }` +- `void SetProductName(const char* productName) { strncpy(product_name, productName, sizeof(product_name)); }` +- `void SetBuild1ComponentTitle(const char* title) { strncpy(build1_comp_title, title, sizeof(build1_comp_title)); }` +- `void SetBuild2ComponentTitle(const char* title) { strncpy(build2_comp_title, title, sizeof(build2_comp_title)); }` +- `void SetBuild3ComponentTitle(const char* title) { strncpy(build3_comp_title, title, sizeof(build3_comp_title)); }` +- `void SetBuild4ComponentTitle(const char* title) { strncpy(build4_comp_title, title, sizeof(build4_comp_title)); }` +- `void SetFuelComponentTitle(const char* title) { strncpy(fuel_comp_title, title, sizeof(fuel_comp_title)); }` +- `void SetPrimaryComponentTitle(const char* title) { strncpy(primary_build_comp_title, title, sizeof(primary_build_comp_title)); }` +- `void SetBuild1ComponentQuantity(int8 qty) { build1_comp_qty = qty; }` +- `void SetBuild2ComponentQuantity(int8 qty) { build2_comp_qty = qty; }` +- `void SetBuild3ComponentQuantity(int8 qty) { build3_comp_qty = qty; }` +- `void SetBuild4ComponentQuantity(int8 qty) { build4_comp_qty = qty; }` +- `void SetFuelComponentQuantity(int8 qty) { fuel_comp_qty = qty; }` +- `void SetPrimaryComponentQuantity(int8 qty) { primary_comp_qty = qty; }` +- `int32 GetID() {return id;}` +- `int32 GetSoeID() { return soe_id; }` +- `int32 GetBookID() {return book_id;}` +- `int8 GetLevel() {return level;}` +- `int8 GetTier() {return tier;}` +- `int16 GetIcon() {return icon;}` +- `int32 GetSkill() {return skill;}` +- `int32 GetTechnique() {return technique;}` +- `int32 GetKnowledge() {return knowledge;}` +- `int32 GetClasses() {return classes;}` +- `bool CanUseRecipeByClass(Item* item, int8 class_id) {` +- `int8 GetDevice_Sub_Type() {return device_sub_type;}` +- `int8 GetUnknown1() {return unknown1;}` +- `int32 GetUnknown2() {return unknown2;}` +- `int32 GetUnknown3() {return unknown3;}` +- `int32 GetUnknown4() {return unknown4;}` +- `int32 GetProductID() { return product_item_id; }` +- `int8 GetProductQuantity() { return product_qty; }` +- `int16 GetBuild1ComponentQuantity() { return build1_comp_qty; }` +- `int16 GetBuild2ComponentQuantity() { return build2_comp_qty; }` +- `int16 GetBuild3ComponentQuantity() { return build3_comp_qty; }` +- `int16 GetBuild4ComponentQuantity() { return build4_comp_qty; }` +- `int16 GetFuelComponentQuantity() { return fuel_comp_qty; }` +- `int16 GetPrimaryComponentQuantity() { return primary_comp_qty; }` +- `void AddBuildComp(int32 itemID, int8 slot, bool preferred = 0);` +- `int8 GetHighestStage() { return highestStage; }` +- `void SetHighestStage(int8 val) { highestStage = val; }` +- `int8 GetTotalBuildComponents();` +- `bool ProvidedAllRequiredComponents(Client* client, vector* player_components, vector>* player_component_pair_qty);` +- `bool PlayerHasComponentByItemID(Client* client, vector* player_components, vector>* player_component_pair_qty, int32 item_id, int8 required_qty);` +- `int8 GetItemRequiredQuantity(int32 item_id);` +- `bool AddRecipe(Recipe *recipe);` +- `void ClearRecipes();` +- `int32 Size();` +- `bool AddRecipeBook(Recipe *recipe);` +- `void ClearRecipeBooks();` +- `int32 Size();` +- `bool AddRecipe(Recipe *recipe);` +- `void ClearRecipes();` +- `bool RemoveRecipe(int32 recipe_id);` +- `int32 Size();` +- `bool AddRecipeBook(Recipe *recipe);` +- `bool HasRecipeBook(int32 book_id);` +- `void ClearRecipeBooks();` +- `int32 Size();` + +## Notable Comments + +- /* +- */ +- //class_id = classes.GetTSBaseClass(spawn->GetTradeskillClass()) bit-match on class ids 1-13 +- //secondary_class_id = classes.GetSecondaryTSBaseClass(spawn->GetTradeskillClass()) bit-match on class ids 1-13 +- //tertiary_class_id = spawn->GetTradeskillClass() (direct match) +- /* any can use bit combination of 1+2 +- */ +- ///Add a build component to this recipe +- ///Item id of the component +- ///Slot id for this component diff --git a/docs/code/RecipeDB.md b/docs/code/RecipeDB.md new file mode 100644 index 0000000..da1c527 --- /dev/null +++ b/docs/code/RecipeDB.md @@ -0,0 +1,29 @@ +# File: `RecipeDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadRecipes() {` +- `void WorldDatabase::LoadRecipeBooks(){` +- `void WorldDatabase::LoadPlayerRecipes(Player *player){` +- `int32 WorldDatabase::LoadPlayerRecipeBooks(int32 char_id, Player *player) {` +- `void WorldDatabase::SavePlayerRecipeBook(Player* player, int32 recipebook_id){` +- `void WorldDatabase::SavePlayerRecipe(Player* player, int32 recipe_id) {` +- `void WorldDatabase::LoadRecipeComponents() {` +- `void WorldDatabase::UpdatePlayerRecipe(Player* player, int32 recipe_id, int8 highest_stage) {` + +## Notable Comments + +- /* +- */ +- //Convert the device string +- //Products/By-Products +- //Advance i past all the product info +- //i += 15; +- //if(query.GetErrorNumber() && query.GetError() && query.GetErrorNumber() < 0xFFFFFFFF) +- //LogWrite(TRADESKILL__ERROR, 0, "Recipes", "Error in SavePlayerRecipeBook query '%s' : %s", query.GetQuery(), query.GetError()); +- //if(query.GetErrorNumber() && query.GetError() && query.GetErrorNumber() < 0xFFFFFFFF) +- //LogWrite(TRADESKILL__ERROR, 0, "Recipes", "Error in SavePlayerRecipeBook query '%s' : %s", query.GetQuery(), query.GetError()); diff --git a/docs/code/Rules.md b/docs/code/Rules.md new file mode 100644 index 0000000..ca91941 --- /dev/null +++ b/docs/code/Rules.md @@ -0,0 +1,52 @@ +# File: `Rules.h` + +## Classes + +- `Rule` +- `RuleSet` +- `RuleManager` + +## Functions + +- `void SetValue(const char *value) {strncpy(this->value, value, sizeof(this->value));}` +- `int32 GetCategory() {return category;}` +- `int32 GetType() {return type;}` +- `int8 GetInt8() {return (int8)atoul(value);}` +- `int16 GetInt16() {return (int16)atoul(value);}` +- `int32 GetInt32() {return (int32)atoul(value);}` +- `int64 GetInt64() {return (int64)atoi64(value);}` +- `sint8 GetSInt8() {return (sint8)atoi(value);}` +- `sint16 GetSInt16() {return (sint16)atoi(value);}` +- `sint32 GetSInt32() {return (sint32)atoi(value);}` +- `sint64 GetSInt64() {return (sint64)atoi64(value);}` +- `bool GetBool() {return atoul(value) > 0 ? true : false;}` +- `float GetFloat() {return atof(value);}` +- `char GetChar() {return value[0];}` +- `void CopyRulesInto(RuleSet *in_rule_set);` +- `void SetID(int32 id) {this->id = id;}` +- `void SetName(const char *name) {strncpy(this->name, name, sizeof(this->name));}` +- `int32 GetID() {return id;}` +- `void AddRule(Rule *rule);` +- `void ClearRules();` +- `void Init();` +- `void Flush(bool reinit=false);` +- `void LoadCodedDefaultsIntoRuleSet(RuleSet *rule_set);` +- `bool AddRuleSet(RuleSet *rule_set);` +- `int32 GetNumRuleSets();` +- `void ClearRuleSets();` +- `bool SetGlobalRuleSet(int32 rule_set_id);` +- `bool SetZoneRuleSet(int32 zone_id, int32 rule_set_id);` +- `void ClearZoneRuleSets();` + +## Notable Comments + +- /* +- */ +- /* CLIENT */ +- /* FACTION */ +- /* GUILD */ +- /* PLAYER */ +- /* PVP */ +- /* COMBAT */ +- /* SPAWN */ +- //SpeedRatio, diff --git a/docs/code/RulesDB.md b/docs/code/RulesDB.md new file mode 100644 index 0000000..b21bfd4 --- /dev/null +++ b/docs/code/RulesDB.md @@ -0,0 +1,18 @@ +# File: `RulesDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadGlobalRuleSet() {` +- `else if(rule_set_id == 0)` +- `void WorldDatabase::LoadRuleSets(bool reload) {` +- `void WorldDatabase::LoadRuleSetDetails(RuleSet *rule_set) {` + +## Notable Comments + +- /* +- */ +- /* first load the coded defaults in */ diff --git a/docs/code/Sign.md b/docs/code/Sign.md new file mode 100644 index 0000000..7bbc3b0 --- /dev/null +++ b/docs/code/Sign.md @@ -0,0 +1,46 @@ +# File: `Sign.h` + +## Classes + +- `Sign` + +## Functions + +- `bool IsSign(){ return true; }` +- `int32 GetWidgetID();` +- `void SetWidgetID(int32 val);` +- `void SetWidgetX(float val);` +- `float GetWidgetX();` +- `void SetWidgetY(float val);` +- `float GetWidgetY();` +- `void SetWidgetZ(float val);` +- `float GetWidgetZ();` +- `void SetSignIcon(int8 val);` +- `void HandleUse(Client* client, string command);` +- `int8 GetSignType();` +- `void SetSignType(int8 val);` +- `float GetSignZoneX();` +- `void SetSignZoneX(float val);` +- `float GetSignZoneY();` +- `void SetSignZoneY(float val);` +- `float GetSignZoneZ();` +- `void SetSignZoneZ(float val);` +- `float GetSignZoneHeading();` +- `void SetSignZoneHeading(float val);` +- `float GetSignDistance();` +- `void SetSignDistance(float val);` +- `int32 GetSignZoneID();` +- `void SetSignZoneID(int32 val);` +- `void SetSignTitle(const char* val);` +- `void SetSignDescription(const char* val);` +- `void SetIncludeLocation(bool val);` +- `bool GetIncludeLocation();` +- `void SetIncludeHeading(bool val);` +- `bool GetIncludeHeading();` +- `void SetLanguage(int8 in_language) { language = in_language; }` +- `int8 GetLanguage() { return language; }` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/Skills.md b/docs/code/Skills.md new file mode 100644 index 0000000..a73f0b6 --- /dev/null +++ b/docs/code/Skills.md @@ -0,0 +1,49 @@ +# File: `Skills.h` + +## Classes + +- `SkillBonusValue` +- `SkillBonus` +- `Skill` +- `MasterSkillList` +- `PlayerSkillList` + +## Functions + +- `int CheckDisarmSkill(int16 targetLevel, int8 chest_difficulty=0);` +- `void AddSkill(Skill* skill);` +- `int16 GetSkillCount();` +- `void RemoveSkill(Skill* skill);` +- `void AddSkill(Skill* new_skill);` +- `bool CheckSkillIncrease(Skill* skill);` +- `bool HasSkill(int32 skill_id);` +- `void IncreaseSkill(Skill* skill, int16 amount);` +- `void IncreaseSkill(int32 skill_id, int16 amount);` +- `void DecreaseSkill(Skill* skill, int16 amount);` +- `void DecreaseSkill(int32 skill_id, int16 amount);` +- `void SetSkill(Skill* skill, int16 value, bool send_update = true);` +- `void SetSkill(int32 skill_id, int16 value, bool send_update = true);` +- `void IncreaseSkillCap(Skill* skill, int16 amount);` +- `void IncreaseSkillCap(int32 skill_id, int16 amount);` +- `void DecreaseSkillCap(Skill* skill, int16 amount);` +- `void DecreaseSkillCap(int32 skill_id, int16 amount);` +- `void SetSkillCap(Skill* skill, int16 value);` +- `void SetSkillCap(int32 skill_id, int16 value);` +- `void IncreaseAllSkillCaps(int16 value);` +- `void IncreaseSkillCapsByType(int8 type, int16 value);` +- `void SetSkillCapsByType(int8 type, int16 value);` +- `void SetSkillValuesByType(int8 type, int16 value, bool send_update = true);` +- `void AddSkillUpdateNeeded(Skill* skill);` +- `void AddSkillBonus(int32 spell_id, int32 skill_id, float value);` +- `void RemoveSkillBonus(int32 spell_id);` +- `int16 CalculateSkillValue(int32 skill_id, int16 current_val);` +- `int16 CalculateSkillMaxValue(int32 skill_id, int16 max_val);` +- `bool HasSkillUpdates();` +- `void ResetPackets();` + +## Notable Comments + +- /* +- */ +- //the following update the current_value to the max_value as soon as the max_value is updated +- /* Each SkillBonus is comprised of multiple possible skill bonus values. This is so one spell can modify diff --git a/docs/code/Spawn.md b/docs/code/Spawn.md new file mode 100644 index 0000000..8a82d85 --- /dev/null +++ b/docs/code/Spawn.md @@ -0,0 +1,452 @@ +# File: `Spawn.h` + +## Classes + +- `Spell` +- `ZoneServer` +- `Quest` +- `LUAHistory` +- `Cell` +- `CellInfo` +- `MovementData` +- `BasicInfoStruct` +- `MovementLocation` +- `SpawnUpdate` +- `SpawnData` +- `TimedGridData` +- `Spawn` +- `SpawnProximity` + +## Functions + +- `void AddChangedZoneSpawn();` +- `void AddPrimaryEntityCommand(const char* name, float distance, const char* command, const char* error_text, int16 cast_time, int32 spell_visual, bool defaultDenyList = false, Player* player = NULL);` +- `void RemovePrimaryEntityCommand(const char* command);` +- `bool SetPermissionToEntityCommand(EntityCommand* command, Player* player, bool permissionValue);` +- `bool SetPermissionToEntityCommandByCharID(EntityCommand* command, int32 charID, bool permissionValue);` +- `void RemoveSpawnFromPlayer(Player* player);` +- `void AddSecondaryEntityCommand(const char* name, float distance, const char* command, const char* error_text, int16 cast_time, int32 spell_visual){` +- `int8 GetLockedNoLoot(){` +- `int16 GetEmoteState(){` +- `int8 GetHideHood(){` +- `void SetLockedNoLoot(int8 new_val, bool updateFlags = true){` +- `void SetHandFlag(int8 new_val, bool updateFlags = true){` +- `void SetHideHood(int8 new_val, bool updateFlags = true){` +- `void SetEmoteState(int8 new_val, bool updateFlags = true){` +- `void SetName(const char* new_name, bool updateFlags = true){` +- `void SetPrefixTitle(const char* new_prefix_title, bool updateFlags = true) {` +- `void SetSuffixTitle(const char* new_suffix_title, bool updateFlags = true) {` +- `void SetSubTitle(const char* new_sub_title, bool updateFlags = true) {` +- `void SetLastName(const char* new_last_name, bool updateFlags = true) {` +- `void SetAdventureClass(int8 new_class, bool updateFlags = true) {` +- `void SetTradeskillClass(int8 new_class, bool updateFlags = true) {` +- `void SetSize(int16 new_size, bool updateFlags = true) {` +- `void SetSpeedX(float speed_x, bool updateFlags = true) {` +- `void SetSpeedY(float speed_y, bool updateFlags = true) {` +- `void SetSpeedZ(float speed_z, bool updateFlags = true) {` +- `void SetX(float x, bool updateFlags = true){` +- `void SetY(float y, bool updateFlags = true, bool disableYMapFix = false);` +- `void SetZ(float z, bool updateFlags = true){` +- `void SetHeading(sint16 dir1, sint16 dir2, bool updateFlags = true){` +- `void SetHeading(float heading, bool updateFlags = true){` +- `void SetPitch(sint16 pitch1, sint16 pitch2, bool updateFlags = true){` +- `void SetPitch(float pitch, bool updateFlags = true){` +- `void SetRoll(float roll, bool updateFlags = true){` +- `else if (roll != 180)` +- `void SetVisualState(int16 state, bool updateFlags = true){` +- `void SetActionState(int16 state, bool updateFlags = true){` +- `void SetMoodState(int16 state, bool updateFlags = true){` +- `void SetInitialState(int16 state, bool updateFlags = true){` +- `void SetActivityStatus(int16 state, bool updateFlags = true){` +- `void SetCollisionRadius(int32 radius, bool updateFlags = true){` +- `int16 GetCollisionRadius(){` +- `int16 GetVisualState(){` +- `int16 GetActionState(){` +- `int16 GetMoodState(){` +- `int16 GetInitialState(){` +- `int16 GetActivityStatus(){` +- `int32 GetPrimaryCommandListID(){` +- `int32 GetSecondaryCommandListID(){` +- `void SetID(int32 in_id){` +- `void SetDifficulty(int8 difficulty, bool setUpdateFlags = true){` +- `void SetTSLevel(int16 tradeskill_level, bool setUpdateFlags = true){` +- `void SetGender(int8 gender, bool setUpdateFlags = true){` +- `void SetShowName(int8 new_val, bool setUpdateFlags = true){` +- `void SetShowLevel(int8 new_val, bool setUpdateFlags = true){` +- `void SetHeroic(int8 new_val, bool setUpdateFlags = true){` +- `void SetTargetable(int8 new_val, bool setUpdateFlags = true){` +- `void SetShowCommandIcon(int8 new_val, bool setUpdateFlags = true){` +- `void SetShowHandIcon(int8 new_val, bool setUpdateFlags = true){` +- `void SetAttackable(int8 new_val, bool setUpdateFlags = true){` +- `void SetLocation(int32 id, bool setUpdateFlags = true);` +- `void SetRace(int8 race, bool setUpdateFlags = true){` +- `void SetIcon(int8 icon, bool setUpdateFlags = true){` +- `void AddIconValue(int8 val){` +- `void RemoveIconValue(int8 val){` +- `int8 GetIconValue(){` +- `void SetSpawnType(int8 new_type){` +- `int8 GetSpawnType(){` +- `void SetDatabaseID(int32 new_id){` +- `int32 GetDatabaseID(){` +- `int8 GetShowHandIcon(){` +- `int32 GetLocation(){` +- `int8 GetAttackable(){` +- `int8 GetShowName(){` +- `int8 GetShowLevel(){` +- `int8 GetHeroic(){` +- `int8 GetTargetable(){` +- `int8 GetShowCommandIcon(){` +- `int8 GetAdventureClass() {` +- `int8 GetTradeskillClass() {` +- `float GetDestinationX(){` +- `float GetX() {` +- `float GetSpeedX() {` +- `float GetSpeedY() {` +- `float GetSpeedZ() {` +- `float GetDestinationY(){` +- `float GetY(){` +- `float GetDestinationZ(){` +- `float GetZ(){` +- `float GetHeading(){` +- `float GetPitch(){` +- `float GetRoll(){` +- `int32 GetID(){` +- `float GetDistance(float x1, float y1, float z1, float x2, float y2, float z2);` +- `float GetDistance(float x, float y, float z, float radius, bool ignore_y = false);` +- `float GetDistance(float x, float y, float z, bool ignore_y = false);` +- `float GetDistance(Spawn* spawn, bool ignore_y = false, bool includeRadius=true);` +- `float GetDistance(Spawn* spawn, float x1, float y1, float z1, bool includeRadius=true);` +- `float CalculateRadius(Spawn* target);` +- `int8 GetDifficulty(){` +- `sint32 GetTotalPower();` +- `sint32 GetPower();` +- `sint32 GetTotalHP();` +- `sint32 GetHP();` +- `sint32 GetTotalHPBase();` +- `sint32 GetTotalHPBaseInstance();` +- `sint32 GetTotalPowerBase();` +- `sint32 GetTotalPowerBaseInstance();` +- `float GetHPRatio() { return GetHP() == 0 || GetTotalHP() == 0 ? 0 : ((float) GetHP() / GetTotalHP() * 100); }` +- `int GetIntHPRatio() { return GetTotalHP() == 0 ? 0 : static_cast(GetHPRatio()); }` +- `sint32 GetTotalSavagery();` +- `sint32 GetSavagery();` +- `sint32 GetTotalDissonance();` +- `sint32 GetDissonance();` +- `sint32 GetTotalSavageryBase();` +- `sint32 GetTotalDissonanceBase();` +- `sint16 GetAssignedAA();` +- `sint16 GetUnassignedAA();` +- `sint16 GetTradeskillAA();` +- `sint16 GetUnassignedTradeskillAA();` +- `sint16 GetPrestigeAA();` +- `sint16 GetUnassignedPretigeAA();` +- `sint16 GetTradeskillPrestigeAA();` +- `sint16 GetUnassignedTradeskillPrestigeAA();` +- `int32 GetAAXPRewards();` +- `void SetTotalPower(sint32 new_val);` +- `void SetTotalHP(sint32 new_val);` +- `void SetTotalSavagery(sint32 new_val);` +- `void SetTotalDissonance(sint32 new_val);` +- `void SetTotalPowerBase(sint32 new_val);` +- `void SetTotalPowerBaseInstance(sint32 new_val);` +- `void SetTotalHPBase(sint32 new_val);` +- `void SetTotalHPBaseInstance(sint32 new_val);` +- `void SetTotalSavageryBase(sint32 new_val);` +- `void SetTotalDissonanceBase(sint32 new_val);` +- `void SetPower(sint32 power, bool setUpdateFlags = true);` +- `void SetHP(sint32 new_val, bool setUpdateFlags = true);` +- `void SetSavagery(sint32 savagery, bool setUpdateFlags = true);` +- `void SetDissonance(sint32 dissonance, bool setUpdateFlags = true);` +- `void SetAssignedAA(sint16 new_val);` +- `void SetUnassignedAA(sint16 new_val);` +- `void SetTradeskillAA(sint16 new_val);` +- `void SetUnassignedTradeskillAA(sint16 new_val);` +- `void SetPrestigeAA(sint16 new_val);` +- `void SetUnassignedPrestigeAA(sint16 new_val);` +- `void SetTradeskillPrestigeAA(sint16 new_val);` +- `void SetUnassignedTradeskillPrestigeAA(sint16 new_val);` +- `void SetAAXPRewards(int32 amount);` +- `void SetPrivateQuestSpawn(bool val) {req_quests_private = val;}` +- `void SetQuestsRequiredOverride(int16 val) {req_quests_override = val;}` +- `void SetQuestsRequiredContinuedAccess(bool val) {req_quests_continued_access = val;}` +- `bool GetPrivateQuestSpawn() {return req_quests_private;}` +- `int16 GetQuestsRequiredOverride() {return req_quests_override;}` +- `bool GetQuestsRequiredContinuedAccess() {return req_quests_continued_access;}` +- `bool Alive(){ return is_alive; }` +- `void SetAlive(bool val) { is_alive = val; }` +- `int16 GetLevel(){` +- `int16 GetTSLevel(){` +- `int8 GetGender(){` +- `int8 GetRace(){` +- `int32 GetSize(){` +- `int32 GetDeviation(){` +- `void SetDeviation(int32 in_dev){` +- `float GetSpawnOrigHeading(){` +- `void SetSpawnOrigHeading(float val){` +- `float GetSpawnOrigX(){` +- `float GetSpawnOrigY(){` +- `float GetSpawnOrigZ(){` +- `float GetSpawnOrigPitch(){` +- `float GetSpawnOrigRoll(){` +- `void SetSpawnOrigX(float val){` +- `void SetSpawnOrigY(float val){` +- `void SetSpawnOrigZ(float val){` +- `void SetSpawnOrigRoll(float val){` +- `void SetSpawnOrigPitch(float val){` +- `void SetSogaModelType(int16 new_val, bool setUpdateFlags = true){` +- `void SetModelType(int16 model_type, bool setUpdateFlags = true){` +- `int16 GetSogaModelType(){` +- `int16 GetModelType(){` +- `bool IsFlyingCreature();` +- `bool IsWaterCreature();` +- `bool InWater();` +- `bool InLava();` +- `void SetFlyingCreature();` +- `void SetWaterCreature();` +- `void SetPrimaryCommand(const char* name, const char* command, float distance = 10);` +- `void SetPrimaryCommands(vector* commands);` +- `void SetSecondaryCommands(vector* commands);` +- `bool HasInfoChanged(){ return info_changed; }` +- `bool HasPositionChanged(){ return position_changed; }` +- `bool HasTarget(){ return target ? true : false; }` +- `int32 GetRespawnTime();` +- `void SetRespawnTime(int32 time);` +- `sint32 GetRespawnOffsetLow();` +- `void SetRespawnOffsetLow(sint32 time);` +- `sint32 GetRespawnOffsetHigh();` +- `void SetRespawnOffsetHigh(sint32 time);` +- `bool DuplicatedSpawn() { return duplicated_spawn; }` +- `void SetDuplicateSpawn(bool val) { duplicated_spawn = val; }` +- `int32 GetExpireTime() { return expire_time; }` +- `void SetExpireTime(int32 new_expire_time) { expire_time = new_expire_time; }` +- `int32 GetExpireOffsetTime();` +- `void SetExpireOffsetTime(int32 time);` +- `int32 GetSpawnLocationID();` +- `void SetSpawnLocationID(int32 id);` +- `int32 GetSpawnEntryID();` +- `void SetSpawnEntryID(int32 id);` +- `int32 GetSpawnLocationPlacementID();` +- `void SetSpawnLocationPlacementID(int32 id);` +- `float GetXOffset() { return x_offset; }` +- `void SetXOffset(float new_x_offset) { x_offset = new_x_offset; }` +- `float GetYOffset() { return y_offset; }` +- `void SetYOffset(float new_y_offset) { y_offset = new_y_offset; }` +- `float GetZOffset() { return z_offset; }` +- `void SetZOffset(float new_z_offset) { z_offset = new_z_offset; }` +- `bool HasTrapTriggered() {` +- `int32 GetTrapState() {` +- `void SetChestDropTime() {` +- `void SetTrapTriggered(bool triggered, int32 state) {` +- `int32 GetChestDropTime() {` +- `int32 GetTrapOpenedTime() {` +- `void AddLootItem(int32 id, int16 charges = 1) {` +- `void AddLootItem(Item* item) {` +- `bool HasLoot() {` +- `void TransferLoot(Spawn* spawn);` +- `bool HasLootItemID(int32 id);` +- `int32 GetLootItemID();` +- `void LockLoot() {` +- `void UnlockLoot() {` +- `void ClearLoot() {` +- `int32 GetLootCount() {` +- `void ClearNonBodyLoot() {` +- `int32 GetLootCoins() {` +- `void SetLootCoins(int32 val, bool lockloot = true) {` +- `void AddLootCoins(int32 coins) {` +- `void SetTarget(Spawn* spawn);` +- `void SetLastAttacker(Spawn* spawn);` +- `bool TakeDamage(int32 damage);` +- `int32 GetZoneID();` +- `void SetFactionID(int32 val) { faction_id = val; }` +- `int32 GetFactionID(){` +- `else if ((next_id - 255) % 256 == 0) { //we dont want it to end in 255, it will confuse/crash the client` +- `return NextID();` +- `void AddProvidedQuest(int32 val){` +- `bool HasProvidedQuests(){` +- `void SetSpawnScript(string name);` +- `bool HasSpawnGroup();` +- `bool IsInSpawnGroup(Spawn* spawn);` +- `void UpdateEncounterState(int8 new_state);` +- `void CheckEncounterState(Entity* victim, bool test_auto_lock = false);` +- `void AddTargetToEncounter(Entity* entity);` +- `void SendSpawnChanges(bool val){ send_spawn_changes = val; }` +- `void SetSpawnGroupID(int32 id);` +- `int32 GetSpawnGroupID();` +- `void AddSpawnToGroup(Spawn* spawn);` +- `void SetSpawnGroupList(vector* list, Mutex* mutex);` +- `void RemoveSpawnFromGroup(bool erase_all = false, bool ignore_death = false);` +- `void SetRunningTo(Spawn* spawn){ running_to = spawn->GetID(); }` +- `void SetTempVisualState(int val, bool update = true) { SetInfo(&tmp_visual_state, val, update); }` +- `int GetTempVisualState(){ return tmp_visual_state; }` +- `void SetTempActionState(int val, bool update = true) { SetInfo(&tmp_action_state, val, update); }` +- `int GetTempActionState(){ return tmp_action_state; }` +- `void AddAllowAccessSpawn(Spawn* spawn){ allowed_access[spawn->GetID()] = 1; }` +- `void RemoveSpawnAccess(Spawn* spawn);` +- `bool IsPrivateSpawn(){ return allowed_access.size() > 0 ;}` +- `bool AllowedAccess(Spawn* spawn){ return allowed_access.count(spawn->GetID()) > 0; }` +- `void MakeSpawnPublic() { allowed_access.clear(); }` +- `void SetSizeOffset(int8 offset);` +- `int8 GetSizeOffset();` +- `void SetMerchantID(int32 val);` +- `int32 GetMerchantID();` +- `void SetMerchantType(int8 val);` +- `int8 GetMerchantType();` +- `void SetCollector(bool is_it) { is_collector = is_it; }` +- `bool IsCollector() { return is_collector; }` +- `void SetMerchantLevelRange(int32 minLvl = 0, int32 maxLvl = 0);` +- `bool IsClientInMerchantLevelRange(Client* ent, bool sendMessageIfDenied = true);` +- `int32 GetMerchantMinLevel();` +- `int32 GetMerchantMaxLevel();` +- `void SetQuestsRequired(Spawn* new_spawn);` +- `void SetQuestsRequired(int32 quest_id, int16 quest_step);` +- `bool HasQuestsRequired();` +- `bool HasHistoryRequired();` +- `void SetRequiredHistory(int32 event_id, int32 value1, int32 value2);` +- `void SetTransporterID(int32 id);` +- `int32 GetTransporterID();` +- `bool MeetsSpawnAccessRequirements(Player* player);` +- `void RemovePrimaryCommands();` +- `void InitializePosPacketData(Player* player, PacketStruct* packet, bool bSpawnUpdate = false);` +- `void InitializeInfoPacketData(Player* player, PacketStruct* packet);` +- `void InitializeVisPacketData(Player* player, PacketStruct* packet);` +- `void InitializeHeaderPacketData(Player* player, PacketStruct* packet, int16 index);` +- `void InitializeFooterPacketData(Player* player, PacketStruct* packet);` +- `void MoveToLocation(Spawn* spawn, float distance, bool immediate = true, bool isMappedLocation = false);` +- `void AddMovementLocation(float x, float y, float z, float speed, int16 delay, const char* lua_function, float heading, bool include_heading = false, bool use_nav_path = false);` +- `void ProcessMovement(bool isSpawnListLocked=false);` +- `void ResetMovement();` +- `bool ValidateRunning(bool lockMovementLocation, bool lockMovementLoop);` +- `bool IsRunning();` +- `void CalculateRunningLocation(bool stop = false);` +- `void RunToLocation(float x, float y, float z, float following_x = 0, float following_y = 0, float following_z = 0);` +- `void NewWaypointChange(MovementLocation* data);` +- `bool CalculateChange();` +- `void AddRunningLocation(float x, float y, float z, float speed, float distance_away = 0, bool attackable = true, bool finished_adding_locations = true, string lua_function = "", bool isMapped=false, bool useNavPath=false);` +- `bool RemoveRunningLocation();` +- `void ClearRunningLocations();` +- `void CopySpawnAppearance(Spawn* spawn);` +- `bool MovementInterrupted(){ return movement_interrupted; }` +- `void MovementInterrupted(bool val) { movement_interrupted = val; }` +- `bool NeedsToResumeMovement(){ return attack_resume_needed; }` +- `void NeedsToResumeMovement(bool val) { attack_resume_needed = val; }` +- `bool HasMovementLoop(){ return movement_loop.size() > 0; }` +- `bool HasMovementLocations() {` +- `float GetFaceTarget(float x, float z);` +- `void FaceTarget(float x, float z);` +- `void FaceTarget(Spawn* target, bool disable_action_state = true);` +- `void SetInvulnerable(bool val);` +- `bool GetInvulnerable();` +- `void SetScaredByStrongPlayers(bool val) { scared_by_strong_players = val; }` +- `bool IsScaredByStrongPlayers() { return scared_by_strong_players; }` +- `bool IsPet() { return is_pet; }` +- `void SetPet(bool val) { is_pet = val; }` +- `void SetFollowTarget(Spawn* spawn, int32 followDistance=0);` +- `void AddTempVariable(string var, string val);` +- `void AddTempVariable(string var, Spawn* val);` +- `void AddTempVariable(string var, ZoneServer* val);` +- `void AddTempVariable(string var, Quest* val);` +- `void AddTempVariable(string var, Item* val);` +- `string GetTempVariable(string var);` +- `int8 GetTempVariableType(string var);` +- `void DeleteTempVariable(string var);` +- `void SetIllusionModel(int16 val, bool setUpdateFlags = true) {` +- `int16 GetIllusionModel() { return m_illusionModel; }` +- `int32 GetSpawnAnim() { return m_spawnAnim; }` +- `void SetSpawnAnim(int32 value) { m_spawnAnim = value; }` +- `int32 GetAddedToWorldTimestamp() { return m_addedToWorldTimestamp; }` +- `void SetAddedToWorldTimestamp(int32 value) { m_addedToWorldTimestamp = value; }` +- `int16 GetSpawnAnimLeeway() { return m_spawnAnimLeeway; }` +- `void SetSpawnAnimLeeway(int16 value) { m_spawnAnimLeeway = value; }` +- `float FindDestGroundZ(glm::vec3 dest, float z_offset);` +- `float FindBestZ(glm::vec3 loc, glm::vec3* result=nullptr, int32* new_grid_id=nullptr, int32* new_widget_id=nullptr);` +- `float GetFixedZ(const glm::vec3& destination, int32 z_find_offset = 1);` +- `void FixZ(bool forceUpdate=false);` +- `bool CheckLoS(Spawn* target);` +- `bool CheckLoS(glm::vec3 myloc, glm::vec3 oloc);` +- `void CalculateNewFearpoint();` +- `void AddSpawnToProximity(int32 spawnValue, SpawnProximityType type);` +- `void RemoveSpawnFromProximity(int32 spawnValue, SpawnProximityType type);` +- `void RemoveSpawnProximities() {` +- `void SetPickupItemID(int32 itemid)` +- `void SetPickupUniqueItemID(int32 uniqueid)` +- `int32 GetPickupItemID() { return pickup_item_id; }` +- `int32 GetPickupUniqueItemID() { return pickup_unique_item_id; }` +- `bool IsSoundsDisabled() { return disable_sounds; }` +- `void SetSoundsDisabled(bool val) { disable_sounds = val; }` +- `void DeleteRegion(Region_Node* inNode, ZBSP_Node* rootNode);` +- `bool InRegion(Region_Node* inNode, ZBSP_Node* rootNode);` +- `int32 GetRegionType(Region_Node* inNode, ZBSP_Node* rootNode);` +- `float SpawnAngle(Spawn* target, float selfx, float selfz);` +- `bool BehindSpawn(Spawn *target, float selfx, float selfz)` +- `bool InFrontSpawn(Spawn *target, float selfx, float selfz)` +- `bool IsFlankingSpawn(Spawn *target, float selfx, float selfz)` +- `bool IsTransportSpawn() { return is_transport_spawn; }` +- `void SetTransportSpawn(bool val) { is_transport_spawn = val; }` +- `sint64 GetRailID() { return rail_id; }` +- `void SetRailID(sint64 val) { rail_id = val; }` +- `void AddRailPassenger(int32 char_id);` +- `void RemoveRailPassenger(int32 char_id);` +- `void SetAppearancePosition(float x, float y, float z);` +- `void SetOmittedByDBFlag(bool val) { is_omitted_by_db_flag = val; }` +- `bool IsOmittedByDBFlag() { return is_omitted_by_db_flag; }` +- `int32 GetLootTier() { return loot_tier; }` +- `void SetLootTier(int32 tier) { loot_tier = tier; }` +- `int32 GetLootDropType() { return loot_drop_type; }` +- `void SetLootDropType(int32 type) { loot_drop_type = type; }` +- `void SetDeletedSpawn(bool val) { deleted_spawn = val; }` +- `bool IsDeletedSpawn() { return deleted_spawn; }` +- `int32 InsertRegionToSpawn(Region_Node* node, ZBSP_Node* bsp_root, WaterRegionType regionType, bool in_region = true);` +- `bool HasRegionTracked(Region_Node* node, ZBSP_Node* bsp_root, bool in_region);` +- `int8 GetArrowColor(int8 spawn_level);` +- `void AddIgnoredWidget(int32 id);` +- `void SendGroupUpdate();` +- `void OverrideLootMethod(GroupLootMethod newMethod) { loot_method = newMethod; }` +- `void SetLootMethod(GroupLootMethod method, int8 item_rarity = 0, int32 group_id = 0);` +- `int32 GetLootGroupID() { return loot_group_id; }` +- `GroupLootMethod GetLootMethod() { return loot_method; }` +- `int8 GetLootRarity() { return loot_rarity; }` +- `int32 GetLootTimeRemaining() { return loot_timer.GetRemainingTime(); }` +- `bool IsLootTimerRunning() { return loot_timer.Enabled(); }` +- `bool CheckLootTimer() { return loot_timer.Check(); }` +- `void DisableLootTimer() { return loot_timer.Disable(); }` +- `int32 GetLooterSpawnID() { return looter_spawn_id; }` +- `void SetLooterSpawnID(int32 id) { looter_spawn_id = id; }` +- `bool AddNeedGreedItemRequest(int32 item_id, int32 spawn_id, bool need_item);` +- `bool AddLottoItemRequest(int32 item_id, int32 spawn_id);` +- `void AddSpawnLootWindowCompleted(int32 spawn_id, bool status_);` +- `bool SetSpawnLootWindowCompleted(int32 spawn_id);` +- `bool HasSpawnLootWindowCompleted(int32 spawn_id);` +- `bool HasSpawnNeedGreedEntry(int32 item_id, int32 spawn_id);` +- `bool HasSpawnLottoEntry(int32 item_id, int32 spawn_id);` +- `void GetSpawnLottoEntries(int32 item_id, std::map* out_entries);` +- `void GetLootItemsList(std::vector* out_entries);` +- `void GetSpawnNeedGreedEntries(int32 item_id, bool need_item, std::map* out_entries);` +- `bool HasLootWindowCompleted();` +- `bool IsLootWindowComplete() { return is_loot_complete; }` +- `void SetLootDispensed() { is_loot_dispensed = true; }` +- `bool IsLootDispensed() { return is_loot_dispensed; }` +- `void StartLootTimer(Spawn* looter);` +- `void CloseLoot(Spawn* sender);` +- `void SetLootName(char* name) {` +- `bool IsItemInLootTier(Item* item);` +- `void DistributeGroupLoot_RoundRobin(std::vector* item_list, bool roundRobinTrashLoot = false); // trash loot is what falls under the item tier requirement by group options` +- `void CalculateInitialVelocity(float heading, float distanceHorizontal, float distanceVertical, float distanceDepth, float duration);` +- `glm::vec3 CalculateProjectilePosition(glm::vec3 initialVelocity, float time);` +- `bool CalculateSpawnProjectilePosition(float x, float y, float z);` +- `void SetKnockback(Spawn* target, int32 duration, float vertical, float horizontal);` +- `void ResetKnockedBack();` +- `void CheckProximities();` +- `bool IsKnockedBack() { return knocked_back; }` + +## Notable Comments + +- /* +- */ +- // WE ARE UNSURE OF THESE OLD CLIENT VALUES USED AS TEMP PLACEHOLDERS FOR NEWER CLIENTS +- //int32 start_time; +- //int32 end_time; +- *field = value; +- /// Sets a user defined variable +- /// Variable we are setting +- /// Value to set the variable to +- /// Gets the value for the given variable diff --git a/docs/code/SpawnLists.md b/docs/code/SpawnLists.md new file mode 100644 index 0000000..73366a5 --- /dev/null +++ b/docs/code/SpawnLists.md @@ -0,0 +1,17 @@ +# File: `SpawnLists.h` + +## Classes + +- `EntityCommand` +- `SpawnEntry` +- `SpawnLocation` + +## Functions + +- `void AddSpawn(SpawnEntry* entity){ entities.push_back(entity); }` + +## Notable Comments + +- /* +- */ +- //devn00b: added spawn location overrides, added these to accomodate. diff --git a/docs/code/SpellProcess.md b/docs/code/SpellProcess.md new file mode 100644 index 0000000..68ebf56 --- /dev/null +++ b/docs/code/SpellProcess.md @@ -0,0 +1,81 @@ +# File: `SpellProcess.h` + +## Classes + +- `InterruptStruct` +- `CastTimer` +- `CastSpell` +- `RecastTimer` +- `SpellProcess` + +## Functions + +- `void RemoveCaster(Spawn* caster, bool lock_spell_process = true);` +- `void RemoveAllSpells(bool reload_spells = false);` +- `void Process();` +- `void Interrupted(Entity* caster, Spawn* interruptor, int16 error_code, bool cancel = false, bool from_movement = false);` +- `void ProcessSpell(ZoneServer* zone, Spell* spell, Entity* caster, Spawn* target = 0, bool lock = true, bool harvest_spell = false, LuaSpell* customSpell = 0, int16 custom_cast_time = 0, bool in_heroic_opp = false);` +- `void ProcessEntityCommand(ZoneServer* zone, EntityCommand* entity_command, Entity* caster, Spawn* target, bool lock = true, bool in_heroic_opp = false);` +- `bool TakePower(LuaSpell* spell, int32 custom_power_req = 0);` +- `bool CheckPower(LuaSpell* spell);` +- `bool TakeHP(LuaSpell* spell, int32 custom_hp_req = 0);` +- `bool CheckHP(LuaSpell* spell);` +- `bool CheckConcentration(LuaSpell* spell);` +- `bool CheckSavagery(LuaSpell* spell);` +- `bool TakeSavagery(LuaSpell* spell);` +- `bool CheckDissonance(LuaSpell* spell);` +- `bool AddDissonance(LuaSpell* spell);` +- `bool AddConcentration(LuaSpell* spell);` +- `bool CastProcessedSpell(LuaSpell* spell, bool passive = false, bool in_heroic_opp = false);` +- `bool CastProcessedEntityCommand(EntityCommand* entity_command, Client* client, Spawn* target, bool in_heroic_opp = false);` +- `void SendStartCast(LuaSpell* spell, Client* client);` +- `void SendFinishedCast(LuaSpell* spell, Client* client);` +- `void LockAllSpells(Client* client);` +- `void UnlockAllSpells(Client* client, Spell* exception = 0);` +- `void UnlockSpell(Client* client, Spell* spell);` +- `bool DeleteCasterSpell(Spawn* caster, Spell* spell, string reason = "");` +- `bool DeleteCasterSpell(LuaSpell* spell, string reason="", bool removing_all_spells = false, Spawn* remove_target = nullptr, bool zone_shutting_down = false, bool shared_lock_spell = true);` +- `void CheckInterrupt(InterruptStruct* interrupt);` +- `void RemoveSpellTimersFromSpawn(Spawn* spawn, bool remove_all = false, bool delete_recast = false, bool call_expire_function = true, bool lock_spell_process = false);` +- `void CheckRecast(Spell* spell, Entity* caster, float timer_override = 0, bool check_linked_timers = true);` +- `void AddSpellToQueue(Spell* spell, Entity* caster);` +- `void RemoveSpellFromQueue(Spell* spell, Entity* caster, bool send_update = true);` +- `void RemoveSpellFromQueue(Entity* caster, bool hostile_only = false);` +- `bool CheckSpellQueue(Spell* spell, Entity* caster);` +- `bool IsReady(Spell* spell, Entity* caster);` +- `void SendSpellBookUpdate(Client* client);` +- `bool CastPassives(Spell* spell, Entity* caster, bool remove = false);` +- `bool CastInstant(Spell* spell, Entity* caster, Entity* target, bool remove = false, bool passive=false);` +- `void AddSpellScriptTimer(SpellScriptTimer* timer);` +- `void RemoveSpellScriptTimer(SpellScriptTimer* timer, bool locked=false);` +- `void RemoveSpellScriptTimerBySpell(LuaSpell* spell, bool clearPendingDeletes=true);` +- `void CheckSpellScriptTimers();` +- `bool SpellScriptTimersHasSpell(LuaSpell* spell);` +- `std::string SpellScriptTimerCustomFunction(LuaSpell* spell);` +- `void ClearSpellScriptTimerList();` +- `void RemoveTargetFromSpell(LuaSpell* spell, Spawn* target, bool remove_caster = false);` +- `void CheckRemoveTargetFromSpell(LuaSpell* spell, bool allow_delete = true, bool removing_all_spells = false);` +- `void RemoveTargetList(LuaSpell* spell);` +- `bool AddHO(Client* client, HeroicOP* ho);` +- `bool AddHO(int32 group_id, HeroicOP* ho);` +- `void KillHOBySpawnID(int32 spawn_id);` +- `void AddSpellCancel(LuaSpell* spell);` +- `void DeleteSpell(LuaSpell* spell);` +- `void SpellCannotStack(ZoneServer* zone, Client* client, Entity* caster, LuaSpell* lua_spell, LuaSpell* conflictSpell);` +- `bool ProcessSpell(LuaSpell* spell, bool first_cast = true, const char* function = 0, SpellScriptTimer* timer = 0, bool all_targets = false);` +- `std::string ApplyLuaFunction(LuaSpell* spell, bool first_cast, const char* function, SpellScriptTimer* timer, Spawn* altTarget = 0);` +- `void AddActiveSpell(LuaSpell* spell);` +- `void DeleteActiveSpell(LuaSpell* spell, bool skipRemoveCurrent = false);` + +## Notable Comments + +- /* +- */ +- /// Handles all spell casts for a zone, only 1 SpellProcess per zone +- /// Remove dead pointers for casters when the Spawn is deconstructed +- /// Remove all spells from the SpellProcess +- /// Main loop, handles everything (interupts, cast time, recast, ...) +- /// Interrupts the caster (creates the InterruptStruct and adds it to a list) +- /// Entity being interrupted +- /// Spawn that interrupted the caster +- /// The error code diff --git a/docs/code/Spells.md b/docs/code/Spells.md new file mode 100644 index 0000000..0035814 --- /dev/null +++ b/docs/code/Spells.md @@ -0,0 +1,73 @@ +# File: `Spells.h` + +## Classes + +- `LUAData` +- `SpellScriptTimer` +- `LevelArray` +- `SpellDisplayEffect` +- `SpellData` +- `Spell` +- `MasterSpellList` + +## Functions + +- `void AddSpellLevel(int8 adventure_class, int8 tradeskill_class, int16 level, float classic_spell_level);` +- `void AddSpellEffect(int8 percentage, int8 subbullet, string description);` +- `void AddSpellLuaData(int8 type, int int_value, int int_value2, float float_value, float float_value2, bool bool_value, string string_value,string string_value2, string helper);` +- `void AddSpellLuaDataInt(int value, int value2, string helper);` +- `void AddSpellLuaDataFloat(float value, float value2, string helper);` +- `void AddSpellLuaDataBool(bool value, string helper);` +- `void AddSpellLuaDataString(string value, string value2, string helper);` +- `int32 GetSpellID();` +- `sint16 TranslateClientSpellIcon(int16 version);` +- `void SetPacketInformation(PacketStruct* packet, Client* client = 0, bool display_tier = false);` +- `void SetAAPacketInformation(PacketStruct* packet, AltAdvanceData* data, Client* client = 0, bool display_tier = false);` +- `void AppendLevelInformation(PacketStruct* packet);` +- `int8 GetSpellTier();` +- `int32 GetSpellDuration();` +- `int16 GetSpellIcon();` +- `int16 GetSpellIconBackdrop();` +- `int16 GetSpellIconHeroicOp();` +- `int16 GetLevelRequired(Player* player);` +- `int16 GetHPRequired(Spawn* spawn);` +- `int16 GetPowerRequired(Spawn* spawn);` +- `int16 GetSavageryRequired(Spawn* spawn);` +- `int16 GetDissonanceRequired(Spawn* spawn);` +- `bool GetSpellData(lua_State* state, std::string field);` +- `bool SetSpellData(lua_State* state, std::string field, int8 fieldArg);` +- `bool ScribeAllowed(Player* player);` +- `bool IsHealSpell();` +- `bool IsBuffSpell();` +- `bool IsDamageSpell();` +- `bool IsControlSpell();` +- `bool IsOffenseSpell();` +- `bool IsCopiedSpell();` +- `void ModifyCastTime(Entity* caster);` +- `int32 CalculateRecastTimer(Entity* caster, float override_timer = 0.0f);` +- `bool CastWhileStunned();` +- `bool CastWhileMezzed();` +- `bool CastWhileStifled();` +- `bool CastWhileFeared();` +- `bool GetStayLocked() { return stay_locked; }` +- `void StayLocked(bool val) { stay_locked = val; }` +- `void DestroySpells();` +- `void Reload();` +- `void AddSpell(int32 id, int8 tier, Spell* spell);` +- `int16 GetSpellErrorValue(int16 version, int8 error_index);` +- `void AddSpellError(int16 version, int8 error_index, int16 error_value);` +- `int32 GetNewMaxSpellID() {` +- `int16 GetClosestVersion(int16 version);` + +## Notable Comments + +- /* +- */ +- // Spell type is for AI so code knows what a spell is +- //vector effects; +- /// Gets the correct spell error value for the given version +- /// Client version +- /// ID of the error +- /// The int16 value for the given error and version +- /// Adds a spell error to the list +- /// Client version for the error diff --git a/docs/code/TCPConnection.md b/docs/code/TCPConnection.md new file mode 100644 index 0000000..d1ee284 --- /dev/null +++ b/docs/code/TCPConnection.md @@ -0,0 +1,61 @@ +# File: `TCPConnection.h` + +## Classes + +- `TCPServer` +- `TCPConnection` +- `TCPNetPacket_Struct` +- `TCPServer` + +## Functions + +- `void TCPServerLoop(void* tmp);` +- `void TCPConnectionLoop(void* tmp);` +- `bool Connect(char* irAddress, int16 irPort, char* errbuf = 0);` +- `bool Connect(int32 irIP, int16 irPort, char* errbuf = 0);` +- `void AsyncConnect(char* irAddress, int16 irPort);` +- `void AsyncConnect(int32 irIP, int16 irPort);` +- `bool Send(const uchar* data, sint32 size);` +- `eTCPMode GetMode() { return TCPMode; }` +- `void Free(); // Inform TCPServer that this connection object is no longer referanced` +- `bool GetEcho();` +- `void SetEcho(bool iValue);` +- `void SetState(int8 iState);` +- `bool CheckNetActive();` +- `bool RunLoop();` +- `bool GetAsyncConnect();` +- `bool SetAsyncConnect(bool iValue);` +- `void OutQueuePush(ServerPacket* pack);` +- `void RemoveRelay(TCPConnection* relay, bool iSendRelayDisconnect);` +- `void ProcessNetworkLayerPacket(ServerPacket* pack);` +- `void SendNetErrorPacket(const char* reason = 0);` +- `bool SendData(char* errbuf = 0);` +- `bool RecvData(char* errbuf = 0);` +- `bool ProcessReceivedData(char* errbuf = 0);` +- `bool ProcessReceivedDataAsPackets(char* errbuf = 0);` +- `bool ProcessReceivedDataAsOldPackets(char* errbuf = 0);` +- `void ClearBuffers();` +- `void LineOutQueuePush(char* line);` +- `void InModeQueuePush(TCPNetPacket_Struct* tnps);` +- `bool ServerSendQueuePop(uchar** data, sint32* size);` +- `void ServerSendQueuePushEnd(const uchar* data, sint32 size);` +- `void ServerSendQueuePushEnd(uchar** data, sint32 size);` +- `void ServerSendQueuePushFront(uchar* data, sint32 size);` +- `bool Open(int16 iPort = 0, char* errbuf = 0); // opens the port` +- `void Close(); // closes the port` +- `bool IsOpen();` +- `void SendPacket(ServerPacket* pack);` +- `void SendPacket(TCPConnection::TCPNetPacket_Struct** tnps);` +- `void Process();` +- `bool RunLoop();` +- `void AddConnection(TCPConnection* con);` +- `void ListenNewConnections();` +- `void CheckInQueue();` + +## Notable Comments + +- /* +- */ +- /* +- */ +- // Functions for outgoing connections diff --git a/docs/code/Titles.md b/docs/code/Titles.md new file mode 100644 index 0000000..6c83c11 --- /dev/null +++ b/docs/code/Titles.md @@ -0,0 +1,28 @@ +# File: `Titles.h` + +## Classes + +- `Title` +- `MasterTitlesList` +- `PlayerTitlesList` + +## Functions + +- `void SetID(int32 id) {this->id = id;}` +- `void SetName(const char *name) {strncpy(this->name, name, sizeof(this->name));}` +- `void SetPrefix(int8 prefix) {this->prefix = prefix;}` +- `void SetSaveNeeded(bool save_needed) {this->save_needed = save_needed;}` +- `sint32 GetID() {return id;}` +- `int8 GetPrefix() {return prefix;}` +- `bool GetSaveNeeded() {return save_needed;}` +- `void Clear();` +- `int32 Size();` +- `void AddTitle(Title* title);` +- `void Add(Title* title);` +- `int32 Size();` +- `void ReleaseReadLock() { MPlayerTitleMutex.releasereadlock(); }` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/Trade.md b/docs/code/Trade.md new file mode 100644 index 0000000..8854f11 --- /dev/null +++ b/docs/code/Trade.md @@ -0,0 +1,31 @@ +# File: `Trade.h` + +## Classes + +- `Item` +- `Entity` +- `TradeItemInfo` +- `Trade` + +## Functions + +- `int8 AddItemToTrade(Entity* character, Item* item, int8 quantity, int8 slot);` +- `void RemoveItemFromTrade(Entity* character, int8 slot);` +- `void AddCoinToTrade(Entity* character, int64 amount);` +- `void RemoveCoinFromTrade(Entity* character, int64 amount);` +- `bool SetTradeAccepted(Entity* character);` +- `bool HasAcceptedTrade(Entity* character);` +- `void CancelTrade(Entity* character);` +- `int8 CheckItem(Entity* trader, Item* item, Entity* other);` +- `int8 MaxSlots() { return trade_max_slots; }` +- `void Trader1ItemAdd(Item* item, int8 quantity, int8 slot);` +- `void Trader2ItemAdd(Item* item, int8 quantity, int8 slot);` +- `void CompleteTrade();` +- `void OpenTradeWindow();` +- `void SendTradePacket();` +- `void CalculateCoins(int64 val, int32& plat, int32& gold, int32& silver, int32& copper);` +- `int8 GetNextFreeSlot(Entity* character);` + +## Notable Comments + +_None detected_ diff --git a/docs/code/Tradeskills.md b/docs/code/Tradeskills.md new file mode 100644 index 0000000..982a624 --- /dev/null +++ b/docs/code/Tradeskills.md @@ -0,0 +1,44 @@ +# File: `Tradeskills.h` + +## Classes + +- `Player` +- `Spawn` +- `Recipe` +- `Client` +- `TradeskillEvent` +- `Tradeskill` +- `TradeskillMgr` +- `MasterTradeskillEventsList` + +## Functions + +- `void Process();` +- `void BeginCrafting(Client* client, vector> components);` +- `void StopCrafting(Client* client, bool lock = true);` +- `bool IsClientCrafting(Client* client);` +- `void CheckTradeskillEvent(Client* client, int16 icon);` +- `void ReadLock(const char* function = (const char*)0, int32 line = 0) { m_tradeskills.readlock(function, line); }` +- `void ReleaseReadLock(const char* function = (const char*)0, int32 line = 0) { m_tradeskills.releasereadlock(function, line); }` +- `int32 GetTechniqueSuccessAnim(int16 version, int32 technique);` +- `int32 GetTechniqueFailureAnim(int16 version, int32 technique);` +- `int32 GetTechniqueIdleAnim(int16 version, int32 technique);` +- `int32 GetMissTargetAnim(int16 version);` +- `int32 GetKillMissTargetAnim(int16 version);` +- `void SetClientIdleVisualState(Client* client, Tradeskill* ts);` +- `void SendItemCreationUI(Client* client, Recipe* recipe);` +- `void AddEvent(TradeskillEvent* tradeskillEvent);` +- `int32 Size();` + +## Notable Comments + +- /* +- */ +- /// Determines if an update is needed if so send one and stop crafting if finished +- /// Starts the actual crafting process +- /// Client that is crafting +- /// List of items the player is using to craft +- /// Stops the crafting process +- /// Client that stopped crafting +- /// Does the list need a mutex lock? default = true +- /// Checks to see if the given client is crafting diff --git a/docs/code/TradeskillsDB.md b/docs/code/TradeskillsDB.md new file mode 100644 index 0000000..fecccc9 --- /dev/null +++ b/docs/code/TradeskillsDB.md @@ -0,0 +1,14 @@ +# File: `TradeskillsDB.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void WorldDatabase::LoadTradeskillEvents() {` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/TradeskillsPackets.md b/docs/code/TradeskillsPackets.md new file mode 100644 index 0000000..e28fb56 --- /dev/null +++ b/docs/code/TradeskillsPackets.md @@ -0,0 +1,34 @@ +# File: `TradeskillsPackets.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void ClientPacketFunctions::SendCreateFromRecipe(Client* client, int32 recipeID) {` +- `else if (index == 1) {` +- `else if (index == 2) {` +- `else if (index == 3) {` +- `else if (index == 1) {` +- `else if (index == 2) {` +- `void ClientPacketFunctions::SendItemCreationUI(Client* client, Recipe* recipe) {` +- `else if (i == 2)` +- `else if (i == 3)` +- `else if (client->GetVersion() < 1193)` +- `else if (client->GetVersion() < 1193)` +- `void ClientPacketFunctions::StopCrafting(Client* client) {` +- `void ClientPacketFunctions::CounterReaction(Client* client, bool countered) {` + +## Notable Comments + +- /* +- */ +- // if recipeID is 0 we are repeating the last recipe, if not set the players current recipe to the new one +- // Get the recipe +- // Create the packet +- // Recipe and crafting table info +- // Mass Production +- // mpq will eventually be retrieved from achievement for mass production +- // Product info +- // Reset item to 0 diff --git a/docs/code/Traits.md b/docs/code/Traits.md new file mode 100644 index 0000000..070b7af --- /dev/null +++ b/docs/code/Traits.md @@ -0,0 +1,30 @@ +# File: `Traits.h` + +## Classes + +- `Client` +- `TraitData` +- `MasterTraitList` + +## Functions + +- `bool IdentifyNextTrait(Client* client, map >* traitList, vector* collectTraits, vector* tieredTraits, std::map* previousMatchedSpells, bool omitFoundMatches = false);` +- `bool ChooseNextTrait(Client* client);` +- `int16 GetSpellCount(Client* client, map >* traits, bool onlyCharTraits = false);` +- `bool IsPlayerAllowedTrait(Client* client, TraitData* trait);` +- `void AddTrait(TraitData* data);` +- `int Size();` +- `void DestroyTraits();` + +## Notable Comments + +- /* +- */ +- /// Sorts the traits for the given client and creats and sends the trait packet. +- /// The Client calling this function +- /// EQ2Packet* +- /// Add trait data to the global list. +- /// The trait data to add. +- /// Get the total number of traits in the global list. +- /// Get the trait data for the given spell. +- /// Spell ID to get trait data for. diff --git a/docs/code/Transmute.md b/docs/code/Transmute.md new file mode 100644 index 0000000..d53c279 --- /dev/null +++ b/docs/code/Transmute.md @@ -0,0 +1,18 @@ +# File: `Transmute.h` + +## Classes + +- `Client` +- `Player` +- `Item` +- `DatabaseResult` +- `Transmute` +- `TransmutingTier` + +## Functions + +_None detected_ + +## Notable Comments + +_None detected_ diff --git a/docs/code/Variables.md b/docs/code/Variables.md new file mode 100644 index 0000000..f0356b5 --- /dev/null +++ b/docs/code/Variables.md @@ -0,0 +1,18 @@ +# File: `Variables.h` + +## Classes + +- `Variable` +- `Variables` + +## Functions + +- `string GetNameValuePair(){ return string(variableName).append(" ").append(variableValue); }` +- `void SetValue(const char* value){` +- `void AddVariable ( Variable* var )` +- `void ClearVariables()` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/VisualStates.md b/docs/code/VisualStates.md new file mode 100644 index 0000000..793a685 --- /dev/null +++ b/docs/code/VisualStates.md @@ -0,0 +1,40 @@ +# File: `VisualStates.h` + +## Classes + +- `VisualState` +- `Emote` +- `EmoteVersionRange` +- `VisualStates` + +## Functions + +- `int GetID() { return id; }` +- `string GetNameString() { return name; }` +- `int32 GetVisualState() { return visual_state; }` +- `string GetNameString() { return name; }` +- `string GetMessageString() { return message; }` +- `string GetTargetedMessageString() { return targeted_message; }` +- `else if (range->GetMinVersion() <= min_version && range->GetMaxVersion() == 0)` +- `else if (range->GetMinVersion() == 0 && max_version <= range->GetMaxVersion())` +- `string GetNameString() { return name; }` +- `void Reset(){` +- `void ClearEmotes(){` +- `void ClearVisualStates(){` +- `void InsertVisualState(VisualState* vs){` +- `void InsertEmoteRange(EmoteVersionRange* emote) {` +- `void InsertSpellVisualRange(EmoteVersionRange* emote, int32 spell_visual_id) {` +- `void ClearSpellVisuals(){` + +## Notable Comments + +- /* +- */ +- // Visual States must use a hash table because of the large amount that exists and the large spacing +- // between their ID's. String and character arrays could not be used for the first iterator because +- // it would require the same pointer to access it from the hash table, which is obviously not possible +- // since the text is from the client. +- // maximum amount of iterations it will attempt to find a entree +- // if min and max version are both in range +- // if the min version is in range, but max range is 0 +- // if min version is 0 and max_version has a cap diff --git a/docs/code/WebServer.md b/docs/code/WebServer.md new file mode 100644 index 0000000..fdfcb5f --- /dev/null +++ b/docs/code/WebServer.md @@ -0,0 +1,22 @@ +# File: `WebServer.h` + +## Classes + +- `WebServer` + +## Functions + +- `void run();` +- `void start();` +- `void register_route(const std::string& uri, std::function&, http::response&)> handler, bool auth_required = true);` +- `void do_accept();` +- `void on_accept(beast::error_code ec, tcp::socket socket);` +- `void do_session_ssl(tcp::socket socket);` +- `void do_session(tcp::socket socket);` +- `void handle_request(http::request>&& req, std::function&&)> send);` +- `std::string authenticate(const http::request& req, int32* user_status = 0);` +- `std::string generate_session_id();` + +## Notable Comments + +_None detected_ diff --git a/docs/code/Widget.md b/docs/code/Widget.md new file mode 100644 index 0000000..8c64bb0 --- /dev/null +++ b/docs/code/Widget.md @@ -0,0 +1,66 @@ +# File: `Widget.h` + +## Classes + +- `Widget` + +## Functions + +- `bool IsWidget(){ return true; }` +- `int32 GetWidgetID();` +- `void SetWidgetID(int32 val);` +- `void SetWidgetX(float val);` +- `float GetWidgetX();` +- `void SetWidgetY(float val);` +- `float GetWidgetY();` +- `void SetWidgetZ(float val);` +- `float GetWidgetZ();` +- `void SetIncludeLocation(bool val);` +- `bool GetIncludeLocation();` +- `void SetIncludeHeading(bool val);` +- `bool GetIncludeHeading();` +- `void SetWidgetIcon(int8 val);` +- `void HandleTimerUpdate();` +- `void OpenDoor();` +- `void CloseDoor();` +- `void HandleUse(Client* client, string command, int8 overrideWidgetType=0xFF);` +- `float GetOpenHeading();` +- `void SetOpenHeading(float val);` +- `float GetClosedHeading();` +- `void SetClosedHeading(float val);` +- `float GetOpenY();` +- `void SetOpenY(float val);` +- `float GetCloseY();` +- `void SetCloseY(float val);` +- `float GetOpenX(){return open_x;}` +- `float GetOpenZ(){return open_z;}` +- `float GetCloseX(){return close_x;}` +- `float GetCloseZ(){return close_z;}` +- `void SetOpenX(float x){open_x = x;}` +- `void SetOpenZ(float z){open_z = z;}` +- `void SetCloseX(float x){close_x = x;}` +- `void SetCloseZ(float z){close_z = z;}` +- `int8 GetWidgetType();` +- `void SetWidgetType(int8 val);` +- `bool IsOpen();` +- `int32 GetActionSpawnID();` +- `void SetActionSpawnID(int32 id);` +- `int32 GetLinkedSpawnID();` +- `void SetLinkedSpawnID(int32 id);` +- `void SetOpenSound(const char* name);` +- `void SetCloseSound(const char* name);` +- `void SetOpenDuration(int16 val);` +- `int16 GetOpenDuration();` +- `void ProcessUse(Spawn* caller=nullptr);` +- `void SetHouseID(int32 val) { m_houseID = val; }` +- `int32 GetHouseID() { return m_houseID; }` +- `void SetMultiFloorLift(bool val) { multi_floor_lift = val; }` +- `bool GetMultiFloorLift() { return multi_floor_lift; }` +- `return string("Door");` +- `return string("Lift");` +- `return string("Generic");` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/World.md b/docs/code/World.md new file mode 100644 index 0000000..e503669 --- /dev/null +++ b/docs/code/World.md @@ -0,0 +1,163 @@ +# File: `World.h` + +## Classes + +- `MerchantInfo` +- `MerchantItemInfo` +- `LootTable` +- `LootDrop` +- `GroundSpawnEntry` +- `GroundSpawnEntryItem` +- `TransportDestination` +- `LocationTransportDestination` +- `LottoPlayer` +- `HouseZone` +- `Deposit` +- `HouseHistory` +- `PlayerHouse` +- `Statistic` +- `PlayerHistory` +- `GlobalLoot` +- `StartingStructHeader` +- `StartingSkill` +- `StartingSpell` +- `VoiceOverStruct` +- `WhoAllPeerPlayer` +- `ZoneInfoMemory` +- `ZoneList` +- `World` + +## Functions + +- `void LoadFromDatabaseRow(MYSQL_ROW row);` +- `void Add(ZoneServer* zone);` +- `void Remove(ZoneServer* zone);` +- `bool GetZone(ZoneChangeDetails* zone_details, int32 opt_zone_id, std::string opt_zone_name = "", bool loadZone = true, bool skip_existing_zones = false, bool increment_zone = true, bool check_peers = true, bool check_instances = false, bool only_always_loaded = false, bool skip_self = false, bool duplicated_zone = false, int32 minLevel = 0, int32 maxLevel = 0, int32 avgLevel = 0, int32 firstLevel = 0);` +- `bool GetZoneByInstance(ZoneChangeDetails* zone_details, int32 instance_id, int32 zone_id = 0, bool loadZone = true, bool skip_existing_zones = false, bool increment_zone = true, bool check_peers = true, int32 minLevel = 0, int32 maxLevel = 0, int32 avgLevel = 0, int32 firstLevel = 0);` +- `bool IsClientConnectedPeer(int32 account_id);` +- `int32 GetZonesPlayersCount();` +- `void AddClientToMap(string name, Client* client){` +- `void CheckFriendList(Client* client);` +- `void CheckFriendZoned(Client* client);` +- `bool HandleGlobalChatMessage(Client* from, char* to, int16 channel, const char* message, const char* channel_name = 0, int32 current_language_id = 0);` +- `void HandleGlobalBroadcast(const char* message);` +- `void HandleGlobalAnnouncement(const char* message);` +- `int32 Count();` +- `void UpdateVitality(float amount);` +- `void RemoveClientFromMap(string name, Client* client){` +- `bool ClientConnected(int32 account_id);` +- `void RemoveClientZoneReference(ZoneServer* zone);` +- `void ReloadClientQuests();` +- `bool DepopFinished();` +- `void Depop();` +- `void Repop();` +- `void DeleteSpellProcess();` +- `void SendZoneWideChannelMessage(std::string fromName, const char* to, int16 channel, const char* message, float distance, const char* channel_name, int32 language);` +- `void LoadSpellProcess();` +- `void ProcessWhoQuery(const char* query, Client* client);` +- `void ProcessWhoQuery(vector* queries, ZoneServer* zone, vector* players, bool isGM);` +- `void SendZoneList(Client* client);` +- `void WritePlayerStatistics();` +- `void ShutDownZones();` +- `void ReloadMail();` +- `void ReloadSpawns();` +- `int32 GetHighestDuplicateID(const std::string& inc_zone_name, int32 inc_zone_id, bool increment_new_value = true);` +- `bool GetDuplicateZoneDetails(ZoneChangeDetails* zone_details, const std::string& inc_zone_name, int32 inc_zone_id, int32 matchDuplicateId);` +- `void WatchdogHeartbeat();` +- `void SendTimeUpdate();` +- `void PopulateClientList(boost::property_tree::ptree& pt);` +- `void PopulateZoneList(boost::property_tree::ptree& pt);` +- `int8 GetClassID(const char* name);` +- `void Process();` +- `void init(std::string web_ipaddr, int16 web_port, std::string cert_file, std::string key_file, std::string key_password, std::string hardcode_user, std::string hardcode_password);` +- `void WorldTimeTick();` +- `float GetXPRate();` +- `float GetTSXPRate();` +- `void LoadVitalityInformation();` +- `void UpdateVitality();` +- `ulong GetCurrentThreadID();` +- `int64 GetThreadUsageCPUTime();` +- `void AddNPCAppearance(int32 id, AppearanceData* appearance){ npc_appearance_list[id] = appearance; }` +- `void ReloadGuilds();` +- `bool ReportBug(string data, char* player_name, int32 account_id, const char* spawn_name, int32 spawn_id, int32 zone_id);` +- `void AddSpawnScript(int32 id, const char* name);` +- `void AddSpawnEntryScript(int32 id, const char* name);` +- `void AddSpawnLocationScript(int32 id, const char* name);` +- `void AddZoneScript(int32 id, const char* name);` +- `void ResetSpawnScripts();` +- `void ResetZoneScripts();` +- `int16 GetMerchantItemQuantity(int32 merchant_id, int32 item_id);` +- `void DecreaseMerchantQuantity(int32 merchant_id, int32 item_id, int16 amount);` +- `int32 GetInventoryID(int32 merchant_id, int32 item_id);` +- `void AddMerchantItem(int32 inventory_id, MerchantItemInfo ItemInfo);` +- `void RemoveMerchantItem(int32 inventory_id, int32 item_id);` +- `void AddMerchantInfo(int32 merchant_id, MerchantInfo* multiplier);` +- `void DeleteMerchantsInfo();` +- `void DeleteMerchantItems();` +- `void DeleteSpawns();` +- `void WritePlayerStatistics();` +- `void WriteServerStatistics();` +- `void AddServerStatistic(int32 stat_id, sint32 stat_value, int32 stat_date);` +- `void UpdateServerStatistic(int32 stat_id, sint32 stat_value, bool overwrite = false);` +- `sint32 GetServerStatisticValue(int32 stat_id);` +- `void RemoveServerStatistics();` +- `void SendGroupQuests(PlayerGroup* group, Client* client);` +- `bool RejoinGroup(Client* client, int32 group_id);` +- `void AddBonuses(Item* item, ItemStatsValues* values, int16 type, sint32 value, Entity* entity);` +- `int32 CreateGuild(const char* guild_name, Client* leader = 0, int32 group_id = 0);` +- `void SaveGuilds();` +- `void PickRandomLottoDigits(int32* digits);` +- `void AddLottoPlayer(int32 character_id, int32 end_time);` +- `void RemoveLottoPlayer(int32 character_id);` +- `void SetLottoPlayerNumMatches(int32 character_id, int8 num_matches);` +- `void CheckLottoPlayers();` +- `void PopulateTOVStatMap();` +- `int32 LoadItemBlueStats();` +- `sint16 GetItemStatAOMValue(sint16 subtype);` +- `sint16 GetItemStatTOVValue(sint16 subtype);` +- `sint16 GetItemStatDOVValue(sint16 subtype);` +- `sint16 GetItemStatCOEValue(sint16 subtype);` +- `sint16 GetItemStatKAValue(sint16 subtype);` +- `sint16 GetItemStatTESTValue(sint16 subtype);` +- `int8 TranslateSlotSubTypeToClient(Client* client, int8 stat_type, sint16 sub_type);` +- `void AddHouseZone(int32 id, string name, int64 cost_coins, int32 cost_status, int64 upkeep_coins, int32 upkeep_status, int8 vault_slots, int8 alignment, int8 guild_level, int32 zone_id, int32 exit_zone_id, float exit_x, float exit_y, float exit_z, float exit_heading);` +- `void AddPlayerHouse(int32 char_id, int32 house_id, int64 unique_id, int32 instance_id, int32 upkeep_due, int64 escrow_coins, int32 escrow_status, string player_name);` +- `void ReloadHouseData(PlayerHouse* ph);` +- `bool CheckTempBugCRC(char* msg);` +- `void SyncCharacterAbilities(Client* client);` +- `void LoadStartingLists();` +- `void PurgeStartingLists();` +- `void SetReloadingSubsystem(string subsystem);` +- `void RemoveReloadingSubSystem(string subsystem);` +- `bool IsReloadingSubsystems();` +- `int32 GetSuppressedWarningTime() {` +- `void SetSuppressedWarning() { suppressed_warning = Timer::GetCurrentTime2(); }` +- `void LoadRegionMaps(std::string zoneFile);` +- `void LoadMaps(std::string zoneFile);` +- `void RemoveMaps(std::string zoneFile);` +- `void SendTimeUpdate();` +- `void LoadVoiceOvers();` +- `void PurgeVoiceOvers();` +- `bool FindVoiceOver(int8 type, int32 id, int16 index, VoiceOverStruct* struct_ = nullptr, bool* find_garbled = nullptr, VoiceOverStruct* garble_struct_ = nullptr);` +- `void AddVoiceOver(int8 type, int32 id, int16 index, VoiceOverStruct* struct_);` +- `void CopyVoiceOver(VoiceOverStruct* struct1, VoiceOverStruct* struct2);` +- `void AddNPCSpell(int32 list_id, int32 spell_id, int8 tier, bool spawn_cast, bool aggro_cast, sint8 req_hp_ratio);` +- `void PurgeNPCSpells();` +- `void ClientAuthApproval(int32 success, std::string charName, int32 account_id, std::string zone_name, int32 zoning_id, int32 instance_id, bool first_login);` +- `void ClearZoneInfoCache();` +- `std::shared_ptr GetZoneInfoById(int32 zoneID);` +- `std::shared_ptr GetZoneInfoByName(const std::string& zoneName);` +- `void AddZoneInfo(int32 zoneID, std::shared_ptr zoneInfo);` + +## Notable Comments + +- /* +- */ +- /*int32 faction_id; +- // Constants for STATs counters +- // Server Utilization +- // Server Stats +- // Player PvE counters +- // Player PvP counters +- // MOST stats for players +- // HIGHEST stats for players diff --git a/docs/code/WorldDatabase.md b/docs/code/WorldDatabase.md new file mode 100644 index 0000000..6795672 --- /dev/null +++ b/docs/code/WorldDatabase.md @@ -0,0 +1,406 @@ +# File: `WorldDatabase.h` + +## Classes + +- `StartingItem` +- `ClaimItems` +- `Bot` +- `WorldDatabase` + +## Functions + +- `bool ConnectNewDatabase();` +- `void PingNewDB();` +- `string GetZoneName(int32 id);` +- `string GetZoneDescription(int32 id);` +- `int32 LoadCharacterSkills(int32 char_id, Player* player);` +- `void DeleteCharacterSkill(int32 char_id, Skill* skill);` +- `void DeleteCharacterSpell(int32 character_id, int32 spell_id);` +- `int32 LoadCharacterSpells(int32 char_id, Player* player);` +- `int32 LoadItemBlueStats();` +- `void SaveQuickBar(int32 char_id, vector* quickbar_items);` +- `void SavePlayerSpells(Client* client);` +- `int32 LoadSkills();` +- `void LoadCommandList();` +- `void UpdateCharacterMacro(int32 char_id, int8 number, const char* name, int16 icon, vector* updates);` +- `void SaveWorldTime(WorldTime* time);` +- `bool SaveSpawnInfo(Spawn* spawn);` +- `int32 GetNextSpawnIDInZone(int32 zone_id);` +- `bool SaveSpawnEntry(Spawn* spawn, const char* spawn_location_name, int8 percent, float x_offset, float y_offset, float z_offset, bool save_zonespawn = true, bool create_spawnlocation = true);` +- `float GetSpawnLocationPlacementOffsetX(int32 location_id);` +- `float GetSpawnLocationPlacementOffsetY(int32 location_id);` +- `float GetSpawnLocationPlacementOffsetZ(int32 location_id);` +- `int32 GetNextSpawnLocation();` +- `bool CreateNewSpawnLocation(int32 id, const char* name);` +- `bool RemoveSpawnFromSpawnLocation(Spawn* spawn);` +- `int32 GetSpawnLocationCount(int32 location, Spawn* spawn = 0);` +- `void LoadSubCommandList();` +- `void LoadGlobalVariables();` +- `void UpdateVitality(int32 timestamp, float amount);` +- `void SaveVariable(const char* name, const char* value, const char* comment);` +- `void LoadVisualStates();` +- `void LoadAppearanceMasterList();` +- `void Save(Client* client);` +- `void SaveItems(Client* client);` +- `void SaveItem(int32 account_id, int32 char_id, Item* item, const char* type);` +- `void DeleteBuyBack(int32 char_id, int32 item_id, int16 quantity, int32 price);` +- `void LoadBuyBacks(Client* client);` +- `void SaveBuyBacks(Client* client);` +- `void SaveBuyBack(int32 char_id, int32 item_id, int16 quantity, int32 price);` +- `void DeleteItem(int32 char_id, Item* item, const char* type);` +- `void SaveCharacterColors(int32 char_id, const char* type, EQ2_Color color);` +- `void SaveCharacterFloats(int32 char_id, const char* type, float float1, float float2, float float3, float multiplier = 100.0f);` +- `int16 GetAppearanceID(string name);` +- `string GetAppearanceName(int16 appearance_id);` +- `void UpdateRandomize(int32 spawn_id, sint32 value);` +- `int32 SaveCharacter(PacketStruct* create, int32 loginID);` +- `int32 LoadNPCAppearanceEquipmentData(ZoneServer* zone);` +- `void SaveNPCAppearanceEquipment(int32 spawn_id, int8 slot_id, int16 type, int8 red=0, int8 green=0, int8 blue=0, int8 hred=0, int8 hgreen=0, int8 hblue=0);` +- `void LoadSpecialZones();` +- `void SaveCharacterSkills(Client* client);` +- `void SaveCharacterQuests(Client* client);` +- `void SaveCharacterQuestProgress(Client* client, Quest* quest);` +- `void DeleteCharacterQuest(int32 quest_id, int32 char_id, bool repeated_quest = false);` +- `void LoadCharacterQuests(Client* client);` +- `void LoadPlayerAA(Player *player);` +- `void LoadCharacterQuestProgress(Client* client);` +- `void LoadCharacterFriendsIgnoreList(Player* player);` +- `void LoadZoneInfo(ZoneServer* zone, int32 minLevel=0, int32 maxLevel=0, int32 avgLevel=0, int32 firstLevel=0);` +- `void LoadZonePlayerLevels(ZoneServer* zone);` +- `void LoadZoneInfo(ZoneInfo* zone_info);` +- `int32 GetZoneID(const char* name);` +- `void SaveZoneInfo(int32 zone_id, const char* field, sint32 value);` +- `void SaveZoneInfo(int32 zone_id, const char* field, float value);` +- `void SaveZoneInfo(int32 zone_id, const char* field, const char* value);` +- `bool GetZoneRequirements(const char* zoneName,sint16* minStatus, int16* minLevel, int16* maxLevel, int16* minVersion);` +- `int16 GetMinimumClientVersion(int8 expansion_id);` +- `string GetExpansionIDByVersion(int16 version);` +- `int32 CheckTableVersions(char* tablename);` +- `bool RunDatabaseQueries(TableQuery* queries, bool output_result = true, bool data = false);` +- `void UpdateTableVersion(char* name, int32 version);` +- `void UpdateDataTableVersion(char* name, int32 version);` +- `void UpdateStartingFactions(int32 char_id, int8 choice);` +- `string GetStartingZoneName(int8 choice);` +- `void UpdateStartingZone(int32 char_id, int8 class_id, int8 race_id, PacketStruct* create);` +- `void UpdateStartingItems(int32 char_id, int8 class_id, int8 race_id, bool base_class = false);` +- `void UpdateStartingSkills(int32 char_id, int8 class_id, int8 race_id);` +- `void UpdateStartingSpells(int32 char_id, int8 class_id, int8 race_id);` +- `void UpdateStartingSkillbar(int32 char_id, int8 class_id, int8 race_id);` +- `void UpdateStartingTitles(int32 char_id, int8 class_id, int8 race_id, int8 gender_id);` +- `bool UpdateSpawnLocationSpawns(Spawn* spawn);` +- `bool UpdateSpawnWidget(int32 widget_id, char* query);` +- `bool CheckVersionTable();` +- `void LoadFactionAlliances();` +- `void LoadFactionList();` +- `bool LoadPlayerFactions(Client* client);` +- `void SavePlayerFactions(Client* client);` +- `bool VerifyFactionID(int32 char_id, int32 faction_id);` +- `void LoadSpawnScriptData();` +- `void LoadZoneScriptData();` +- `int32 LoadSpellScriptData();` +- `bool UpdateSpawnScriptData(int32 spawn_id, int32 spawn_location_id, int32 spawnentry_id, const char* name);` +- `bool VerifyZone(const char* name);` +- `int8 GetInstanceTypeByZoneID(int32 zoneID);` +- `void LoadNPCAppearances();*/` +- `void ResetDatabase();` +- `void EnableConstraints();` +- `void DisableConstraints();` +- `int32 SaveCombinedSpawnLocation(ZoneServer* zone, Spawn* spawn, const char* name);` +- `int32 ProcessSpawnLocations(ZoneServer* zone, const char* sql_query, int8 type);` +- `int32 LoadSpawnLocationGroupAssociations(ZoneServer* zone);` +- `int32 LoadSpawnLocationGroups(ZoneServer* zone);` +- `int32 LoadSpawnGroupChances(ZoneServer* zone);` +- `bool SpawnGroupAddAssociation(int32 group1, int32 group2);` +- `bool SpawnGroupRemoveAssociation(int32 group1, int32 group2);` +- `bool SpawnGroupAddSpawn(Spawn* spawn, int32 group_id);` +- `bool SpawnGroupRemoveSpawn(Spawn* spawn, int32 group_id);` +- `int32 CreateSpawnGroup(Spawn* spawn, string name);` +- `void DeleteSpawnGroup(int32 id);` +- `bool SetGroupSpawnChance(int32 id, float chance);` +- `void LoadGroundSpawnEntries(ZoneServer* zone);` +- `void LoadGroundSpawnItems(ZoneServer* zone);` +- `void LoadSpawns(ZoneServer* zone);` +- `int8 GetAppearanceType(string type);` +- `void LoadNPCs(ZoneServer* zone);` +- `void LoadSpiritShards(ZoneServer* zone);` +- `int32 LoadAppearances(ZoneServer* zone, Client* client = 0);` +- `int32 LoadNPCSpells();` +- `int32 LoadNPCSkills(ZoneServer* zone);` +- `int32 LoadNPCEquipment(ZoneServer* zone);` +- `void LoadObjects(ZoneServer* zone);` +- `void LoadGroundSpawns(ZoneServer* zone);` +- `void LoadWidgets(ZoneServer* zone);` +- `void LoadSigns(ZoneServer* zone);` +- `void ReloadItemList(int32 item_id = 0);` +- `void LoadItemList(int32 item_id = 0);` +- `int32 LoadItemStats(int32 item_id = 0);` +- `int32 LoadItemModStrings(int32 item_id = 0);` +- `int32 LoadItemAppearances(int32 item_id = 0);` +- `int32 LoadItemLevelOverride(int32 item_id = 0);` +- `int32 LoadItemEffects(int32 item_id = 0);` +- `int32 LoadBookPages(int32 item_id = 0);` +- `int32 LoadNextUniqueItemID();` +- `int32 LoadSkillItems(int32 item_id = 0);` +- `int32 LoadRangeWeapons(int32 item_id = 0);` +- `int32 LoadThrownWeapons(int32 item_id = 0);` +- `int32 LoadBaubles(int32 item_id = 0);` +- `int32 LoadBooks(int32 item_id = 0);` +- `int32 LoadItemsets(int32 item_id = 0);` +- `int32 LoadHouseItem(int32 item_id = 0);` +- `int32 LoadRecipeBookItems(int32 item_id = 0);` +- `int32 LoadArmor(int32 item_id = 0);` +- `int32 LoadAdornments(int32 item_id = 0);` +- `int32 LoadClassifications();` +- `int32 LoadShields(int32 item_id = 0);` +- `int32 LoadBags(int32 item_id = 0);` +- `int32 LoadFoods(int32 item_id = 0);` +- `int32 LoadWeapons(int32 item_id = 0);` +- `int32 LoadRanged();` +- `int32 LoadHouseContainers(int32 item_id = 0);` +- `void LoadBrokerItemStats();` +- `void SaveSignMark(int32 char_id, int32 sign_id, char* char_name, Client* client);` +- `string GetSignMark(int32 char_id, int32 sign_id, char* char_name); // returns the string containing the character name` +- `void LoadTransporters(ZoneServer* zone);` +- `void LoadTransportMaps(ZoneServer* zone);` +- `void LoadDataFromRow(DatabaseResult *result, Item* item);` +- `void LoadCharacterItemList(int32 account_id, int32 char_id, Player* player, int16);` +- `bool loadCharacter(const char* name, int32 account_id, Client* client);` +- `std::string loadCharacterFromLogin(ZoneChangeDetails* details, int32 char_id, int32 account_id);` +- `bool LoadCharacterStats(int32 id, int32 account_id, Client* client);` +- `void LoadCharacterQuestRewards(Client* client);` +- `void LoadCharacterQuestTemporaryRewards(Client* client, int32 quest_id);` +- `bool InsertCharacterStats(int32 character_id, int8 class_id, int8 race_id);` +- `bool UpdateCharacterTimeStamp(int32 account_id, int32 character_id, int32 timestamp);` +- `bool insertCharacterProperty(Client* client, char* propName, char* propValue);` +- `bool loadCharacterProperties(Client* client);` +- `string GetPlayerName(char* name);` +- `int32 GetCharacterTimeStamp(int32 character_id, int32 account_id,bool* char_exists);` +- `int32 GetCharacterTimeStamp(int32 character_id);` +- `sint32 GetLatestDataTableVersion(char* name);` +- `sint16 GetLowestCharacterAdminStatus(int32 account_id);` +- `sint16 GetHighestCharacterAdminStatus(int32 account_id);` +- `sint16 GetCharacterAdminStatus(char* character_name);` +- `sint16 GetCharacterAdminStatus(int32 account_id , int32 char_id);` +- `bool UpdateAdminStatus(char* character_name, sint16 flag);` +- `void LoadMerchantInformation();` +- `void LoadMerchantInventory();` +- `string GetMerchantDescription(int32 merchant_id);` +- `void LoadPlayerStatistics(Player* player, int32 char_id);` +- `void WritePlayerStatistic(Player* player, Statistic* stat);` +- `void LoadServerStatistics();` +- `void WriteServerStatistic(Statistic* stat);` +- `void WriteServerStatistic(int32 stat_id, sint32 stat_value);` +- `void WriteServerStatisticsNeededQueries();` +- `void SavePlayerMail(Mail* mail);` +- `void SavePlayerMail(Client* client);` +- `void LoadPlayerMail(Client* client, bool new_only = false);` +- `void DeletePlayerMail(Mail* mail);` +- `void GetPetNames(ZoneServer* zone);` +- `int8 GetCharacterLevel(int32 character_id);` +- `int16 GetCharacterModelType(int32 character_id);` +- `int8 GetCharacterClass(int32 character_id);` +- `int8 GetCharacterGender(int32 character_id);` +- `int32 GetCharacterID(const char* name);` +- `int32 GetCharacterCurrentZoneID(int32 character_id);` +- `int32 GetCharacterAccountID(int32 character_id);` +- `void LoadEntityCommands(ZoneServer* zone);` +- `void LoadSpells();` +- `void LoadSpellEffects();` +- `void LoadSpellLuaData();` +- `void LoadTraits();` +- `int32 LoadPlayerSkillbar(Client* client);` +- `string GetColumnNames(char* name);` +- `string GetZoneName(char* zone_description);` +- `bool GetItemResultsToClient (Client* client, const char* varSearch, int maxResults=20);` +- `void LoadRevivePoints(vector* revive_points, int32 zone_id);` +- `void SaveBugReport(const char* category, const char* subcategory, const char* causes_crash, const char* reproducible, const char* summary, const char* description, const char* version, const char* player, int32 account_id, const char* spawn_name, int32 spawn_id, int32 zone_id);` +- `void FixBugReport();` +- `int32 LoadQuests();` +- `void LoadQuestDetails(Quest* quest);` +- `bool DeleteCharacter(int32 account_id, int32 character_id);` +- `int32 GetMaxHotBarID();` +- `int8 CheckNameFilter(const char* name, int8 min_length = 4, int8 max_length = 15);` +- `void LoadFogInit(string zone, PacketStruct* packet);` +- `void ToggleCharacterOnline();` +- `void ToggleCharacterOnline(Client* client, int8 toggle);` +- `int32 CreateNewInstance(int32 zone_id, int32 playersMinLevel=0, int32 playersMaxLevel=0, int32 playersavgLevel=0, int32 playersfirstLevel=0);` +- `int32 AddCharacterInstance(int32 char_id, int32 instance_id, string zone_name, int8 instance_type, int32 last_success, int32 last_failure, int32 success_lockout, int32 failure_lockout);` +- `bool UpdateCharacterInstanceTimers(int32 char_id, int32 instance_id, int32 lockout_time=0, int32 reset_time=0, int32 reenter_time=0 );` +- `bool UpdateCharacterInstance(int32 char_id, string zone_name, int32 instance_id, int8 type = 0, int32 timestamp = 0);` +- `bool VerifyInstanceID(int32 char_id, int32 instance_id);` +- `bool CheckVectorForValue(vector* vector, int32 value);` +- `int32 CheckSpawnRemoveInfo(map* inmap, int32 spawn_location_entry_id);` +- `bool UpdateInstancedSpawnRemoved(int32 spawn_location_entry_id, int32 spawn_type, int32 respawn_time, int32 instance_id );` +- `int32 CreateInstanceSpawnRemoved(int32 spawn_location_entry_id, int32 spawn_type, int32 respawn_time, int32 instance_id );` +- `bool DeleteInstance(int32 instance_id);` +- `bool DeleteInstanceSpawnRemoved(int32 instance_id, int32 spawn_location_entry_id);` +- `bool DeleteCharacterFromInstance(int32 char_id, int32 instance_id);` +- `bool LoadCharacterInstances(Client* client);` +- `bool DeletePersistedRespawn(int32 zone_id, int32 spawn_location_entry_id);` +- `int32 CreatePersistedRespawn(int32 spawn_location_entry_id, int32 spawn_type, int32 respawn_time, int32 zone_id);` +- `void UpdateLoginEquipment();` +- `void UpdateLoginZones();` +- `void LoadLocationGrids(ZoneServer* zone);` +- `bool LoadLocationGridLocations(LocationGrid* grid);` +- `int32 CreateLocation(int32 zone_id, int32 grid_id, const char* name, bool include_y);` +- `bool AddLocationPoint(int32 location_id, float x, float y, float z);` +- `bool DeleteLocation(int32 location_id);` +- `bool DeleteLocationPoint(int32 location_point_id);` +- `void ListLocations(Client* client);` +- `void ListLocationPoints(Client* client, int32 location_id);` +- `bool LocationExists(int32 location_id);` +- `bool GetTableVersions(vector *table_versions);` +- `bool QueriesFromFile(const char *file);` +- `void LoadAchievements();` +- `int32 LoadAchievementRequirements(Achievement *achievement);` +- `int32 LoadAchievementRewards(Achievement *achievement);` +- `void LoadPlayerAchievements(Player *player);` +- `int32 LoadPlayerAchievementsUpdates(Player *player);` +- `int32 LoadPlayerAchievementsUpdateItems(AchievementUpdate *update, int32 player_id);` +- `void LoadAltAdvancements();` +- `void LoadTreeNodes();` +- `void LoadCollections();` +- `int32 LoadCollectionItems(Collection *collection);` +- `int32 LoadCollectionRewards(Collection *collection);` +- `void LoadPlayerCollections(Player *player);` +- `void LoadPlayerCollectionItems(Player *player, Collection *collection);` +- `void SavePlayerCollections(Client *client);` +- `void SavePlayerCollection(Client *client, Collection *collection);` +- `void SavePlayerCollectionItems(Client *client, Collection *collection);` +- `void SavePlayerCollectionItem(Client *client, Collection *collection, int32 item_id);` +- `int32 SaveSpawnTemplate(int32 placement_id, const char* template_name);` +- `bool RemoveSpawnTemplate(int32 template_id);` +- `int32 CreateSpawnFromTemplateByID(Client* client, int32 template_id);` +- `int32 CreateSpawnFromTemplateByName(Client* client, const char* template_name);` +- `bool SaveZoneSafeCoords(int32 zone_id, float x, float y, float z, float heading);` +- `bool SaveSignZoneToCoords(int32 spawn_id, float x, float y, float z, float heading);` +- `void LoadGuilds();` +- `void LoadGuild(int32 guild_id);` +- `int32 LoadGuildMembers(Guild* guild);` +- `void LoadGuildEvents(Guild* guild);` +- `void LoadGuildRanks(Guild* guild);` +- `void LoadGuildEventFilters(Guild* guild);` +- `void LoadGuildPointsHistory(Guild* guild, GuildMember* guild_member);` +- `void LoadGuildRecruiting(Guild* guild);` +- `void SaveGuild(Guild* guild, bool new_guild = false);` +- `void SaveGuildMembers(Guild* guild);` +- `void SaveGuildEvents(Guild* guild);` +- `void SaveGuildRanks(Guild* guild);` +- `void SaveGuildEventFilters(Guild* guild);` +- `void SaveGuildPointsHistory(Guild* guild);` +- `void SaveGuildRecruiting(Guild* guild);` +- `void DeleteGuild(Guild* guild);` +- `void DeleteGuildMember(Guild* guild, int32 character_id);` +- `void DeleteGuildEvent(Guild* guild, int64 event_id);` +- `void DeleteGuildPointHistory(Guild* guild, int32 character_id, PointHistory* point_history);` +- `void ArchiveGuildEvent(Guild* guild, GuildEvent* guild_event);` +- `void SaveHiddenGuildEvent(Guild* guild, GuildEvent* guild_event);` +- `void LoadGuildDefaultRanks(Guild* guild);` +- `void LoadGuildDefaultEventFilters(Guild* guild);` +- `bool AddNewPlayerToServerGuild(int32 account_id, int32 char_id);` +- `int32 GetGuildIDByCharacterID(int32 char_id);` +- `void LoadChannels();` +- `void LoadRecipes();` +- `void LoadRecipeBooks();` +- `void LoadPlayerRecipes(Player *player);` +- `int32 LoadPlayerRecipeBooks(int32 char_id, Player *player);` +- `void SavePlayerRecipeBook(Player* player, int32 recipebook_id);` +- `void LoadRecipeComponents();` +- `void UpdatePlayerRecipe(Player* player, int32 recipe_id, int8 highest_rank);` +- `void SavePlayerRecipe(Player* player, int32 recipe_id);` +- `void LoadTradeskillEvents();` +- `void LoadGlobalRuleSet();` +- `void LoadRuleSets(bool reload=false);` +- `void LoadRuleSetDetails(RuleSet *rule_set);` +- `sint32 AddMasterTitle(const char* titleName, int8 isPrefix = 0);` +- `void LoadTitles();` +- `sint32 LoadCharacterTitles(int32 char_id, Player *player);` +- `sint32 GetCharPrefixIndex(int32 char_id, Player *player);` +- `sint32 GetCharSuffixIndex(int32 char_id, Player *player);` +- `void SaveCharPrefixIndex(sint32 index, int32 char_id);` +- `void SaveCharSuffixIndex(sint32 index, int32 char_id);` +- `sint32 AddCharacterTitle(sint32 index, int32 char_id, Spawn* player);` +- `void LoadLanguages();` +- `int32 LoadCharacterLanguages(int32 char_id, Player *player);` +- `int16 GetCharacterCurrentLang(int32 char_id, Player *player);` +- `void SaveCharacterCurrentLang(int32 id, int32 char_id, Client *client);` +- `void UpdateStartingLanguage(int32 char_id, uint8 race_id, int32 starting_city=0);` +- `void SaveCharacterLang(int32 char_id, int32 lang_id);` +- `void SaveCharacterHistory(Player* player, int8 type, int8 subtype, int32 value, int32 value2, char* location, int32 event_date);` +- `void LoadHouseZones();` +- `int64 AddPlayerHouse(int32 char_id, int32 house_id, int32 instance_id, int32 upkeep_due);` +- `void SetHouseUpkeepDue(int32 char_id, int32 house_id, int32 instance_id, int32 upkeep_due);` +- `void RemovePlayerHouse(int32 char_id, int32 house_id);` +- `void UpdateHouseEscrow(int32 house_id, int32 instance_id, int64 amount_coins, int32 amount_status);` +- `void LoadPlayerHouses();` +- `void LoadDeposits(PlayerHouse* house);` +- `void LoadHistory(PlayerHouse* house);` +- `void AddHistory(PlayerHouse* house, char* name, char* reason, int32 timestamp, int64 amount = 0, int32 status = 0, int8 pos_flag = 0);` +- `bool CheckBannedIPs(const char* loginIP);` +- `void LoadHOStarters();` +- `void LoadHOWheel();` +- `void LoadClaimItems(int32 char_id);` +- `int16 CountCharClaimItems(int32 char_id);` +- `vector LoadCharacterClaimItems(int32 char_id);` +- `void ClaimItem(int32 char_id, int32 item_id, Client* client);` +- `int32 GetAccountAge(int32 account_id);` +- `void LoadRaceTypes();` +- `void LoadLoot(ZoneServer* zone);` +- `void LoadGlobalLoot(ZoneServer* zone);` +- `bool LoadSpawnLoot(ZoneServer* zone, Spawn* spawn);` +- `void AddLootTableToSpawn(Spawn* spawn, int32 loottable_id);` +- `bool RemoveSpawnLootTable(Spawn* spawn, int32 loottable_id);` +- `void LoadCharacterHistory(int32 char_id, Player *player);` +- `void LoadSpellErrors();` +- `bool LoadSign(ZoneServer* zone, int32 spawn_id);` +- `bool LoadWidget(ZoneServer* zone, int32 spawn_id);` +- `bool LoadObject(ZoneServer* zone, int32 spawn_id);` +- `bool LoadGroundSpawn(ZoneServer* zone, int32 spawn_id);` +- `void LoadGroundSpawnEntry(ZoneServer* zone, int32 entry_id);` +- `void LoadGroundSpawnItems(ZoneServer* zone, int32 entry_id);` +- `bool LoadNPC(ZoneServer* zone, int32 spawn_id);` +- `void LoadAppearance(ZoneServer* zone, int32 spawn_id);` +- `void LoadNPCAppearanceEquipmentData(ZoneServer* zone, int32 spawn_id);` +- `void SaveCharacterPicture(int32 characterID, int8 type, uchar* picture, int32 picture_size);` +- `void SaveCharRepeatableQuest(Client* client, int32 quest_id, int16 quest_complete_count);` +- `void LoadZoneFlightPaths(ZoneServer* zone);` +- `void LoadZoneFlightPathLocations(ZoneServer* zone);` +- `void SaveCharacterLUAHistory(Player* player, int32 event_id, int32 value, int32 value2);` +- `void LoadCharacterLUAHistory(int32 char_id, Player* player);` +- `int32 CreateNewBot(int32 char_id, string name, int8 race, int8 advClass, int8 gender, int16 model_id, int32& index);` +- `void SaveBotAppearance(Bot* bot);` +- `void SaveBotColors(int32 bot_id, const char* type, EQ2_Color color);` +- `void SaveBotFloats(int32 bot_id, const char* type, float float1, float float2, float float3);` +- `bool LoadBot(int32 char_id, int32 bot_index, Bot* bot);` +- `void LoadBotAppearance(Bot* bot);` +- `void SaveBotItem(int32 bot_id, int32 item_id, int8 slot);` +- `void LoadBotEquipment(Bot* bot);` +- `string GetBotList(int32 char_id);` +- `void DeleteBot(int32 char_id, int32 bot_index);` +- `void SetBotStartingItems(Bot* bot, int8 class_id, int8 race_id);` +- `void LoadTransmuting();` +- `void FindSpell(Client* client, char* findString);` +- `void LoadChestTraps();` +- `bool CheckExpansionFlags(ZoneServer* zone, int32 spawnXpackFlag);` +- `bool CheckHolidayFlags(ZoneServer* zone, int32 spawnHolidayFlag);` +- `void GetHouseSpawnInstanceData(ZoneServer* zone, Spawn* spawn);` +- `int32 FindHouseInstanceSpawn(Spawn* spawn);` +- `void LoadStartingSkills(World* world);` +- `void LoadStartingSpells(World* world);` +- `void LoadVoiceOvers(World* world);` +- `bool DeleteSpiritShard(int32 id);` +- `void LoadCharacterSpellEffects(int32 char_id, Client *client, int8 db_spell_type);` +- `int32 GetMysqlExpCurve(int level);` + +## Notable Comments + +- /* +- */ +- /*void loadNPCAppearance(int32 appearance_id); +- //void LoadMerchantMultipliers(); +- // Zone Instance DB Functions +- //int32 AddCharacterInstance(int32 char_id, int32 instance_id, int32 grant_reenter_time_left=0, int32 grant_reset_time_left=0, int32 lockout_time=0); +- // +- /* Achievements */ +- /* Alternate Advancement */ +- /* Collections */ diff --git a/docs/code/WorldServer_Index.md b/docs/code/WorldServer_Index.md new file mode 100644 index 0000000..e3e079b --- /dev/null +++ b/docs/code/WorldServer_Index.md @@ -0,0 +1,164 @@ +# WorldServer Module + +Handles zone management, character/world state, network connections for zones, and gameplay logic. + +## Files: + +- [Appearances.md](Appearances.md) +- [classes.md](classes.md) +- [classes.md](classes.md) +- [client.md](client.md) +- [client.md](client.md) +- [ClientPacketFunctions.md](ClientPacketFunctions.md) +- [ClientPacketFunctions.md](ClientPacketFunctions.md) +- [Combat.md](Combat.md) +- [Combat.md](Combat.md) +- [Entity.md](Entity.md) +- [Entity.md](Entity.md) +- [Factions.md](Factions.md) +- [Factions.md](Factions.md) +- [GroundSpawn.md](GroundSpawn.md) +- [GroundSpawn.md](GroundSpawn.md) +- [Languages.md](Languages.md) +- [Languages.md](Languages.md) +- [LoginServer.md](LoginServer.md) +- [LoginServer.md](LoginServer.md) +- [LuaFunctions.md](LuaFunctions.md) +- [LuaFunctions.md](LuaFunctions.md) +- [LuaInterface.md](LuaInterface.md) +- [LuaInterface.md](LuaInterface.md) +- [MutexHelper.md](MutexHelper.md) +- [MutexList.md](MutexList.md) +- [MutexMap.md](MutexMap.md) +- [MutexVector.md](MutexVector.md) +- [net.md](net.md) +- [net.md](net.md) +- [NPC.md](NPC.md) +- [NPC.md](NPC.md) +- [NPC_AI.md](NPC_AI.md) +- [NPC_AI.md](NPC_AI.md) +- [Object.md](Object.md) +- [Object.md](Object.md) +- [Player.md](Player.md) +- [Player.md](Player.md) +- [PlayerGroups.md](PlayerGroups.md) +- [PlayerGroups.md](PlayerGroups.md) +- [Quests.md](Quests.md) +- [Quests.md](Quests.md) +- [races.md](races.md) +- [races.md](races.md) +- [Sign.md](Sign.md) +- [Sign.md](Sign.md) +- [Skills.md](Skills.md) +- [Skills.md](Skills.md) +- [Spawn.md](Spawn.md) +- [Spawn.md](Spawn.md) +- [SpawnLists.md](SpawnLists.md) +- [SpellProcess.md](SpellProcess.md) +- [SpellProcess.md](SpellProcess.md) +- [Spells.md](Spells.md) +- [Spells.md](Spells.md) +- [Titles.md](Titles.md) +- [Titles.md](Titles.md) +- [Trade.md](Trade.md) +- [Trade.md](Trade.md) +- [Transmute.md](Transmute.md) +- [Transmute.md](Transmute.md) +- [Variables.md](Variables.md) +- [VisualStates.md](VisualStates.md) +- [Widget.md](Widget.md) +- [Widget.md](Widget.md) +- [World.md](World.md) +- [World.md](World.md) +- [WorldDatabase.md](WorldDatabase.md) +- [WorldDatabase.md](WorldDatabase.md) +- [WorldTCPConnection.md](WorldTCPConnection.md) +- [zoneserver.md](zoneserver.md) +- [zoneserver.md](zoneserver.md) +- [Achievements.md](Achievements.md) +- [Achievements.md](Achievements.md) +- [AchievementsDB.md](AchievementsDB.md) +- [AltAdvancement.md](AltAdvancement.md) +- [AltAdvancement.md](AltAdvancement.md) +- [AltAdvancementDB.md](AltAdvancementDB.md) +- [Bot.md](Bot.md) +- [Bot.md](Bot.md) +- [BotBrain.md](BotBrain.md) +- [BotBrain.md](BotBrain.md) +- [BotCommands.md](BotCommands.md) +- [BotDB.md](BotDB.md) +- [Chat.md](Chat.md) +- [Chat.md](Chat.md) +- [ChatChannel.md](ChatChannel.md) +- [ChatChannel.md](ChatChannel.md) +- [ChatDB.md](ChatDB.md) +- [Collections.md](Collections.md) +- [Collections.md](Collections.md) +- [CollectionsDB.md](CollectionsDB.md) +- [Commands.md](Commands.md) +- [Commands.md](Commands.md) +- [CommandsDB.md](CommandsDB.md) +- [ConsoleCommands.md](ConsoleCommands.md) +- [ConsoleCommands.md](ConsoleCommands.md) +- [Guild.md](Guild.md) +- [Guild.md](Guild.md) +- [GuildDB.md](GuildDB.md) +- [HeroicOp.md](HeroicOp.md) +- [HeroicOp.md](HeroicOp.md) +- [HeroicOpDB.md](HeroicOpDB.md) +- [HeroicOpPackets.md](HeroicOpPackets.md) +- [HousingDB.md](HousingDB.md) +- [HousingPackets.md](HousingPackets.md) +- [Items.md](Items.md) +- [Items.md](Items.md) +- [ItemsDB.md](ItemsDB.md) +- [Items_CoE.md](Items_CoE.md) +- [Items_DoV.md](Items_DoV.md) +- [Items_ToV.md](Items_ToV.md) +- [Loot.md](Loot.md) +- [Loot.md](Loot.md) +- [LootDB.md](LootDB.md) +- [RaceTypes.md](RaceTypes.md) +- [RaceTypes.md](RaceTypes.md) +- [RaceTypesDB.md](RaceTypesDB.md) +- [Recipe.md](Recipe.md) +- [Recipe.md](Recipe.md) +- [RecipeDB.md](RecipeDB.md) +- [Rules.md](Rules.md) +- [Rules.md](Rules.md) +- [RulesDB.md](RulesDB.md) +- [Tradeskills.md](Tradeskills.md) +- [Tradeskills.md](Tradeskills.md) +- [TradeskillsDB.md](TradeskillsDB.md) +- [TradeskillsPackets.md](TradeskillsPackets.md) +- [Traits.md](Traits.md) +- [Traits.md](Traits.md) +- [HTTPSClient.md](HTTPSClient.md) +- [HTTPSClient.md](HTTPSClient.md) +- [HTTPSClientPool.md](HTTPSClientPool.md) +- [HTTPSClientPool.md](HTTPSClientPool.md) +- [PeerManager.md](PeerManager.md) +- [PeerManager.md](PeerManager.md) +- [WorldWeb.md](WorldWeb.md) +- [ChestTrap.md](ChestTrap.md) +- [ChestTrap.md](ChestTrap.md) +- [map.md](map.md) +- [map.md](map.md) +- [mob_movement_manager.md](mob_movement_manager.md) +- [mob_movement_manager.md](mob_movement_manager.md) +- [pathfinder_interface.md](pathfinder_interface.md) +- [pathfinder_interface.md](pathfinder_interface.md) +- [pathfinder_nav_mesh.md](pathfinder_nav_mesh.md) +- [pathfinder_nav_mesh.md](pathfinder_nav_mesh.md) +- [pathfinder_null.md](pathfinder_null.md) +- [pathfinder_null.md](pathfinder_null.md) +- [pathfinder_waypoint.md](pathfinder_waypoint.md) +- [pathfinder_waypoint.md](pathfinder_waypoint.md) +- [position.md](position.md) +- [position.md](position.md) +- [raycast_mesh.md](raycast_mesh.md) +- [raycast_mesh.md](raycast_mesh.md) +- [region_map.md](region_map.md) +- [region_map.md](region_map.md) +- [region_map_v1.md](region_map_v1.md) +- [region_map_v1.md](region_map_v1.md) diff --git a/docs/code/WorldTCPConnection.md b/docs/code/WorldTCPConnection.md new file mode 100644 index 0000000..e7d1cb5 --- /dev/null +++ b/docs/code/WorldTCPConnection.md @@ -0,0 +1,14 @@ +# File: `WorldTCPConnection.h` + +## Classes + +- `WorldTCPConnection` + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ diff --git a/docs/code/WorldWeb.md b/docs/code/WorldWeb.md new file mode 100644 index 0000000..3aedebe --- /dev/null +++ b/docs/code/WorldWeb.md @@ -0,0 +1,74 @@ +# File: `WorldWeb.cpp` + +## Classes + +_None detected_ + +## Functions + +- `void World::Web_worldhandle_status(const http::request& req, http::response& res) {` +- `void World::Web_populate_status(boost::property_tree::ptree& pt) {` +- `void World::Web_worldhandle_clients(const http::request& req, http::response& res) {` +- `void ZoneList::PopulateClientList(boost::property_tree::ptree& pt) {` +- `void World::Web_worldhandle_setadminstatus(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `std::string charname("");` +- `else if (!got_status_field || charname.size() < 1) {` +- `void World::Web_worldhandle_reloadrules(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `void World::Web_worldhandle_reloadcommand(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `void World::Web_worldhandle_addpeer(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `std::string client_addr("");` +- `std::string client_internal_addr("");` +- `std::string web_addr("");` +- `else if (got_addr)` +- `else if (got_port)` +- `void World::Web_worldhandle_zones(const http::request& req, http::response& res) {` +- `void ZoneList::PopulateZoneList(boost::property_tree::ptree& pt) {` +- `void World::Web_worldhandle_addcharauth(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `std::string clientIP("");` +- `std::string charName(""), zoneName("");` +- `void World::Web_worldhandle_startzone(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `std::string zoneName("");` +- `void World::Web_worldhandle_sendglobalmessage(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `std::string toName(""), fromName(""), msg("");` +- `void World::Web_worldhandle_newgroup(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `std::string leader(""), member("");` +- `std::string web_address("");` +- `std::string fieldName("group_id_");` +- `else if (net.is_primary) {` +- `else if (group_id) {` +- `void World::Web_worldhandle_addgroupmember(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `void World::Web_worldhandle_removegroupmember(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `std::string name("");` +- `void World::Web_worldhandle_disbandgroup(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `void World::Web_worldhandle_createguild(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `std::string newGuildName(""), leaderName("");` +- `else if (guildID) {` +- `void World::Web_worldhandle_addguildmember(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `std::string invitedBy("");` +- `void World::Web_worldhandle_removeguildmember(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `std::string removedBy("");` +- `void World::Web_worldhandle_setguildpermission(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `void World::Web_worldhandle_setguildeventfilter(const http::request& req, http::response& res) {` +- `std::istringstream json_stream(req.body());` +- `void World::Web_worldhandle_peerstatus(const http::request& req, http::response& res) {` + +## Notable Comments + +- /* +- */ +- // failed to find zone requested by peer diff --git a/docs/code/classes.md b/docs/code/classes.md new file mode 100644 index 0000000..5f8c457 --- /dev/null +++ b/docs/code/classes.md @@ -0,0 +1,27 @@ +# File: `classes.h` + +## Classes + +- `Classes` + +## Functions + +- `string GetClassNameCase(int8 class_id);` +- `sint8 GetClassID(const char* name);` +- `int8 GetBaseClass(int8 class_id);` +- `int8 GetSecondaryBaseClass(int8 class_id);` +- `int8 GetTSBaseClass(int8 class_id);` +- `int8 GetSecondaryTSBaseClass(int8 class_id);` + +## Notable Comments + +- /* +- */ +- //Tradeskills +- // 0 - transmuting/tinkering +- //43 - artisan +- //44 - craftsman +- //45 - provisioner +- //46 - Woodworker +- //47 - carpenter +- //48 - armorer diff --git a/docs/code/client.md b/docs/code/client.md new file mode 100644 index 0000000..e42f8a2 --- /dev/null +++ b/docs/code/client.md @@ -0,0 +1,376 @@ +# File: `client.h` + +## Classes + +- `TransportDestination` +- `ConversationOption` +- `VoiceOverStruct` +- `GroupOptions` +- `QueuedQuest` +- `BuyBackItem` +- `MacroData` +- `Mail` +- `MailWindow` +- `PendingGuildInvite` +- `PendingResurrection` +- `IncomingPaperdollImage` +- `WaypointInfo` +- `DialogManager` +- `Client` +- `ClientList` + +## Functions + +- `bool addAccept(const std::string& key, int32 id, int32 seconds) {` +- `std::lock_guard lock(mutex_);` +- `bool addDecline(const std::string& key, int32 id, int32 seconds) {` +- `std::lock_guard lock(mutex_);` +- `bool clearAccept(const std::string& key) {` +- `std::lock_guard lock(mutex_);` +- `bool clearDecline(const std::string& key) {` +- `std::lock_guard lock(mutex_);` +- `int32 getAcceptValue(const std::string& key) {` +- `std::lock_guard lock(mutex_);` +- `int32 getDeclineValue(const std::string& key) {` +- `std::lock_guard lock(mutex_);` +- `bool isDialogActive(const std::string& key) {` +- `std::lock_guard lock(mutex_);` +- `void startTimer(const std::string& key, int32 seconds, bool isAccept) {` +- `std::lock_guard lock(mutex_);` +- `void RemoveClientFromZone();` +- `bool Process(bool zone_process = false);` +- `void Disconnect(bool send_disconnect = true);` +- `void SetConnected(bool val) { connected = val; }` +- `bool IsConnected() { return connected; }` +- `bool IsReadyForSpawns() { return ready_for_spawns; }` +- `bool IsReadyForUpdates() { return ready_for_updates; }` +- `bool IsZoning() { return client_zoning; }` +- `void SetReadyForUpdates();` +- `void SetReadyForSpawns(bool val);` +- `void QueuePacket(EQ2Packet* app, bool attemptedCombine = false);` +- `void SendLoginInfo();` +- `int8 GetMessageChannelColor(int8 channel_type);` +- `void HandleTellMessage(const char* fromName, const char* message, const char* to, int32 current_language_id);` +- `void SimpleMessage(int8 color, const char* message);` +- `void Message(int8 type, const char* message, ...);` +- `void SendSpellUpdate(Spell* spell, bool add_silently = false, bool add_to_hotbar = true);` +- `void Zone(ZoneChangeDetails* new_zone, ZoneServer* opt_zone = nullptr, bool set_coords = true, bool is_spell = false);` +- `void Zone(const char* new_zone, bool set_coords = true, bool is_spell = false);` +- `void Zone(int32 instanceid, bool set_coords = true, bool byInstanceID = false, bool is_spell = false);` +- `void ApproveZone();` +- `void SendZoneInfo();` +- `void SendZoneSpawns();` +- `void HandleVerbRequest(EQApplicationPacket* app);` +- `void SendControlGhost(int32 send_id = 0xFFFFFFFF, int8 unknown2 = 0);` +- `void SendCharInfo();` +- `void SendLoginDeniedBadVersion();` +- `void SendCharPOVGhost();` +- `void SendPlayerDeathWindow();` +- `float DistanceFrom(Client* client);` +- `void SendDefaultGroupOptions();` +- `bool HandleLootItemByID(Spawn* entity, int32 item_id, Spawn* target);` +- `bool HandleLootItem(Spawn* entity, Item* item, Spawn* target = nullptr, bool overrideLootRestrictions = false);` +- `void HandleLootItemRequestPacket(EQApplicationPacket* app);` +- `void HandleSkillInfoRequest(EQApplicationPacket* app);` +- `void HandleExamineInfoRequest(EQApplicationPacket* app);` +- `void HandleQuickbarUpdateRequest(EQApplicationPacket* app);` +- `void SendPopupMessage(int8 unknown, const char* text, const char* type, float size, int8 red, int8 green, int8 blue);` +- `void PopulateSkillMap();` +- `void ChangeLevel(int16 old_level, int16 new_level);` +- `void ChangeTSLevel(int16 old_level, int16 new_level);` +- `bool Summon(const char* search_name);` +- `std::string IdentifyInstanceLockout(int32 zoneID, bool displayClient = true);` +- `bool IdentifyInstance(ZoneChangeDetails* zone_details, int32 zoneID);` +- `bool TryZoneInstance(int32 zoneID, bool zone_coords_valid = false);` +- `bool GotoSpawn(const char* search_name, bool forceTarget = false);` +- `void DisplayDeadWindow();` +- `void HandlePlayerRevive(int32 point_id);` +- `void Bank(Spawn* banker, bool cancel = false);` +- `void BankWithdrawal(int64 amount);` +- `bool BankWithdrawalNoBanker(int64 amount);` +- `bool BankHasCoin(int64 amount);` +- `void BankDeposit(int64 amount);` +- `void SetBanker(Spawn* in_banker);` +- `bool AddItem(int32 item_id, int16 quantity = 0, AddItemType type = AddItemType::NOT_SET);` +- `bool AddItem(Item* item, bool* item_deleted = 0, AddItemType type = AddItemType::NOT_SET);` +- `bool AddItemToBank(int32 item_id, int16 quantity = 0);` +- `bool AddItemToBank(Item* item);` +- `void UnequipItem(int16 index, sint32 bag_id = -999, int8 to_slot = 255, int8 appearance_equip = 0);` +- `bool RemoveItem(Item* item, int16 quantity, bool force_override_no_delete = false);` +- `void ProcessTeleport(Spawn* spawn, vector* destinations, int32 transport_id = 0, bool is_spell = false);` +- `void ProcessTeleportLocation(EQApplicationPacket* app);` +- `void UpdateCharacterInstances();` +- `void SetLastSavedTimeStamp(int32 unixts) { last_saved_timestamp = unixts; }` +- `int32 GetLastSavedTimeStamp() { return last_saved_timestamp; }` +- `bool CheckZoneAccess(const char* zoneName);` +- `int32 GetCurrentZoneID();` +- `void SetCurrentZoneByInstanceID(int32 id, int32 zoneid);` +- `void SetCurrentZone(int32 id, int32 zone_duplicate_id = 0);` +- `void SetCurrentZone(ZoneServer* zone);` +- `void SetZoningDestination(ZoneServer* zone) {` +- `int32 GetDuplicatingZoneID() { return duplicate_zoning_id; }` +- `void setConnection(EQStream* ieqs) { eqs = ieqs; }` +- `void SetNameCRC(int32 val) { name_crc = val; }` +- `int32 GetNameCRC() { return name_crc; }` +- `void SetVersion(int16 new_version) { version = new_version; }` +- `void SetAccountID(int32 in_accountid) { account_id = in_accountid; }` +- `void SetCharacterID(int32 in_characterid) { character_id = in_characterid; }` +- `void SetAdminStatus(sint16 in_status) { admin_status = in_status; }` +- `void DetermineCharacterUpdates();` +- `void UpdateTimeStampFlag(int8 flagType)` +- `int8 GetTimeStampFlag() { return timestamp_flag; }` +- `bool UpdateQuickbarNeeded();` +- `void Save();` +- `void CloseLoot(int32 spawn_id);` +- `void SendLootResponsePacket(int32 total_coins, vector* items, Spawn* entity, bool ignore_loot_tier = false);` +- `void LootSpawnRequest(Spawn* entity, bool attemptDisarm = true);` +- `bool LootSpawnByMethod(Spawn* entity);` +- `void OpenChest(Spawn* entity, bool attemptDisarm = true);` +- `void CastGroupOrSelf(Entity* source, uint32 spellID, uint32 spellTier = 1, float restrictiveRadius = 0.0f);` +- `void CheckPlayerQuestsKillUpdate(Spawn* spawn);` +- `void CheckPlayerQuestsChatUpdate(Spawn* spawn);` +- `void CheckPlayerQuestsItemUpdate(Item* item);` +- `void CheckPlayerQuestsSpellUpdate(Spell* spell);` +- `void CheckPlayerQuestsLocationUpdate();` +- `void AddPendingQuest(Quest* quest, bool forced = false);` +- `void AcceptQuest(int32 quest_id);` +- `bool HasPendingQuest(int32 quest_id);` +- `void RemovePendingQuest(int32 quest_id);` +- `void SetPlayerQuest(Quest* quest, map* progress);` +- `void AddPlayerQuest(Quest* quest, bool call_accepted = true, bool send_packets = true);` +- `void RemovePlayerQuest(int32 id, bool send_update = true, bool delete_quest = true);` +- `void SendQuestJournal(bool all_quests = false, Client* client = 0, bool updated = true);` +- `void SendQuestUpdate(Quest* quest);` +- `void SendQuestFailure(Quest* quest);` +- `void SendQuestUpdateStep(Quest* quest, int32 step, bool display_quest_helper = true);` +- `void SendQuestUpdateStepImmediately(Quest* quest, int32 step, bool display_quest_helper = true);` +- `void DisplayQuestRewards(Quest* quest, int64 coin, vector* rewards = 0, vector* selectable_rewards = 0, map* factions = 0, const char* header = "Quest Reward!", int32 status_points = 0, const char* text = 0, bool was_displayed = false);` +- `void PopulateQuestRewardItems(vector * items, PacketStruct* packet, std::string num_rewards_str = "num_rewards", std::string reward_id_str = "reward_id", std::string item_str = "item");` +- `void DisplayQuestComplete(Quest* quest, bool tempReward = false, std::string customDescription = string(""), bool was_displayed = false);` +- `void DisplayRandomizeFeatures(int32 features);` +- `void AcceptQuestReward(Quest* quest, int32 item_id);` +- `void DisplayConversation(int32 conversation_id, int32 spawn_id, vector* conversations, const char* text, const char* mp3, int32 key1, int32 key2, int8 language = 0, int8 can_close = 1);` +- `void DisplayConversation(Item* item, vector* conversations, const char* text, int8 type, const char* mp3 = 0, int32 key1 = 0, int32 key2 = 0, int8 language = 0, int8 can_close = 1);` +- `void DisplayConversation(Spawn* src, int8 type, vector* conversations, const char* text, const char* mp3 = 0, int32 key1 = 0, int32 key2 = 0, int8 language = 0, int8 can_close = 1);` +- `void CloseDialog(int32 conversation_id);` +- `int32 GetConversationID(Spawn* spawn, Item* item);` +- `void CombineSpawns(float radius, Spawn* spawn);` +- `void AddCombineSpawn(Spawn* spawn);` +- `void RemoveCombineSpawn(Spawn* spawn);` +- `void SaveCombineSpawns(const char* name = 0);` +- `bool ShouldTarget();` +- `void TargetSpawn(Spawn* spawn);` +- `void ReloadQuests();` +- `int32 GetCurrentQuestID() { return current_quest_id; }` +- `void SetLuaDebugClient(bool val);` +- `void SetMerchantTransaction(Spawn* spawn);` +- `void SetMailTransaction(Spawn* spawn);` +- `void PlaySound(const char* name);` +- `void SendBuyMerchantList(bool sell = false);` +- `void SendSellMerchantList(bool sell = false);` +- `void SendBuyBackList(bool sell = false);` +- `void SendRepairList();` +- `void ShowLottoWindow();` +- `void PlayLotto(int32 price, int32 ticket_item_id);` +- `void SendGuildCreateWindow();` +- `float CalculateBuyMultiplier(int32 merchant_id);` +- `float CalculateSellMultiplier(int32 merchant_id);` +- `void BuyItem(int32 item_id, int16 quantity);` +- `void SellItem(int32 item_id, int16 quantity, int32 unique_id = 0);` +- `void BuyBack(int32 item_id, int16 quantity);` +- `void RepairItem(int32 item_id);` +- `void RepairAllItems();` +- `void AddBuyBack(int32 unique_id, int32 item_id, int16 quantity, int32 price, bool save_needed = true);` +- `void SendMailList();` +- `void DisplayMailMessage(int32 mail_id);` +- `void HandleSentMail(EQApplicationPacket* app);` +- `void DeleteMail(int32 mail_id, bool from_database = false);` +- `bool AddMailItem(Item* item);` +- `bool AddMailCoin(int32 copper, int32 silver = 0, int32 gold = 0, int32 plat = 0);` +- `bool RemoveMailCoin(int32 copper, int32 silver = 0, int32 gold = 0, int32 plat = 0);` +- `void TakeMailAttachments(int32 mail_id);` +- `void ResetSendMail(bool cancel = true, bool needslock = true);` +- `bool GateAllowed();` +- `bool BindAllowed();` +- `bool Bind();` +- `bool Gate(bool is_spell = false);` +- `void SendChatRelationship(int8 type, const char* name);` +- `void SendFriendList();` +- `void SendIgnoreList();` +- `void SendNewAdventureSpells();` +- `void SendNewTradeskillSpells();` +- `string GetCoinMessage(int32 total_coins);` +- `void SetItemSearch(vector* items);` +- `void SearchStore(int32 page);` +- `void SetPlayer(Player* new_player);` +- `void AddPendingQuestAcceptReward(Quest* quest);` +- `void AddPendingQuestReward(Quest* quest, bool update = true, bool is_temporary = false, std::string description = std::string(""));` +- `bool HasQuestRewardQueued(int32 quest_id, bool is_temporary, bool is_collection);` +- `void QueueQuestReward(int32 quest_id, bool is_temporary, bool is_collection, bool has_displayed, int64 tmp_coin, int32 tmp_status, std::string description, bool db_saved = false, int32 index = 0);` +- `void RemoveQueuedQuestReward();` +- `void AddPendingQuestUpdate(int32 quest_id, int32 step_id, int32 progress = 0xFFFFFFFF);` +- `void ProcessQuestUpdates();` +- `void AddWaypoint(const char* waypoint_name, int8 waypoint_category, int32 spawn_id);` +- `void BeginWaypoint(const char* waypoint_name, float x, float y, float z);` +- `void InspectPlayer(Player* player_to_inspect);` +- `void SetPendingGuildInvite(Guild* guild, Player* invited_by = 0);` +- `void ShowClaimWindow();` +- `void ShowGuildSearchWindow();` +- `void CheckQuestQueue();` +- `void ShowDressingRoom(Item* item, sint32 crc);` +- `void SendCollectionList();` +- `bool SendCollectionsForItem(Item* item);` +- `void HandleCollectionAddItem(int32 collection_id, Item* item);` +- `void DisplayCollectionComplete(Collection* collection);` +- `void HandInCollections();` +- `void AcceptCollectionRewards(Collection* collection, int32 selectable_item_id = 0);` +- `void SendRecipeList();` +- `void PopulateRecipeData(Recipe* recipe, PacketStruct* packet, int i = 0);` +- `int32 GetRecipeCRC(Recipe* recipe);` +- `void SendRecipeDetails(vector* recipes);` +- `void SendTitleUpdate();` +- `void SendUpdateTitles(sint32 prefix, sint32 suffix);` +- `void SendLanguagesUpdate(int32 id, bool setlang = 1);` +- `void SendAchievementsList();` +- `void SendAchievementUpdate(bool first_login = false);` +- `void SendPetOptionsWindow(const char* pet_name, int8 type = 1);` +- `void SendBiography();` +- `bool IsCrafting();` +- `void SetRecipeListSent(bool val) { m_recipeListSent = val; }` +- `bool GetRecipeListSent() { return m_recipeListSent; }` +- `void ShowRecipeBook();` +- `void SendResurrectionWindow();` +- `void AcceptResurrection();` +- `void SetPendingLastName(string last_name);` +- `void RemovePendingLastName();` +- `void SendLastNameConfirmation();` +- `void SetInitialSpawnsSent(bool val) { initial_spawns_sent = val; }` +- `bool GetInitialSpawnsSent() { return initial_spawns_sent; }` +- `void SendQuestJournalUpdate(Quest* quest, bool updated = true);` +- `void AddQuestTimer(int32 quest_id);` +- `void RemoveQuestTimer(int32 quest_id);` +- `void SetPendingFlightPath(int32 val) { pending_flight_path = val; }` +- `int32 GetPendingFlightPath() { return pending_flight_path; }` +- `void AttemptStartAutoMount();` +- `int32 extractZoneNumericalSuffix(const std::string& input) {` +- `std::regex pattern(R"(.*\s(\d+)$)"); // Matches a space followed by digits at the end` +- `return std::stoul(match[1].str()); // Extract and convert the numerical part` +- `void EndAutoMount();` +- `bool GetOnAutoMount() { return on_auto_mount; }` +- `bool IsCurrentTransmuteID(int32 trans_id);` +- `void SetTransmuteID(int32 trans_id);` +- `int32 GetTransmuteID();` +- `void SetSpawnPlacementMode(ServerSpawnPlacementMode mode) { spawnPlacementMode = mode; }` +- `ServerSpawnPlacementMode GetSpawnPlacementMode() { return spawnPlacementMode; }` +- `bool HandleNewLogin(int32 account_id, int32 access_code);` +- `void SendSpawnChanges(set& spawns);` +- `void MakeSpawnChangePacket(map info_changes, map pos_changes, map vis_changes, int32 info_size, int32 pos_size, int32 vis_size);` +- `bool IsZonedIn() { return connected_to_zone; }` +- `void SendHailCommand(Spawn* target);` +- `void SendDefaultCommand(Spawn* spawn, const char* command, float distance);` +- `void SetTempPlacementSpawn(Spawn* tmp);` +- `void SetPlacementUniqueItemID(int32 id) { placement_unique_item_id = id; }` +- `int32 GetPlacementUniqueItemID() { return placement_unique_item_id; }` +- `void SetHasOwnerOrEditAccess(bool val) { hasOwnerOrEditAccess = val; }` +- `bool HasOwnerOrEditAccess() { return hasOwnerOrEditAccess; }` +- `bool HandleHouseEntityCommands(Spawn* spawn, int32 spawnid, string command);` +- `bool PopulateHouseSpawn(PacketStruct* place_object);` +- `bool PopulateHouseSpawnFinalize();` +- `void SendMoveObjectMode(Spawn* spawn, uint8 placementMode, float unknown2_3 = 0.0f);` +- `void SendFlightAutoMount(int32 path_id, int16 mount_id = 0, int8 mount_red_color = 0xFF, int8 mount_green_color = 0xFF, int8 mount_blue_color = 0xFF);` +- `void SendShowBook(Spawn* sender, string title, int8 language, int8 num_pages, ...);` +- `void SendShowBook(Spawn* sender, string title, int8 language, vector pages);` +- `void SetTemporaryTransportID(int32 id) { temporary_transport_id = id; }` +- `int32 GetTemporaryTransportID() { return temporary_transport_id; }` +- `void SetRejoinGroupID(int32 id) { rejoin_group_id = id; }` +- `void TempRemoveGroup();` +- `void ReplaceGroupClient(Client* new_client);` +- `void SendWaypoints();` +- `void AddWaypoint(string name, int8 type);` +- `void RemoveWaypoint(string name) {` +- `void SelectWaypoint(int32 id);` +- `void ClearWaypoint();` +- `bool ShowPathToTarget(float x, float y, float z, float y_offset);` +- `bool ShowPathToTarget(Spawn* spawn);` +- `void SetRegionDebug(bool val) { regionDebugMessaging = val; }` +- `void SendEquipOrInvUpdateBySlot(int8 slot);` +- `void SetReloadingZone(bool val) { client_reloading_zone = val; }` +- `bool IsReloadingZone() { return client_reloading_zone; }` +- `void QueueStateCommand(int32 spawn_player_id, int32 state);` +- `void ProcessStateCommands();` +- `void PurgeItem(Item* item);` +- `void ConsumeFoodDrink(Item* item, int32 slot);` +- `void AwardCoins(int64 total_coins, std::string reason = string(""));` +- `void TriggerSpellSave();` +- `void ClearSentItemDetails() {` +- `bool IsPlayerLoadingComplete() { return player_loading_complete; }` +- `int32 GetRejoinGroupID() { return rejoin_group_id; }` +- `void ClearSentSpellList() {` +- `void UpdateSentSpellList();` +- `bool CountSentSpell(int32 id, int32 tier) {` +- `void SetSentSpell(int32 id, int32 tier) {` +- `void DisableSave() { disable_save = true; }` +- `bool IsSaveDisabled() { return disable_save; }` +- `void ResetZoningCoords() {` +- `void SetZoningCoords(float x, float y, float z, float h) {` +- `bool UseItem(Item* item, Spawn* target = nullptr);` +- `void SendPlayFlavor(Spawn* spawn, int8 language, VoiceOverStruct* non_garble, VoiceOverStruct* garble, bool success = false, bool garble_success = false);` +- `void SaveQuestRewardData(bool force_refresh = false);` +- `void UpdateCharacterRewardData(QuestRewardData* data);` +- `void SetQuestUpdateState(bool val) { quest_updates = val; }` +- `bool SetPlayerPOVGhost(Spawn* spawn);` +- `int32 GetPlayerPOVGhostSpawnID() { return pov_ghost_spawn_id; }` +- `void HandleDialogSelectMsg(int32 conversation_id, int32 response_index);` +- `bool SetPetName(const char* name);` +- `bool CheckConsumptionAllowed(int16 slot, bool send_message = true);` +- `void StartLinkdeadTimer();` +- `bool IsLinkdeadTimerEnabled();` +- `bool AddRecipeBookToPlayer(int32 recipe_id, Item* item = nullptr);` +- `bool RemoveRecipeFromPlayer(int32 recipe_id);` +- `void SaveSpells();` +- `void GiveQuestReward(Quest* quest, bool has_displayed = false);` +- `void SendReplaceWidget(int32 widget_id, bool delete_widget, float x = 0.0f, float y = 0.0f, float z = 0.0f, int32 grid_id = 0);` +- `void ProcessZoneIgnoreWidgets();` +- `void SendHearCast(Spawn* caster, Spawn* target, int32 spell_visual, int16 cast_time);` +- `int32 GetSpellVisualOverride(int32 spell_visual);` +- `sint16 GetClientItemPacketOffset() { sint16 offset = -1; if (GetVersion() <= 373) { offset = -2; } return offset; }` +- `int32 GetZoningID() { return zoning_id; }` +- `int32 GetZoningInstanceID() { return zoning_instance_id; }` +- `void SetZoningDetails(ZoneChangeDetails* details) { zoning_details = ZoneChangeDetails(details); }` +- `void HandleGroupAcceptResponse(int8 result);` +- `void SetGroupOptionsReference(GroupOptions* options);` +- `void SendReceiveOffer(Client* client_target, int8 type, std::string name, int8 unknown2);` +- `bool SendDialogChoice(int32 spawnID, const std::string& windowTextPrompt, const std::string& acceptText, const std::string& acceptCommand, const std::string& declineText, const std::string& declineCommand, int32 time, int8 textBox, int8 textBoxRequired, int32 maxLength);` +- `void AddRecipeToPlayerPack(Recipe* recipe, PacketStruct* packet, int16* i);` +- `void SavePlayerImages();` +- `void SkillChanged(Skill* skill, int16 previous_value, int16 new_value);` +- `void SetStepComplete(int32 quest_id, int32 step);` +- `void AddStepProgress(int32 quest_id, int32 step, int32 progress);` +- `void SendNewSpells(int8 class_id);` +- `void SendNewTSSpells(int8 class_id);` +- `void AddSendNewSpells(vector* spells);` +- `bool HandlePacket(EQApplicationPacket* app);` +- `bool GetHouseZoneServer(ZoneChangeDetails* zone_details, int32 spawn_id, int64 house_id);` +- `bool EntityCommandPrecheck(Spawn* spawn, const char* command);` +- `bool ContainsStream(EQStream* eqs);` +- `void Add(Client* client);` +- `void Remove(Client* client, bool delete_data = false);` +- `void RemoveConnection(EQStream* eqs);` +- `void Process();` +- `int32 Count();` +- `void ReloadQuests();` +- `void CheckPlayersInvisStatus(Client* owner);` +- `void RemovePlayerFromInvisHistory(int32 spawnID);` + +## Notable Comments + +- /* +- */ +- // Add accept string with int32 id and a timer +- // Add decline string with int32 id and a timer +- // Clear a specific accept string +- // Clear a specific decline string +- // Check if a dialog is active +- //void SetCurrentZoneByInstanceID(instanceid, zoneid); +- ///Send the pet options window to the client +- ///Type of pet, 1 = combat 0 = non combat diff --git a/docs/code/database.md b/docs/code/database.md new file mode 100644 index 0000000..ae5a2a8 --- /dev/null +++ b/docs/code/database.md @@ -0,0 +1,39 @@ +# File: `database.h` + +## Classes + +- `Query` +- `Database` +- `Query` + +## Functions + +- `bool Init(bool silentLoad=false);` +- `bool LoadVariables();` +- `void HandleMysqlError(int32 errnum);` +- `int32 AuthenticateWebUser(char* userName, char* passwd,int32* status = 0);` +- `int32 NoAuthRoute(char* route);` +- `void AddAsyncQuery(Query* query);` +- `void RunAsyncQueries(int32 queryid);` +- `void RemoveActiveQuery(Query* query);` +- `void AddActiveQuery(Query* query);` +- `bool IsActiveQuery(int32 id, Query* skip=0);` +- `void PingAsyncDatabase();` +- `void InitVars();` +- `void PurgeDBInstances();` +- `void FreeDBInstance(Database* cur);` +- `int32 GetLastInsertedID() { return *last_insert_id; }` +- `int32 GetAffectedRows() { return *affected_rows; }` +- `int32 GetErrorNumber(){ return errnum; }` +- `void NextRow(){` +- `void AddQueryAsync(int32 queryID, Database* db, QUERY_TYPE type, const char* format, ...);` +- `void RunQueryAsync(Database* db);` +- `QUERY_TYPE GetQueryType() {` +- `int32 GetQueryID() { return queryID; }` + +## Notable Comments + +- /* +- */ +- *row = mysql_fetch_row(result); +- *row = mysql_fetch_row(result); diff --git a/docs/code/dbcore.md b/docs/code/dbcore.md new file mode 100644 index 0000000..59badf1 --- /dev/null +++ b/docs/code/dbcore.md @@ -0,0 +1,23 @@ +# File: `dbcore.h` + +## Classes + +- `DBcore` + +## Functions + +- `eStatus GetStatus() { return pStatus; }` +- `bool RunQuery(const char* query, int32 querylen, char* errbuf = 0, MYSQL_RES** result = 0, int32* affected_rows = 0, int32* last_insert_id = 0, int32* errnum = 0, bool retry = true);` +- `int32 DoEscapeString(char* tobuf, const char* frombuf, int32 fromlen);` +- `void ping();` +- `string getSafeEscapeString(const char* from_string);` +- `string getSafeEscapeString(string* from_string);` +- `bool Open(const char* iHost, const char* iUser, const char* iPassword, const char* iDatabase, int32 iPort, int32* errnum = 0, char* errbuf = 0, bool iCompress = false, bool iSSL = false);` +- `bool ReadDBINI(char *host, char *user, char *pass, char *db, unsigned int* port, bool* compress, bool *items);` +- `bool Open(int32* errnum = 0, char* errbuf = 0);` + +## Notable Comments + +- /* +- */ +- //#include diff --git a/docs/code/debug.md b/docs/code/debug.md new file mode 100644 index 0000000..8d6721c --- /dev/null +++ b/docs/code/debug.md @@ -0,0 +1,34 @@ +# File: `debug.h` + +## Classes + +- `EQEMuLog` +- `PerformanceMonitor` + +## Functions + +- `void CatchSignal(int);` +- `typedef void (* msgCallbackBuf)(LogIDs id, const char *buf, int8 size, int32 count);` +- `typedef void (* msgCallbackFmt)(LogIDs id, const char *fmt, va_list ap);` +- `void SetAllCallbacks(msgCallbackFmt proc);` +- `void SetAllCallbacks(msgCallbackBuf proc);` +- `void SetCallback(LogIDs id, msgCallbackFmt proc);` +- `void SetCallback(LogIDs id, msgCallbackBuf proc);` +- `bool writebuf(LogIDs id, const char *buf, int8 size, int32 count);` +- `bool write(LogIDs id, const char *fmt, ...);` +- `bool Dump(LogIDs id, int8* data, int32 size, int32 cols=16, int32 skip=0);` +- `bool open(LogIDs id);` +- `bool writeNTS(LogIDs id, bool dofile, const char *fmt, ...); // no error checking, assumes is open, no locking, no timestamp, no newline` + +## Notable Comments + +- /* +- */ +- // Debug Levels +- /* +- */ +- //#ifndef _CRTDBG_MAP_ALLOC +- //#endif +- // VS6 doesn't like the length of STL generated names: disabling +- //these are callbacks called for each +- /* LogStatus: bitwise variable diff --git a/docs/code/emu_opcodes.md b/docs/code/emu_opcodes.md new file mode 100644 index 0000000..764d1ab --- /dev/null +++ b/docs/code/emu_opcodes.md @@ -0,0 +1,18 @@ +# File: `emu_opcodes.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- //this is the highest opcode possibly used in the regular EQ protocol +- /* +- */ +- //a preprocessor hack so we dont have to maintain two lists diff --git a/docs/code/emu_oplist.md b/docs/code/emu_oplist.md new file mode 100644 index 0000000..b2749e0 --- /dev/null +++ b/docs/code/emu_oplist.md @@ -0,0 +1,22 @@ +# File: `emu_oplist.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- //N(OP_AddClientToGroupMsg), +- //N(OP_AddGroupToGroupMsg), +- //N(OP_WSWeatherUpdateMsg), +- //N(OP_SkillSlotMapping), +- //N(OP_GuildKickMsg), +- //N(OP_PurchaseConsignmentRequestMsg), +- //N(OP_PurchaseConsignmentResponseMsg), +- //N(OP_ProcessScriptMsg), diff --git a/docs/code/index.md b/docs/code/index.md new file mode 100644 index 0000000..d3cc9b0 --- /dev/null +++ b/docs/code/index.md @@ -0,0 +1,17 @@ +# EQ2Emu Codebase Overview + +This documentation provides a structured overview of the EQ2Emu server code base, separated by major modules. + +## Modules + +- [LoginServer](LoginServer_Index.md) +- [Common](Common_Index.md) +- [WorldServer](WorldServer_Index.md) + +Each module index links to all related source/header files in that module. + +### Usage for LLM or Wiki: + +- Use module markdown files to understand the structure of login, world, and common functionality. +- Each file markdown lists classes, functions, and notable comments. +- This structure is ready for ingestion into markdown-based vector databases, Wiki.js, GitBook or JSONL conversion for LLM training. diff --git a/docs/code/linked_list.md b/docs/code/linked_list.md new file mode 100644 index 0000000..77b645f --- /dev/null +++ b/docs/code/linked_list.md @@ -0,0 +1,60 @@ +# File: `linked_list.h` + +## Classes + +- `ListElement` +- `LinkedList` +- `LinkedListIterator` + +## Functions + +- `void SetData ( const TYPE& d ) { data = d ; } // Quagmire - this may look like a mem leak, but dont change it, this behavior is expected where it's called` +- `void SetLastNext ( ListElement* p )` +- `void SetNext (ListElement* n) { next = n ; }` +- `void SetPrev (ListElement* p) { prev = p ; }` +- `void ReplaceData(const TYPE&);` +- `void Append (const TYPE&);` +- `void Insert (const TYPE&);` +- `TYPE Pop();` +- `TYPE PeekTop();` +- `void Clear();` +- `void LCount() { count--; }` +- `void ResetCount() { count=0; }` +- `int32 Count() { return count; }` +- `void Advance();` +- `bool IsFirst()` +- `bool IsLast()` +- `bool MoreElements();` +- `void MoveFirst();` +- `void MoveLast();` +- `void RemoveCurrent(bool DeleteData = true);` +- `void Replace(const TYPE& new_data);` +- `void Reset();` +- `void SetDir(direction);` +- `void LinkedListIterator::Advance()` +- `bool LinkedListIterator::MoreElements()` +- `void LinkedListIterator::MoveFirst()` +- `void LinkedListIterator::MoveLast()` +- `void LinkedListIterator::RemoveCurrent(bool DeleteData)` +- `void LinkedListIterator::Replace(const TYPE& new_data)` +- `void LinkedListIterator::Reset()` +- `void LinkedListIterator::SetDir(direction d)` +- `void ListElement::ReplaceData(const TYPE& new_data)` +- `void LinkedList::Clear() {` +- `void LinkedList::Append(const TYPE& data)` +- `void LinkedList::Insert(const TYPE& data)` +- `TYPE LinkedList::Pop() {` +- `TYPE LinkedList::PeekTop() {` + +## Notable Comments + +- /* +- */ +- // if (current_element == 0) +- // { +- // return; +- // } +- // if (prev != 0) +- // { +- // } +- // if (next != 0) diff --git a/docs/code/login_opcodes.md b/docs/code/login_opcodes.md new file mode 100644 index 0000000..3afe547 --- /dev/null +++ b/docs/code/login_opcodes.md @@ -0,0 +1,15 @@ +# File: `login_opcodes.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- //#define OP_Reg_SendPricing 0x0400 diff --git a/docs/code/login_oplist.md b/docs/code/login_oplist.md new file mode 100644 index 0000000..ea240a4 --- /dev/null +++ b/docs/code/login_oplist.md @@ -0,0 +1,15 @@ +# File: `login_oplist.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- //N(OP_LSRequestPlayerDescMsg), diff --git a/docs/code/login_structs.md b/docs/code/login_structs.md new file mode 100644 index 0000000..2c4a486 --- /dev/null +++ b/docs/code/login_structs.md @@ -0,0 +1,21 @@ +# File: `login_structs.h` + +## Classes + +- `LS_LoginRequest` +- `LS_WorldStatusChanged` +- `LS_PlayCharacterRequest` +- `LS_OLDPlayCharacterRequest` +- `LS_CharListAccountInfoEarlyClient` +- `LS_CharListAccountInfo` + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- // int8 unknown7; // adds 'free' option.. +- // DoF does not have the following data diff --git a/docs/code/map.md b/docs/code/map.md new file mode 100644 index 0000000..5dd57b7 --- /dev/null +++ b/docs/code/map.md @@ -0,0 +1,49 @@ +# File: `map.h` + +## Classes + +- `GridMapBorder` +- `Map` +- `impl` +- `MapRange` + +## Functions + +- `float FindBestZ(glm::vec3 &start, glm::vec3 *result, std::map* ignored_widgets, uint32 *GridID = 0, uint32* WidgetID = 0);` +- `float FindClosestZ(glm::vec3 &start, glm::vec3 *result, std::map* ignored_widgets, uint32 *GridID = 0, uint32* WidgetID = 0);` +- `bool LineIntersectsZone(glm::vec3 start, glm::vec3 end, float step, std::map* ignored_widgets, glm::vec3 *result);` +- `bool LineIntersectsZoneNoZLeaps(glm::vec3 start, glm::vec3 end, float step_mag, std::map* ignored_widgets, glm::vec3 *result);` +- `bool CheckLoS(glm::vec3 myloc, glm::vec3 oloc, std::map* ignored_widgets);` +- `bool DoCollisionCheck(glm::vec3 myloc, glm::vec3 oloc, std::map* ignored_widgets, glm::vec3 &outnorm, float &distance);` +- `bool Load(const std::string& filename);` +- `std::string GetFileName() { return m_ZoneFile; }` +- `void SetMapLoaded(bool val) {` +- `bool IsMapLoaded() {` +- `void SetMapLoading(bool val) {` +- `bool IsMapLoading() {` +- `float GetMinX() { return m_MinX; }` +- `float GetMaxX() { return m_MaxX; }` +- `float GetMinY() { return m_MinY; }` +- `float GetMaxY() { return m_MaxY; }` +- `float GetMinZ() { return m_MinZ; }` +- `float GetMaxZ() { return m_MaxZ; }` +- `bool isPointWithinMap(double x, double y, double z, double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {` +- `void SetFileName(std::string newfile) { m_FileName = string(newfile); }` +- `void MapMinMaxY(float y);` +- `void MapGridMinMaxBorderArray(GridMapBorder* border, glm::vec3 a, glm::vec3 b, glm::vec3 c);` +- `void MapGridMinMaxBorder(GridMapBorder* border, glm::vec3 a);` +- `bool IsPointInGrid(GridMapBorder* border, glm::vec3 a, float radius);` +- `std::vector GetGridsByPoint(glm::vec3 a, float radius);` +- `void RotateVertex(glm::vec3 &v, float rx, float ry, float rz);` +- `void ScaleVertex(glm::vec3 &v, float sx, float sy, float sz);` +- `void TranslateVertex(glm::vec3 &v, float tx, float ty, float tz);` +- `bool LoadV2(FILE *f);` +- `bool LoadV2Deflated(FILE *f);` +- `bool LoadV3Deflated(std::ifstream* file, std::streambuf * const srcbuf);` +- `void Clear();` +- `void AddVersionRange(std::string zoneName);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/md5.md b/docs/code/md5.md new file mode 100644 index 0000000..8c48db6 --- /dev/null +++ b/docs/code/md5.md @@ -0,0 +1,18 @@ +# File: `md5.h` + +## Classes + +- `MD5` +- `MD5Context` + +## Functions + +- `void Generate(const char* iString);` +- `void Generate(const int8* buf, uint32 len);` +- `bool Set(const int8 buf[16]);` +- `bool Set(const char* iMD5String);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/misc.md b/docs/code/misc.md new file mode 100644 index 0000000..734ebda --- /dev/null +++ b/docs/code/misc.md @@ -0,0 +1,33 @@ +# File: `misc.h` + +## Classes + +_None detected_ + +## Functions + +- `void Unprotect(string &s, char what);` +- `void Protect(string &s, char what);` +- `bool ItemParse(const char *data, int length, map > &items, int id_pos, int name_pos, int max_field, int level=0);` +- `int Tokenize(string s, map & tokens, char delim='|');` +- `void LoadItemDBFieldNames();` +- `void encode_length(unsigned long length, char *out);` +- `void decode(char *in, char *out);` +- `void encode_chunk(char *in, int len, char *out);` +- `void decode_chunk(char *in, char *out);` +- `int Deflate(unsigned char* in_data, int in_length, unsigned char* out_data, int max_out_length);` +- `int Inflate(unsigned char* indata, int indatalen, unsigned char* outdata, int outdatalen, bool iQuiet=true);` +- `int print_stacktrace();` +- `bool alpha_check(unsigned char val);` +- `void dump_message_column(unsigned char *buffer, unsigned long length, string leader="", FILE *to = stdout);` +- `string string_from_time(string pattern, time_t now=0);` +- `string timestamp(time_t now=0);` +- `string long2ip(unsigned long ip);` +- `string pop_arg(string &s, string seps, bool obey_quotes);` +- `int EQsprintf(char *buffer, const char *pattern, const char *arg1, const char *arg2, const char *arg3, const char *arg4, const char *arg5, const char *arg6, const char *arg7, const char *arg8, const char *arg9);` +- `int GetItemNameCrc(string item_name);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/mob_movement_manager.md b/docs/code/mob_movement_manager.md new file mode 100644 index 0000000..290d07f --- /dev/null +++ b/docs/code/mob_movement_manager.md @@ -0,0 +1,44 @@ +# File: `mob_movement_manager.h` + +## Classes + +- `Mob` +- `Client` +- `RotateCommand` +- `MovementCommand` +- `MobMovementEntry` +- `PlayerPositionUpdateServer_Struct` +- `MobMovementManager` +- `Implementation` + +## Functions + +- `void Process();` +- `void AddMob(Entity *mob);` +- `void RemoveMob(Entity *mob);` +- `void AddClient(Client *client);` +- `void RemoveClient(Client *client);` +- `void RotateTo(Entity *who, float to, MobMovementMode mob_movement_mode = MovementRunning);` +- `void Teleport(Entity *who, float x, float y, float z, float heading);` +- `void NavigateTo(Entity *who, float x, float y, float z, MobMovementMode mode = MovementRunning, bool overrideDistance=false);` +- `void StopNavigation(Entity *who);` +- `void DisruptNavigation(Entity* who);` +- `float FixHeading(float in);` +- `void ClearStats();` +- `bool IsRunningCommandProcess() {` +- `bool SetCommandProcess(bool status) {` +- `void UpdatePath(Entity *who, float x, float y, float z, MobMovementMode mob_movement_mode);` +- `void UpdatePathGround(Entity *who, float x, float y, float z, MobMovementMode mode);` +- `void UpdatePathUnderwater(Entity *who, float x, float y, float z, MobMovementMode movement_mode);` +- `void UpdatePathBoat(Entity *who, float x, float y, float z, MobMovementMode mode);` +- `void PushTeleportTo(MobMovementEntry &ent, float x, float y, float z, float heading);` +- `void PushMoveTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mob_movement_mode);` +- `void PushSwimTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mob_movement_mode);` +- `void PushRotateTo(MobMovementEntry &ent, Entity *who, float to, MobMovementMode mob_movement_mode);` +- `void PushStopMoving(MobMovementEntry &mob_movement_entry);` +- `void PushEvadeCombat(MobMovementEntry &mob_movement_entry);` +- `void HandleStuckBehavior(Entity *who, float x, float y, float z, MobMovementMode mob_movement_mode);` + +## Notable Comments + +- /* diff --git a/docs/code/net.md b/docs/code/net.md new file mode 100644 index 0000000..28b5e42 --- /dev/null +++ b/docs/code/net.md @@ -0,0 +1,39 @@ +# File: `net.h` + +## Classes + +- `NetConnection` +- `ZoneAuthRequest` +- `ZoneAuth` + +## Functions + +- `ThreadReturnType EQ2ConsoleListener(void *tmp);` +- `void CatchSignal(int sig_num);` +- `void UpdateWindowTitle(char* iNewTitle);` +- `bool ReadLoginINI(int argc, char** argv);` +- `void WelcomeHeader();` +- `void SetPrimary(bool isprimary = true);` +- `std::string GetWebWorldAddress() { return web_worldaddress; }` +- `std::string GetWebCertFile() { return web_certfile; }` +- `std::string GetWebKeyFile() { return web_keyfile; }` +- `std::string GetWebKeyPassword() { return web_keypassword; }` +- `std::string GetWebHardcodeUser() { return web_hardcodeuser; }` +- `std::string GetWebHardcodePassword() { return web_hardcodepassword; }` +- `std::string GetCmdUser() { return web_cmduser; }` +- `std::string GetCmdPassword() { return web_cmdpassword; }` +- `int16 GetPeerPriority() { return web_peerpriority; }` +- `int32 GetAccountID() { return accountid; }` +- `int32 GetAccessKey() { return accesskey; }` +- `int32 GetTimeStamp() { return timestamp; }` +- `void setFirstLogin(bool value) { firstlogin = value; }` +- `bool isFirstLogin() { return firstlogin; }` +- `void AddAuth(ZoneAuthRequest* zar);` +- `void PurgeInactiveAuth();` +- `void RemoveAuth(ZoneAuthRequest* zar);` + +## Notable Comments + +- /* +- */ +- // Create a copy of the existing multimap diff --git a/docs/code/op_codes.md b/docs/code/op_codes.md new file mode 100644 index 0000000..696b9ca --- /dev/null +++ b/docs/code/op_codes.md @@ -0,0 +1,14 @@ +# File: `op_codes.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ diff --git a/docs/code/opcodemgr.md b/docs/code/opcodemgr.md new file mode 100644 index 0000000..f307835 --- /dev/null +++ b/docs/code/opcodemgr.md @@ -0,0 +1,32 @@ +# File: `opcodemgr.h` + +## Classes + +- `OpcodeManager` +- `OpcodeSetStrategy` +- `MutableOpcodeManager` +- `SharedOpcodeManager` +- `SharedMemStrategy` +- `RegularOpcodeManager` +- `NormalMemStrategy` +- `NullOpcodeManager` +- `EmptyOpcodeManager` + +## Functions + +- `EmuOpcode NameSearch(const char *name);` +- `void Set(EmuOpcode emu_op, uint16 eq_op);` +- `void Set(EmuOpcode emu_op, uint16 eq_op);` + +## Notable Comments + +- /* +- */ +- //This has to be public for stupid visual studio +- //in a shared manager, this dosent protect others +- //keeps opcodes in shared memory +- //keeps opcodes in regular heap memory +- //implement our editing interface +- //always resolves everything to 0 or OP_Unknown +- //fake it, just used for testing anyways +- //starts as NullOpcodeManager, but remembers any mappings set diff --git a/docs/code/packet_dump.md b/docs/code/packet_dump.md new file mode 100644 index 0000000..c4c4459 --- /dev/null +++ b/docs/code/packet_dump.md @@ -0,0 +1,22 @@ +# File: `packet_dump.h` + +## Classes + +- `ServerPacket` + +## Functions + +- `void DumpPacketAscii(const uchar* buf, int32 size, int32 cols=16, int32 skip=0);` +- `void DumpPacketHex(const uchar* buf, int32 size, int32 cols=16, int32 skip=0);` +- `void DumpPacketBin(const void* data, int32 len);` +- `void DumpPacket(const uchar* buf, int32 size);` +- `void DumpPacket(const ServerPacket* pack, bool iShowInfo = false);` +- `void DumpPacketBin(const ServerPacket* pack);` +- `void DumpPacketBin(int32 data);` +- `void DumpPacketBin(int16 data);` +- `void DumpPacketBin(int8 data);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/packet_functions.md b/docs/code/packet_functions.md new file mode 100644 index 0000000..909dedf --- /dev/null +++ b/docs/code/packet_functions.md @@ -0,0 +1,27 @@ +# File: `packet_functions.h` + +## Classes + +_None detected_ + +## Functions + +- `int32 roll(int32 in, int8 bits);` +- `int64 roll(int64 in, int8 bits);` +- `int32 rorl(int32 in, int8 bits);` +- `int64 rorl(int64 in, int8 bits);` +- `void EncryptProfilePacket(EQApplicationPacket* app);` +- `void EncryptProfilePacket(uchar* pBuffer, int32 size);` +- `void EncryptZoneSpawnPacket(EQApplicationPacket* app);` +- `void EncryptZoneSpawnPacket(uchar* pBuffer, int32 size);` +- `int DeflatePacket(unsigned char* in_data, int in_length, unsigned char* out_data, int max_out_length);` +- `uint32 InflatePacket(uchar* indata, uint32 indatalen, uchar* outdata, uint32 outdatalen, bool iQuiet = false);` +- `uint32 GenerateCRC(int32 b, int32 bufsize, uchar *buf);` +- `uint32 GenerateCRCRecipe(uint32 b, void* buf, uint32 bufsize);` + +## Notable Comments + +- /* +- */ +- //void EncryptSpawnPacket(EQApplicationPacket* app); +- //void EncryptSpawnPacket(uchar* pBuffer, int32 size); diff --git a/docs/code/pathfinder_interface.md b/docs/code/pathfinder_interface.md new file mode 100644 index 0000000..19ee7e3 --- /dev/null +++ b/docs/code/pathfinder_interface.md @@ -0,0 +1,17 @@ +# File: `pathfinder_interface.h` + +## Classes + +- `Client` +- `Seperator` +- `PathfinderOptions` +- `IPathfinder` +- `IPathNode` + +## Functions + +_None detected_ + +## Notable Comments + +_None detected_ diff --git a/docs/code/pathfinder_nav_mesh.md b/docs/code/pathfinder_nav_mesh.md new file mode 100644 index 0000000..6866fff --- /dev/null +++ b/docs/code/pathfinder_nav_mesh.md @@ -0,0 +1,20 @@ +# File: `pathfinder_nav_mesh.h` + +## Classes + +- `NavMeshSetHeader` +- `NavMeshTileHeader` +- `PathfinderNavmesh` +- `Implementation` + +## Functions + +- `void Clear();` +- `void Load(const std::string &path);` +- `void ShowPath(Client *c, const glm::vec3 &start, const glm::vec3 &end);` +- `dtStatus GetPolyHeightNoConnections(dtPolyRef ref, const float *pos, float *height) const;` +- `dtStatus GetPolyHeightOnPath(const dtPolyRef *path, const int path_len, const glm::vec3 &pos, float *h) const;` + +## Notable Comments + +_None detected_ diff --git a/docs/code/pathfinder_null.md b/docs/code/pathfinder_null.md new file mode 100644 index 0000000..e074a35 --- /dev/null +++ b/docs/code/pathfinder_null.md @@ -0,0 +1,13 @@ +# File: `pathfinder_null.h` + +## Classes + +- `PathfinderNull` + +## Functions + +_None detected_ + +## Notable Comments + +_None detected_ diff --git a/docs/code/pathfinder_waypoint.md b/docs/code/pathfinder_waypoint.md new file mode 100644 index 0000000..50adce3 --- /dev/null +++ b/docs/code/pathfinder_waypoint.md @@ -0,0 +1,24 @@ +# File: `pathfinder_waypoint.h` + +## Classes + +- `PathFileHeader` +- `Node` +- `FindPerson_Point` +- `PathfinderWaypoint` +- `Implementation` + +## Functions + +- `void Load(const std::string &filename);` +- `void LoadV2(FILE *f, const PathFileHeader &header);` +- `void LoadV3(FILE *f, const PathFileHeader &header);` +- `void ShowNodes();` +- `void ShowPath(Client *c, const glm::vec3 &start, const glm::vec3 &end);` +- `void NodeInfo(Client *c);` +- `void BuildGraph();` +- `void ShowNode(const Node &n);` + +## Notable Comments + +_None detected_ diff --git a/docs/code/position.md b/docs/code/position.md new file mode 100644 index 0000000..3130b11 --- /dev/null +++ b/docs/code/position.md @@ -0,0 +1,42 @@ +# File: `position.h` + +## Classes + +_None detected_ + +## Functions + +- `std::string to_string(const glm::vec4 &position);` +- `std::string to_string(const glm::vec3 &position);` +- `std::string to_string(const glm::vec2 &position);` +- `bool IsWithinAxisAlignedBox(const glm::vec3 &position, const glm::vec3 &minimum, const glm::vec3 &maximum);` +- `bool IsWithinAxisAlignedBox(const glm::vec2 &position, const glm::vec2 &minimum, const glm::vec2 &maximum);` +- `bool IsOrigin(const glm::vec2 &position);` +- `bool IsOrigin(const glm::vec3 &position);` +- `bool IsOrigin(const glm::vec4 &position);` +- `float DistanceSquared(const glm::vec2& point1, const glm::vec2& point2);` +- `float Distance(const glm::vec2& point1, const glm::vec2& point2);` +- `float DistanceSquared(const glm::vec3& point1, const glm::vec3& point2);` +- `float Distance(const glm::vec3& point1, const glm::vec3& point2);` +- `float DistanceNoZ(const glm::vec3& point1, const glm::vec3& point2);` +- `float DistanceSquaredNoZ(const glm::vec3& point1, const glm::vec3& point2);` +- `float DistanceSquared(const glm::vec4& point1, const glm::vec4& point2);` +- `float Distance(const glm::vec4& point1, const glm::vec4& point2);` +- `float DistanceNoZ(const glm::vec4& point1, const glm::vec4& point2);` +- `float DistanceSquaredNoZ(const glm::vec4& point1, const glm::vec4& point2);` +- `float GetReciprocalHeading(const glm::vec4& point1);` +- `float GetReciprocalHeading(const float heading);` +- `bool IsHeadingEqual(const float h1, const float h2);` +- `bool IsPositionEqual(const glm::vec2 &p1, const glm::vec2 &p2);` +- `bool IsPositionEqual(const glm::vec3 &p1, const glm::vec3 &p2);` +- `bool IsPositionEqual(const glm::vec4 &p1, const glm::vec4 &p2);` +- `bool IsPositionEqualWithinCertainZ(const glm::vec3 &p1, const glm::vec3 &p2, float z_eps);` +- `bool IsPositionEqualWithinCertainZ(const glm::vec4 &p1, const glm::vec4 &p2, float z_eps);` +- `bool IsPositionWithinSimpleCylinder(const glm::vec3 &p1, const glm::vec3 &cylinder_center, float cylinder_radius, float cylinder_height);` +- `bool IsPositionWithinSimpleCylinder(const glm::vec4 &p1, const glm::vec4 &cylinder_center, float cylinder_radius, float cylinder_height);` +- `float CalculateHeadingAngleBetweenPositions(float x1, float y1, float x2, float y2);` + +## Notable Comments + +- /* EQEMu: Everquest Server Emulator +- */ diff --git a/docs/code/queue.md b/docs/code/queue.md new file mode 100644 index 0000000..d6f925f --- /dev/null +++ b/docs/code/queue.md @@ -0,0 +1,19 @@ +# File: `queue.h` + +## Classes + +- `MyQueue` +- `MyQueueNode` +- `MyQueue` + +## Functions + +- `void push(T* data)` +- `bool empty()` +- `void clear()` +- `int count()` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/races.md b/docs/code/races.md new file mode 100644 index 0000000..00a0be4 --- /dev/null +++ b/docs/code/races.md @@ -0,0 +1,16 @@ +# File: `races.h` + +## Classes + +- `Races` + +## Functions + +- `int8 GetRaceNameGood();` +- `int8 GetRaceNameEvil();` +- `sint8 GetRaceID(const char* name);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/raycast_mesh.md b/docs/code/raycast_mesh.md new file mode 100644 index 0000000..359c915 --- /dev/null +++ b/docs/code/raycast_mesh.md @@ -0,0 +1,22 @@ +# File: `raycast_mesh.h` + +## Classes + +- `RaycastMesh` + +## Functions + +- `void serializeRaycastMesh(RaycastMesh* rm, std::vector& rm_buffer);` + +## Notable Comments + +- // This code snippet allows you to create an axis aligned bounding volume tree for a triangle mesh so that you can do +- // high-speed raycasting. +- // +- // There are much better implementations of this available on the internet. In particular I recommend that you use +- // OPCODE written by Pierre Terdiman. +- // @see: http://www.codercorner.com/Opcode.htm +- // +- // OPCODE does a whole lot more than just raycasting, and is a rather significant amount of source code. +- // +- // I am providing this code snippet for the use case where you *only* want to do quick and dirty optimized raycasting. diff --git a/docs/code/region_map.md b/docs/code/region_map.md new file mode 100644 index 0000000..a61517d --- /dev/null +++ b/docs/code/region_map.md @@ -0,0 +1,25 @@ +# File: `region_map.h` + +## Classes + +- `Client` +- `Spawn` +- `ZoneServer` +- `Region_Node` +- `ZBSP_Node` +- `RegionMap` +- `RegionMapRange` + +## Functions + +- `void AddVersionRange(std::string zoneName);` +- `else if (range->GetMinVersion() <= min_version && range->GetMaxVersion() == 0)` +- `else if (range->GetMinVersion() == 0 && max_version <= range->GetMaxVersion())` +- `else if (version >= range->GetMinVersion() && version <= range->GetMaxVersion())` + +## Notable Comments + +- // if min and max version are both in range +- // if the min version is in range, but max range is 0 +- // if min version is 0 and max_version has a cap +- // if min and max version are both in range diff --git a/docs/code/region_map_v1.md b/docs/code/region_map_v1.md new file mode 100644 index 0000000..ec68866 --- /dev/null +++ b/docs/code/region_map_v1.md @@ -0,0 +1,20 @@ +# File: `region_map_v1.h` + +## Classes + +- `Client` +- `Spawn` +- `Region_Status` +- `RegionMapV1` + +## Functions + +- `WaterRegionType BSPReturnRegionType(int32 node_number, const glm::vec3& location, int32 gridid=0) const;` +- `WaterRegionType BSPReturnRegionTypeNode(const Region_Node* node, const ZBSP_Node* BSP_Root, int32 node_number, const glm::vec3& location, float distToNode=0.0f) const;` +- `WaterRegionType BSPReturnRegionWaterRegion(const Region_Node* node, const ZBSP_Node* BSP_Root, int32 node_number, const glm::vec3& location, float distToNode=0.0f) const;` +- `WaterRegionType EstablishDistanceAtAngle(const Region_Node* region_node, const ZBSP_Node* current_node, float distance, float absDistance, float absSplitDist, bool checkEdgedAngle=false) const;` +- `std::string TestFile(std::string testFile);` + +## Notable Comments + +_None detected_ diff --git a/docs/code/seperator.md b/docs/code/seperator.md new file mode 100644 index 0000000..29e6f60 --- /dev/null +++ b/docs/code/seperator.md @@ -0,0 +1,27 @@ +# File: `seperator.h` + +## Classes + +- `Seperator` + +## Functions + +- `else if (iObeyQuotes && (message[i] == '\"' || message[i] == '\'')) {` +- `bool IsSet(int num) const {` +- `return IsSet(arg[num]);` +- `bool IsNumber(int num) const {` +- `return IsNumber(arg[num]);` +- `bool IsHexNumber(int num) const {` +- `return IsHexNumber(arg[num]);` +- `else if (i == 0 && (check[i] == '-' || check[i] == '+') && !check[i+1] == 0) {` + +## Notable Comments + +- /* +- */ +- // This class will split up a string smartly at the div character (default is space and tab) +- // Seperator.arg[i] is a copy of the string chopped at the divs +- // Seperator.argplus[i] is a pointer to the original string so it doesnt end at the div +- // Written by Quagmire +- // cout << i << ": 0x" << hex << (int) message[i] << dec << " " << message[i] << endl; +- // this is ok, do nothin diff --git a/docs/code/servertalk.md b/docs/code/servertalk.md new file mode 100644 index 0000000..b07e557 --- /dev/null +++ b/docs/code/servertalk.md @@ -0,0 +1,69 @@ +# File: `servertalk.h` + +## Classes + +- `ServerPacket` +- `GetLatestTables_Struct` +- `ServerLSInfo_Struct` +- `ServerLSStatus_Struct` +- `ServerSystemwideMessage` +- `ServerSyncWorldList_Struct` +- `UsertoWorldRequest_Struct` +- `UsertoWorldResponse_Struct` +- `ServerEncapPacket_Struct` +- `ServerEmoteMessage_Struct` +- `LatestTableVersions` +- `TableData` +- `TableQuery` +- `TableDataQuery` +- `EquipmentUpdateRequest_Struct` +- `LoginEquipmentUpdate` +- `EquipmentUpdate_Struct` +- `EquipmentUpdateList_Struct` +- `ZoneUpdateRequest_Struct` +- `LoginZoneUpdate` +- `ZoneUpdate_Struct` +- `ZoneUpdateList_Struct` +- `CharacterTimeStamp_Struct` +- `CharDataUpdate_Struct` +- `BugReport` +- `RaceUpdate_Struct` +- `CharNameUpdate_Struct` +- `CharZoneUpdate_Struct` +- `WorldCharCreate_Struct` +- `WorldCharNameFilter_Struct` +- `WorldCharNameFilterResponse_Struct` +- `CharPictureUpdate_Struct` + +## Functions + +- `bool Deflate() {` +- `bool Inflate() {` +- `void SetTableSize(int16 size){` +- `void AddTable(char* name, int32 version, int32 data_version){` +- `int16 GetTotalSize(){` +- `int16 GetTotalTables(){` +- `TableVersion GetTable(int16 index){` +- `string Serialize(){` +- `void DeSerialize(uchar* data){` +- `string GetQueriesString(){` +- `void AddQuery(char* query){` +- `int16 GetTotalSize(){` +- `int16 GetTotalQueries(){` +- `string Serialize(){` +- `void DeSerialize(uchar* data){` +- `int32 GetTotalQueries(){` +- `void DeSerialize(uchar* data){` + +## Notable Comments + +- /* +- */ +- //EQ2 Opcodes +- /************ PACKET RELATED STRUCT ************/ +- /*struct TableVersion{ +- // Max number of equipment updates to send at once +- // Login's structure of equipment data +- // World's structure of equipment data +- // How many equipmment updates are there to send? +- //EQ2 Specific Structures Login -> World (Image) diff --git a/docs/code/sha512.md b/docs/code/sha512.md new file mode 100644 index 0000000..cc019e6 --- /dev/null +++ b/docs/code/sha512.md @@ -0,0 +1,26 @@ +# File: `sha512.h` + +## Classes + +- `SHA512` + +## Functions + +- `void init();` +- `void update(const unsigned char *message, unsigned int len);` +- `void final(unsigned char *digest);` +- `void transform(const unsigned char *message, unsigned int block_nb);` +- `std::string sha512(std::string input);` + +## Notable Comments + +- *((str) + 3) = (uint8) ((x) ); \ +- *((str) + 2) = (uint8) ((x) >> 8); \ +- *((str) + 1) = (uint8) ((x) >> 16); \ +- *((str) + 0) = (uint8) ((x) >> 24); \ +- *((str) + 7) = (uint8) ((x) ); \ +- *((str) + 6) = (uint8) ((x) >> 8); \ +- *((str) + 5) = (uint8) ((x) >> 16); \ +- *((str) + 4) = (uint8) ((x) >> 24); \ +- *((str) + 3) = (uint8) ((x) >> 32); \ +- *((str) + 2) = (uint8) ((x) >> 40); \ diff --git a/docs/code/string_util.md b/docs/code/string_util.md new file mode 100644 index 0000000..abfa098 --- /dev/null +++ b/docs/code/string_util.md @@ -0,0 +1,46 @@ +# File: `string_util.h` + +## Classes + +_None detected_ + +## Functions + +- `std::vector split(std::string str_to_split, char delimiter);` +- `std::string implode(std::string glue, std::vector src);` +- `return ltrim(rtrim(str, chars), chars);` +- `std::string implode(const std::string &glue, const std::pair &encapsulation, const std::vector &src)` +- `std::string output(oss.str());` +- `std::vector join_pair(const std::string &glue, const std::pair &encapsulation, const std::vector> &src)` +- `std::vector join_tuple(const std::string &glue, const std::pair &encapsulation, const std::vector> &src)` +- `std::vector SplitString(const std::string &s, char delim);` +- `std::string EscapeString(const char *src, size_t sz);` +- `std::string EscapeString(const std::string &s);` +- `bool StringIsNumber(const std::string &s);` +- `void ToLowerString(std::string &s);` +- `void ToUpperString(std::string &s);` +- `std::string JoinString(const std::vector& ar, const std::string &delim);` +- `void find_replace(std::string& string_subject, const std::string& search_string, const std::string& replace_string);` +- `void ParseAccountString(const std::string &s, std::string &account, std::string &loginserver);` +- `bool atobool(const char* iBool);` +- `bool isAlphaNumeric(const char *text);` +- `bool strn0cpyt(char* dest, const char* source, uint32 size);` +- `int MakeAnyLenString(char** ret, const char* format, ...);` +- `uint32 AppendAnyLenString(char** ret, uint32* bufsize, uint32* strlen, const char* format, ...);` +- `uint32 hextoi(const char* num);` +- `uint64 hextoi64(const char* num);` +- `void MakeLowerString(const char *source, char *target);` +- `void RemoveApostrophes(std::string &s);` + +## Notable Comments + +- /* +- * Copyright 2013 Facebook, Inc. +- * +- * Licensed under the Apache License, Version 2.0 (the "License"); +- * you may not use this file except in compliance with the License. +- * You may obtain a copy of the License at +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software diff --git a/docs/code/timer.md b/docs/code/timer.md new file mode 100644 index 0000000..f0e3f25 --- /dev/null +++ b/docs/code/timer.md @@ -0,0 +1,33 @@ +# File: `timer.h` + +## Classes + +- `Timer` +- `BenchTimer` + +## Functions + +- `int gettimeofday (timeval *tp, ...);` +- `bool Check(bool iReset = true);` +- `void Enable();` +- `void Disable();` +- `void Start(int32 set_timer_time=0, bool ChangeResetTimer = true);` +- `void SetTimer(int32 set_timer_time=0);` +- `int32 GetRemainingTime();` +- `int32 GetElapsedTime();` +- `void Trigger();` +- `void SetAtTrigger(int32 set_at_trigger, bool iEnableIfDisabled = false);` +- `void reset() { start_time = clock::now(); }` +- `double elapsed() { return std::chrono::duration(clock::now() - start_time).count(); }` + +## Notable Comments + +- /* +- */ +- // Disgrace: for windows compile +- // Tells the timer to be more acurate about happening every X ms. +- // Instead of Check() setting the start_time = now, +- // it it sets it to start_time += timer_time +- // static int32 current_time; +- // static int32 last_time; +- // this is seconds diff --git a/docs/code/types.md b/docs/code/types.md new file mode 100644 index 0000000..f7fb583 --- /dev/null +++ b/docs/code/types.md @@ -0,0 +1,26 @@ +# File: `types.h` + +## Classes + +- `uint16_breakdown` +- `uint32_breakdown` +- `EQ2_32BitString` +- `EQ2_16BitString` +- `EQ2_8BitString` +- `EQ2_Color` +- `WorldTime` + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ +- //atoi is not int32 or uint32 safe!!!! +- //typedef __u64 int64; +- //typedef __u64 uint64; +- //typedef __s64 sint64; +- // #define THREAD_RETURN(x) return; +- // More WIN32 compatability diff --git a/docs/code/unix.md b/docs/code/unix.md new file mode 100644 index 0000000..48f5e91 --- /dev/null +++ b/docs/code/unix.md @@ -0,0 +1,14 @@ +# File: `unix.h` + +## Classes + +_None detected_ + +## Functions + +- `void Sleep(unsigned int x);` + +## Notable Comments + +- /* +- */ diff --git a/docs/code/version.md b/docs/code/version.md new file mode 100644 index 0000000..1537470 --- /dev/null +++ b/docs/code/version.md @@ -0,0 +1,14 @@ +# File: `version.h` + +## Classes + +_None detected_ + +## Functions + +_None detected_ + +## Notable Comments + +- /* +- */ diff --git a/docs/code/xmlParser.md b/docs/code/xmlParser.md new file mode 100644 index 0000000..9bd77d7 --- /dev/null +++ b/docs/code/xmlParser.md @@ -0,0 +1,90 @@ +# File: `xmlParser.h` + +## Classes + +- `XMLNodeContents` +- `XMLNodeDataTag` +- `XMLNodeDataTag` + +## Functions + +- `XMLSTR createXMLString(int nFormat=1, int *pnSize=NULL) const;` +- `XMLCSTR getName() const; ///< name of the node` +- `XMLCSTR getText(int i=0) const; ///< return ith text field` +- `int nText() const; ///< nbr of text field` +- `XMLNode getParentNode() const; ///< return the parent node` +- `XMLNode getChildNode(int i=0) const; ///< return ith child node` +- `XMLNode getChildNode(XMLCSTR name, int i) const; ///< return ith child node with specific name (return an empty node if failing). If i==-1, this returns the last XMLNode with the given name.` +- `XMLNode getChildNode(XMLCSTR name, int *i=NULL) const; ///< return next child node with specific name (return an empty node if failing)` +- `XMLNode getChildNodeByPath(XMLCSTR path, char createNodeIfMissing=0, XMLCHAR sep='/');` +- `XMLNode getChildNodeByPathNonConst(XMLSTR path, char createNodeIfMissing=0, XMLCHAR sep='/');` +- `int nChildNode(XMLCSTR name) const; ///< return the number of child node with specific name` +- `int nChildNode() const; ///< nbr of child node` +- `XMLAttribute getAttribute(int i=0) const; ///< return ith attribute` +- `XMLCSTR getAttributeName(int i=0) const; ///< return ith attribute name` +- `XMLCSTR getAttributeValue(int i=0) const; ///< return ith attribute value` +- `char isAttributeSet(XMLCSTR name) const; ///< test if an attribute with a specific name is given` +- `XMLCSTR getAttribute(XMLCSTR name, int i) const; ///< return ith attribute content with specific name (return a NULL if failing)` +- `XMLCSTR getAttribute(XMLCSTR name, int *i=NULL) const; ///< return next attribute content with specific name (return a NULL if failing)` +- `int nAttribute() const; ///< nbr of attribute` +- `XMLClear getClear(int i=0) const; ///< return ith clear field (comments)` +- `int nClear() const; ///< nbr of clear field` +- `XMLNodeContents enumContents(XMLElementPosition i) const; ///< enumerate all the different contents (attribute,child,text, clear) of the current XMLNode. The order is reflecting the order of the original file/string. NOTE: 0 <= i < nElement();` +- `int nElement() const; ///< nbr of different contents for current node` +- `char isEmpty() const; ///< is this node Empty?` +- `char isDeclaration() const; ///< is this node a declaration ` +- `XMLNode deepCopy() const; ///< deep copy (duplicate/clone) a XMLNode` +- `XMLNode addChild(XMLCSTR lpszName, char isDeclaration=FALSE, XMLElementPosition pos=-1); ///< Add a new child node` +- `XMLNode addChild(XMLNode nodeToAdd, XMLElementPosition pos=-1); ///< If the "nodeToAdd" has some parents, it will be detached from it's parents before being attached to the current XMLNode` +- `XMLCSTR addText(XMLCSTR lpszValue, XMLElementPosition pos=-1); ///< Add a new text content` +- `XMLCSTR updateName(XMLCSTR lpszName); ///< change node's name` +- `XMLCSTR updateText(XMLCSTR lpszNewValue, int i=0); ///< if the text to update is missing, a new one will be added` +- `XMLCSTR updateText(XMLCSTR lpszNewValue, XMLCSTR lpszOldValue); ///< if the text to update is missing, a new one will be added` +- `void deleteNodeContent();` +- `void deleteAttribute(int i=0); ///< Delete the ith attribute of the current XMLNode` +- `void deleteAttribute(XMLCSTR lpszName); ///< Delete the attribute with the given name (the "strcmp" function is used to find the right attribute)` +- `void deleteAttribute(XMLAttribute *anAttribute); ///< Delete the attribute with the name "anAttribute->lpszName" (the "strcmp" function is used to find the right attribute)` +- `void deleteText(int i=0); ///< Delete the Ith text content of the current XMLNode` +- `void deleteText(XMLCSTR lpszValue); ///< Delete the text content "lpszValue" inside the current XMLNode (direct "pointer-to-pointer" comparison is used to find the right text)` +- `void deleteClear(int i=0); ///< Delete the Ith clear tag inside the current XMLNode` +- `void deleteClear(XMLCSTR lpszValue); ///< Delete the clear tag "lpszValue" inside the current XMLNode (direct "pointer-to-pointer" comparison is used to find the clear tag)` +- `void deleteClear(XMLClear *p); ///< Delete the clear tag "p" inside the current XMLNode (direct "pointer-to-pointer" comparison on the lpszName of the clear tag is used to find the clear tag)` +- `XMLNode addChild_WOSD(XMLSTR lpszName, char isDeclaration=FALSE, XMLElementPosition pos=-1); ///< Add a new child node` +- `XMLCSTR addText_WOSD(XMLSTR lpszValue, XMLElementPosition pos=-1); ///< Add a new text content` +- `XMLCSTR updateName_WOSD(XMLSTR lpszName); ///< change node's name` +- `XMLCSTR updateText_WOSD(XMLSTR lpszNewValue, int i=0); ///< if the text to update is missing, a new one will be added` +- `XMLCSTR updateText_WOSD(XMLSTR lpszNewValue, XMLCSTR lpszOldValue); ///< if the text to update is missing, a new one will be added` +- `XMLElementPosition positionOfText(int i=0) const;` +- `XMLElementPosition positionOfText(XMLCSTR lpszValue) const;` +- `XMLElementPosition positionOfClear(int i=0) const;` +- `XMLElementPosition positionOfClear(XMLCSTR lpszValue) const;` +- `XMLElementPosition positionOfClear(XMLClear *a) const;` +- `XMLElementPosition positionOfChildNode(int i=0) const;` +- `XMLElementPosition positionOfChildNode(XMLNode x) const;` +- `XMLElementPosition positionOfChildNode(XMLCSTR name, int i=0) const; ///< return the position of the ith childNode with the specified name if (name==NULL) return the position of the ith childNode` +- `char parseClearTag(void *px, void *pa);` +- `char maybeAddTxT(void *pa, XMLCSTR tokenPStr);` +- `int ParseXMLElement(void *pXML);` +- `int indexText(XMLCSTR lpszValue) const;` +- `int indexClear(XMLCSTR lpszValue) const;` +- `XMLNode addChild_priv(int,XMLSTR,char,int);` +- `XMLCSTR addText_priv(int,XMLSTR,int);` +- `void emptyTheNode(char force);` +- `void freeBuffer();///* revive_points);` +- `void AddClient(Client* client);` +- `void SimpleMessage(int8 type, const char* message, Spawn* from, float distance, bool send_to_sender = true);` +- `void HandleChatMessage(Spawn* from, const char* to, int16 channel, const char* message, float distance = 0, const char* channel_name = 0, bool show_bubble = true, int32 language = 0);` +- `void HandleChatMessage(Client* client, Spawn* from, const char* to, int16 channel, const char* message, float distance = 0, const char* channel_name = 0, bool show_bubble = true, int32 language = 0);` +- `void HandleChatMessage(Client* client, std::string fromName, const char* to, int16 channel, const char* message, float distance = 0, const char* channel_name = 0, int32 language = 0);` +- `void HandleChatMessage(std::string fromName, const char* to, int16 channel, const char* message, float distance, const char* channel_name, int32 language);` +- `void HandleBroadcast(const char* message);` +- `void HandleAnnouncement(const char* message);` +- `int16 SetSpawnTargetable(Spawn* spawn, float distance);` +- `int16 SetSpawnTargetable(int32 spawn_id);` +- `void ApplySetSpawnCommand(Client* client, Spawn* target, int8 type, const char* value);` +- `void SetSpawnCommand(Spawn* spawn, int8 type, char* value, Client* client = 0);` +- `void SetSpawnCommand(int32 spawn_id, int8 type, char* value, Client* client = 0);` +- `void AddLoot(NPC* npc, Spawn* killer = nullptr, GroupLootMethod loot_method = GroupLootMethod::METHOD_FFA, int8 item_rarity = 0, int32 group_id = 0);` +- `void AddSpawn(Spawn* spawn);` +- `void RemoveDeadEnemyList(Spawn* spawn);` +- `void RemoveDeadSpawn(Spawn* spawn);` +- `void AddSpawnGroupLocation(int32 group_id, int32 location_id, int32 spawn_location_id);` +- `void AddSpawnGroupAssociation(int32 group_id1, int32 group_id2);` +- `void AddSpawnGroupChance(int32 group_id, float percent);` +- `void RemoveSpawn(Spawn* spawn, bool delete_spawn = true, bool respawn = true, bool lock = true, bool erase_from_spawn_list = true, bool lock_spell_process = false);` +- `void ProcessSpawnLocations();` +- `void SendQuestUpdates(Client* client, Spawn* spawn = 0);` +- `bool CallSpawnScript(Spawn* npc, int8 type, Spawn* spawn = 0, const char* message = 0, bool is_door_open = false, sint32 input_value = 0, sint32* return_value = 0);` +- `void SendSpawnVisualState(Spawn* spawn, int16 type);` +- `void SendSpellFailedPacket(Client* client, int16 error);` +- `void SendInterruptPacket(Spawn* interrupted, LuaSpell* spell, bool fizzle=false);` +- `void HandleEmote(Spawn* originator, string name, Spawn* opt_target = nullptr, bool no_target = false);` +- `void PlaySoundFile(Client* client, const char* name, float origin_x, float origin_y, float origin_z);` +- `void SendZoneSpawns(Client* client);` +- `void StartZoneInitialSpawnThread(Client* client);` +- `void SendSpawnChanges();` +- `void SendSpawnChanges(Spawn* spawn);` +- `void SendSpawnChanges(Spawn* spawn, Client* client, bool override_changes = false, bool override_vis_changes = false);` +- `void SendSpawnChangesByDBID(int32 spawn_id, Client* client, bool override_changes = false, bool override_vis_changes = false);` +- `void SendPlayerPositionChanges(Player* player);` +- `void UpdateVitality(float amount);` +- `void KillSpawn(bool spawnListLocked, Spawn* dead, Spawn* killer, bool send_packet = true, int8 type = 0, int8 damage_type = 0, int16 kill_blow_type = 0);` +- `void SendDamagePacket(Spawn* attacker, Spawn* victim, int8 type1, int8 type2, int8 damage_type, int16 damage, const char* spell_name);` +- `void SendHealPacket(Spawn* caster, Spawn* target, int16 type, int32 heal_amt, const char* spell_name);` +- `void SendCastSpellPacket(LuaSpell* spell, Entity* caster, int32 spell_visual_override = 0, int16 casttime_override = 0xFFFF);` +- `void SendCastSpellPacket(int32 spell_visual, Spawn* target, Spawn* caster = 0);` +- `void SendCastEntityCommandPacket(EntityCommand* entity_command, int32 spawn_id, int32 target_id);` +- `void TriggerCharSheetTimer();` +- `void SendTimeUpdateToAllClients();` +- `void AddWidgetTimer(Spawn* widget, float time);` +- `bool HasWidgetTimer(Spawn* widget);` +- `void Despawn(Spawn* spawn, int32 timer);` +- `void RepopSpawns(Client* client, Spawn* spawn);` +- `bool AddCloseSpawnsToSpawnGroup(Spawn* spawn, float radius);` +- `void Depop(bool respawns = false, bool repop = false);` +- `bool IsSpawnGroupAlive(int32 id);` +- `void AddEnemyList(NPC* npc);` +- `void ReloadClientQuests();` +- `void SendAllSpawnsForLevelChange(Client* client);` +- `void SendAllSpawnsForSeeInvisChange(Client* client);` +- `void SendAllSpawnsForVisChange(Client* client, bool limitToEntities=true);` +- `void AddLocationGrid(LocationGrid* grid);` +- `void RemoveLocationGrids();` +- `void DeleteTransporters();` +- `void CheckTransporters(Client* client);` +- `void WritePlayerStatistics();` +- `bool SendRadiusSpawnInfo(Client* client, float radius);` +- `void FindSpawn(Client* client, char* regSearchStr);` +- `void AddChangedSpawn(Spawn* spawn);` +- `void AddDamagedSpawn(Spawn* spawn);` +- `void AddDrowningVictim(Player* player);` +- `void RemoveDrowningVictim(Player* player);` +- `void DeleteSpellProcess();` +- `void LoadSpellProcess();` +- `void LockAllSpells(Player* player);` +- `void UnlockAllSpells(Player* player);` +- `void RemoveSpellTimersFromSpawn(Spawn* spawn, bool remove_all, bool delete_recast = true, bool call_expire_function = true, bool lock_spell_process = false);` +- `void Interrupted(Entity* caster, Spawn* interruptor, int16 error_code, bool cancel = false, bool from_movement = false);` +- `void ProcessSpell(Spell* spell, Entity* caster, Spawn* target = 0, bool lock = true, bool harvest_spell = false, LuaSpell* customSpell = 0, int16 custom_cast_time = 0, bool in_heroic_opp = false);` +- `void ProcessEntityCommand(EntityCommand* entity_command, Entity* caster, Spawn* target, bool lock = true);` +- `void AddPlayerTracking(Player* player);` +- `void RemovePlayerTracking(Player* player, int8 mode);` +- `void SendUpdateTitles(Client *client, Title *suffix = 0, Title *prefix = 0);` +- `void SendUpdateTitles(Spawn *spawn, Title *suffix = 0, Title *prefix = 0);` +- `void RemoveTargetFromSpell(LuaSpell* spell, Spawn* target, bool remove_caster = false);` +- `void SetRain(float val);` +- `void SetWind(float val);` +- `void ProcessWeather();` +- `void ResurrectSpawn(Spawn* spawn, Client* client);` +- `void HidePrivateSpawn(Spawn* spawn);` +- `bool SetPlayerTargetByName(Client* originator, char* targetName, float distance);` +- `std::vector GetGridsByLocation(Spawn* originator, glm::vec3 loc, float distance);` +- `void StartZoneSpawnsForLevelThread(Client* client);` +- `void SendDispellPacket(Entity* caster, Spawn* target, string dispell_name, string spell_name, int8 dispell_type);` +- `void SetupInstance(int32 createdInstanceID=0);` +- `void SendUpdateDefaultCommand(Spawn* spawn, const char* command, float distance, Spawn* toplayer = NULL);` +- `int32 GetClosestLocation(Spawn* spawn);` +- `void PlayFlavor(Client* client, Spawn* spawn, const char* mp3, const char* text, const char* emote, int32 key1, int32 key2, int8 language);` +- `void PlayVoice(Client* client, Spawn* spawn, const char* mp3, int32 key1, int32 key2);` +- `void PlayFlavor(Spawn* spawn, const char* mp3, const char* text, const char* emote, int32 key1, int32 key2, int8 language);` +- `void PlayFlavorID(Spawn* spawn, int8 type, int32 id, int16 index, int8 language);` +- `void PlayVoice(Spawn* spawn, const char* mp3, int32 key1, int32 key2);` +- `void SendThreatPacket(Spawn* caster, Spawn* target, int32 threat_amt, const char* spell_name);` +- `void SendYellPacket(Spawn* yeller, float max_distance=50.0f);` +- `void KillSpawnByDistance(Spawn* spawn, float max_distance, bool include_players = false, bool send_packet = false);` +- `void SpawnSetByDistance(Spawn* spawn, float max_distance, string field, string value);` +- `void AddSpawnScriptTimer(SpawnScriptTimer* timer);` +- `void AddMovementNPC(Spawn* spawn);` +- `void AddPlayerProximity(Spawn* spawn, float distance, string in_range_function, string leaving_range_function);` +- `void AddLocationProximity(float x, float y, float z, float max_variation, string in_range_function, string leaving_range_function);` +- `void PlayAnimation(Spawn* spawn, int32 visual_state, Spawn* spawn2 = 0, int8 type = 1);` +- `void AddTransportSpawn(Spawn* spawn);` +- `void RemovePlayerPassenger(int32 char_id);` +- `bool IsDusk() { return isDusk; } // never used, probably meant for lua though` +- `void SetZoneName(char* new_zone) {` +- `void SetZoneFile(char* zone) {` +- `void SetZoneSkyFile(char* zone) {` +- `void SetZoneDescription(char* desc) {` +- `void SetUnderWorld(float under){ underworld = under; }` +- `float GetUnderWorld(){ return underworld; }` +- `void SetZoneID(int32 new_id){ zoneID = new_id; }` +- `void SetCityZone(bool val) { cityzone = val; }` +- `void SetAlwaysLoaded(bool val) { always_loaded = val; }` +- `void SetDuplicatedZone(bool val) { duplicated_zone = val; }` +- `void SetDuplicatedID(int32 id) { duplicated_id = id; }` +- `int32 NumPlayers() { return pNumPlayers; }` +- `void SetMinimumStatus(sint16 minStatus) { minimumStatus = minStatus; }` +- `sint16 GetMinimumStatus() { return minimumStatus; }` +- `void SetMinimumLevel(int16 minLevel) { minimumLevel = minLevel; }` +- `void SetMaximumLevel(int16 maxLevel) { maximumLevel = maxLevel; }` +- `void SetMinimumVersion(int16 minVersion) { minimumVersion = minVersion; }` +- `int16 GetMinimumLevel() { return minimumLevel; }` +- `int16 GetMaximumLevel() { return maximumLevel; }` +- `int16 GetMinimumVersion() { return minimumVersion; }` +- `void SetZoneLockState(bool lock_state) { locked = lock_state; } // JA: /zone lock|unlock` +- `int32 GetInstanceID() { return instanceID; }` +- `bool IsInstanceZone() { return isInstance; }` +- `void SetInstanceID(int32 newInstanceID) { instanceID = newInstanceID; }` +- `void SetShutdownTimer(int val){` +- `void AddSpawnLocation(int32 id, SpawnLocation* spawnlocation) {` +- `void SetInstanceType(int16 type) { InstanceType = (Instance_Type)type; if(type>0)isInstance=true; else isInstance=false; }` +- `Instance_Type GetInstanceType() { return InstanceType; }` +- `float GetSafeX(){ return safe_x; }` +- `float GetSafeY(){ return safe_y; }` +- `float GetSafeZ(){ return safe_z; }` +- `float GetSafeHeading() { return safe_heading; }` +- `void SetSafeX(float val){ safe_x = val; }` +- `void SetSafeY(float val){ safe_y = val; }` +- `void SetSafeZ(float val){ safe_z = val; }` +- `void SetSafeHeading(float val) { safe_heading = val; }` +- `float GetXPModifier() { return xp_mod; }` +- `void SetXPModifier(float val) { xp_mod = val; }` +- `void SetZoneMOTD(string z_motd) { zone_motd = z_motd; }` +- `string GetZoneMOTD() { return zone_motd; }` +- `bool isZoneShuttingDown ( ) { return zoneShuttingDown; }` +- `void Shutdown(){ zoneShuttingDown = true; }` +- `int32 GetClientCount(){ return clients.size(); }` +- `int32 GetDefaultLockoutTime() { return def_lockout_time; }` +- `int32 GetDefaultReenterTime() { return def_reenter_time; }` +- `int32 GetDefaultResetTime() { return def_reset_time; }` +- `int8 GetForceGroupZoneOption() { return group_zone_option; }` +- `void SetDefaultLockoutTime(int32 val) { def_lockout_time = val; }` +- `void SetDefaultReenterTime(int32 val) { def_reenter_time = val; }` +- `void SetDefaultResetTime(int32 val) { def_reset_time = val; }` +- `void SetForceGroupZoneOption(int8 val) { group_zone_option = val; }` +- `bool FinishedDepop(){ return finished_depop; }` +- `bool isWeatherEnabled() { return weather_enabled; }` +- `void SetWeatherEnabled(bool val) { weather_enabled = val; }` +- `bool isWeatherAllowed() { return weather_allowed; }` +- `void SetWeatherAllowed(bool val) { weather_allowed = val; }` +- `int8 GetWeatherType() { return weather_type; }` +- `void SetWeatherType(int8 val) { weather_type = val; }` +- `int32 GetWeatherFrequency() { return weather_frequency; }` +- `void SetWeatherFrequency(int32 val) { weather_frequency = val; }` +- `float GetWeatherMinSeverity() { return weather_min_severity; }` +- `void SetWeatherMinSeverity(float val) { weather_min_severity = val; }` +- `float GetWeatherMaxSeverity() { return weather_max_severity; }` +- `void SetWeatherMaxSeverity(float val) { weather_max_severity = val; }` +- `float GetWeatherChangeAmount() { return weather_change_amount; }` +- `void SetWeatherChangeAmount(float val) { weather_change_amount = val; }` +- `float GetWeatherDynamicOffset() { return weather_dynamic_offset; }` +- `void SetWeatherDynamicOffset(float val) { weather_dynamic_offset = val; }` +- `int8 GetWeatherChance() { return weather_change_chance; }` +- `void SetWeatherChance(int8 val) { weather_change_chance = val; }` +- `float GetCurrentWeather() { return weather_current_severity; }` +- `void SetCurrentWeather(float val) { weather_current_severity = val; }` +- `int8 GetWeatherPattern() { return weather_pattern; }` +- `void SetWeatherPattern(int8 val) { weather_pattern = val; }` +- `void SetWeatherLastChangedTime(int32 val) { weather_last_changed_time = val; }` +- `int32 GetExpansionFlag() { return expansion_flag; }` +- `void SetExpansionFlag(int32 val) { expansion_flag = val; }` +- `int32 GetHolidayFlag() { return holiday_flag; }` +- `void SetHolidayFlag(int32 val) { holiday_flag = val; }` +- `int32 GetCanBind() { return can_bind; }` +- `void SetCanBind(int32 val) { can_bind = val; }` +- `bool GetCanGate() { return can_gate; }` +- `void SetCanGate(int32 val) { can_gate = val; }` +- `bool GetCanEvac() { return can_evac; }` +- `void SetCanEvac(int32 val) { can_evac = val; }` +- `void RemoveClientImmediately(Client* client);` +- `void ClearHate(Entity* entity);` +- `void AddFlightPath(int32 id, FlightPathInfo* info);` +- `void AddFlightPathLocation(int32 id, FlightPathLocation* location);` +- `void DeleteFlightPaths();` +- `void SendFlightPathsPackets(Client* client);` +- `int32 GetFlightPathIndex(int32 id);` +- `float GetFlightPathSpeed(int32 id);` +- `void SendSpawn(Spawn* spawn, Client* client); // moved from private to public for bots` +- `void ProcessSpawnConditional(int8 condition);` +- `void SetSpawnStructs(Client* client);` +- `void AddSpawnProximities(Spawn* spawn);` +- `void RemoveSpawnProximities(Spawn* spawn);` +- `void SetSpawnScript(SpawnEntry* entry, Spawn* spawn);` +- `bool IsLoading() {` +- `vector GetHouseItems(Client* client);` +- `void SendHouseItems(Client* client);` +- `int32 GetWatchdogTime() { return watchdogTimestamp; }` +- `void SetWatchdogTime(int32 time) { watchdogTimestamp = time; }` +- `void CancelThreads();` +- `void AddPendingSpawnRemove(int32 id);` +- `void ProcessSpawnRemovals();` +- `bool SendRemoveSpawn(Client* client, Spawn* spawn, PacketStruct* packet = 0, bool delete_spawn = false);` +- `void AddSpawnToGroup(Spawn* spawn, int32 group_id);` +- `void QueueStateCommandToClients(int32 spawn_id, int32 state);` +- `void QueueDefaultCommand(int32 spawn_id, std::string command, float distance);` +- `void ProcessQueuedStateCommands();` +- `void RemoveClientsFromZone(ZoneServer* zone);` +- `void WorldTimeUpdateTrigger() { sync_game_time_timer.Trigger(); }` +- `void StopSpawnScriptTimer(Spawn* spawn, std::string functionName);` +- `void SendSubSpawnUpdates(SUBSPAWN_TYPES subtype);` +- `bool HouseItemSpawnExists(int32 item_id);` +- `void ProcessPendingSpawns();` +- `void AddSpawnToGrid(Spawn* spawn, int32 grid_id);` +- `void RemoveSpawnFromGrid(Spawn* spawn, int32 grid_id);` +- `int32 GetSpawnCountInGrid(int32 grid_id);` +- `void SendClientSpawnListInGrid(Client* client, int32 grid_id);` +- `void AddIgnoredWidget(int32 id);` +- `void AddRespawn(Spawn* spawn);` +- `void AddRespawn(int32 locationID, int32 respawnTime);` +- `void SendRespawnTimerList(Client* client);` +- `void AddTransporter(LocationTransportDestination* loc);` +- `void CheckDeadSpawnRemoval();` +- `void DeleteData(bool boot_clients = true);` +- `void DeleteFactionLists();` +- `void ProcessDepop(bool respawns_allowed = false, bool repop = false);` +- `void ClientProcess(bool ignore_shutdown_timer = false); // never used outside zone server` +- `void RemoveClient(Client* client); // never used outside zone server` +- `void DeterminePosition(SpawnLocation* spawnlocation, Spawn* spawn); // never used outside zone server` +- `void AddDeadSpawn(Spawn* spawn, int32 timer = 0xFFFFFFFF); // never used outside zone server` +- `int32 CalculateSpawnGroup(SpawnLocation* spawnlocation, bool respawn = false); // never used outside zone server` +- `float GetSpawnGroupChance(int32 group_id); // never used outside zone server` +- `void ProcessSpawnLocation(int32 location_id, map* instNPCs, map* instGroundSpawns, map* instObjSpawns, map* instWidgetSpawns, map* instSignSpawns, bool respawn = false); // never used outside zone server` +- `void SendRaidSheetChanges(); // never used outside zone server` +- `void SendCharSheetChanges(); // never used outside zone server` +- `void SendCharSheetChanges(Client* client); // never used outside zone server` +- `void SaveClients(); // never used outside zone server` +- `void CheckSendSpawnToClient(); // never used outside zone server` +- `void CheckSendSpawnToClient(Client* client, bool initial_login = false); // never used outside zone server` +- `void CheckRemoveSpawnFromClient(Spawn* spawn); // never used outside zone server` +- `void SaveClient(Client* client); // never used outside zone server` +- `void ProcessFaction(Spawn* spawn, Client* client); // never used outside zone server` +- `void RegenUpdate(); // never used outside zone server` +- `void SendCalculatedXP(Player* player, Spawn* victim); // never used outside zone server, might not be used at all any more` +- `void SendTimeUpdate(Client* client); // never used outside zone server` +- `void CheckWidgetTimers(); // never used outside zone server` +- `void CheckRespawns(); // never used outside zone server` +- `void CheckSpawnExpireTimers(); // never used outside zone server` +- `void AddSpawnExpireTimer(Spawn* spawn, int32 expire_time, int32 expire_offset = 0); // never used outside zone server` +- `void CheckSpawnRange(Client* client, Spawn* spawn, bool initial_login = false); // never used outside zone server` +- `void CheckSpawnRange(Spawn* spawn); // never used outside zone server` +- `void DeleteSpawnScriptTimers(Spawn* spawn, bool all = false); // never used outside zone server` +- `void DeleteSpawnScriptTimers(); // never used outside zone server` +- `void CheckSpawnScriptTimers(); // never used outside zone server` +- `bool PrepareSpawnID(Player* player, Spawn* spawn); // never used outside zone server` +- `void RemoveMovementNPC(Spawn* spawn); // never used outside zone server` +- `bool CheckNPCAttacks(NPC* npc, Spawn* victim, Client* client = 0); // never used outside zone server` +- `bool AggroVictim(NPC* npc, Spawn* victim, Client* client = 0); // never used outside zone server` +- `bool CheckEnemyList(NPC* npc); // never used outside zone server` +- `void RemovePlayerProximity(Spawn* spawn, bool all = false); // never used outside zone server` +- `void RemovePlayerProximity(Client* client); // never used outside zone server` +- `void CheckPlayerProximity(Spawn* spawn, Client* client); // never used outside zone server` +- `void RemoveLocationProximities(); // never used outside zone server` +- `void CheckLocationProximity(); // never used outside zone server` +- `void CheckLocationGrids(); // never used outside zone server` +- `void RemoveSpawnSupportFunctions(Spawn* spawn, bool lock_spell_process = false, bool shutdown = false); // never used outside zone server` +- `void ReloadTransporters(); // never used outside zone server` +- `void DeleteSpawns(bool delete_all); // never used outside zone server` +- `void AddPendingDelete(Spawn* spawn); // never used outside zone server` +- `void ClearDeadSpawns(); // never used outside zone server` +- `void RemoveChangedSpawn(Spawn* spawn); // never used outside zone server` +- `void ProcessDrowning(); // never used outside zone server` +- `void RemoveDamagedSpawn(Spawn* spawn); // never used outside zone server` +- `void ProcessTracking(); // never used outside zone server` +- `void ProcessTracking(Client* client); // never used outside zone server` +- `void SendEpicMobDeathToGuild(Player* killer, Spawn* victim); // never used outside zone server` +- `void ProcessAggroChecks(Spawn* spawn); // never used outside zone server` +- `bool CombatProcess(Spawn* spawn); // never used outside zone server` +- `void LootProcess(Spawn* spawn);` +- `void CloseSpawnLootWindow(Spawn* spawn);` +- `void InitWeather(); // never used outside zone server` +- `void DismissAllPets(); // never used outside zone server` +- `void SetEntityCommandList(int32 id, EntityCommand* command);` +- `void ClearEntityCommands();` +- `void AddNPC(int32 id, NPC* npc);` +- `void AddNPCSkill(int32 list_id, int32 skill_id, int16 value);` +- `void AddNPCEquipment(int32 list_id, int32 item_id);` +- `void SetNPCEquipment(NPC* npc);` +- `void AddObject(int32 id, Object* object){ object_list[id] = object; }` +- `void AddSign(int32 id, Sign* sign){ sign_list[id] = sign; }` +- `void AddWidget(int32 id, Widget* widget);` +- `void AddGroundSpawnEntry(int32 groundspawn_id, int16 min_skill_level, int16 min_adventure_level, int8 bonus_table, float harvest1, float harvest3, float harvest5, float harvest_imbue, float harvest_rare, float harvest10, int32 harvest_coin);` +- `void AddGroundSpawnItem(int32 groundspawn_id, int32 item_id, int8 is_rare, int32 grid_id);` +- `void LoadGroundSpawnEntries();` +- `void LoadGroundSpawnItems();` +- `void DeleteGroundSpawnItems();` +- `void AddGroundSpawn(int32 id, GroundSpawn* spawn);` +- `void AddLootTable(int32 id, LootTable* table);` +- `void AddLootDrop(int32 id, LootDrop* drop);` +- `void AddSpawnLootList(int32 spawn_id, int32 id);` +- `void ClearSpawnLootList(int32 spawn_id);` +- `void AddLevelLootList(GlobalLoot* loot);` +- `void AddRacialLootList(int16 racial_id, GlobalLoot* loot);` +- `void AddZoneLootList(int32 zone, GlobalLoot* loot);` +- `void ClearLootTables();` +- `vector GetSpawnLootList(int32 spawn_id, int32 zone_id, int8 spawn_level, int16 racial_id, Spawn* spawn = 0);` +- `void AddLocationTransporter(int32 zone_id, string message, float trigger_x, float trigger_y, float trigger_z, float trigger_radius, int32 destination_zone_id, float destination_x, float destination_y, float destination_z, float destination_heading, int32 cost, int32 unique_id);` +- `void GetTransporters(vector* returnList, Client* client, int32 transport_id);` +- `void DeleteGlobalTransporters();` +- `void AddTransportMap(int32 id, string name);` +- `bool TransportHasMap(int32 id);` +- `string GetTransportMap(int32 id);` +- `void DeleteTransporterMaps();` +- `void DeleteGlobalSpawns();` +- `void ReloadSpawns();` +- `void SendStateCommand(Spawn* spawn, int32 state);` +- `int32 getGroupraidMinLevel() const {` +- `int32 getGroupraidMaxLevel() const {` +- `int32 getGroupraidAvgLevel() const {` +- `int32 getGroupraidFirstLevel() const {` +- `void setGroupRaidLevels(int32 min_level, int32 max_level, int32 avg_level, int32 first_level) {` + +## Notable Comments + +- /* +- */ +- // Can't verify these 3 values +- // 32768 - SF +- // 131072 - AoD +- /* JA: TODO Turn into R_World Rules */ +- // need to attempt to clean this up and add xml comments, remove unused code, find a logical way to sort the functions maybe by get/set/process/add etc... +- /// Sends the game time packet to all connected clients +- /// Set the rain levl in the zone +- /// Level of rain in the zone 0.0 - 1.1 (rain starts at 0.76)