[
  {
    "path": ".gitignore",
    "content": ".import\r\n*.d\r\n*.o\r\n*.meta\r\n*.obj\r\n*.pyc\r\n*.bc\r\n*.os"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.md",
    "content": "# Entity Spell System\n\nAn entity and spell system for the GODOT Engine, that is usable for both 2d, and 3d games. The main purpose of this \nmodule is to handle spells, auras, and most entity-related things like spawning, items, inventory, containers, \nvendors, interaction, targeting, equipment (+ visuals), loot, crafting, talents, pets, npcs, etc ...\n\nThe module supports networking. It is designed to be authoritative, so players shouldn't be able to cheat by design.\n\nIt is a c++ engine module, which means you will need to compile it into godot. (See compiling)\n\n## Godot Version Support\n\nThis branch tries to follow godot's master branch (as much as I have time).\n\nFor different godot versions look at the other branches.\n\nStatus for this branch: Update for 4.0 is still work in progress. Godot's virtual method binding rework hit this module \nextremely hard, to the point where I'm seriously considering reworking most of the virtuals \nto use a `_notification()`-like interface.\n\n## Project setup tl;dr\n\n### First \n\nYou need to create an `ESSResourceDB` resource somewhere in you project. (Or alloocate it dynamically.)\n\nNow you can either:\n\n-Go to `ProjectSettings->Ess->Data`, and set the `ess_resource_db_path` property also make sure that `automatic_load` is on.\n\n-Or you can load it yourself and set it into the `ESS` singleton either using the `resource_db` property.\n\n### Second\n\nYou need to add an `ESSEntitySpawner` somewhere into your SceneTree. I recommend that you create an autoload for it.\nThis is where you have to implement your spawning logic.\n\n### What the module doesn't cover\n\nMovement, and controls.\n\nUnfortunately, there isn't a one-stop-shop solution for movement, especially if we throw networking into the mix,\nand the same is true for targeting. This means that this module cannot really do much in this regard, but it will \ngive you as much help to set everything up as possible.\n\n## Optional Dependencies\n\nMesh Data Resource\n\nhttps://github.com/Relintai/mesh_data_resource.git\n\nAdds mesh (MeshDataResource) support to ModelVisuals.\n\n## Pre-built binaries\n\nYou can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases) \nrepo, should you want to. It contains all my modules.\n\n## Overview\n\nThe module provides a huge number of script callbacks, usually as virtual methods they usually start with an underscore.\n\nDo not call methods with underscores, all of them has a normal counterpart, always call that.\n\nFor example entity has `crafts(int id)` and `_crafts(int id)` (virtual). Always use `crafts(int id)`, it will\ncall `_crafts(int id)`.\n\nFor networked classes, every variable is broken up into clientside, and serverside. This makes it easier to \ndevelop games that can also run locally, with less overhead and simpler logic. \nE.g. this makes it easy to use the visibility system even when you play locally on the server, because you just use the clientside variables,\nand your logic will work the same way.\n\n## Settings\n\nEntity and spell system comes with quite a few settings, you can find these under `ProjectSettings->Ess`.\n\n## Singletons\n\nThe module contains 2 singletons. `ESS`, and `ProfileManager`. Both are accessible from scripts.\n\n### The ESS singleton\n\nContains the active `ESSResourceDB` instance, and for convenience a reference to the active `ESSEntitySpawner` \ninstance. Also loads/handles/processes all of the entity and spell system related ProjectSettings, so if you need\nany ESS related value from ProjectSettings, don't query it directly, get it from this singleton.\n\nCustomizable enums values are preprocessed, and you usually have multiple ways of getting them.\n\n### The ProfileManager singleton\n\nContains methods to easily load/save/handle `PlayerProfile`s.\n\n#### PlayerProfile\n\nContains player-related data, most notably `ClassProfile`s.\n\n#### ClassProfile\n\nContains class-related data, most notably `ActionBarProfile`s, and `InputProfiles`.\n\n#### ActionBarProfile\n\nContains the data for a set of actionbars.\n\n#### InputProfileswd\n\nContains the keybind data for a class.\n\n## Enums\n\nESS needs lots of enums to work, and to reduce complexity with includes they ended up in a few separate classes.\n\nI'm still in the process of converting these to be customizable (`ESS` singleton / ProjectSettings).\n\n(Only the ones that worth it will be converted.)\n\n### EntityEnums\n\nContains Entity-related enums, like AIStates, skeleton attach points, entity flags, immunity flags,\nstate flags.\n\n### ItemEnums\n\nContains item-related enums, like rarity, armor type, item types.\n\n### SpellEnums\n\nContains spell-related enums, like aura types, damage types, spell categories, spell types, trigger types, \nand quite a few notification constants.\n\n### Customizable enums\n\nOpen `ProjectSettings`, and then go to `ESS/Enums`.\n\nAll of the string properties are customizable enums. These require a comma-separated list.\nThey are essentially a godot comma separated property hint enum string.\n\nThey all have defaults.\n\nFer example:\n\nIf you want you game to work with the following stats: Agility,Intellect,Crit,Weapon Damage,Stamina\nand you want Agility,Intellect,Stamina as you main stats.\n\nFirstly you want to put you main stats at the beginning, because the system will take the first `main_stat_count` \nstats as main stats.\n\nAnd then just enter `Agility,Intellect,Stamina,Crit,Weapon Damage` into the `stats` setting, and then \nset `main_stat_count` to 3.\n\nWhen these values are expected to be used as properties, the `ESS` singleton will create snake_cased versions automatically.\n`String stat_get_property_name(id: int) const` inside the ESS singleton for example.\n\nSo in the example case `ESS.stat_get_property_name(4)` would return `weapon_damage`.\n\n## ESSResourceDB\n\nThis is a class that maps ids to resources for quick lookups.\nThis is necessary in order to support networking, because you don't want to send resource paths over the network \nevery time somebody casts a spell for example. \n\n### ESSResourceDBStatic\n\nSimple static resource db. Just drag and drop all your data that you use into it with the inspector.\n\nStores the data as vectors.\n\nSupports id remapping, which means that it can assign new ids to all added resources, so they don't clash.\nThe added resource's index will be set as it's id.\n\nThis is useful for modding support, as you can just collect every mod's resource dbs, and add them to a static db,\nand with this option enabled the ids will not clash.\n\nYou can see an example of this [here](https://github.com/Relintai/broken_seals/blob/master/game/scripts/game_modules/DataManager.gd).\n\n### ESSResourceDBMap\n\nStores everything as a vector, and a map.\n\n#### ESSResourceDBFolders\n\nInherited from `ESSResourceDBMap`.\n\nIt will load everything from the folders that you set up into it's `folders` property.\n\n## Entity\n\nThis is the main class that can be used for players/mobs/npcs and also other things like chests. \n\nI ended up merging subclass functionality into it, because\nthat way it gains a lot more utility, by sacrificing only a small amount of memory.\nFor example this way it is easy to make chests attack the player, or make spell that animate objects.\n\n## Entity Body\n\nOriginally entities used to be inherited from `Spatial` or `Node2D`, so they could contain/drive their own models, \nbut eventually on order to support both 2d, and 3d, bodies were separated from them. This unfortunately \ncomplicates the setup a bit, but the upsides overweight the downsides, as this way you don't need to create different\nentities for every model/body you have.\n\nBodies are stored at `EntityData->EntitySpeciesData->ModelDatas (SpeciesModelData)->Body`\n\nWhen an `Entity` gets initialized, it will instance it's body automatically, but if you want to intance it yourself,\nyou can call `void instance_body(entity_data: EntityData, model_index: int)` on an `Entity`.\n\nThe `model_index` property tell the `Entity` which one it should use.\n\nInstancing bodies does not happen immediately, but you will probably want to set an `Entity`'s position right where \nyou create it, a few helpers were added:\\\n\n`void set_transform_2d(transform: Transform2D, only_stored: bool = false)`\\\n`void set_transform_3d(transform: Transform, only_stored: bool = false)`\n\nYour body implementation then can get this from an entity an set itself to the right place.\n\n### CharacterSkeletons\n\nCharacterSkeletons handle the looks of your characters.\n\nThey come in two variants, one for 2d, one for 3d.\n\nThey have quite a few helper methods.\n\nThey can store ModelVisuals, and ModelVisualEntries.\n\nThey support attach points. For example a character's hand.\nIt adds properties based on the selected entity_type.\nThese are based on the values from `ProjectSettings->ESS->Enums->skeletons_bone_attachment_points`.\n\nIf you want to merge meshes this is where you can implement it.\n\n#### CharacterSkeleton3D\n\nThe 3d variant.\n\n[Complex 3d skeleton scene](https://github.com/Relintai/broken_seals/blob/master/game/models/entities/human/models/armature_huf.tscn) \\\n[Complex 3d skeleton script](https://github.com/Relintai/broken_seals/blob/master/game/player/CharacterSkeletonGD.gd)\n\n#### CharacterSkeleton2D\n\nThe 2d variant.\n\n[Simple 2d roguelike skeleton script](https://github.com/Relintai/broken_seals_roguelike/blob/master/game/characters/SimpleCharacter.gd) \\\n[Simple 2d roguelike skeleton scene](https://github.com/Relintai/broken_seals_roguelike/blob/master/game/characters/SimpleCharacter.tscn)\n\n#### ModelVisual\n\nA collection ModelVisualEntries.\n\nYou will need to use this to define a look. For example if you have an item that will change your character's clothes,\nyou will use this.\n\n##### ModelVisualEntry\n\nContains meshes, textures, texture tints, mesh transforms.\n\nIt has 2 modes, `Bone` and `Attachment`.\n\nIn the bone mode, you need to select an entity type, and then a concrete bone. This is the \"merge this into the final character mesh\" mode.\n\nIn the attachment mode, you need to select a common attach point (`ProjectSettings->Ess->enums->skeletons_bone_attachment_points`), \nand the containing mesh will be put on to that point by the CharacterSkeleton. This is how you can implement weapons for example.\n\n### EntitySpeciesData\n\nContains data related to a species, like `SpeciesModelData`s, and species specific spells, and auras.\n\n#### SpeciesModelData\n\nContains a scene of a species's body and it's customizations.\n\nThe `customizable_slots_string` and `customizable_colors_string` should be filled with a comma separated string,\nthey will add properties. Currently you need to click on something else, and back on the resource for these to show up,\nafter a change to the strings.\n\nThe body can be any scene, Entity will instance it, and set it to it's body property.\n\nThe body should handle movement based on the player's input, it should handle sending position information through the network, \nif you want networking, it might (`CharacterSkeleton`s can also do it) also drive your animations/animation players if you have it.\n\nBodies does not need to handle the graphics themselves (`ModelVisualEntries` for example) (you can implement your logic here \nif you want to), but the `CharacterSkeleton` classes exist for that purpose.\n\n[Complex 3d body script](https://github.com/Relintai/broken_seals/blob/master/game/player/Body.gd) \\\n[Complex 3d body scene](https://github.com/Relintai/broken_seals/blob/master/game/models/entities/human/models/HumanFemale.tscn)\n\n[Simple 2d roguelike body script](https://github.com/Relintai/broken_seals_roguelike/blob/master/game/player/Body.gd) \\\n[Simple 2d roguelike body scene](https://github.com/Relintai/broken_seals_roguelike/blob/master/game/player/Body.gd)\n\n#### SpeciesInstance\n\nThis class will store character model customization data. E.g. which hairstyle you want for an `Entity`.\n\nNot yet finished!\n\n### Spawning\n\nSince spawning (= creating) entities is entirely dependent on the type of game you are making, ESS cannot do\neverything for you. It will set up stats, equipment etc, but there is no way to set up positions for example.\n\nYou can implement your spawning logic by inheriting from `ESSEntitySpawner`, and implementing `_request_entity_spawn`.\n\nYou should only have one spawner at any given time. It will register itself into the ESS singleton automatically.\n\nSince it is inherited from Node, I recommend that you create an autoload for it.\n\nThe ESS singleton also contains convenience methods to request spawning an Entity.\n\n[Sample 3d spawner implementation](https://github.com/Relintai/broken_seals/blob/master/game/player/bs_entity_spawner.gd) \\\n[Sample 2d spawner implementation](https://github.com/Relintai/broken_seals_roguelike/blob/master/game/player/bs_entity_spawner.gd)\n\n#### EntityCreateInfo\n\nEntity spawning usually requires a lot of complexity and hassle, this helper class aims to make it painless.\n\nAll methods that deal with spawning will take this as a parameter.\n\n### EntityData\n\nSince setting up Entities as scenes is usually quite the hassle, `EntityData` had to be created.\n\nIt stores everything an entity needs.\n\nIn order to spawn an entity you need it.\n\n#### EntityClassData\n\n`EntityClassData` holds class-related information, like specs (`CharacterSpec`), spells, start spells, start auras, \nalternative ais, `EntityResource`s (mana for example).\n\n#### CharacterSpec\n\n`CharacterSpec` holds spec-related information, most notably talents.\n\n#### EntityResource\n\nEntityResources are things like mana, health, or speed. These add greater flexibility over stats.\n\nThe resource system is quite flexible, if you add a resource serverside, it will be automatically\nadded clientside. (You have to add `EntityResource`s to the active `ESSResourceDB`!)\n\nBy default all entities have the build in speed and health resources, as a set index \n(`EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH` and `EntityEnums::ENTITY_RESOURCE_INDEX_SPEED`).\n\nThere is also the `EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN` constant, so you have \nthe current offset where the custom resources start.\n\nEntity allocates these in it's  `_initialize()` virtual method, if you want to customize them.\n\nNote that `EntityClassData` contains an array, so you can add more resources easily to classes,\nthese will be automatically added when the system initializes an `Entity`.\n\n##### EntityResourceHealth\n\nThe standard health resource implementation.\n\n##### EntityResourceSpeed\n\nThe standard speed resource implementation.\n\n#### EntityResourceCostData\n\nThis is the class taht lets you implement resource costs. For example mana cost for a spell.\n\n##### EntityResourceCostDataResource\n\nThe standard resource cost implementation.\n\n##### EntityResourceCostDataHealth\n\nThe standard health resource cost implementation.\n\nIt has a resource property, so you can just assign any resource to this.\n\n### Interactions\n\nIf you want your player to interact with it's target. For example a vendor, or loot.\n\nFirst make sure that you can interact, by checking `Entity.cans_interact()` or `Entity.canc_interact()`.\nIf this returns true, you can call `Entity.crequest_interact()`. This will call `Entity.sinteract()` serverside.\n\nInteractions are handled by `EntityData` by default. It has the same methods. If `EntityData` is not set, the `Entity` \nwill try to call the same overridable on itself.\n\nYou can see an example implementation [here](https://github.com/Relintai/broken_seals/blob/master/game/scripts/entities/EntityDataGD.gd).\n\n### AI\n\nYou can implement ai by extending `EntityAI`, and then assigning it to an `EntityData`.\n\nWhen an `Entity` gets spawned it will create a copy for itself, so you can safely use class variables.\n\n#### AIFormation\n\nNot yet finished, it was meant as a way to calculate offset pet positions, (If an `Entity` has let's say \n4 pets you don't just want them all to stay on top of their controller).\n\nIf this functionality ends up in `EntityAI`, after pets are finished, this will be removed.\n\n### Pets\n\nUnfortunately pet support is not yet finished.\n\nIt is mostly done though, so you will see pet-related methods scattered around.\n\n### Bags\n\nStores items. See `Bag`. It has quite a few virtual methods, you should be able to implement most inventory types\nshould you want to.\n\nEntity will send these over the network.\n\nAlso Entities have a target bag property. For example this makes vendors easily implementable.\n\n### VRPCs\n\nEntities has a networked visibility system. The method itself is called `vrpc`, it works the same way as normal rpcs.\nIf you want to send data to every client that sees the current entity, use this. \n\n## Spells, Auras, Talents\n\nSpell is the class you need to create both spells, and aura.\\\nIt stores the data, and also it has the ability to be scripted.\\\nTalents are actually just spells used as Auras. Right now the system just applies them as a permanent aura.\\\nYou don't need to worry about applying auras, cast them as spells instead. It they are set to permanent, or they have a duration set they will be applied as an aura automatically.\n\nTalent ranks are implemented by deapplying the earlier rank first, then applying the new rank.\n\n### How to\n\nRequest casting a spell clientside: `void spell_crequest_cast(spell_id: int)` \\\nRequest to learn a spell clientside: `void spell_learn_requestc(id: int)`\n\nRequest talent learning clientside: \\\n`void character_talent_crequest_learn(spec_index: int, character_talent_row: int, character_talent_culomn: int)` or \\\n`void class_talent_crequest_learn(spec_index: int, class_talent_row: int, class_talent_culomn: int)` \n\n#### Cast a spell\n\nNote that you should only do this serverside.\n\n```\n# Or get it from the active ESSResourceDB, etc\nexport(Spell) var spell : Spell\n\nfunc scast_spell() -> void:\n\tvar sci : SpellCastInfo = SpellCastInfo.new()\n\n\tsci.caster = info.caster\n\tsci.target = info.target\n\tsci.has_cast_time = spell.cast_enabled\n\tsci.cast_time = spell.cast_cast_time\n\tsci.spell_scale = info.spell_scale\n\tsci.set_spell(spell)\n\n\tspell.cast_starts(sci)\n\n```\n\n#### Apply an aura\n\nNormally you shouldn't do this, this is for more advanced uses. Cast the aura as a spell instead.\n\nNote that you should only apply auras serverside, they will be sent to clients automatically.\n\n```\n# Or get it from the active ESSResourceDB, etc\nexport(Spell) var aura : Spell\n\nfunc sapply_aura() -> void:\n    var ainfo : AuraApplyInfo = AuraApplyInfo.new()\n            \n    ainfo.caster = info.caster\n    ainfo.target = info.caster\n    ainfo.spell_scale = 1\n    ainfo.aura = aura\n\n    aura.sapply(ainfo)\n\n```\n\n#### UI\n\n[Complete UI Implemetation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player)\n\n[Player UI Core Implemetation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/player_ui)\n\n[Aura Frame Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/auraframe) \\\n[Castbar Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/castbar) \\\n[Unitframe Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/unitframes)\n\n[Actionbar Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/actionbars)\n\n[Character Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/character) \\\n[Inventory Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/bags) \\\n[Crafting Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/crafting) \\\n[Loot Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/loot_window) \\\n[Talent Window Implemetation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/talents) \\\n[Spellbook Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/spellbook)  \\\n[Vendor Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/vendor_window) \\\n[Trainer Window Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/trainer)\n\n[3D Nameplate Implementation](https://github.com/Relintai/broken_seals/tree/master/game/ui/world/nameplates) \\\n[2D Nameplate Implementation](https://github.com/Relintai/broken_seals_roguelike/tree/master/game/ui/nameplates)\n\n### Infos / Pipelines\n\n#### SpellCastInfo\n\nStores information about the state of a spell's cast.\n\n#### AuraApplyInfo\n\nHelps to apply auras\n\n#### SpellDamageInfo, SpellHealInfo\n\nThese are used in the damage and heal calculation. For example these can be used to implement immunities, or absorb effects \nby modifying their damage values in aura callbacks.\n\n### Projectiles\n\nSpells support projectiles, they are created/set up inside `void handle_projectile(info: SpellCastInfo)`.\n\nThe default implementation will instance `Spell`'s projectile scene (if set), and then it will try to call a \n`void setup_projectile(info: SpellCastInfo)` on it if exists.\n\nYou can override this behaviour by implementing your own `_void handle_projectile(info: SpellCastInfo)` on `Spell`\n\nNote that the module already adds `SpellFollowProjectile3D`, but this has not been finished yet.\n\n## Items\n\nItems are implemented using 2 classes, `ItemTemplate`, and `ItemInstance`.\n\n`ItemTemplate` contains all information for a potential item. You can generate `Iteminstance`s with this,\nusing it's `ItemInstance create_item_instance()` method. You can also implement your custom item creation logic\nusing the `void _create_item_instance()` virtual.\n\n`ItemInstance` is the actual item.\n\n### Loot\n\nLooting can be implemented using `Entity`'s target bag functionality.\n\nYou can see an example implementation [here](https://github.com/Relintai/broken_seals/blob/master/game/scripts/entities/EntityDataGD.gd). \\\nAnd an example ui implementation [here](https://github.com/Relintai/broken_seals/tree/master/game/ui/player/loot_window).\n\n## XP\n\nYou can set all the xp values for your levels in `ProjectSettings->Ess->xp`.\n\nNow you can start distributing xp, for whatever you'd like to Entities, using `Entity.xp_adds(vlaue : int)`\n\n## Examples\n\nEventually I'll create a separate repository with a few examples/demos, but for now you can check the game \nI've been working on for examples.\n\n3d:\nhttps://github.com/Relintai/broken_seals.git\n\n2d turn based:\nhttps://github.com/Relintai/broken_seals_roguelike\n\n2d: \nhttps://github.com/Relintai/broken_seals_2d.git\n\n## Compiling\n\nFirst make sure that you can compile godot. See the official docs: https://docs.godotengine.org/en/3.x/development/compiling/index.html\n\n1. Clone the engine if you haven't already:\n\nIf you want Godot 3.x:\n```git clone -b 3.x https://github.com/godotengine/godot.git godot```\n\nIf you want Godot 4.0:\n```git clone https://github.com/godotengine/godot.git godot```\n\n2. go into the modules folder inside the engine's directory\"\n\n```cd godot```\n```cd modules```\n\n3. clone this repository\n\n```git clone https://github.com/Relintai/entity_spell_system.git entity_spell_system```\n\n(the folder needs to be named entity_spell_system!)\n\n4. Go up one folder\n\n```cd ..```\n\n5. Compile godot.\n\nFor example:\n\n```scons p=x11 t=release_debug tools=yes```\n"
  },
  {
    "path": "SCsub",
    "content": "import os\n\nImport('env')\n\nmodule_env = env.Clone()\n\nif os.path.isdir('../mesh_data_resource'):\n    module_env.Append(CPPDEFINES=['MESH_DATA_RESOURCE_PRESENT'])\n\nif os.path.isdir('../props'):\n    module_env.Append(CPPDEFINES=['PROPS_PRESENT'])\n\nhas_texture_packer = False\n\nif os.path.isdir('../texture_packer'):\n    has_texture_packer = True\n    module_env.Append(CPPDEFINES=['TEXTURE_PACKER_PRESENT'])\n\nsources = [\n    \"register_types.cpp\",\n\n    \"entity_enums.cpp\",\n    \"spell_enums.cpp\",\n    \"item_enums.cpp\",\n\n    \"data/auras/aura_group.cpp\",\n\n    \"data/items/item_instance.cpp\",\n    \"data/items/item_template.cpp\",\n    \"data/items/equipment_data.cpp\",\n    \"data/items/craft_recipe_helper.cpp\",\n    \"data/items/craft_recipe.cpp\",\n    \"data/items/model_visual.cpp\",\n    \"data/items/model_visual_entry.cpp\",\n    \"data/species/entity_species_data.cpp\",\n    \"data/species/species_model_data.cpp\",\n    \"data/species/species_instance.cpp\",\n\n    \"data/spells/spell_cooldown_manipulation_data.cpp\",\n    \"data/spells/spell.cpp\",\n    \"data/spells/spell_effect_visual.cpp\",\n    \"data/spells/spell_effect_visual_simple.cpp\",\n\n    \"data/atlases/character_atlas.cpp\",\n    \"data/atlases/character_atlas_entry.cpp\",\n\n    \"entities/data/entity_data.cpp\",\n    \"entities/data/entity_class_data.cpp\",\n\n    \"entities/data/vendor_item_data.cpp\",\n    \"entities/data/vendor_item_data_entry.cpp\",\n\n    \"entities/data/entity_data_container.cpp\",\n\n    \"entities/data/item_container_data.cpp\",\n    \"entities/data/item_container_data_entry.cpp\",\n\n    \"entities/skills/entity_skill.cpp\",\n    \"entities/skills/entity_skill_data.cpp\",\n\n    \"entities/data/character_spec.cpp\",\n    \n    \"skeleton/character_bones.cpp\",\n\n    \"entities/stats/stat_data.cpp\",\n    \"entities/stats/level_stat_data.cpp\",\n    \"entities/stats/simple_level_stat_data.cpp\",\n    \"entities/stats/complex_level_stat_data.cpp\",\n\n    \"inventory/bag.cpp\",\n    #\"inventory/inventory.cpp\",\n\n    \"infos/aura_infos.cpp\",\n    \"infos/spell_cast_info.cpp\",\n\n    \"pipelines/spell_damage_info.cpp\",\n    \"pipelines/spell_heal_info.cpp\",\n    \"entities/auras/aura_data.cpp\",\n    \"entities/entity.cpp\",\n\n    \"entities/resources/entity_resource_cost_data.cpp\",\n    \"entities/resources/entity_resource_cost_data_health.cpp\",\n    \"entities/resources/entity_resource_cost_data_resource.cpp\",\n    \"entities/resources/entity_resource.cpp\",\n    \"entities/resources/entity_resource_health.cpp\",\n    \"entities/resources/entity_resource_speed.cpp\",\n\n    \"drag_and_drop/es_drag_and_drop.cpp\",\n\n    \"skeleton/character_skeleton_2d.cpp\",\n    \"skeleton/character_skeleton_3d.cpp\",\n\n    \"skeleton/skeleton_model_entry.cpp\",\n\n    \"utility/entity_create_info.cpp\",\n\n    \"data/loot/loot_data_base.cpp\",\n\n    \"entities/ai/entity_ai.cpp\",\n\n    \"formations/ai_formation.cpp\",\n\n    \"projectiles/3d/spell_follow_projectile_3d.cpp\",\n\n    \"profiles/input/input_profile_modifier.cpp\",\n    \"profiles/input/input_profile_modifier_entry.cpp\",\n    \"profiles/input/input_profile.cpp\",\n\n    \"profiles/actionbar/action_bar_button_entry.cpp\",\n    \"profiles/actionbar/action_bar_entry.cpp\",\n    \"profiles/actionbar/action_bar_profile.cpp\",\n\n    \"profiles/class_profile.cpp\",\n\n    \"profiles/player_profile.cpp\",\n\n    \"spawners/ess_entity_spawner.cpp\",\n\n    \"singletons/profile_manager.cpp\",\n    \"singletons/ess.cpp\",\n\n    \"database/ess_resource_db.cpp\",\n    \"database/ess_resource_db_static.cpp\",\n    \"database/ess_resource_db_map.cpp\",\n    \"database/ess_resource_db_folders.cpp\",\n\n    \"editor/ess_editor_plugin.cpp\",\n\n    \"props/prop_data_entity.cpp\",\n\n    \"material_cache/ess_material_cache.cpp\"\n]\n\nif has_texture_packer:\n    sources.append(\"material_cache/ess_material_cache_pcm.cpp\")\n\nif ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':\n    # Shared lib compilation\n    module_env.Append(CCFLAGS=['-fPIC'])\n    module_env['LIBS'] = []\n    shared_lib = module_env.SharedLibrary(target='#bin/ess', source=sources)\n    shared_lib_shim = shared_lib[0].name.rsplit('.', 1)[0]\n    env.Append(LIBS=[shared_lib_shim])\n    env.Append(LIBPATH=['#bin'])\nelse:\n    # Static compilation\n    module_env.add_source_files(env.modules_sources, sources)\n"
  },
  {
    "path": "config.py",
    "content": "\n\ndef can_build(env, platform):\n  return True\n\n\ndef configure(env):\n\tpass\n\n\ndef get_doc_classes():\n    return [\n        \"CharacterAtlasEntry\",\n        \"CharacterAtlas\",\n\n        \"ESS\",\n\n        \"AuraGroup\",\n        \"CraftRecipeHelper\",\n        \"CraftRecipe\",\n        \"EquipmentData\",\n        \"ItemInstance\",\n        \"ItemTemplate\",\n        \"ModelVisualEntry\",\n        \"ModelVisual\",\n        \"SpellCooldownManipulationData\",\n        \"SpellEffectVisualSimple\",\n        \"SpellEffectVisual\",\n        \"Spell\",\n\n        \"ESDragAndDrop\",\n\n        \"EntityAI\",\n        \"AuraData\",\n        \"CharacterSpec\",\n        \"EntityClassData\",\n        \"EntityDataContainer\",\n        \"EntityData\",\n        \"ItemContainerDataEntry\",\n        \"ItemContainerData\",\n        \"VendorItemDataEntry\",\n        \"VendorItemData\",\n        \"EntityResourceCostData\",\n        \"EntityResourceCostDataHealth\",\n        \"EntityResourceCostDataResource\",\n        \"EntityResource\",\n        \"EntityResourceHealth\",\n        \"EntityResourceSpeed\",\n        \"EntitySkillData\",\n        \"EntitySkill\",\n        \"ComplexLevelStatData\",\n        \"LevelStatData\",\n        \"SimpleLevelStatData\",\n        \"StatData\",\n        \"StatModifier\",\n        \"Entity\",\n\n        \"AIFormation\",\n\n        \"AuraApplyInfo\",\n        \"SpellCastInfo\",\n\n        \"Bag\",\n\n        \"LootDataBase\",\n\n        \"SpellDamageInfo\",\n        \"SpellHealInfo\",\n\n        \"ActionBarButtonEntry\",\n        \"ActionBarEntry\",\n        \"ActionBarProfile\",\n        \"InputProfileModifierEntry\",\n        \"InputProfileModifier\",\n        \"InputProfile\",\n        \"ClassProfile\",\n        \"PlayerProfile\",\n        \"ProfileManager\",\n\n        \"CharacterBones\",\n        \"CharacterSkeleton3D\",\n        \"CharacterSkeleton2D\",\n        \"CharacterSkeleton\",\n        \"EntitySpeciesData\",\n        \"SpeciesInstance\",\n        \"SkeletonModelEntry\",\n        \"SpeciesModelData\",\n\n        \"EntityCreateInfo\",\n\n        \"SpellFollowProjectile3D\",\n\n        \"ESSResourceDB\",\n        \"ESSResourceDBFolders\",\n        \"ESSResourceDBStatic\",\n        \"ESSResourceDBMap\",\n\n        \"EntityEnums\",\n        \"ItemEnums\",\n        \"SpellEnums\",\n\n        \"ESSEntitySpawner\",\n\n        \"PropDataEntity\",\n\n        \"ESSMaterialCache\",\n        \"ESSMaterialCachePCM\",\n    ]\n\ndef get_doc_path():\n    return \"doc_classes\"\n\n"
  },
  {
    "path": "data/atlases/character_atlas.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"character_atlas.h\"\n\nCharacterAtlas::CharacterAtlas() {\n}\n\nvoid CharacterAtlas::_bind_methods() {\n}\n"
  },
  {
    "path": "data/atlases/character_atlas.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef CHARACTER_ATLAS_H\n#define CHARACTER_ATLAS_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\nclass CharacterAtlas : public Resource {\n\tGDCLASS(CharacterAtlas, Resource);\n\npublic:\n\tCharacterAtlas();\n\nprotected:\n\tstatic void _bind_methods();\n\n\t//private:\n};\n\n#endif\n"
  },
  {
    "path": "data/atlases/character_atlas_entry.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"character_atlas_entry.h\"\n\nCharacterAtlasEntry::CharacterAtlasEntry() {\n}\n\nvoid CharacterAtlasEntry::_bind_methods() {\n}\n"
  },
  {
    "path": "data/atlases/character_atlas_entry.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef CHARACTER_ATLAS_ENTRY_H\n#define CHARACTER_ATLAS_ENTRY_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\nclass CharacterAtlasEntry : public Resource {\n\tGDCLASS(CharacterAtlasEntry, Resource);\n\npublic:\n\tCharacterAtlasEntry();\n\nprotected:\n\tstatic void _bind_methods();\n\n\t//private:\n};\n\n#endif\n"
  },
  {
    "path": "data/auras/aura_group.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"aura_group.h\"\n\nAuraGroup::AuraGroup() {\n}\n\nvoid AuraGroup::_bind_methods() {\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_description\"), \"set_name\", \"get_name\");\n}\n"
  },
  {
    "path": "data/auras/aura_group.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef AURA_GROUP_H\n#define AURA_GROUP_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\nclass AuraGroup : public Resource {\n\tGDCLASS(AuraGroup, Resource);\n\npublic:\n\tAuraGroup();\n\nprotected:\n\tstatic void _bind_methods();\n};\n\n#endif\n"
  },
  {
    "path": "data/items/craft_recipe.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"craft_recipe.h\"\n\nconst String CraftRecipe::BINDING_STRING_CRAFT_CATEGORIES = \"None,Alchemy,Smithing,Tailoring,Enchanting,Engineering\";\nconst String CraftRecipe::BINDING_STRING_CRAFT_SUB_CATEGORIES = \"None,Potions\";\n\nint CraftRecipe::get_id() const {\n\treturn _id;\n}\nvoid CraftRecipe::set_id(const int value) {\n\t_id = value;\n}\n\nCraftRecipe::CraftCategories CraftRecipe::get_category() const {\n\treturn _category;\n}\nvoid CraftRecipe::set_category(const CraftCategories value) {\n\t_category = value;\n}\n\nCraftRecipe::CraftSubCategories CraftRecipe::get_sub_category() const {\n\treturn _sub_category;\n}\n\nvoid CraftRecipe::set_sub_category(const CraftSubCategories value) {\n\t_sub_category = value;\n}\n\nRef<CraftRecipeHelper> CraftRecipe::get_required_tool(const int index) {\n\treturn _required_tools[index];\n}\n\nvoid CraftRecipe::set_required_tool(const int index, const Ref<CraftRecipeHelper> &value) {\n\t_required_tools[index] = value;\n}\n\nint CraftRecipe::get_required_tools_count() const {\n\treturn _required_tools_count;\n}\n\nvoid CraftRecipe::set_required_tools_count(const int value) {\n\t_required_tools_count = value;\n}\n\nvoid CraftRecipe::set_required_material(const int index, const Ref<CraftRecipeHelper> &value) {\n\t_required_materials[index] = value;\n}\n\nRef<CraftRecipeHelper> CraftRecipe::get_required_material(int index) {\n\treturn _required_materials[index];\n}\n\nint CraftRecipe::get_required_materials_count() const {\n\treturn _required_materials_count;\n}\n\nvoid CraftRecipe::set_required_materials_count(const int value) {\n\t_required_materials_count = value;\n}\n\nRef<CraftRecipeHelper> CraftRecipe::get_item() {\n\treturn _item;\n}\n\nvoid CraftRecipe::set_item(const Ref<CraftRecipeHelper> &value) {\n\t_item = value;\n}\n\nCraftRecipe::CraftRecipe() {\n\t_id = 0;\n\t_category = CraftCategories::CRAFT_CATEGORY_NONE;\n\t_sub_category = CraftSubCategories::CRAFT_SUB_CATEGORY_NONE;\n\t//_item = Ref<CraftRecipeHelper>(memnew(CraftRecipeHelper()));\n\t_required_materials_count = 0;\n\t_required_tools_count = 0;\n\n\t//for (int i = 0; i < MAX_REQUIRED_TOOLS; ++i) {\n\t//\t_required_tools[i] = Ref<CraftRecipeHelper>(memnew(CraftRecipeHelper()));\n\t//}\n\n\t//for (int i = 0; i < MAX_REQUIRED_MATERIALS; ++i) {\n\t//\t_required_materials[i] = Ref<CraftRecipeHelper>(memnew(CraftRecipeHelper()));\n\t//}\n}\n\nCraftRecipe::~CraftRecipe() {\n\t//TODO check if the array destrutors actually unref the objects.\n\n\t//_item = Ref<CraftRecipeHelper>(NULL);\n}\n\nvoid CraftRecipe::_validate_property(PropertyInfo &property) const {\n\tString prop = property.name;\n\tif (prop.begins_with(\"RequiredMaterials_\")) {\n\t\tint frame = prop.get_slicec('/', 0).get_slicec('_', 1).to_int();\n\t\tif (frame >= _required_materials_count) {\n\t\t\tproperty.usage = 0;\n\t\t}\n\t} else if (prop.begins_with(\"RequiredTools_\")) {\n\t\tint frame = prop.get_slicec('/', 0).get_slicec('_', 1).to_int();\n\t\tif (frame >= _required_tools_count) {\n\t\t\tproperty.usage = 0;\n\t\t}\n\t}\n}\n\nvoid CraftRecipe::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &CraftRecipe::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &CraftRecipe::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_name\", \"get_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_category\"), &CraftRecipe::get_category);\n\tClassDB::bind_method(D_METHOD(\"set_category\", \"value\"), &CraftRecipe::set_category);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"category\", PROPERTY_HINT_ENUM, CraftRecipe::BINDING_STRING_CRAFT_CATEGORIES), \"set_category\", \"get_category\");\n\n\tClassDB::bind_method(D_METHOD(\"get_sub_category\"), &CraftRecipe::get_sub_category);\n\tClassDB::bind_method(D_METHOD(\"set_sub_category\", \"value\"), &CraftRecipe::set_sub_category);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sub_category\", PROPERTY_HINT_ENUM, CraftRecipe::BINDING_STRING_CRAFT_SUB_CATEGORIES), \"set_sub_category\", \"get_sub_category\");\n\n\tClassDB::bind_method(D_METHOD(\"get_required_material\"), &CraftRecipe::get_required_material);\n\tClassDB::bind_method(D_METHOD(\"set_required_material\", \"mat\"), &CraftRecipe::set_required_material);\n\n\tClassDB::bind_method(D_METHOD(\"get_required_materials_count\"), &CraftRecipe::get_required_materials_count);\n\tClassDB::bind_method(D_METHOD(\"set_required_materials_count\", \"count\"), &CraftRecipe::set_required_materials_count);\n\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"required_materials_count\", PROPERTY_HINT_RANGE, \"0,\" + itos(MAX_REQUIRED_MATERIALS), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_required_materials_count\", \"get_required_materials_count\");\n\n\tfor (int i = 0; i < MAX_REQUIRED_MATERIALS; i++) {\n\t\tADD_PROPERTYI(PropertyInfo(Variant::OBJECT, \"RequiredMaterials_\" + itos(i) + \"\", PROPERTY_HINT_RESOURCE_TYPE, \"CraftRecipeHelper\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"set_required_material\", \"get_required_material\", i);\n\t}\n\n\tClassDB::bind_method(D_METHOD(\"get_required_tool\"), &CraftRecipe::get_required_tool);\n\tClassDB::bind_method(D_METHOD(\"set_required_tool\", \"value\"), &CraftRecipe::set_required_tool);\n\n\tClassDB::bind_method(D_METHOD(\"get_required_tools_count\"), &CraftRecipe::get_required_tools_count);\n\tClassDB::bind_method(D_METHOD(\"set_required_tools_count\", \"value\"), &CraftRecipe::set_required_tools_count);\n\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"required_tools_count\", PROPERTY_HINT_RANGE, \"0,\" + itos(MAX_REQUIRED_TOOLS), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_required_tools_count\", \"get_required_tools_count\");\n\n\tfor (int i = 0; i < MAX_REQUIRED_TOOLS; i++) {\n\t\tADD_PROPERTYI(PropertyInfo(Variant::OBJECT, \"RequiredTools_\" + itos(i), PROPERTY_HINT_RESOURCE_TYPE, \"CraftRecipeHelper\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"set_required_tool\", \"get_required_tool\", i);\n\t}\n\n\tClassDB::bind_method(D_METHOD(\"get_item\"), &CraftRecipe::get_item);\n\tClassDB::bind_method(D_METHOD(\"set_item\", \"value\"), &CraftRecipe::set_item);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"CraftRecipeHelper\"), \"set_item\", \"get_item\");\n\n\tBIND_CONSTANT(MAX_REQUIRED_TOOLS);\n\tBIND_CONSTANT(MAX_REQUIRED_MATERIALS);\n\n\tBIND_ENUM_CONSTANT(CRAFT_CATEGORY_NONE);\n\tBIND_ENUM_CONSTANT(CRAFT_CATEGORY_ALCHEMY);\n\tBIND_ENUM_CONSTANT(CRAFT_CATEGORY_SMITHING);\n\tBIND_ENUM_CONSTANT(CRAFT_CATEGORY_TAILORING);\n\tBIND_ENUM_CONSTANT(CRAFT_CATEGORY_ENCHANTING);\n\tBIND_ENUM_CONSTANT(CRAFT_CATEGORY_ENGINEERING);\n\n\tBIND_ENUM_CONSTANT(CRAFT_SUB_CATEGORY_NONE);\n\tBIND_ENUM_CONSTANT(CRAFT_SUB_CATEGORY_POTIONS);\n}\n"
  },
  {
    "path": "data/items/craft_recipe.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef CRAFT_RECIPE_H\n#define CRAFT_RECIPE_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n#include \"core/string/ustring.h\"\n\n\n#include \"item_template.h\"\n\n#include \"craft_recipe_helper.h\"\n\nclass CraftRecipe : public Resource {\n\tGDCLASS(CraftRecipe, Resource);\n\npublic:\n\tstatic const String BINDING_STRING_CRAFT_CATEGORIES;\n\tstatic const String BINDING_STRING_CRAFT_SUB_CATEGORIES;\n\n\tenum CraftCategories {\n\t\tCRAFT_CATEGORY_NONE,\n\t\tCRAFT_CATEGORY_ALCHEMY,\n\t\tCRAFT_CATEGORY_SMITHING,\n\t\tCRAFT_CATEGORY_TAILORING,\n\t\tCRAFT_CATEGORY_ENCHANTING,\n\t\tCRAFT_CATEGORY_ENGINEERING,\n\t};\n\n\tenum CraftSubCategories {\n\t\tCRAFT_SUB_CATEGORY_NONE,\n\t\tCRAFT_SUB_CATEGORY_POTIONS,\n\t};\n\npublic:\n\tint get_id() const;\n\tvoid set_id(const int value);\n\n\tCraftCategories get_category() const;\n\tvoid set_category(const CraftCategories value);\n\n\tCraftSubCategories get_sub_category() const;\n\tvoid set_sub_category(const CraftSubCategories value);\n\n\t//Tools\n\tRef<CraftRecipeHelper> get_required_tool(int index);\n\tvoid set_required_tool(const int index, const Ref<CraftRecipeHelper> &value);\n\n\tint get_required_tools_count() const;\n\tvoid set_required_tools_count(const int value);\n\n\t//Materials\n\tRef<CraftRecipeHelper> get_required_material(const int index);\n\tvoid set_required_material(const int index, const Ref<CraftRecipeHelper> &value);\n\n\tint get_required_materials_count() const;\n\tvoid set_required_materials_count(const int value);\n\n\t//Item\n\tRef<CraftRecipeHelper> get_item();\n\tvoid set_item(const Ref<CraftRecipeHelper> &value);\n\n\tCraftRecipe();\n\t~CraftRecipe();\n\nprotected:\n\tstatic void _bind_methods();\n\tvoid _validate_property(PropertyInfo &property) const;\n\nprivate:\n\tenum {\n\t\tMAX_REQUIRED_MATERIALS = 6, //Increase if necessary, should be enough for now\n\t\tMAX_REQUIRED_TOOLS = 6 //Increase if necessary, should be enough for now\n\t};\n\n\tint _id;\n\tString _text_name;\n\n\tCraftCategories _category;\n\tCraftSubCategories _sub_category;\n\n\tint _required_tools_count;\n\tRef<CraftRecipeHelper> _required_tools[MAX_REQUIRED_TOOLS];\n\n\tint _required_materials_count;\n\tRef<CraftRecipeHelper> _required_materials[MAX_REQUIRED_MATERIALS];\n\n\tRef<CraftRecipeHelper> _item;\n};\n\nVARIANT_ENUM_CAST(CraftRecipe::CraftSubCategories);\nVARIANT_ENUM_CAST(CraftRecipe::CraftCategories);\n\n#endif\n"
  },
  {
    "path": "data/items/craft_recipe_helper.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"craft_recipe_helper.h\"\n\nRef<ItemTemplate> CraftRecipeHelper::get_item() {\n\treturn _item;\n}\n\nvoid CraftRecipeHelper::set_item(Ref<ItemTemplate> value) {\n\t_item = value;\n}\n\nint CraftRecipeHelper::get_count() {\n\treturn _count;\n}\n\nvoid CraftRecipeHelper::set_count(int value) {\n\t_count = value;\n}\n\nCraftRecipeHelper::CraftRecipeHelper(Ref<ItemTemplate> item, int count) {\n\tset_item(item);\n\tset_count(count);\n}\n\nCraftRecipeHelper::CraftRecipeHelper() {\n\tset_count(0);\n}\n\nCraftRecipeHelper::~CraftRecipeHelper() {\n}\n\nvoid CraftRecipeHelper::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_item\"), &CraftRecipeHelper::get_item);\n\tClassDB::bind_method(D_METHOD(\"set_item\", \"value\"), &CraftRecipeHelper::set_item);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemTemplate\"), \"set_item\", \"get_item\");\n\n\tClassDB::bind_method(D_METHOD(\"get_count\"), &CraftRecipeHelper::get_count);\n\tClassDB::bind_method(D_METHOD(\"set_count\", \"value\"), &CraftRecipeHelper::set_count);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"count\"), \"set_count\", \"get_count\");\n}\n"
  },
  {
    "path": "data/items/craft_recipe_helper.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef CRAFT_RECIPE_HELPER_H\n#define CRAFT_RECIPE_HELPER_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"item_template.h\"\n\nclass CraftRecipeHelper : public Resource {\n\tGDCLASS(CraftRecipeHelper, Resource);\n\npublic:\n\tRef<ItemTemplate> get_item();\n\tvoid set_item(Ref<ItemTemplate> value);\n\tint get_count();\n\tvoid set_count(int value);\n\n\tCraftRecipeHelper(Ref<ItemTemplate> item, int count);\n\tCraftRecipeHelper();\n\t~CraftRecipeHelper();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tRef<ItemTemplate> _item;\n\tint _count;\n};\n\n#endif\n"
  },
  {
    "path": "data/items/equipment_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"equipment_data.h\"\n\n#include \"item_instance.h\"\n#include \"item_template.h\"\n\n#include \"../../singletons/ess.h\"\n\nRef<ItemTemplate> EquipmentData::get_slot(int index) {\n\tERR_FAIL_INDEX_V(index, ESS::get_singleton()->equip_slot_get_count(), Ref<ItemTemplate>());\n\n\treturn _entries[index];\n}\nvoid EquipmentData::set_slot(int index, Ref<ItemTemplate> entry) {\n\tERR_FAIL_INDEX(index, ESS::get_singleton()->equip_slot_get_count());\n\n\t_entries.write[index] = entry;\n}\n\nRef<ItemInstance> EquipmentData::get_item(int index) {\n\tERR_FAIL_INDEX_V(index, ESS::get_singleton()->equip_slot_get_count(), Ref<ItemInstance>());\n\n\tRef<ItemTemplate> ede = _entries[index];\n\n\tif (!ede.is_valid())\n\t\treturn Ref<ItemInstance>();\n\n\treturn ede->create_item_instance();\n}\n\nEquipmentData::EquipmentData() {\n\t_entries.resize(ESS::get_singleton()->equip_slot_get_count());\n}\n\nEquipmentData::~EquipmentData() {\n\t_entries.clear();\n}\n\nbool EquipmentData::_set(const StringName &p_name, const Variant &p_value) {\n\tString name = p_name;\n\n\tif (name.get_slicec('/', 0) == \"slot\") {\n\t\tStringName prop = name.get_slicec('/', 1);\n\n\t\tif (ESS::get_singleton()->equip_slot_is_property(prop)) {\n\t\t\tint id = ESS::get_singleton()->equip_slot_get_property_id(prop);\n\n\t\t\tif (_entries.size() < id) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t_entries.set(id, p_value);\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nbool EquipmentData::_get(const StringName &p_name, Variant &r_ret) const {\n\tString name = p_name;\n\n\tif (name.get_slicec('/', 0) == \"slot\") {\n\t\tStringName prop = name.get_slicec('/', 1);\n\n\t\tif (ESS::get_singleton()->equip_slot_is_property(prop)) {\n\t\t\tint id = ESS::get_singleton()->equip_slot_get_property_id(prop);\n\n\t\t\tif (_entries.size() < id) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tr_ret = _entries[id];\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nvoid EquipmentData::_get_property_list(List<PropertyInfo> *p_list) const {\n\tfor (int i = 0; i < ESS::get_singleton()->equip_slot_get_count(); ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::OBJECT, \"slot/\" + ESS::get_singleton()->equip_slot_get_property_name(i), PROPERTY_HINT_RESOURCE_TYPE, \"ItemTemplate\"));\n\t}\n}\n\nvoid EquipmentData::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_slot\", \"index\"), &EquipmentData::get_slot);\n\tClassDB::bind_method(D_METHOD(\"set_slot\", \"index\", \"entry\"), &EquipmentData::set_slot);\n}\n"
  },
  {
    "path": "data/items/equipment_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef EQUIPMENT_DATA_H\n#define EQUIPMENT_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\nclass ItemInstance;\nclass ItemTemplate;\n\nclass EquipmentData : public Resource {\n\tGDCLASS(EquipmentData, Resource);\n\npublic:\n\tRef<ItemTemplate> get_slot(int index);\n\tvoid set_slot(int index, Ref<ItemTemplate> entry);\n\n\tRef<ItemInstance> get_item(int index);\n\n\tEquipmentData();\n\t~EquipmentData();\n\nprotected:\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tstatic void _bind_methods();\n\nprivate:\n\tVector<Ref<ItemTemplate> > _entries;\n};\n\n#endif\n"
  },
  {
    "path": "data/items/item_instance.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"item_instance.h\"\n\n#include \"item_template.h\"\n\n#include \"../../database/ess_resource_db.h\"\n#include \"../../singletons/ess.h\"\n\n#include \"core/version.h\"\n\nRef<ItemTemplate> ItemInstance::get_item_template() {\n\treturn _item_template;\n}\nvoid ItemInstance::set_item_template(const Ref<ItemTemplate> &value) {\n\t_item_template = value;\n\n\t_item_template_path = \"\";\n\n\tif (value.is_valid())\n\t\t_item_template_path = value->get_path();\n}\n\nint ItemInstance::stat_modifier_get_stat_id(const int index) const {\n\tERR_FAIL_INDEX_V(index, _modifiers.size(), 0);\n\n\treturn _modifiers[index].stat_id;\n}\nvoid ItemInstance::stat_modifier_set_stat_id(const int index, const int value) {\n\tERR_FAIL_INDEX(index, _modifiers.size());\n\n\t_modifiers.write[index].stat_id = value;\n}\n\nfloat ItemInstance::stat_modifier_get_base_mod(const int index) const {\n\tERR_FAIL_INDEX_V(index, _modifiers.size(), 0);\n\n\treturn _modifiers[index].base_mod;\n}\nvoid ItemInstance::stat_modifier_set_base_mod(const int index, const float value) {\n\tERR_FAIL_INDEX(index, _modifiers.size());\n\n\t_modifiers.write[index].base_mod = value;\n}\n\nfloat ItemInstance::stat_modifier_get_bonus_mod(const int index) const {\n\tERR_FAIL_INDEX_V(index, _modifiers.size(), 0);\n\n\treturn _modifiers[index].bonus_mod;\n}\nvoid ItemInstance::stat_modifier_set_bonus_mod(const int index, const float value) {\n\tERR_FAIL_INDEX(index, _modifiers.size());\n\n\t_modifiers.write[index].bonus_mod = value;\n}\n\nfloat ItemInstance::stat_modifier_get_percent_mod(const int index) const {\n\tERR_FAIL_INDEX_V(index, _modifiers.size(), 0);\n\n\treturn _modifiers[index].percent_mod;\n}\nvoid ItemInstance::stat_modifier_set_percent_mod(const int index, const float value) {\n\tERR_FAIL_INDEX(index, _modifiers.size());\n\n\t_modifiers.write[index].percent_mod = value;\n}\n\nvoid ItemInstance::add_item_stat_modifier(const int stat_id, const int base_mod, const int bonus_mod, const int percent_mod) {\n\tItemStatModifier mod;\n\n\tmod.stat_id = stat_id;\n\tmod.base_mod = base_mod;\n\tmod.bonus_mod = bonus_mod;\n\tmod.percent_mod = percent_mod;\n\n\t_modifiers.push_back(mod);\n}\nvoid ItemInstance::remove_item_stat_modifier(const int index) {\n\tERR_FAIL_INDEX(index, _modifiers.size());\n\n\t_modifiers.remove_at(index);\n}\nvoid ItemInstance::clear_item_stat_modifiers() {\n\t_modifiers.clear();\n}\nint ItemInstance::stat_modifier_get_count() const {\n\treturn _modifiers.size();\n}\n\nVector<Variant> ItemInstance::stat_modifiers_get() {\n\tVector<Variant> arr;\n\tarr.resize(_modifiers.size() * 4);\n\n\tfor (int i = 0; i < _modifiers.size(); ++i) {\n\t\tint indx = i * 4;\n\t\tconst ItemStatModifier &m = _modifiers[i];\n\n\t\tarr.write[indx] = m.stat_id;\n\t\tarr.write[indx + 1] = m.base_mod;\n\t\tarr.write[indx + 2] = m.bonus_mod;\n\t\tarr.write[indx + 3] = m.percent_mod;\n\t}\n\n\treturn arr;\n}\nvoid ItemInstance::stat_modifiers_set(const Vector<Variant> &mods) {\n\tERR_FAIL_COND((mods.size() % 4) != 0);\n\n\t_modifiers.resize(mods.size() / 4);\n\n\tfor (int i = 0; i < _modifiers.size(); ++i) {\n\t\tint indx = i * 4;\n\t\tItemStatModifier &m = _modifiers.write[i];\n\n\t\tm.stat_id = mods[indx];\n\t\tm.base_mod = mods[indx + 1];\n\t\tm.bonus_mod = mods[indx + 2];\n\t\tm.percent_mod = mods[indx + 3];\n\t}\n}\n\nint ItemInstance::get_stack_size() const {\n\treturn _stack_size;\n}\nvoid ItemInstance::set_stack_size(const int value) {\n\t_stack_size = value;\n\n\temit_signal(\"stack_size_changed\", Ref<ItemInstance>(this));\n}\n\nint ItemInstance::get_charges() const {\n\treturn _charges;\n}\nvoid ItemInstance::set_charges(const int value) {\n\t_charges = value;\n\n\temit_signal(\"stack_charges_changed\", Ref<ItemInstance>(this));\n}\n\nString ItemInstance::get_description() {\n\tif (!has_method(\"_get_description\"))\n\t\treturn \"\";\n\n\treturn call(\"_get_description\");\n}\n\nDictionary ItemInstance::to_dict() {\n\treturn call(\"_to_dict\");\n}\nvoid ItemInstance::from_dict(const Dictionary &dict) {\n\tcall(\"_from_dict\", dict);\n}\n\nDictionary ItemInstance::_to_dict() {\n\tDictionary dict;\n\n\tdict[\"item_path\"] = _item_template->get_path();\n\n\tdict[\"stack_size\"] = _stack_size;\n\n\tArray mods;\n\n\tfor (int i = 0; i < _modifiers.size(); ++i) {\n\t\tDictionary mdict;\n\n\t\tmdict[\"stat_id\"] = _modifiers[i].stat_id;\n\n\t\tmdict[\"base_mod\"] = _modifiers[i].base_mod;\n\t\tmdict[\"bonus_mod\"] = _modifiers[i].bonus_mod;\n\t\tmdict[\"percent_mod\"] = _modifiers[i].percent_mod;\n\n\t\tmods.append(mdict);\n\t}\n\n\tdict[\"modifiers\"] = mods;\n\n\treturn dict;\n}\nvoid ItemInstance::_from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\t_item_template_path = dict.get(\"item_path\", 0);\n\n\tif (ESS::get_singleton() != NULL) {\n\t\t_item_template = ESS::get_singleton()->get_resource_db()->get_item_template_path(_item_template_path);\n\t}\n\n\t_stack_size = dict.get(\"stack_size\", 0);\n\n\tArray mods = dict.get(\"modifiers\", Array());\n\n\tfor (int i = 0; i < mods.size(); ++i) {\n\t\tItemStatModifier mod;\n\t\tDictionary mdict = mods.get(i);\n\n\t\tmod.stat_id = dict.get(\"stat_id\", 0);\n\t\tmod.base_mod = dict.get(\"base_mod\", 0);\n\t\tmod.bonus_mod = dict.get(\"bonus_mod\", 0);\n\t\tmod.percent_mod = dict.get(\"percent_mod\", 0);\n\n\t\t_modifiers.push_back(mod);\n\t}\n}\n\nItemInstance::ItemInstance() {\n\t_stack_size = 1;\n\t_charges = -1;\n}\nItemInstance::~ItemInstance() {\n\t_modifiers.clear();\n}\n\nvoid ItemInstance::_bind_methods() {\n\tADD_SIGNAL(MethodInfo(\"stack_size_changed\", PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\")));\n\tADD_SIGNAL(MethodInfo(\"stack_charges_changed\", PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\")));\n\n\tClassDB::bind_method(D_METHOD(\"get_item_template\"), &ItemInstance::get_item_template);\n\tClassDB::bind_method(D_METHOD(\"set_item_template\", \"value\"), &ItemInstance::set_item_template);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"item_template\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemTemplate\"), \"set_item_template\", \"get_item_template\");\n\n\tClassDB::bind_method(D_METHOD(\"get_stack_size\"), &ItemInstance::get_stack_size);\n\tClassDB::bind_method(D_METHOD(\"set_stack_size\", \"count\"), &ItemInstance::set_stack_size);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"stack_size\"), \"set_stack_size\", \"get_stack_size\");\n\n\tClassDB::bind_method(D_METHOD(\"get_charges\"), &ItemInstance::get_charges);\n\tClassDB::bind_method(D_METHOD(\"set_charges\", \"size\"), &ItemInstance::set_charges);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"charges\"), \"set_charges\", \"get_charges\");\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_stat_id\", \"index\"), &ItemInstance::stat_modifier_get_stat_id);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_stat_id\", \"index\", \"value\"), &ItemInstance::stat_modifier_set_stat_id);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_base_mod\", \"index\"), &ItemInstance::stat_modifier_get_base_mod);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_base_mod\", \"index\", \"value\"), &ItemInstance::stat_modifier_set_base_mod);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_bonus_mod\", \"index\"), &ItemInstance::stat_modifier_get_bonus_mod);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_bonus_mod\", \"index\", \"value\"), &ItemInstance::stat_modifier_set_bonus_mod);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_percent_mod\", \"index\"), &ItemInstance::stat_modifier_get_percent_mod);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_percent_mod\", \"index\", \"value\"), &ItemInstance::stat_modifier_set_percent_mod);\n\n\tClassDB::bind_method(D_METHOD(\"add_item_stat_modifier\", \"stat_id\", \"base_mod\", \"bonus_mod\", \"percent_mod\"), &ItemInstance::add_item_stat_modifier);\n\tClassDB::bind_method(D_METHOD(\"remove_item_stat_modifier\", \"index\"), &ItemInstance::remove_item_stat_modifier);\n\tClassDB::bind_method(D_METHOD(\"clear_item_stat_modifiers\"), &ItemInstance::clear_item_stat_modifiers);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_count\"), &ItemInstance::stat_modifier_get_count);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifiers_get\"), &ItemInstance::stat_modifiers_get);\n\tClassDB::bind_method(D_METHOD(\"stat_modifiers_set\", \"mods\"), &ItemInstance::stat_modifiers_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"stat_modifiers\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT, \"\"), \"stat_modifiers_set\", \"stat_modifiers_get\");\n\n\t////GDVIRTUAL_BIND(\"_get_description\", \"desc\");\n\tClassDB::bind_method(D_METHOD(\"get_description\"), &ItemInstance::get_description);\n\n\t//Serialization\n\t////GDVIRTUAL_BIND(\"_from_dict\", \"dict\");\n\t////GDVIRTUAL_BIND(\"_to_dict\", \"dict\");\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &ItemInstance::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &ItemInstance::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_from_dict\", \"dict\"), &ItemInstance::_from_dict);\n\tClassDB::bind_method(D_METHOD(\"_to_dict\"), &ItemInstance::_to_dict);\n}\n"
  },
  {
    "path": "data/items/item_instance.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ITEM_INSTANCE_H\n#define ITEM_INSTANCE_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n\n\n#include \"../../item_enums.h\"\n\nclass ItemTemplate;\n\nclass ItemInstance : public Resource {\n\tGDCLASS(ItemInstance, Resource);\n\npublic:\n\tRef<ItemTemplate> get_item_template();\n\tvoid set_item_template(const Ref<ItemTemplate> &value);\n\n\t//Modifiers\n\tint stat_modifier_get_stat_id(const int index) const;\n\tvoid stat_modifier_set_stat_id(const int index, const int value);\n\n\tfloat stat_modifier_get_base_mod(const int index) const;\n\tvoid stat_modifier_set_base_mod(const int index, const float value);\n\n\tfloat stat_modifier_get_bonus_mod(const int index) const;\n\tvoid stat_modifier_set_bonus_mod(const int index, const float value);\n\n\tfloat stat_modifier_get_percent_mod(const int index) const;\n\tvoid stat_modifier_set_percent_mod(const int index, const float value);\n\n\tvoid add_item_stat_modifier(const int stat_id, const int base_mod, const int bonus_mod, const int percent_mod);\n\tvoid remove_item_stat_modifier(const int index);\n\tvoid clear_item_stat_modifiers();\n\n\tint stat_modifier_get_count() const;\n\n\tVector<Variant> stat_modifiers_get();\n\tvoid stat_modifiers_set(const Vector<Variant> &mods);\n\n\tint get_stack_size() const;\n\tvoid set_stack_size(const int value);\n\n\tint get_charges() const;\n\tvoid set_charges(const int value);\n\n\tString get_description();\n\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tvirtual Dictionary _to_dict();\n\tvirtual void _from_dict(const Dictionary &dict);\n\n\tItemInstance();\n\t~ItemInstance();\n\nprotected:\n\tstatic void _bind_methods();\n\nprotected:\n\tstruct ItemStatModifier {\n\t\tint stat_id;\n\t\tfloat base_mod;\n\t\tfloat bonus_mod;\n\t\tfloat percent_mod;\n\n\t\tItemStatModifier() {\n\t\t\tstat_id = 0;\n\t\t\tbase_mod = 0;\n\t\t\tbonus_mod = 0;\n\t\t\tpercent_mod = 0;\n\t\t}\n\t};\n\nprivate:\n\tRef<ItemTemplate> _item_template;\n\tStringName _item_template_path;\n\n\tint _stack_size;\n\tint _charges;\n\n\tVector<ItemStatModifier> _modifiers;\n};\n\n#endif\n"
  },
  {
    "path": "data/items/item_template.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"item_template.h\"\n\n#include \"../../entities/data/entity_class_data.h\"\n#include \"../spells/spell.h\"\n#include \"item_instance.h\"\n\n#include \"../../singletons/ess.h\"\n\n#include \"../../defines.h\"\n\nint ItemTemplate::get_id() const {\n\treturn _id;\n}\nvoid ItemTemplate::set_id(const int value) {\n\t_id = value;\n}\n\nItemEnums::ItemType ItemTemplate::get_item_type() const {\n\treturn _item_type;\n}\nvoid ItemTemplate::set_item_type(const ItemEnums::ItemType value) {\n\t_item_type = value;\n}\n\nItemEnums::ItemSubtype ItemTemplate::get_item_sub_type() const {\n\treturn _item_sub_type;\n}\nvoid ItemTemplate::set_item_sub_type(const ItemEnums::ItemSubtype value) {\n\t_item_sub_type = value;\n}\n\nItemEnums::ItemSubSubtype ItemTemplate::get_item_sub_sub_type() const {\n\treturn _item_sub_sub_type;\n}\nvoid ItemTemplate::set_item_sub_sub_type(const ItemEnums::ItemSubSubtype value) {\n\t_item_sub_sub_type = value;\n}\n\nItemEnums::ItemRarity ItemTemplate::get_rarity() const {\n\treturn _rarity;\n}\nvoid ItemTemplate::set_rarity(const ItemEnums::ItemRarity value) {\n\t_rarity = value;\n}\n\nItemEnums::ArmorType ItemTemplate::get_armor_type() const {\n\treturn _armor_type;\n}\nvoid ItemTemplate::set_armor_type(const ItemEnums::ArmorType value) {\n\t_armor_type = value;\n}\n\nint ItemTemplate::get_equip_slot() const {\n\treturn _equip_slot;\n}\nvoid ItemTemplate::set_equip_slot(const int value) {\n\t_equip_slot = value;\n}\n\nRef<ModelVisual> ItemTemplate::get_model_visual() const {\n\treturn _model_visual;\n}\nvoid ItemTemplate::set_model_visual(const Ref<ModelVisual> &value) {\n\t_model_visual = value;\n}\n\nRef<EntityClassData> ItemTemplate::get_required_character_class() const {\n\treturn _required_character_class;\n}\nvoid ItemTemplate::set_required_character_class(const Ref<EntityClassData> &value) {\n\t_required_character_class = value;\n}\n\nint ItemTemplate::get_price() const {\n\treturn _price;\n}\n\nvoid ItemTemplate::set_price(const int value) {\n\t_price = value;\n}\n\nint ItemTemplate::get_stack_size() const {\n\treturn _stack_size;\n}\nvoid ItemTemplate::set_stack_size(const int value) {\n\t_stack_size = value;\n}\n\nRef<Texture> ItemTemplate::get_icon() const {\n\treturn _icon;\n}\n\nvoid ItemTemplate::set_icon(const Ref<Texture> &value) {\n\t_icon = value;\n}\n\nfloat ItemTemplate::get_scale_x() const {\n\treturn _scale_x;\n}\n\nvoid ItemTemplate::set_scale_x(const float value) {\n\t_scale_x = value;\n}\n\nfloat ItemTemplate::get_scale_y() const {\n\treturn _scale_y;\n}\n\nvoid ItemTemplate::set_scale_y(const float value) {\n\t_scale_y = value;\n}\n\nfloat ItemTemplate::get_scale_z() const {\n\treturn _scale_z;\n}\n\nvoid ItemTemplate::set_scale_z(const float value) {\n\t_scale_z = value;\n}\n\nint ItemTemplate::get_bag_size() const {\n\treturn _bag_size;\n}\nvoid ItemTemplate::set_bag_size(const int size) {\n\t_bag_size = size;\n}\n\n///     TEXTS    ////\n\nString ItemTemplate::get_text_translation_key() const {\n\treturn _text_translation_key;\n}\nvoid ItemTemplate::set_text_translation_key(const String &value) {\n\t_text_translation_key = value;\n}\n\n////    TEACHES    ////\n\nint ItemTemplate::get_num_teaches_spells() const {\n\treturn _teaches_spells.size();\n}\nvoid ItemTemplate::set_num_teaches_spells(int value) {\n\t_teaches_spells.resize(value);\n}\n\nRef<Spell> ItemTemplate::get_teaches_spell(const int index) {\n\tERR_FAIL_INDEX_V(index, _teaches_spells.size(), Ref<Spell>());\n\n\treturn _teaches_spells[index];\n}\nvoid ItemTemplate::set_teaches_spell(const int index, const Ref<Spell> &spell) {\n\tERR_FAIL_INDEX(index, _teaches_spells.size());\n\n\t_teaches_spells.set(index, Ref<Spell>(spell));\n}\n\nVector<Variant> ItemTemplate::get_teaches_spells() {\n\tVARIANT_ARRAY_GET(_teaches_spells);\n}\nvoid ItemTemplate::set_teaches_spells(const Vector<Variant> &spells) {\n\tVARIANT_ARRAY_SET(spells, _teaches_spells, Spell);\n}\n\n////    GRANTS SPELLS    ////\n\nint ItemTemplate::get_num_grants_spells() const {\n\treturn _grants_spells.size();\n}\nvoid ItemTemplate::set_num_grants_spells(const int value) {\n\t_grants_spells.resize(value);\n}\n\nRef<Spell> ItemTemplate::get_grants_spell(const int index) {\n\tERR_FAIL_INDEX_V(index, _grants_spells.size(), Ref<Spell>());\n\n\treturn _grants_spells[index];\n}\nvoid ItemTemplate::set_grants_spell(const int index, const Ref<Spell> &spell) {\n\tERR_FAIL_INDEX(index, _grants_spells.size());\n\n\t_grants_spells.set(index, Ref<Spell>(spell));\n}\n\nVector<Variant> ItemTemplate::get_grants_spells() {\n\tVARIANT_ARRAY_GET(_grants_spells);\n}\nvoid ItemTemplate::set_grants_spells(const Vector<Variant> &spells) {\n\tVARIANT_ARRAY_SET(spells, _grants_spells, Spell);\n}\n\n////    AURAS    ////\n\nint ItemTemplate::get_num_auras() const {\n\treturn _auras.size();\n}\nvoid ItemTemplate::set_num_auras(int value) {\n\t_auras.resize(value);\n}\n\nRef<Spell> ItemTemplate::get_aura(const int index) {\n\tERR_FAIL_INDEX_V(index, _auras.size(), Ref<Spell>());\n\n\treturn _auras[index];\n}\nvoid ItemTemplate::set_aura(const int index, const Ref<Spell> &aura) {\n\tERR_FAIL_INDEX(index, _auras.size());\n\n\t_auras.set(index, Ref<Spell>(aura));\n}\n\nVector<Variant> ItemTemplate::get_auras() {\n\tVARIANT_ARRAY_GET(_auras);\n}\nvoid ItemTemplate::set_auras(const Vector<Variant> &auras) {\n\tVARIANT_ARRAY_SET(auras, _auras, Spell);\n}\n\n//Required Skills\nint ItemTemplate::get_num_required_skills() const {\n\treturn _required_skills.size();\n}\n\nRef<Spell> ItemTemplate::get_required_skill(const int index) {\n\tERR_FAIL_INDEX_V(index, _required_skills.size(), Ref<Spell>());\n\n\treturn _required_skills.get(index);\n}\nvoid ItemTemplate::set_required_skill(const int index, const Ref<Spell> &aura) {\n\tERR_FAIL_INDEX(index, _required_skills.size());\n\n\t_required_skills.set(index, aura);\n}\n\nVector<Variant> ItemTemplate::get_required_skills() {\n\tVARIANT_ARRAY_GET(_required_skills);\n}\nvoid ItemTemplate::set_required_skills(const Vector<Variant> &skills) {\n\tVARIANT_ARRAY_SET(skills, _required_skills, Spell);\n}\n\n//use spell\nRef<Spell> ItemTemplate::get_use_spell() {\n\treturn _use_spell;\n}\nvoid ItemTemplate::set_use_spell(const Ref<Spell> &use_spell) {\n\t_use_spell = use_spell;\n}\n\nint ItemTemplate::get_charges() const {\n\treturn _charges;\n}\nvoid ItemTemplate::set_charges(const int value) {\n\t_charges = value;\n}\n\nbool ItemTemplate::get_consumed() const {\n\treturn _consumed;\n}\nvoid ItemTemplate::set_consumed(const bool value) {\n\t_consumed = false;\n}\n\nint ItemTemplate::stat_modifier_get_count() const {\n\treturn _modifier_count;\n}\n\nvoid ItemTemplate::stat_modifier_set_count(int value) {\n\t_modifier_count = value;\n}\n\nint ItemTemplate::stat_modifier_get_stat_id(const int index) const {\n\treturn _modifiers[index].stat_id;\n}\n\nvoid ItemTemplate::stat_modifier_set_stat_id(const int index, const int value) {\n\t_modifiers[index].stat_id = value;\n}\n\nfloat ItemTemplate::stat_modifier_get_min_base_mod(const int index) const {\n\treturn _modifiers[index].min_base_mod;\n}\n\nvoid ItemTemplate::stat_modifier_set_min_base_mod(const int index, const float value) {\n\t_modifiers[index].min_base_mod = value;\n}\n\nfloat ItemTemplate::stat_modifier_get_max_base_mod(const int index) const {\n\treturn _modifiers[index].max_base_mod;\n}\n\nvoid ItemTemplate::stat_modifier_set_max_base_mod(const int index, const float value) {\n\t_modifiers[index].max_base_mod = value;\n}\n\nfloat ItemTemplate::stat_modifier_get_min_bonus_mod(const int index) const {\n\treturn _modifiers[index].min_bonus_mod;\n}\n\nvoid ItemTemplate::stat_modifier_set_min_bonus_mod(const int index, const float value) {\n\t_modifiers[index].min_bonus_mod = value;\n}\n\nfloat ItemTemplate::stat_modifier_get_max_bonus_mod(const int index) const {\n\treturn _modifiers[index].max_bonus_mod;\n}\n\nvoid ItemTemplate::stat_modifier_set_max_bonus_mod(const int index, const float value) {\n\t_modifiers[index].max_bonus_mod = value;\n}\n\nfloat ItemTemplate::stat_modifier_get_min_percent_mod(const int index) const {\n\treturn _modifiers[index].min_percent_mod;\n}\n\nvoid ItemTemplate::stat_modifier_set_min_percent_mod(const int index, const float value) {\n\t_modifiers[index].min_percent_mod = value;\n}\n\nfloat ItemTemplate::stat_modifier_get_max_percent_mod(const int index) const {\n\treturn _modifiers[index].max_percent_mod;\n}\n\nvoid ItemTemplate::stat_modifier_set_max_percent_mod(const int index, const float value) {\n\t_modifiers[index].max_percent_mod = value;\n}\n\nfloat ItemTemplate::stat_modifier_get_scaling_factor(const int index) const {\n\treturn _modifiers[index].scaling_factor;\n}\n\nvoid ItemTemplate::stat_modifier_set_scaling_factor(const int index, const float value) {\n\t_modifiers[index].scaling_factor = value;\n}\n\nint ItemTemplate::get_animator_weapon_type() {\n\tif (_item_sub_type == ItemEnums::ITEM_SUB_TYPE_SWORD) {\n\t\treturn 1;\n\t}\n\tif (_item_sub_type == ItemEnums::ITEM_SUB_TYPE_BOW) {\n\t\treturn 2;\n\t}\n\tif (_item_sub_type == ItemEnums::ITEM_SUB_TYPE_AXE) {\n\t\treturn 3;\n\t}\n\treturn 0;\n}\n\nRef<ItemInstance> ItemTemplate::create_item_instance() {\n\tif (has_method(\"_create_item_instance\")) {\n\t\tRef<ItemInstance> ii = call(\"_create_item_instance\");\n\n\t\tERR_FAIL_COND_V(!ii.is_valid(), Ref<ItemInstance>());\n\n\t\treturn ii;\n\t}\n\n\tRef<ItemInstance> item;\n\titem.instantiate();\n\n\t//todo setup\n\t//ERR_EXPLAIN(\"NOT YET IMPLEMENTED!\");\n\tERR_FAIL_V(item);\n\n\treturn item;\n}\n\nString ItemTemplate::get_description() {\n\tif (!has_method(\"_get_description\"))\n\t\treturn \"\";\n\n\treturn call(\"_get_description\");\n}\n\nItemTemplate::ItemTemplate() {\n\t_id = 0;\n\t_item_type = ItemEnums::ITEM_TYPE_NONE;\n\t_item_sub_type = ItemEnums::ITEM_SUB_TYPE_NONE;\n\t_item_sub_sub_type = ItemEnums::ITEM_SUB_SUB_TYPE_NONE;\n\t_rarity = ItemEnums::ITEM_RARITY_NONE;\n\t_armor_type = ItemEnums::ARMOR_TYPE_NONE;\n\t_equip_slot = ESS::get_singleton()->equip_slot_get_count();\n\t_price = 0;\n\n\t_scale_x = 0;\n\t_scale_y = 0;\n\t_scale_z = 0;\n\t_modifier_count = 0;\n\n\t_stack_size = 1;\n\t_bag_size = 0;\n\n\t_charges = -1;\n\t_consumed = false;\n}\n\nItemTemplate::~ItemTemplate() {\n\t_teaches_spells.clear();\n\t_grants_spells.clear();\n\t_auras.clear();\n\t_required_character_class.unref();\n}\n\nvoid ItemTemplate::_validate_property(PropertyInfo &property) const {\n\tString prop = property.name;\n\tif (prop.begins_with(\"stat_modifier_\")) {\n\t\tif (prop.ends_with(\"count\"))\n\t\t\treturn;\n\n\t\tint frame = prop.get_slicec('/', 0).get_slicec('_', 2).to_int();\n\t\tif (frame >= _modifier_count) {\n\t\t\tproperty.usage = 0;\n\t\t}\n\n\t\tif (property.name.ends_with(\"stat_id\"))\n\t\t\tproperty.hint_string = ESS::get_singleton()->stat_get_string();\n\t} else if (prop == \"equip_slot\") {\n\t\tproperty.hint_string = ESS::get_singleton()->equip_slot_get_string();\n\t}\n}\n\nvoid ItemTemplate::_bind_methods() {\n\t////GDVIRTUAL_BIND(\"_create_item_instance\");\n\n\tClassDB::bind_method(D_METHOD(\"create_item_instance\"), &ItemTemplate::create_item_instance);\n\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &ItemTemplate::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"count\"), &ItemTemplate::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_item_type\"), &ItemTemplate::get_item_type);\n\tClassDB::bind_method(D_METHOD(\"set_item_type\", \"count\"), &ItemTemplate::set_item_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"item_type\", PROPERTY_HINT_ENUM, ItemEnums::BINDING_STRING_ITEM_TYPE), \"set_item_type\", \"get_item_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_item_sub_type\"), &ItemTemplate::get_item_sub_type);\n\tClassDB::bind_method(D_METHOD(\"set_item_sub_type\", \"count\"), &ItemTemplate::set_item_sub_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"item_sub_type\", PROPERTY_HINT_ENUM, ItemEnums::BINDING_STRING_ITEM_SUB_TYPE), \"set_item_sub_type\", \"get_item_sub_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_item_sub_sub_type\"), &ItemTemplate::get_item_sub_sub_type);\n\tClassDB::bind_method(D_METHOD(\"set_item_sub_sub_type\", \"count\"), &ItemTemplate::set_item_sub_sub_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"item_sub_sub_type\", PROPERTY_HINT_ENUM, ItemEnums::BINDING_STRING_ITEM_SUB_SUB_TYPE), \"set_item_sub_sub_type\", \"get_item_sub_sub_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_rarity\"), &ItemTemplate::get_rarity);\n\tClassDB::bind_method(D_METHOD(\"set_rarity\", \"count\"), &ItemTemplate::set_rarity);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"rarity\", PROPERTY_HINT_ENUM, ItemEnums::BINDING_STRING_RARITY), \"set_rarity\", \"get_rarity\");\n\n\tClassDB::bind_method(D_METHOD(\"get_armor_type\"), &ItemTemplate::get_armor_type);\n\tClassDB::bind_method(D_METHOD(\"set_armor_type\", \"value\"), &ItemTemplate::set_armor_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"armor_type\", PROPERTY_HINT_ENUM, ItemEnums::BINDING_STRING_ARMOR_TYPE), \"set_armor_type\", \"get_armor_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_equip_slot\"), &ItemTemplate::get_equip_slot);\n\tClassDB::bind_method(D_METHOD(\"set_equip_slot\", \"count\"), &ItemTemplate::set_equip_slot);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"equip_slot\", PROPERTY_HINT_ENUM, \"\"), \"set_equip_slot\", \"get_equip_slot\");\n\n\tClassDB::bind_method(D_METHOD(\"get_price\"), &ItemTemplate::get_price);\n\tClassDB::bind_method(D_METHOD(\"set_price\", \"count\"), &ItemTemplate::set_price);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"price\"), \"set_price\", \"get_price\");\n\n\tClassDB::bind_method(D_METHOD(\"get_model_visual\"), &ItemTemplate::get_model_visual);\n\tClassDB::bind_method(D_METHOD(\"set_model_visual\", \"value\"), &ItemTemplate::set_model_visual);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"model_visual\", PROPERTY_HINT_RESOURCE_TYPE, \"ModelVisual\"), \"set_model_visual\", \"get_model_visual\");\n\n\tClassDB::bind_method(D_METHOD(\"get_stack_size\"), &ItemTemplate::get_stack_size);\n\tClassDB::bind_method(D_METHOD(\"set_stack_size\", \"value\"), &ItemTemplate::set_stack_size);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"stack_size\"), \"set_stack_size\", \"get_stack_size\");\n\n\tClassDB::bind_method(D_METHOD(\"get_icon\"), &ItemTemplate::get_icon);\n\tClassDB::bind_method(D_METHOD(\"set_icon\", \"value\"), &ItemTemplate::set_icon);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"icon\", PROPERTY_HINT_RESOURCE_TYPE, \"Texture\"), \"set_icon\", \"get_icon\");\n\n\tClassDB::bind_method(D_METHOD(\"get_scale_x\"), &ItemTemplate::get_scale_x);\n\tClassDB::bind_method(D_METHOD(\"set_scale_x\", \"count\"), &ItemTemplate::set_scale_x);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"scale_x\"), \"set_scale_x\", \"get_scale_x\");\n\n\tClassDB::bind_method(D_METHOD(\"get_scale_y\"), &ItemTemplate::get_scale_y);\n\tClassDB::bind_method(D_METHOD(\"set_scale_y\", \"count\"), &ItemTemplate::set_scale_y);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"scale_y\"), \"set_scale_y\", \"get_scale_y\");\n\n\tClassDB::bind_method(D_METHOD(\"get_scale_z\"), &ItemTemplate::get_scale_z);\n\tClassDB::bind_method(D_METHOD(\"set_scale_z\", \"count\"), &ItemTemplate::set_scale_z);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"scale_z\"), \"set_scale_z\", \"get_scale_z\");\n\n\tClassDB::bind_method(D_METHOD(\"get_bag_size\"), &ItemTemplate::get_bag_size);\n\tClassDB::bind_method(D_METHOD(\"set_bag_size\", \"size\"), &ItemTemplate::set_bag_size);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"bag_size\"), \"set_bag_size\", \"get_bag_size\");\n\n\t////    Teaches    ////\n\tClassDB::bind_method(D_METHOD(\"get_num_teaches_spells\"), &ItemTemplate::get_num_teaches_spells);\n\tClassDB::bind_method(D_METHOD(\"set_num_teaches_spells\", \"value\"), &ItemTemplate::set_num_teaches_spells);\n\n\tClassDB::bind_method(D_METHOD(\"get_teaches_spell\", \"index\"), &ItemTemplate::get_teaches_spell);\n\tClassDB::bind_method(D_METHOD(\"set_teaches_spell\", \"index\", \"spell\"), &ItemTemplate::set_teaches_spell);\n\n\tClassDB::bind_method(D_METHOD(\"get_teaches_spells\"), &ItemTemplate::get_teaches_spells);\n\tClassDB::bind_method(D_METHOD(\"set_teaches_spells\", \"spells\"), &ItemTemplate::set_teaches_spells);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"teaches_spells\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"set_teaches_spells\", \"get_teaches_spells\");\n\n\t////    Grants Spells    ////\n\tClassDB::bind_method(D_METHOD(\"get_num_grants_spells\"), &ItemTemplate::get_num_grants_spells);\n\tClassDB::bind_method(D_METHOD(\"set_num_grants_spells\", \"value\"), &ItemTemplate::set_num_grants_spells);\n\n\tClassDB::bind_method(D_METHOD(\"get_grants_spell\", \"index\"), &ItemTemplate::get_grants_spell);\n\tClassDB::bind_method(D_METHOD(\"set_grants_spell\", \"index\", \"spell\"), &ItemTemplate::set_grants_spell);\n\n\tClassDB::bind_method(D_METHOD(\"get_grants_spells\"), &ItemTemplate::get_grants_spells);\n\tClassDB::bind_method(D_METHOD(\"set_grants_spells\", \"spells\"), &ItemTemplate::set_grants_spells);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"grants_spells\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"set_grants_spells\", \"get_grants_spells\");\n\n\t////    Auras    ////\n\tClassDB::bind_method(D_METHOD(\"get_num_auras\"), &ItemTemplate::get_num_auras);\n\tClassDB::bind_method(D_METHOD(\"set_num_auras\", \"value\"), &ItemTemplate::set_num_auras);\n\n\tClassDB::bind_method(D_METHOD(\"get_aura\", \"index\"), &ItemTemplate::get_aura);\n\tClassDB::bind_method(D_METHOD(\"set_aura\", \"index\", \"aura\"), &ItemTemplate::set_aura);\n\n\tClassDB::bind_method(D_METHOD(\"get_auras\"), &ItemTemplate::get_auras);\n\tClassDB::bind_method(D_METHOD(\"set_auras\", \"auras\"), &ItemTemplate::set_auras);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"auras\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"set_auras\", \"get_auras\");\n\n\t////    Required Skills    ////\n\tClassDB::bind_method(D_METHOD(\"get_num_required_skills\"), &ItemTemplate::get_num_required_skills);\n\n\tClassDB::bind_method(D_METHOD(\"get_required_skill\", \"index\"), &ItemTemplate::get_required_skill);\n\tClassDB::bind_method(D_METHOD(\"set_required_skill\", \"index\", \"aura\"), &ItemTemplate::set_required_skill);\n\n\tClassDB::bind_method(D_METHOD(\"get_required_skills\"), &ItemTemplate::get_required_skills);\n\tClassDB::bind_method(D_METHOD(\"set_required_skills\", \"auras\"), &ItemTemplate::set_required_skills);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"required_skills\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"set_required_skills\", \"get_required_skills\");\n\n\t//Use spell\n\tClassDB::bind_method(D_METHOD(\"get_use_spell\"), &ItemTemplate::get_use_spell);\n\tClassDB::bind_method(D_METHOD(\"set_use_spell\", \"size\"), &ItemTemplate::set_use_spell);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"use_spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"set_use_spell\", \"get_use_spell\");\n\n\tClassDB::bind_method(D_METHOD(\"get_charges\"), &ItemTemplate::get_charges);\n\tClassDB::bind_method(D_METHOD(\"set_charges\", \"size\"), &ItemTemplate::set_charges);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"charges\"), \"set_charges\", \"get_charges\");\n\n\tClassDB::bind_method(D_METHOD(\"get_consumed\"), &ItemTemplate::get_consumed);\n\tClassDB::bind_method(D_METHOD(\"set_consumed\", \"size\"), &ItemTemplate::set_consumed);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"consumed\"), \"set_consumed\", \"get_consumed\");\n\n\tADD_GROUP(\"Texts\", \"text\");\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_name\", \"get_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_text_translation_key\"), &ItemTemplate::get_text_translation_key);\n\tClassDB::bind_method(D_METHOD(\"set_text_translation_key\", \"value\"), &ItemTemplate::set_text_translation_key);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_translation_key\"), \"set_text_translation_key\", \"get_text_translation_key\");\n\n\t////GDVIRTUAL_BIND(\"_get_description\");\n\tClassDB::bind_method(D_METHOD(\"get_description\"), &ItemTemplate::get_description);\n\n\t//StatMods Property binds\n\tADD_GROUP(\"Stat Modifiers\", \"stat_modifier\");\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_count\"), &ItemTemplate::stat_modifier_get_count);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_count\", \"count\"), &ItemTemplate::stat_modifier_set_count);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"stat_modifier_count\", PROPERTY_HINT_RANGE, \"0,\" + itos(MAX_ITEM_STAT_MOD), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"stat_modifier_set_count\", \"stat_modifier_get_count\");\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_stat_id\", \"index\"), &ItemTemplate::stat_modifier_get_stat_id);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_stat_id\", \"index\", \"value\"), &ItemTemplate::stat_modifier_set_stat_id);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_min_base_mod\", \"index\"), &ItemTemplate::stat_modifier_get_min_base_mod);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_min_base_mod\", \"index\", \"value\"), &ItemTemplate::stat_modifier_set_min_base_mod);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_max_base_mod\", \"index\"), &ItemTemplate::stat_modifier_get_max_base_mod);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_max_base_mod\", \"index\", \"value\"), &ItemTemplate::stat_modifier_set_max_base_mod);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_min_bonus_mod\", \"index\"), &ItemTemplate::stat_modifier_get_min_bonus_mod);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_min_bonus_mod\", \"index\", \"value\"), &ItemTemplate::stat_modifier_set_min_bonus_mod);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_max_bonus_mod\", \"index\"), &ItemTemplate::stat_modifier_get_max_bonus_mod);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_max_bonus_mod\", \"index\", \"value\"), &ItemTemplate::stat_modifier_set_max_bonus_mod);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_min_percent_mod\", \"index\"), &ItemTemplate::stat_modifier_get_min_percent_mod);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_min_percent_mod\", \"index\", \"value\"), &ItemTemplate::stat_modifier_set_min_percent_mod);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_max_percent_mod\", \"index\"), &ItemTemplate::stat_modifier_get_max_percent_mod);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_max_percent_mod\", \"index\", \"value\"), &ItemTemplate::stat_modifier_set_max_percent_mod);\n\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_get_scaling_factor\", \"index\"), &ItemTemplate::stat_modifier_get_scaling_factor);\n\tClassDB::bind_method(D_METHOD(\"stat_modifier_set_scaling_factor\", \"index\", \"value\"), &ItemTemplate::stat_modifier_set_scaling_factor);\n\n\tfor (int i = 0; i < MAX_ITEM_STAT_MOD; ++i) {\n\t\tADD_PROPERTYI(PropertyInfo(Variant::INT, \"stat_modifier_\" + itos(i) + \"/stat_id\", PROPERTY_HINT_ENUM, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"stat_modifier_set_stat_id\", \"stat_modifier_get_stat_id\", i);\n\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"stat_modifier_\" + itos(i) + \"/min_base_mod\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"stat_modifier_set_min_base_mod\", \"stat_modifier_get_min_base_mod\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"stat_modifier_\" + itos(i) + \"/max_base_mod\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"stat_modifier_set_max_base_mod\", \"stat_modifier_get_max_base_mod\", i);\n\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"stat_modifier_\" + itos(i) + \"/min_bonus_mod\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"stat_modifier_set_min_bonus_mod\", \"stat_modifier_get_min_bonus_mod\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"stat_modifier_\" + itos(i) + \"/max_bonus_mod\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"stat_modifier_set_max_bonus_mod\", \"stat_modifier_get_max_bonus_mod\", i);\n\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"stat_modifier_\" + itos(i) + \"/min_percent_mod\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"stat_modifier_set_min_percent_mod\", \"stat_modifier_get_min_percent_mod\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"stat_modifier_\" + itos(i) + \"/max_percent_mod\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"stat_modifier_set_max_percent_mod\", \"stat_modifier_get_max_percent_mod\", i);\n\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"stat_modifier_\" + itos(i) + \"/scaling_factor\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"stat_modifier_set_scaling_factor\", \"stat_modifier_get_scaling_factor\", i);\n\t}\n\n\tClassDB::bind_method(D_METHOD(\"get_animator_weapon_type\"), &ItemTemplate::get_animator_weapon_type);\n\n\tBIND_CONSTANT(MAX_ITEM_STAT_MOD);\n}\n"
  },
  {
    "path": "data/items/item_template.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ITEM_TEMPLATE_H\n#define ITEM_TEMPLATE_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n\n\n#include \"scene/resources/texture.h\"\n\n#include \"../../item_enums.h\"\n#include \"model_visual.h\"\n\nclass ItemInstance;\nclass Spell;\nclass EntityClassData;\n\nclass ItemTemplate : public Resource {\n\tGDCLASS(ItemTemplate, Resource);\n\npublic:\n\tint get_id() const;\n\tvoid set_id(const int value);\n\n\tItemEnums::ItemType get_item_type() const;\n\tvoid set_item_type(const ItemEnums::ItemType value);\n\n\tItemEnums::ItemSubtype get_item_sub_type() const;\n\tvoid set_item_sub_type(const ItemEnums::ItemSubtype value);\n\n\tItemEnums::ItemSubSubtype get_item_sub_sub_type() const;\n\tvoid set_item_sub_sub_type(const ItemEnums::ItemSubSubtype value);\n\n\tItemEnums::ItemRarity get_rarity() const;\n\tvoid set_rarity(const ItemEnums::ItemRarity value);\n\n\tItemEnums::ArmorType get_armor_type() const;\n\tvoid set_armor_type(const ItemEnums::ArmorType value);\n\n\tint get_equip_slot() const;\n\tvoid set_equip_slot(const int value);\n\n\tRef<ModelVisual> get_model_visual() const;\n\tvoid set_model_visual(const Ref<ModelVisual> &value);\n\n\tRef<EntityClassData> get_required_character_class() const;\n\tvoid set_required_character_class(const Ref<EntityClassData> &value);\n\n\tint get_price() const;\n\tvoid set_price(const int value);\n\n\tint get_stack_size() const;\n\tvoid set_stack_size(const int value);\n\n\tRef<Texture> get_icon() const;\n\tvoid set_icon(const Ref<Texture> &value);\n\n\tfloat get_scale_x() const;\n\tvoid set_scale_x(const float value);\n\n\tfloat get_scale_y() const;\n\tvoid set_scale_y(const float value);\n\n\tfloat get_scale_z() const;\n\tvoid set_scale_z(const float value);\n\n\tint get_bag_size() const;\n\tvoid set_bag_size(const int size);\n\n\tString get_text_translation_key() const;\n\tvoid set_text_translation_key(const String &value);\n\n\t//Teaches\n\tint get_num_teaches_spells() const;\n\tvoid set_num_teaches_spells(const int value);\n\n\tRef<Spell> get_teaches_spell(const int index);\n\tvoid set_teaches_spell(const int index, const Ref<Spell> &teaches_spell);\n\n\tVector<Variant> get_teaches_spells();\n\tvoid set_teaches_spells(const Vector<Variant> &teaches_spells);\n\n\t//Grants Spells\n\tint get_num_grants_spells() const;\n\tvoid set_num_grants_spells(const int value);\n\n\tRef<Spell> get_grants_spell(const int index);\n\tvoid set_grants_spell(const int index, const Ref<Spell> &grants_spell);\n\n\tVector<Variant> get_grants_spells();\n\tvoid set_grants_spells(const Vector<Variant> &grants_spells);\n\n\t//Auras\n\tint get_num_auras() const;\n\tvoid set_num_auras(const int value);\n\n\tRef<Spell> get_aura(const int index);\n\tvoid set_aura(const int index, const Ref<Spell> &aura);\n\n\tVector<Variant> get_auras();\n\tvoid set_auras(const Vector<Variant> &auras);\n\n\t//Required Skills\n\tint get_num_required_skills() const;\n\n\tRef<Spell> get_required_skill(const int index);\n\tvoid set_required_skill(const int index, const Ref<Spell> &skills);\n\n\tVector<Variant> get_required_skills();\n\tvoid set_required_skills(const Vector<Variant> &grants_spells);\n\n\t//use spell\n\tRef<Spell> get_use_spell();\n\tvoid set_use_spell(const Ref<Spell> &use_spell);\n\n\tint get_charges() const;\n\tvoid set_charges(const int value);\n\n\tbool get_consumed() const;\n\tvoid set_consumed(const bool value);\n\n\t//Stat mods\n\tint stat_modifier_get_count() const;\n\tvoid stat_modifier_set_count(const int value);\n\n\tint stat_modifier_get_stat_id(int index) const;\n\tvoid stat_modifier_set_stat_id(int index, int value);\n\n\tfloat stat_modifier_get_min_base_mod(const int index) const;\n\tvoid stat_modifier_set_min_base_mod(const int index, const float value);\n\n\tfloat stat_modifier_get_max_base_mod(const int index) const;\n\tvoid stat_modifier_set_max_base_mod(const int index, const float value);\n\n\tfloat stat_modifier_get_min_bonus_mod(const int index) const;\n\tvoid stat_modifier_set_min_bonus_mod(const int index, const float value);\n\n\tfloat stat_modifier_get_max_bonus_mod(const int index) const;\n\tvoid stat_modifier_set_max_bonus_mod(const int index, const float value);\n\n\tfloat stat_modifier_get_min_percent_mod(const int index) const;\n\tvoid stat_modifier_set_min_percent_mod(const int index, const float value);\n\n\tfloat stat_modifier_get_max_percent_mod(const int index) const;\n\tvoid stat_modifier_set_max_percent_mod(const int index, const float value);\n\n\tfloat stat_modifier_get_scaling_factor(const int index) const;\n\tvoid stat_modifier_set_scaling_factor(const int index, const float value);\n\n\tint get_animator_weapon_type();\n\n\tRef<ItemInstance> create_item_instance();\n\n\tString get_description();\n\n\tItemTemplate();\n\t~ItemTemplate();\n\npublic:\n\tstruct SkillEntry {\n\t\tRef<Spell> aura;\n\t\tint level;\n\t};\n\nprotected:\n\tvoid _validate_property(PropertyInfo &property) const;\n\tstatic void _bind_methods();\n\nprotected:\n\tstruct ItemTemplateStatModifier {\n\t\tint stat_id;\n\n\t\tfloat min_base_mod;\n\t\tfloat max_base_mod;\n\n\t\tfloat min_bonus_mod;\n\t\tfloat max_bonus_mod;\n\n\t\tfloat min_percent_mod;\n\t\tfloat max_percent_mod;\n\n\t\tfloat scaling_factor;\n\n\t\tItemTemplateStatModifier() {\n\t\t\tstat_id = 0;\n\t\t\tmin_base_mod = 0;\n\t\t\tmax_base_mod = 0;\n\t\t\tmin_bonus_mod = 0;\n\t\t\tmax_bonus_mod = 0;\n\t\t\tmin_percent_mod = 0;\n\t\t\tmax_percent_mod = 0;\n\t\t\tscaling_factor = 1;\n\t\t}\n\t};\n\nprivate:\n\tenum {\n\t\tMAX_ITEM_STAT_MOD = 6,\n\t};\n\n\tint _id;\n\tItemEnums::ItemRarity _rarity;\n\tItemEnums::ItemType _item_type;\n\tItemEnums::ItemSubtype _item_sub_type;\n\tItemEnums::ItemSubSubtype _item_sub_sub_type;\n\tItemEnums::ArmorType _armor_type;\n\tint _equip_slot;\n\n\tint _price;\n\n\tRef<EntityClassData> _required_character_class;\n\tRef<ModelVisual> _model_visual;\n\n\tint _stack_size;\n\n\tRef<Texture> _icon;\n\n\tfloat _scale_x;\n\tfloat _scale_y;\n\tfloat _scale_z;\n\n\tint _bag_size;\n\n\tString _text_translation_key;\n\n\tVector<Ref<Spell> > _teaches_spells;\n\tVector<Ref<Spell> > _grants_spells;\n\tVector<Ref<Spell> > _auras;\n\tVector<Ref<Spell> > _required_skills;\n\tRef<Spell> _use_spell;\n\tint _charges;\n\tbool _consumed;\n\n\tint _modifier_count;\n\tItemTemplateStatModifier _modifiers[MAX_ITEM_STAT_MOD];\n};\n\n#endif\n"
  },
  {
    "path": "data/items/model_visual.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"model_visual.h\"\n\n#include \"../../singletons/ess.h\"\n\n#include \"../../defines.h\"\n\nint ModelVisual::get_layer() {\n\treturn _layer;\n}\nvoid ModelVisual::set_layer(int layer) {\n\t_layer = layer;\n}\n\n//ModelVisualEntries\n\nRef<ModelVisualEntry> ModelVisual::get_visual_entry(const int index) const {\n\tERR_FAIL_INDEX_V(index, _visual_entries.size(), Ref<ModelVisualEntry>());\n\n\treturn _visual_entries.get(index);\n}\nvoid ModelVisual::set_visual_entry(const int index, const Ref<ModelVisualEntry> visual_entry) {\n\tERR_FAIL_INDEX(index, _visual_entries.size());\n\n\t_visual_entries.set(index, visual_entry);\n}\nvoid ModelVisual::add_visual_entry(const Ref<ModelVisualEntry> visual_entry) {\n\t_visual_entries.push_back(visual_entry);\n}\nvoid ModelVisual::remove_visual_entry(const int index) {\n\tERR_FAIL_INDEX(index, _visual_entries.size());\n\n\t_visual_entries.remove_at(index);\n}\n\nint ModelVisual::get_visual_entry_count() const {\n\treturn _visual_entries.size();\n}\n\nVector<Variant> ModelVisual::get_visual_entries() {\n\tVARIANT_ARRAY_GET(_visual_entries);\n}\nvoid ModelVisual::set_visual_entries(const Vector<Variant> &visual_entries) {\n\tVARIANT_ARRAY_SET(visual_entries, _visual_entries, ModelVisualEntry);\n}\n\nModelVisual::ModelVisual() {\n\t_layer = 0;\n}\n\nModelVisual::~ModelVisual() {\n\t_visual_entries.clear();\n}\n\nvoid ModelVisual::_validate_property(PropertyInfo &property) const {\n\tString name = property.name;\n\n\tif (name == \"layer\") {\n\t\tproperty.hint_string = ESS::get_singleton()->texture_layers_get();\n\t}\n}\n\nvoid ModelVisual::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_layer\"), &ModelVisual::get_layer);\n\tClassDB::bind_method(D_METHOD(\"set_layer\", \"layer\"), &ModelVisual::set_layer);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"layer\", PROPERTY_HINT_ENUM, \"\"), \"set_layer\", \"get_layer\");\n\n\t//ModelVisualEntry\n\tClassDB::bind_method(D_METHOD(\"get_visual_entry\", \"index\"), &ModelVisual::get_visual_entry);\n\tClassDB::bind_method(D_METHOD(\"set_visual_entry\", \"index\", \"data\"), &ModelVisual::set_visual_entry);\n\tClassDB::bind_method(D_METHOD(\"add_visual_entry\", \"visual_entry\"), &ModelVisual::add_visual_entry);\n\tClassDB::bind_method(D_METHOD(\"remove_visual_entry\", \"index\"), &ModelVisual::remove_visual_entry);\n\n\tClassDB::bind_method(D_METHOD(\"get_visual_entry_count\"), &ModelVisual::get_visual_entry_count);\n\n\tClassDB::bind_method(D_METHOD(\"get_visual_entries\"), &ModelVisual::get_visual_entries);\n\tClassDB::bind_method(D_METHOD(\"set_visual_entries\", \"visual_entrys\"), &ModelVisual::set_visual_entries);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"get_visual_entries\", PROPERTY_HINT_NONE, \"17/17:ModelVisualEntry\", PROPERTY_USAGE_DEFAULT, \"ModelVisualEntry\"), \"set_visual_entries\", \"get_visual_entries\");\n}\n"
  },
  {
    "path": "data/items/model_visual.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef MODEL_VISUAL_H\n#define MODEL_VISUAL_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"../../item_enums.h\"\n#include \"model_visual_entry.h\"\n\nclass ModelVisual : public Resource {\n\tGDCLASS(ModelVisual, Resource);\n\npublic:\n\tint get_layer();\n\tvoid set_layer(int layer);\n\n\t//ModelVisualEntry\n\tRef<ModelVisualEntry> get_visual_entry(const int index) const;\n\tvoid set_visual_entry(const int index, const Ref<ModelVisualEntry> visual_entry);\n\tvoid add_visual_entry(const Ref<ModelVisualEntry> visual_entry);\n\tvoid remove_visual_entry(const int index);\n\n\tint get_visual_entry_count() const;\n\n\tVector<Variant> get_visual_entries();\n\tvoid set_visual_entries(const Vector<Variant> &visual_entries);\n\n\tModelVisual();\n\t~ModelVisual();\n\nprotected:\n\tvoid _validate_property(PropertyInfo &property) const;\n\tstatic void _bind_methods();\n\nprivate:\n\tint _layer;\n\n\tVector<Ref<ModelVisualEntry> > _visual_entries;\n};\n\n#endif\n"
  },
  {
    "path": "data/items/model_visual_entry.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"model_visual_entry.h\"\n\n#include \"../../singletons/ess.h\"\n\nconst String ModelVisualEntry::BINDING_STRING_MODEL_VISUAL_ENTRY_TYPES = \"Bone,Attachment\";\n\nModelVisualEntry::ModenVisualEntryType ModelVisualEntry::get_type() const {\n\treturn _type;\n}\nvoid ModelVisualEntry::set_type(const ModelVisualEntry::ModenVisualEntryType type) {\n\t_type = type;\n}\n\nint ModelVisualEntry::get_override_layer() const {\n\treturn _override_layer;\n}\nvoid ModelVisualEntry::set_override_layer(const int layer) {\n\t_override_layer = layer;\n}\n\nint ModelVisualEntry::get_entity_type() const {\n\treturn _entity_type;\n}\nvoid ModelVisualEntry::set_entity_type(const int value) {\n\t_entity_type = value;\n}\n\nint ModelVisualEntry::get_bone() const {\n\treturn _bone;\n}\nvoid ModelVisualEntry::set_bone(const int value) {\n\t_bone = value;\n}\n\nint ModelVisualEntry::get_group() const {\n\treturn _group;\n}\nvoid ModelVisualEntry::set_group(const int value) {\n\t_group = value;\n}\n\n#ifdef MESH_DATA_RESOURCE_PRESENT\nRef<MeshDataResource> ModelVisualEntry::get_mesh(const int index) {\n\tERR_FAIL_INDEX_V(index, _entries.size(), Ref<MeshDataResource>());\n\n\treturn _entries[index].mesh;\n}\nvoid ModelVisualEntry::set_mesh(const int index, const Ref<MeshDataResource> &mesh) {\n\tERR_FAIL_INDEX(index, _entries.size());\n\n\t_entries.write[index].mesh = mesh;\n}\n#endif\n\nRef<Texture> ModelVisualEntry::get_texture(const int index) {\n\tERR_FAIL_INDEX_V(index, _entries.size(), Ref<Texture>());\n\n\treturn _entries[index].texture;\n}\nvoid ModelVisualEntry::set_texture(const int index, const Ref<Texture> &texture) {\n\tERR_FAIL_INDEX(index, _entries.size());\n\n\t_entries.write[index].texture = texture;\n}\n\nColor ModelVisualEntry::get_color(const int index) const {\n\tERR_FAIL_INDEX_V(index, _entries.size(), Color());\n\n\treturn _entries[index].color;\n}\nvoid ModelVisualEntry::set_color(const int index, const Color &color) {\n\tERR_FAIL_INDEX(index, _entries.size());\n\n\t_entries.write[index].color = color;\n}\n\nRef<PackedScene> ModelVisualEntry::get_attachment(const int index) {\n\tERR_FAIL_INDEX_V(index, _entries.size(), Ref<PackedScene>());\n\n\treturn _entries[index].attachment;\n}\nvoid ModelVisualEntry::set_attachment(const int index, const Ref<PackedScene> &attachment) {\n\tERR_FAIL_INDEX(index, _entries.size());\n\t_entries.write[index].attachment = attachment;\n}\n\nTransform3D ModelVisualEntry::get_transform(const int index) const {\n\tERR_FAIL_INDEX_V(index, _entries.size(), Transform3D());\n\n\treturn _entries[index].transform;\n}\nvoid ModelVisualEntry::set_transform(const int index, const Transform3D &transform) {\n\tERR_FAIL_INDEX(index, _entries.size());\n\n\t_entries.write[index].transform = transform;\n}\n\nint ModelVisualEntry::get_size() const {\n\treturn _entries.size();\n}\nvoid ModelVisualEntry::set_size(const int value) {\n\t_entries.resize(value);\n}\n\nModelVisualEntry::ModelVisualEntry() {\n\t_type = MODEL_VISUAL_ENTRY_TYPE_BONE;\n\t_override_layer = 0;\n\n\t_entity_type = 0;\n\t_bone = 0;\n\t_group = 0;\n\n\t_entries.resize(1);\n}\n\nModelVisualEntry::~ModelVisualEntry() {\n\t_entries.clear();\n}\n\nbool ModelVisualEntry::_set(const StringName &p_name, const Variant &p_value) {\n\tString name = p_name;\n\n\tif (name.begins_with(\"entry_\")) {\n\t\tint index = name.get_slicec('_', 1).to_int();\n\n\t\tif (index >= _entries.size()) {\n\t\t\t_entries.resize(index + 1);\n\t\t}\n\n\t\tStringName p = name.get_slicec('/', 1);\n\n\t\tif (p == \"texture\") {\n\t\t\t_entries.write[index].texture = p_value;\n\n\t\t\treturn true;\n#ifdef MESH_DATA_RESOURCE_PRESENT\n\t\t} else if (p == \"mesh\") {\n\t\t\t_entries.write[index].mesh = p_value;\n\n\t\t\treturn true;\n#endif\n\t\t} else if (p == \"color\") {\n\t\t\t_entries.write[index].color = p_value;\n\n\t\t\treturn true;\n\t\t} else if (p == \"attachment\") {\n\t\t\t_entries.write[index].attachment = p_value;\n\n\t\t\treturn true;\n\t\t} else if (p == \"transform\") {\n\t\t\t_entries.write[index].transform = p_value;\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nbool ModelVisualEntry::_get(const StringName &p_name, Variant &r_ret) const {\n\tString name = p_name;\n\n\tif (name.begins_with(\"entry_\")) {\n\t\tint index = name.get_slicec('_', 1).to_int();\n\n\t\tif (index >= _entries.size()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tStringName p = name.get_slicec('/', 1);\n\n\t\tif (p == \"texture\") {\n\t\t\tr_ret = _entries[index].texture;\n\n\t\t\treturn true;\n#ifdef MESH_DATA_RESOURCE_PRESENT\n\t\t} else if (p == \"mesh\") {\n\t\t\tr_ret = _entries[index].mesh;\n\n\t\t\treturn true;\n#endif\n\t\t} else if (p == \"color\") {\n\t\t\tr_ret = _entries[index].color;\n\n\t\t\treturn true;\n\t\t} else if (p == \"attachment\") {\n\t\t\tr_ret = _entries[index].attachment;\n\n\t\t\treturn true;\n\t\t} else if (p == \"transform\") {\n\t\t\tr_ret = _entries[index].transform;\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nvoid ModelVisualEntry::_get_property_list(List<PropertyInfo> *p_list) const {\n\tfor (int i = 0; i < _entries.size(); ++i) {\n\t\tif (_type == ModelVisualEntry::MODEL_VISUAL_ENTRY_TYPE_BONE) {\n#ifdef MESH_DATA_RESOURCE_PRESENT\n\t\t\tp_list->push_back(PropertyInfo(Variant::OBJECT, \"entry_\" + itos(i) + \"/mesh\", PROPERTY_HINT_RESOURCE_TYPE, \"MeshDataResource\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL));\n#endif\n\t\t\tp_list->push_back(PropertyInfo(Variant::OBJECT, \"entry_\" + itos(i) + \"/texture\", PROPERTY_HINT_RESOURCE_TYPE, \"Texture\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL));\n\t\t\tp_list->push_back(PropertyInfo(Variant::COLOR, \"entry_\" + itos(i) + \"/color\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL));\n\t\t} else {\n\t\t\tp_list->push_back(PropertyInfo(Variant::OBJECT, \"entry_\" + itos(i) + \"/attachment\", PROPERTY_HINT_RESOURCE_TYPE, \"PackedScene\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL));\n\t\t}\n\t\tp_list->push_back(PropertyInfo(Variant::TRANSFORM3D, \"entry_\" + itos(i) + \"/transform\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL));\n\t}\n}\n\nvoid ModelVisualEntry::_validate_property(PropertyInfo &property) const {\n\tString name = property.name;\n\n\tif (_type == ModelVisualEntry::MODEL_VISUAL_ENTRY_TYPE_BONE) {\n\t\tif (name == \"entity_type\") {\n\t\t\tproperty.usage = PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED;\n\t\t\tproperty.hint_string = ESS::get_singleton()->entity_types_get();\n\t\t} else if (name == \"bone\") {\n\t\t\tif (ESS::get_singleton()->skeletons_bones_count() > _entity_type) {\n\t\t\t\tproperty.hint_string = ESS::get_singleton()->skeletons_bones_index_get(_entity_type);\n\t\t\t} else {\n\t\t\t\tproperty.hint_string = \"\";\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (name == \"entity_type\") {\n\t\t\tproperty.usage = PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED;\n\t\t} else if (name == \"bone\") {\n\t\t\tproperty.hint_string = EntityEnums::BINDING_STRING_COMMON_CHARCATER_SKELETON_POINTS;\n\t\t}\n\t}\n\n\tif (name == \"group\") {\n\t\tproperty.hint_string = ESS::get_singleton()->model_visual_groups_get();\n\t} else if (name == \"override_layer\") {\n\t\tproperty.hint_string = ESS::get_singleton()->texture_layers_get();\n\t}\n}\n\nvoid ModelVisualEntry::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_type\"), &ModelVisualEntry::get_type);\n\tClassDB::bind_method(D_METHOD(\"set_type\", \"value\"), &ModelVisualEntry::set_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"type\", PROPERTY_HINT_ENUM, ModelVisualEntry::BINDING_STRING_MODEL_VISUAL_ENTRY_TYPES, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_type\", \"get_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_override_layer\"), &ModelVisualEntry::get_override_layer);\n\tClassDB::bind_method(D_METHOD(\"set_override_layer\", \"value\"), &ModelVisualEntry::set_override_layer);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"override_layer\", PROPERTY_HINT_ENUM, \"\"), \"set_override_layer\", \"get_override_layer\");\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_type\"), &ModelVisualEntry::get_entity_type);\n\tClassDB::bind_method(D_METHOD(\"set_entity_type\", \"value\"), &ModelVisualEntry::set_entity_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"entity_type\", PROPERTY_HINT_ENUM, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_entity_type\", \"get_entity_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_bone\"), &ModelVisualEntry::get_bone);\n\tClassDB::bind_method(D_METHOD(\"set_bone\", \"value\"), &ModelVisualEntry::set_bone);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"bone\", PROPERTY_HINT_ENUM), \"set_bone\", \"get_bone\");\n\n\tClassDB::bind_method(D_METHOD(\"get_group\"), &ModelVisualEntry::get_group);\n\tClassDB::bind_method(D_METHOD(\"set_group\", \"value\"), &ModelVisualEntry::set_group);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"group\", PROPERTY_HINT_ENUM), \"set_group\", \"get_group\");\n\n#ifdef MESH_DATA_RESOURCE_PRESENT\n\tClassDB::bind_method(D_METHOD(\"get_mesh\", \"index\"), &ModelVisualEntry::get_mesh);\n\tClassDB::bind_method(D_METHOD(\"set_mesh\", \"index\", \"value\"), &ModelVisualEntry::set_mesh);\n#endif\n\n\tClassDB::bind_method(D_METHOD(\"get_texture\", \"index\"), &ModelVisualEntry::get_texture);\n\tClassDB::bind_method(D_METHOD(\"set_texture\", \"index\", \"value\"), &ModelVisualEntry::set_texture);\n\n\tClassDB::bind_method(D_METHOD(\"get_color\"), &ModelVisualEntry::get_color);\n\tClassDB::bind_method(D_METHOD(\"set_color\", \"value\"), &ModelVisualEntry::set_color);\n\n\tClassDB::bind_method(D_METHOD(\"get_attachment\"), &ModelVisualEntry::get_attachment);\n\tClassDB::bind_method(D_METHOD(\"set_attachment\", \"value\"), &ModelVisualEntry::set_attachment);\n\n\tClassDB::bind_method(D_METHOD(\"get_transform\", \"index\"), &ModelVisualEntry::get_transform);\n\tClassDB::bind_method(D_METHOD(\"set_transform\", \"index\", \"value\"), &ModelVisualEntry::set_transform);\n\n\tClassDB::bind_method(D_METHOD(\"get_size\"), &ModelVisualEntry::get_size);\n\tClassDB::bind_method(D_METHOD(\"set_size\", \"value\"), &ModelVisualEntry::set_size);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"size\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_size\", \"get_size\");\n\n\tBIND_ENUM_CONSTANT(MODEL_VISUAL_ENTRY_TYPE_BONE);\n\tBIND_ENUM_CONSTANT(MODEL_VISUAL_ENTRY_TYPE_ATTACHMENT);\n}\n"
  },
  {
    "path": "data/items/model_visual_entry.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef MODEL_VISUAL_ENTRY_H\n#define MODEL_VISUAL_ENTRY_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/string/ustring.h\"\n#include \"core/math/color.h\"\n\n\n#include \"scene/resources/texture.h\"\n\n#include \"../../entity_enums.h\"\n#include \"../../item_enums.h\"\n\n#include \"scene/resources/mesh.h\"\n#include \"scene/resources/packed_scene.h\"\n\n#ifdef MESH_DATA_RESOURCE_PRESENT\n#include \"../../../mesh_data_resource/mesh_data_resource.h\"\n#endif\n\nclass ModelVisualEntry : public Resource {\n\tGDCLASS(ModelVisualEntry, Resource);\n\npublic:\n\tenum ModenVisualEntryType {\n\t\tMODEL_VISUAL_ENTRY_TYPE_BONE = 0,\n\t\tMODEL_VISUAL_ENTRY_TYPE_ATTACHMENT\n\t};\n\n\tstatic const String BINDING_STRING_MODEL_VISUAL_ENTRY_TYPES;\n\npublic:\n\tModelVisualEntry::ModenVisualEntryType get_type() const;\n\tvoid set_type(const ModelVisualEntry::ModenVisualEntryType type);\n\n\tint get_override_layer() const;\n\tvoid set_override_layer(const int layer);\n\n\tint get_entity_type() const;\n\tvoid set_entity_type(const int value);\n\n\tint get_bone() const;\n\tvoid set_bone(const int value);\n\n\tint get_group() const;\n\tvoid set_group(const int value);\n\n#ifdef MESH_DATA_RESOURCE_PRESENT\n\tRef<MeshDataResource> get_mesh(const int index);\n\tvoid set_mesh(const int index, const Ref<MeshDataResource> &mesh);\n#endif\n\n\tRef<Texture> get_texture(const int index);\n\tvoid set_texture(const int index, const Ref<Texture> &texture);\n\n\tColor get_color(const int index) const;\n\tvoid set_color(const int index, const Color &color);\n\n\tRef<PackedScene> get_attachment(const int index);\n\tvoid set_attachment(const int index, const Ref<PackedScene> &attachment);\n\n\tTransform3D get_transform(const int index) const;\n\tvoid set_transform(const int index, const Transform3D &transform);\n\n\tint get_size() const;\n\tvoid set_size(const int value);\n\n\tModelVisualEntry();\n\t~ModelVisualEntry();\n\nprotected:\n\tstruct MVEE {\n#ifdef MESH_DATA_RESOURCE_PRESENT\n\t\tRef<MeshDataResource> mesh;\n#endif\n\t\tRef<Texture> texture;\n\t\tColor color;\n\n\t\tRef<PackedScene> attachment;\n\t\tTransform3D transform;\n\n\t\tMVEE() {\n\t\t\tcolor = Color(1, 1, 1, 1);\n\t\t}\n\n\t\t~MVEE() {\n#ifdef MESH_DATA_RESOURCE_PRESENT\n\t\t\tmesh.unref();\n#endif\n\t\t\ttexture.unref();\n\t\t\tattachment.unref();\n\t\t}\n\t};\n\nprotected:\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tvoid _validate_property(PropertyInfo &property) const;\n\tstatic void _bind_methods();\n\nprivate:\n\tModelVisualEntry::ModenVisualEntryType _type;\n\tint _override_layer;\n\n\tint _entity_type;\n\tint _bone;\n\tint _group;\n\n\tVector<MVEE> _entries;\n};\n\nVARIANT_ENUM_CAST(ModelVisualEntry::ModenVisualEntryType);\n\n#endif\n"
  },
  {
    "path": "data/loot/loot_data_base.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"loot_data_base.h\"\n\n#include \"../../defines.h\"\n\nint LootDataBase::get_loot_db_size() const {\n\treturn _loot_dbs.size();\n}\nvoid LootDataBase::set_loot_db_size(const float value) {\n\t_loot_dbs.resize(value);\n}\n\nint LootDataBase::get_items_size() const {\n\treturn _items.size();\n}\nvoid LootDataBase::set_items_size(const int value) {\n\t_items.resize(value);\n}\n\nfloat LootDataBase::get_loot_db_chance(const int index) const {\n\tERR_FAIL_INDEX_V(index, _loot_dbs.size(), 0);\n\n\treturn _loot_dbs.get(index).chance;\n}\nvoid LootDataBase::set_loot_db_chance(const int index, const float value) {\n\tERR_FAIL_INDEX(index, _loot_dbs.size());\n\n\tLootDBLDF l = _loot_dbs.get(index);\n\tl.chance = value;\n\t_loot_dbs.set(index, l);\n}\n\nRef<LootDataBase> LootDataBase::get_loot_db(const int index) const {\n\tERR_FAIL_INDEX_V(index, _loot_dbs.size(), 0);\n\n\treturn _loot_dbs.get(index).loot_db;\n}\nvoid LootDataBase::set_loot_db(const int index, const Ref<LootDataBase> &value) {\n\tERR_FAIL_INDEX(index, _loot_dbs.size());\n\n\tLootDBLDF l = _loot_dbs.get(index);\n\tl.loot_db = value;\n\t_loot_dbs.set(index, l);\n}\n\nfloat LootDataBase::get_item_chance(const int index) const {\n\tERR_FAIL_INDEX_V(index, _items.size(), 0);\n\n\treturn _items.get(index).chance;\n}\nvoid LootDataBase::set_item_chance(const int index, const float value) {\n\tERR_FAIL_INDEX(index, _items.size());\n\n\tLootDBItem l = _items.get(index);\n\tl.chance = value;\n\t_items.set(index, l);\n}\n\nRef<ItemTemplate> LootDataBase::get_item(const int index) const {\n\tERR_FAIL_INDEX_V(index, _items.size(), 0);\n\n\treturn _items.get(index).item;\n}\nvoid LootDataBase::set_item(const int index, const Ref<ItemTemplate> &value) {\n\tERR_FAIL_INDEX(index, _items.size());\n\n\tLootDBItem l = _items.get(index);\n\tl.item = value;\n\t_items.set(index, l);\n}\n\nArray LootDataBase::get_loot() {\n\treturn call(\"_get_loot\");\n}\n\nArray LootDataBase::_get_loot() {\n\tArray arr;\n\n\tfor (int i = 0; i < _loot_dbs.size(); ++i) {\n\t\tLootDBLDF l = _loot_dbs.get(i);\n\n\t\tif (!l.loot_db.is_valid())\n\t\t\tcontinue;\n\n\t\tMath::randomize();\n\n\t\tfloat val = Math::randf() * 100.0;\n\n\t\tif (val < l.chance) {\n\t\t\tarr.append(l.loot_db->get_loot());\n\t\t}\n\t}\n\n\tfor (int i = 0; i < _items.size(); ++i) {\n\t\tLootDBItem l = _items.get(i);\n\n\t\tif (!l.item.is_valid())\n\t\t\tcontinue;\n\n\t\tMath::randomize();\n\n\t\tfloat val = Math::randf() * 100.0;\n\n\t\tif (val < l.chance) {\n\t\t\tarr.append(l.item);\n\t\t}\n\t}\n\n\treturn arr;\n}\n\nLootDataBase::LootDataBase() {\n}\n\nLootDataBase::~LootDataBase() {\n\t_loot_dbs.clear();\n\t_items.clear();\n}\n\nbool LootDataBase::_set(const StringName &p_name, const Variant &p_value) {\n\tString name = p_name;\n\n\tif (name.begins_with(\"loot_dbs/\")) {\n\t\tint index = name.get_slicec('/', 1).to_int();\n\t\tString what = name.get_slicec('/', 2);\n\n\t\tif (_loot_dbs.size() <= index) {\n\t\t\tset_loot_db_size(index);\n\t\t}\n\n\t\tLootDBLDF ldb = _loot_dbs.get(index);\n\n\t\tif (what == \"chance\") {\n\t\t\tldb.chance = p_value;\n\t\t\t_loot_dbs.set(index, ldb);\n\n\t\t\treturn true;\n\t\t} else if (what == \"loot_db\") {\n\t\t\tldb.loot_db = p_value;\n\t\t\t_loot_dbs.set(index, ldb);\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\n\t} else if (name.begins_with(\"items/\")) {\n\t\tint index = name.get_slicec('/', 1).to_int();\n\t\tString what = name.get_slicec('/', 2);\n\n\t\tif (_items.size() <= index) {\n\t\t\tset_items_size(index);\n\t\t}\n\n\t\tLootDBItem ldb = _items.get(index);\n\n\t\tif (what == \"chance\") {\n\t\t\tldb.chance = p_value;\n\t\t\t_items.set(index, ldb);\n\n\t\t\treturn true;\n\t\t} else if (what == \"item_template\") {\n\t\t\tldb.item = p_value;\n\t\t\t_items.set(index, ldb);\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nbool LootDataBase::_get(const StringName &p_name, Variant &r_ret) const {\n\tString name = p_name;\n\n\tif (name.begins_with(\"loot_dbs/\")) {\n\t\tint index = name.get_slicec('/', 1).to_int();\n\t\tString what = name.get_slicec('/', 2);\n\n\t\tif (_loot_dbs.size() <= index) {\n\t\t\treturn false;\n\t\t}\n\n\t\tLootDBLDF ldb = _loot_dbs.get(index);\n\n\t\tif (what == \"chance\") {\n\t\t\tr_ret = ldb.chance;\n\n\t\t\treturn true;\n\t\t} else if (what == \"loot_db\") {\n\t\t\tr_ret = ldb.loot_db;\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t} else if (name.begins_with(\"items/\")) {\n\t\tint index = name.get_slicec('/', 1).to_int();\n\t\tString what = name.get_slicec('/', 2);\n\n\t\tif (_items.size() <= index) {\n\t\t\treturn false;\n\t\t}\n\n\t\tLootDBItem ldb = _items.get(index);\n\n\t\tif (what == \"chance\") {\n\t\t\tr_ret = ldb.chance;\n\n\t\t\treturn true;\n\t\t} else if (what == \"item_template\") {\n\t\t\tr_ret = ldb.item;\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nvoid LootDataBase::_get_property_list(List<PropertyInfo> *p_list) const {\n\tint property_usange = PROPERTY_USAGE_DEFAULT;\n\n\tfor (int i = 0; i < _loot_dbs.size(); ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::REAL, \"loot_dbs/\" + itos(i) + \"/chance\", PROPERTY_HINT_NONE, \"\", property_usange));\n\t\tp_list->push_back(PropertyInfo(Variant::OBJECT, \"loot_dbs/\" + itos(i) + \"/loot_db\", PROPERTY_HINT_RESOURCE_TYPE, \"LootDataBase\", property_usange));\n\t}\n\n\tfor (int i = 0; i < _items.size(); ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::REAL, \"items/\" + itos(i) + \"/chance\", PROPERTY_HINT_NONE, \"\", property_usange));\n\t\tp_list->push_back(PropertyInfo(Variant::OBJECT, \"items/\" + itos(i) + \"/item_template\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemTemplate\", property_usange));\n\t}\n}\n\nvoid LootDataBase::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_loot_db_size\"), &LootDataBase::get_loot_db_size);\n\tClassDB::bind_method(D_METHOD(\"set_loot_db_size\", \"value\"), &LootDataBase::set_loot_db_size);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"loot_db_size\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_loot_db_size\", \"get_loot_db_size\");\n\n\tClassDB::bind_method(D_METHOD(\"get_items_size\"), &LootDataBase::get_items_size);\n\tClassDB::bind_method(D_METHOD(\"set_items_size\", \"value\"), &LootDataBase::set_items_size);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"items_size\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_items_size\", \"get_items_size\");\n\n\tClassDB::bind_method(D_METHOD(\"get_loot_db_chance\", \"index\"), &LootDataBase::get_loot_db_chance);\n\tClassDB::bind_method(D_METHOD(\"set_loot_db_chance\", \"index\", \"value\"), &LootDataBase::set_loot_db_chance);\n\n\tClassDB::bind_method(D_METHOD(\"get_loot_db\", \"index\"), &LootDataBase::get_loot_db);\n\tClassDB::bind_method(D_METHOD(\"set_loot_db\", \"index\", \"value\"), &LootDataBase::set_loot_db);\n\n\tClassDB::bind_method(D_METHOD(\"get_item_chance\", \"index\"), &LootDataBase::get_item_chance);\n\tClassDB::bind_method(D_METHOD(\"set_item_chance\", \"index\", \"value\"), &LootDataBase::set_item_chance);\n\n\tClassDB::bind_method(D_METHOD(\"get_item\", \"index\"), &LootDataBase::get_item);\n\tClassDB::bind_method(D_METHOD(\"set_item\", \"index\", \"value\"), &LootDataBase::set_item);\n\n\t//GDVIRTUAL_BIND(\"_get_loot\");\n\n\tClassDB::bind_method(D_METHOD(\"get_loot\"), &LootDataBase::get_loot);\n\tClassDB::bind_method(D_METHOD(\"_get_loot\"), &LootDataBase::_get_loot);\n}\n"
  },
  {
    "path": "data/loot/loot_data_base.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef LOOT_DATA_BASE_H\n#define LOOT_DATA_BASE_H\n\n#include \"core/version.h\"\n\n#include \"core/templates/vector.h\"\n#include \"core/variant/array.h\"\n\n\n#include \"../items/item_template.h\"\n\nclass LootDataBase : public Resource {\n\tGDCLASS(LootDataBase, Resource);\n\npublic:\n\tint get_loot_db_size() const;\n\tvoid set_loot_db_size(const float value);\n\n\tint get_items_size() const;\n\tvoid set_items_size(const int value);\n\n\tfloat get_loot_db_chance(const int index) const;\n\tvoid set_loot_db_chance(const int index, const float value);\n\n\tRef<LootDataBase> get_loot_db(const int index) const;\n\tvoid set_loot_db(const int index, const Ref<LootDataBase> &value);\n\n\tfloat get_item_chance(const int index) const;\n\tvoid set_item_chance(const int index, const float value);\n\n\tRef<ItemTemplate> get_item(const int index) const;\n\tvoid set_item(const int index, const Ref<ItemTemplate> &value);\n\n\tArray get_loot();\n\tArray _get_loot();\n\n\tLootDataBase();\n\t~LootDataBase();\n\nprotected:\n\tstruct LootDBLDF {\n\t\tfloat chance;\n\t\tRef<LootDataBase> loot_db;\n\n\t\tLootDBLDF() {\n\t\t\tchance = 0;\n\t\t}\n\t};\n\n\tstruct LootDBItem {\n\t\tfloat chance;\n\t\tRef<ItemTemplate> item;\n\n\t\tLootDBItem() {\n\t\t\tchance = 0;\n\t\t}\n\t};\n\nprotected:\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tstatic void _bind_methods();\n\nprivate:\n\tVector<LootDBLDF> _loot_dbs;\n\tVector<LootDBItem> _items;\n};\n\n#endif\n"
  },
  {
    "path": "data/species/entity_species_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_species_data.h\"\n\n#include \"../spells/spell.h\"\n\n#include \"../../singletons/ess.h\"\n\n#include \"core/version.h\"\n\nint EntitySpeciesData::get_id() const {\n\treturn _id;\n}\nvoid EntitySpeciesData::set_id(const int value) {\n\t_id = value;\n}\n\nint EntitySpeciesData::get_type() const {\n\treturn _type;\n}\nvoid EntitySpeciesData::set_type(const int value) {\n\t_type = value;\n}\n\nString EntitySpeciesData::get_text_description() const {\n\treturn _text_description;\n}\nvoid EntitySpeciesData::set_text_description(const String &value) {\n\t_text_description = value;\n}\n\n//ModelData\n\nRef<SpeciesModelData> EntitySpeciesData::get_model_data(const int index) const {\n\tERR_FAIL_INDEX_V(index, _model_datas.size(), Ref<SpeciesModelData>());\n\n\treturn _model_datas.get(index);\n}\nvoid EntitySpeciesData::set_model_data(const int index, const Ref<SpeciesModelData> &model_data) {\n\tERR_FAIL_INDEX(index, _model_datas.size());\n\n\t_model_datas.set(index, model_data);\n}\nvoid EntitySpeciesData::add_model_data(const Ref<SpeciesModelData> &model_data) {\n\t_model_datas.push_back(model_data);\n}\nvoid EntitySpeciesData::remove_model_data(const int index) {\n\tERR_FAIL_INDEX(index, _model_datas.size());\n\n\t_model_datas.remove_at(index);\n}\n\nint EntitySpeciesData::get_model_data_count() const {\n\treturn _model_datas.size();\n}\n\nVector<Variant> EntitySpeciesData::get_model_datas() {\n\tVARIANT_ARRAY_GET(_model_datas);\n}\nvoid EntitySpeciesData::set_model_datas(const Vector<Variant> &model_datas) {\n\tVARIANT_ARRAY_SET(model_datas, _model_datas, SpeciesModelData);\n}\n\n//Spells\n\nRef<Spell> EntitySpeciesData::get_spell(const int index) const {\n\tERR_FAIL_INDEX_V(index, _spells.size(), Ref<Spell>());\n\n\treturn _spells.get(index);\n}\nvoid EntitySpeciesData::set_spell(const int index, const Ref<Spell> &spell) {\n\tERR_FAIL_INDEX(index, _spells.size());\n\n\t_spells.set(index, spell);\n}\nvoid EntitySpeciesData::add_spell(const Ref<Spell> &spell) {\n\t_spells.push_back(spell);\n}\nvoid EntitySpeciesData::remove_spell(const int index) {\n\tERR_FAIL_INDEX(index, _spells.size());\n\n\t_spells.remove_at(index);\n}\n\nint EntitySpeciesData::get_spell_count() const {\n\treturn _spells.size();\n}\n\nVector<Variant> EntitySpeciesData::get_spells() {\n\tVARIANT_ARRAY_GET(_spells);\n}\nvoid EntitySpeciesData::set_spells(const Vector<Variant> &spells) {\n\tVARIANT_ARRAY_SET(spells, _spells, Spell);\n}\n\n//Auras\n\nRef<Spell> EntitySpeciesData::get_aura(const int index) const {\n\tERR_FAIL_INDEX_V(index, _auras.size(), Ref<Spell>());\n\n\treturn _auras.get(index);\n}\nvoid EntitySpeciesData::set_aura(const int index, const Ref<Spell> &aura) {\n\tERR_FAIL_INDEX(index, _auras.size());\n\n\t_auras.set(index, aura);\n}\nvoid EntitySpeciesData::add_aura(const Ref<Spell> &aura) {\n\t_auras.push_back(aura);\n}\nvoid EntitySpeciesData::remove_aura(const int index) {\n\tERR_FAIL_INDEX(index, _auras.size());\n\n\t_auras.remove_at(index);\n}\n\nint EntitySpeciesData::get_aura_count() const {\n\treturn _auras.size();\n}\n\nVector<Variant> EntitySpeciesData::get_auras() {\n\tVARIANT_ARRAY_GET(_auras);\n}\nvoid EntitySpeciesData::set_auras(const Vector<Variant> &auras) {\n\t_auras.clear();\n\tfor (int i = 0; i < auras.size(); i++) {\n\t\tRef<Spell> aura = Ref<Spell>(auras[i]);\n\n\t\t_auras.push_back(aura);\n\t}\n}\n\nString EntitySpeciesData::generate_name(int seed) {\n\tif (has_method(\"_generate_name\")) {\n\t\treturn call(\"_generate_name\", seed);\n\t}\n\n\treturn \"\";\n}\n\nEntitySpeciesData::EntitySpeciesData() {\n\t_id = 0;\n\t_type = 0;\n}\nEntitySpeciesData::~EntitySpeciesData() {\n\t_model_datas.clear();\n\n\t_spells.clear();\n\t_auras.clear();\n}\n\nvoid EntitySpeciesData::_validate_property(PropertyInfo &property) const {\n\tif (property.name == \"type\") {\n\t\tproperty.hint_string = ESS::get_singleton()->entity_types_get();\n\t}\n}\n\nvoid EntitySpeciesData::_bind_methods() {\n\t////GDVIRTUAL_BIND(\"_generate_name\", \"seed\");\n\n\tClassDB::bind_method(D_METHOD(\"generate_name\"), &EntitySpeciesData::generate_name);\n\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &EntitySpeciesData::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &EntitySpeciesData::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_type\"), &EntitySpeciesData::get_type);\n\tClassDB::bind_method(D_METHOD(\"set_type\", \"value\"), &EntitySpeciesData::set_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"type\", PROPERTY_HINT_ENUM, \"\"), \"set_type\", \"get_type\");\n\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_name\", \"get_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_text_description\"), &EntitySpeciesData::get_text_description);\n\tClassDB::bind_method(D_METHOD(\"set_text_description\", \"value\"), &EntitySpeciesData::set_text_description);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_description\"), \"set_text_description\", \"get_text_description\");\n\n\t//ModelData\n\tClassDB::bind_method(D_METHOD(\"get_model_data\", \"index\"), &EntitySpeciesData::get_model_data);\n\tClassDB::bind_method(D_METHOD(\"set_model_data\", \"index\", \"data\"), &EntitySpeciesData::set_model_data);\n\tClassDB::bind_method(D_METHOD(\"add_model_data\", \"model_data\"), &EntitySpeciesData::add_model_data);\n\tClassDB::bind_method(D_METHOD(\"remove_model_data\", \"index\"), &EntitySpeciesData::remove_model_data);\n\n\tClassDB::bind_method(D_METHOD(\"get_model_data_count\"), &EntitySpeciesData::get_model_data_count);\n\n\tClassDB::bind_method(D_METHOD(\"get_model_datas\"), &EntitySpeciesData::get_model_datas);\n\tClassDB::bind_method(D_METHOD(\"set_model_datas\", \"model_datas\"), &EntitySpeciesData::set_model_datas);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"model_datas\", PROPERTY_HINT_NONE, \"17/17:SpeciesModelData\", PROPERTY_USAGE_DEFAULT, \"SpeciesModelData\"), \"set_model_datas\", \"get_model_datas\");\n\n\t//Spells\n\tClassDB::bind_method(D_METHOD(\"get_spell\", \"index\"), &EntitySpeciesData::get_spell);\n\tClassDB::bind_method(D_METHOD(\"set_spell\", \"index\", \"data\"), &EntitySpeciesData::set_spell);\n\tClassDB::bind_method(D_METHOD(\"add_spell\", \"spell\"), &EntitySpeciesData::add_spell);\n\tClassDB::bind_method(D_METHOD(\"remove_spell\", \"index\"), &EntitySpeciesData::remove_spell);\n\n\tClassDB::bind_method(D_METHOD(\"get_spell_count\"), &EntitySpeciesData::get_spell_count);\n\n\tClassDB::bind_method(D_METHOD(\"get_spells\"), &EntitySpeciesData::get_spells);\n\tClassDB::bind_method(D_METHOD(\"set_spells\", \"spells\"), &EntitySpeciesData::set_spells);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"spells\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"set_spells\", \"get_spells\");\n\n\t//Auras\n\tClassDB::bind_method(D_METHOD(\"get_aura\", \"index\"), &EntitySpeciesData::get_aura);\n\tClassDB::bind_method(D_METHOD(\"set_aura\", \"index\", \"data\"), &EntitySpeciesData::set_aura);\n\tClassDB::bind_method(D_METHOD(\"add_aura\", \"aura\"), &EntitySpeciesData::add_aura);\n\tClassDB::bind_method(D_METHOD(\"remove_aura\", \"index\"), &EntitySpeciesData::remove_aura);\n\n\tClassDB::bind_method(D_METHOD(\"get_aura_count\"), &EntitySpeciesData::get_aura_count);\n\n\tClassDB::bind_method(D_METHOD(\"get_auras\"), &EntitySpeciesData::get_auras);\n\tClassDB::bind_method(D_METHOD(\"set_auras\", \"auras\"), &EntitySpeciesData::set_auras);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"auras\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"set_auras\", \"get_auras\");\n}\n"
  },
  {
    "path": "data/species/entity_species_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_SPECIES_DATA_H\n#define ENTITY_SPECIES_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n#include \"core/string/ustring.h\"\n\n\n#include \"../../entity_enums.h\"\n\n#include \"species_model_data.h\"\n\nclass Spell;\n\nclass EntitySpeciesData : public Resource {\n\tGDCLASS(EntitySpeciesData, Resource);\n\npublic:\n\tint get_id() const;\n\tvoid set_id(const int value);\n\n\tint get_type() const;\n\tvoid set_type(const int value);\n\n\tString get_text_description() const;\n\tvoid set_text_description(const String &value);\n\n\t//ModelData\n\tRef<SpeciesModelData> get_model_data(const int index) const;\n\tvoid set_model_data(const int index, const Ref<SpeciesModelData> &data);\n\tvoid add_model_data(const Ref<SpeciesModelData> &data);\n\tvoid remove_model_data(const int index);\n\n\tint get_model_data_count() const;\n\n\tVector<Variant> get_model_datas();\n\tvoid set_model_datas(const Vector<Variant> &datas);\n\n\t//Spells\n\tRef<Spell> get_spell(const int index) const;\n\tvoid set_spell(const int index, const Ref<Spell> &spell);\n\tvoid add_spell(const Ref<Spell> &spell);\n\tvoid remove_spell(const int index);\n\n\tint get_spell_count() const;\n\n\tVector<Variant> get_spells();\n\tvoid set_spells(const Vector<Variant> &spells);\n\n\t//Auras\n\tRef<Spell> get_aura(const int index) const;\n\tvoid set_aura(const int index, const Ref<Spell> &aura);\n\tvoid add_aura(const Ref<Spell> &aura);\n\tvoid remove_aura(const int index);\n\n\tint get_aura_count() const;\n\n\tVector<Variant> get_auras();\n\tvoid set_auras(const Vector<Variant> &auras);\n\n\tString generate_name(int seed);\n\n\tEntitySpeciesData();\n\t~EntitySpeciesData();\n\nprotected:\n\tvoid _validate_property(PropertyInfo &property) const;\n\tstatic void _bind_methods();\n\nprivate:\n\tint _id;\n\tint _type;\n\tString _text_description;\n\n\tVector<Ref<SpeciesModelData> > _model_datas;\n\tVector<Ref<Spell> > _spells;\n\tVector<Ref<Spell> > _auras;\n};\n\n#endif\n"
  },
  {
    "path": "data/species/species_instance.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"species_instance.h\"\n\n#include \"core/version.h\"\n\n#include \"../../database/ess_resource_db.h\"\n#include \"../../singletons/ess.h\"\n\n#include \"entity_species_data.h\"\n\nint SpeciesInstance::get_id() const {\n\treturn _id;\n}\nvoid SpeciesInstance::set_id(const int value) {\n\t_id = value;\n}\n\nint SpeciesInstance::get_species_id() const {\n\treturn _species_id;\n}\nvoid SpeciesInstance::set_species_id(int value) {\n\t_id = value;\n\n\t_species = ESS::get_singleton()->get_resource_db()->get_entity_species_data(_id);\n}\n\nStringName SpeciesInstance::get_species_path() const {\n\treturn _path;\n}\nvoid SpeciesInstance::set_species_path(const StringName &value) {\n\t_path = value;\n\n\t_species = ESS::get_singleton()->get_resource_db()->get_entity_species_data_path(_path);\n}\n\nRef<EntitySpeciesData> SpeciesInstance::get_species() {\n\treturn _species;\n}\nvoid SpeciesInstance::set_species(const Ref<EntitySpeciesData> &value) {\n\t_species = value;\n\n\tif (_species.is_valid()) {\n\t\t_path = _species->get_path();\n\t} else {\n\t\t_path = \"\";\n\t}\n}\n\nint SpeciesInstance::get_skin_color_index() const {\n\treturn _skin_color_index;\n}\nvoid SpeciesInstance::set_skin_color_index(const int value) {\n\t_skin_color_index = value;\n}\n\nint SpeciesInstance::get_hair_style_index() const {\n\treturn _hair_style_index;\n}\nvoid SpeciesInstance::set_hair_style_index(const int value) {\n\t_hair_style_index = value;\n}\n\nint SpeciesInstance::get_hair_color_index() const {\n\treturn _hair_color_index;\n}\nvoid SpeciesInstance::set_hair_color_index(const int value) {\n\t_hair_color_index = value;\n}\n\nint SpeciesInstance::get_head_index() const {\n\treturn _head_index;\n}\nvoid SpeciesInstance::set_head_index(const int value) {\n\t_head_index = value;\n}\n\nDictionary SpeciesInstance::to_dict() {\n\treturn call(\"_to_dict\");\n}\nvoid SpeciesInstance::from_dict(const Dictionary &dict) {\n\tcall(\"_from_dict\", dict);\n}\n\nDictionary SpeciesInstance::_to_dict() {\n\tDictionary dict;\n\n\tdict[\"id\"] = _id;\n\tdict[\"species_path\"] = _path;\n\tdict[\"skin_color_index\"] = _skin_color_index;\n\tdict[\"hair_style_index\"] = _hair_style_index;\n\tdict[\"_hair_color_index\"] = _hair_color_index;\n\tdict[\"head_index\"] = _head_index;\n\n\treturn dict;\n}\nvoid SpeciesInstance::_from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\t_id = dict.get(\"id\", 0);\n\tset_species_path(dict.get(\"species_path\", \"\"));\n\t_skin_color_index = dict.get(\"skin_color_index\", 0);\n\t_hair_style_index = dict.get(\"hair_style_index\", 0);\n\t_hair_color_index = dict.get(\"hair_color_index\", 0);\n\t_head_index = dict.get(\"head_index\", 0);\n}\n\nSpeciesInstance::SpeciesInstance() {\n\t_id = 0;\n\t_species_id = 0;\n\t_skin_color_index = 0;\n\t_hair_style_index = 0;\n\t_hair_color_index = 0;\n\t_head_index = 0;\n}\nSpeciesInstance::~SpeciesInstance() {\n\t_species.unref();\n}\n\nvoid SpeciesInstance::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &SpeciesInstance::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &SpeciesInstance::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_species_id\"), &SpeciesInstance::get_species_id);\n\tClassDB::bind_method(D_METHOD(\"set_species_id\", \"value\"), &SpeciesInstance::set_species_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"species_id\"), \"set_species_id\", \"get_species_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_species\"), &SpeciesInstance::get_species);\n\tClassDB::bind_method(D_METHOD(\"set_species\", \"value\"), &SpeciesInstance::set_species);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"species\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySpeciesData\"), \"set_species\", \"get_species\");\n\n\tClassDB::bind_method(D_METHOD(\"get_skin_color_index\"), &SpeciesInstance::get_skin_color_index);\n\tClassDB::bind_method(D_METHOD(\"set_skin_color_index\", \"value\"), &SpeciesInstance::set_skin_color_index);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"skin_color_index\"), \"set_skin_color_index\", \"get_skin_color_index\");\n\n\tClassDB::bind_method(D_METHOD(\"get_hair_style_index\"), &SpeciesInstance::get_hair_style_index);\n\tClassDB::bind_method(D_METHOD(\"set_hair_style_index\", \"value\"), &SpeciesInstance::set_hair_style_index);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"hair_style_index\"), \"set_hair_style_index\", \"get_hair_style_index\");\n\n\tClassDB::bind_method(D_METHOD(\"get_hair_color_index\"), &SpeciesInstance::get_hair_color_index);\n\tClassDB::bind_method(D_METHOD(\"set_hair_color_index\", \"value\"), &SpeciesInstance::set_hair_color_index);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"hair_color_index\"), \"set_hair_color_index\", \"get_hair_color_index\");\n\n\tClassDB::bind_method(D_METHOD(\"get_head_index\"), &SpeciesInstance::get_head_index);\n\tClassDB::bind_method(D_METHOD(\"set_head_index\", \"value\"), &SpeciesInstance::set_head_index);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"head_index\"), \"set_head_index\", \"get_head_index\");\n\n\t//Serialization\n\t//GDVIRTUAL_BIND(\"_from_dict\", \"dict\");\n\t//GDVIRTUAL_BIND(\"_to_dict\");\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &SpeciesInstance::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &SpeciesInstance::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_from_dict\", \"dict\"), &SpeciesInstance::_from_dict);\n\tClassDB::bind_method(D_METHOD(\"_to_dict\"), &SpeciesInstance::_to_dict);\n}\n"
  },
  {
    "path": "data/species/species_instance.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPECIES_INSTANCE_H\n#define SPECIES_INSTANCE_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"../items/model_visual_entry.h\"\n\nclass EntitySpeciesData;\n\nclass SpeciesInstance : public Resource {\n\tGDCLASS(SpeciesInstance, Resource);\n\npublic:\n\tint get_id() const;\n\tvoid set_id(const int value);\n\n\tint get_species_id() const;\n\tvoid set_species_id(const int value);\n\n\tStringName get_species_path() const;\n\tvoid set_species_path(const StringName &value);\n\n\tRef<EntitySpeciesData> get_species();\n\tvoid set_species(const Ref<EntitySpeciesData> &value);\n\n\tint get_skin_color_index() const;\n\tvoid set_skin_color_index(const int value);\n\n\tint get_hair_style_index() const;\n\tvoid set_hair_style_index(const int value);\n\n\tint get_hair_color_index() const;\n\tvoid set_hair_color_index(const int value);\n\n\tint get_head_index() const;\n\tvoid set_head_index(const int value);\n\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tDictionary _to_dict();\n\tvoid _from_dict(const Dictionary &dict);\n\n\tSpeciesInstance();\n\t~SpeciesInstance();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _id;\n\tStringName _path;\n\tint _species_id;\n\tRef<EntitySpeciesData> _species;\n\tint _skin_color_index;\n\tint _hair_style_index;\n\tint _hair_color_index;\n\tint _head_index;\n};\n\n#endif\n"
  },
  {
    "path": "data/species/species_model_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"species_model_data.h\"\n\n#include \"core/version.h\"\n\n#include \"../../defines.h\"\n#include \"../../singletons/ess.h\"\n\n#include \"core/string/ustring.h\"\n\n\n\nint SpeciesModelData::get_id() {\n\treturn _id;\n}\nvoid SpeciesModelData::set_id(int value) {\n\t_id = value;\n}\n\nint SpeciesModelData::get_bone_structure() const {\n\treturn _bone_structure;\n}\nvoid SpeciesModelData::set_bone_structure(const int value) {\n\t_bone_structure = value;\n}\n\nRef<PackedScene> SpeciesModelData::get_body() {\n\treturn _body;\n}\nvoid SpeciesModelData::set_body(Ref<PackedScene> value) {\n\t_body = value;\n}\n\n//Entries\n\nRef<ModelVisualEntry> SpeciesModelData::get_visual(const int index) const {\n\tERR_FAIL_INDEX_V(index, _visuals.size(), Ref<ModelVisualEntry>());\n\n\treturn _visuals.get(index);\n}\nvoid SpeciesModelData::set_visual(const int index, const Ref<ModelVisualEntry> visual) {\n\tERR_FAIL_INDEX(index, _visuals.size());\n\n\t_visuals.set(index, visual);\n}\nvoid SpeciesModelData::add_visual(const Ref<ModelVisualEntry> &visual) {\n\t_visuals.push_back(visual);\n}\nvoid SpeciesModelData::remove_visual(const int index) {\n\tERR_FAIL_INDEX(index, _visuals.size());\n\n\t_visuals.remove_at(index);\n}\n\nint SpeciesModelData::get_visual_count() const {\n\treturn _visuals.size();\n}\n\nVector<Variant> SpeciesModelData::get_visuals() {\n\tVARIANT_ARRAY_GET(_visuals);\n}\nvoid SpeciesModelData::set_visuals(const Vector<Variant> &visuals) {\n\tVARIANT_ARRAY_SET(visuals, _visuals, ModelVisualEntry);\n}\n\n//Customizable Slots\nString SpeciesModelData::get_customizable_slots_string() const {\n\treturn _customizable_slots_string;\n}\nvoid SpeciesModelData::set_customizable_slots_string(const String &value) {\n\t_customizable_slots_string = value;\n\n\tif (value == \"\") {\n\t\t_customizable_slots.resize(0);\n\t\treturn;\n\t}\n\n\t_customizable_slots.resize(_customizable_slots_string.get_slice_count(\",\"));\n}\n\nRef<ModelVisualEntry> SpeciesModelData::get_customizable_slot_entry(const int slot_index, const int index) const {\n\tERR_FAIL_INDEX_V(slot_index, _customizable_slots.size(), Ref<ModelVisualEntry>());\n\tERR_FAIL_INDEX_V(index, _customizable_slots[slot_index].size(), Ref<ModelVisualEntry>());\n\n\treturn _customizable_slots[slot_index].get(index);\n}\nvoid SpeciesModelData::set_customizable_slot_entry(const int slot_index, const int index, const Ref<ModelVisualEntry> customizable_slot) {\n\tERR_FAIL_INDEX(slot_index, _customizable_slots.size());\n\tERR_FAIL_INDEX(index, _customizable_slots[slot_index].size());\n\n\t_customizable_slots.write[slot_index].set(index, customizable_slot);\n}\nvoid SpeciesModelData::add_customizable_slot_entry(const int slot_index, const Ref<ModelVisualEntry> customizable_slot) {\n\tERR_FAIL_INDEX(slot_index, _customizable_slots.size());\n\n\t_customizable_slots.write[slot_index].push_back(customizable_slot);\n}\nvoid SpeciesModelData::remove_customizable_slot_entry(const int slot_index, const int index) {\n\tERR_FAIL_INDEX(slot_index, _customizable_slots.size());\n\tERR_FAIL_INDEX(index, _customizable_slots.size());\n\n\t_customizable_slots.write[slot_index].remove_at(index);\n}\n\nint SpeciesModelData::get_customizable_slot_count() const {\n\treturn _customizable_slots.size();\n}\n\nint SpeciesModelData::get_customizable_slot_entry_count(const int slot_index) const {\n\tERR_FAIL_INDEX_V(slot_index, _customizable_slots.size(), 0);\n\n\treturn _customizable_slots[slot_index].size();\n}\n\nVector<Variant> SpeciesModelData::get_customizable_slot_entries(const int slot_index) const {\n\tVector<Variant> r;\n\n\tERR_FAIL_INDEX_V(slot_index, _customizable_slots.size(), r);\n\n\tfor (int i = 0; i < _customizable_slots[slot_index].size(); i++) {\n#if GODOT4\n\t\tr.push_back(_customizable_slots[slot_index][i]);\n#else\n\t\tr.push_back(_customizable_slots[slot_index][i].get_ref_ptr());\n#endif\n\t}\n\treturn r;\n}\nvoid SpeciesModelData::set_customizable_slot_entries(const int slot_index, const Vector<Variant> &customizable_slots) {\n\tERR_FAIL_INDEX(slot_index, _customizable_slots.size());\n\n\t_customizable_slots.write[slot_index].clear();\n\tfor (int i = 0; i < customizable_slots.size(); i++) {\n\t\tRef<ModelVisualEntry> e = Ref<ModelVisualEntry>(customizable_slots[i]);\n\t\t_customizable_slots.write[slot_index].push_back(e);\n\t}\n}\n\n//Color Customizable Slots\nString SpeciesModelData::get_customizable_color_slots_string() const {\n\treturn _customizable_color_slots_string;\n}\nvoid SpeciesModelData::set_customizable_color_slots_string(const String &value) {\n\t_customizable_color_slots_string = value;\n\n\tif (value == \"\") {\n\t\t_visuals.resize(0);\n\t\treturn;\n\t}\n\n\t_customizable_color_slots.resize(_customizable_color_slots_string.get_slice_count(\",\"));\n}\n\nColor SpeciesModelData::get_color_customizable_slot_color(const int slot_index, const int index) const {\n\tERR_FAIL_INDEX_V(slot_index, _customizable_color_slots.size(), Color());\n\tERR_FAIL_INDEX_V(index, _customizable_color_slots.size(), Color());\n\n\treturn _customizable_color_slots[slot_index].colors.get(index);\n}\nvoid SpeciesModelData::set_color_customizable_slot_color(const int slot_index, const int index, const Color color_customizable_slot) {\n\tERR_FAIL_INDEX(slot_index, _customizable_color_slots.size());\n\tERR_FAIL_INDEX(index, _customizable_color_slots[slot_index].colors.size());\n\n\t_customizable_color_slots.write[slot_index].colors.set(index, color_customizable_slot);\n}\nvoid SpeciesModelData::add_color_customizable_slot_color(const int slot_index, const Color color_customizable_slot) {\n\tERR_FAIL_INDEX(slot_index, _customizable_color_slots.size());\n\n\t_customizable_color_slots.write[slot_index].colors.push_back(color_customizable_slot);\n}\nvoid SpeciesModelData::remove_color_customizable_slot_color(const int slot_index, const int index) {\n\tERR_FAIL_INDEX(slot_index, _customizable_color_slots.size());\n\tERR_FAIL_INDEX(index, _customizable_color_slots.size());\n\n\t_customizable_color_slots.write[slot_index].colors.remove_at(index);\n}\n\nVector<Color> SpeciesModelData::get_color_customizable_slot_colors(const int slot_index) const {\n\tERR_FAIL_INDEX_V(slot_index, _customizable_color_slots.size(), Vector<Color>());\n\n\treturn _customizable_color_slots[slot_index].colors;\n}\nvoid SpeciesModelData::set_color_customizable_slot_colors(const int slot_index, const Vector<Color> &colors) {\n\tERR_FAIL_INDEX(slot_index, _customizable_color_slots.size());\n\n\t_customizable_color_slots.write[slot_index].colors = colors;\n}\n\nuint64_t SpeciesModelData::get_color_customizable_slot_bone_slot_mask(const int slot_index) const {\n\tERR_FAIL_INDEX_V(slot_index, _customizable_color_slots.size(), 0);\n\n\treturn _customizable_color_slots[slot_index].bone_slot_mask;\n}\nvoid SpeciesModelData::set_color_customizable_slot_bone_slot_mask(const int slot_index, const uint64_t value) {\n\tERR_FAIL_INDEX(slot_index, _customizable_color_slots.size());\n\n\t_customizable_color_slots.write[slot_index].bone_slot_mask = value;\n}\n\nint SpeciesModelData::get_color_customizable_slot_texture_layer(const int slot_index) const {\n\tERR_FAIL_INDEX_V(slot_index, _customizable_color_slots.size(), 0);\n\n\treturn _customizable_color_slots[slot_index].texture_layer;\n}\nvoid SpeciesModelData::set_color_customizable_slot_texture_layer(const int slot_index, const int value) {\n\tERR_FAIL_INDEX(slot_index, _customizable_color_slots.size());\n\n\t_customizable_color_slots.write[slot_index].texture_layer = value;\n}\n\nint SpeciesModelData::get_color_customizable_count() const {\n\treturn _customizable_color_slots.size();\n}\n\nint SpeciesModelData::get_color_customizable_slot_count(const int slot_index) const {\n\tERR_FAIL_INDEX_V(slot_index, _customizable_color_slots.size(), 0);\n\n\treturn _customizable_color_slots[slot_index].colors.size();\n}\n\nSpeciesModelData::SpeciesModelData() {\n\t_id = 0;\n\t_bone_structure = 0;\n}\nSpeciesModelData::~SpeciesModelData() {\n\t_body.unref();\n\n\t_visuals.clear();\n\n\tfor (int i = 0; i < _customizable_slots.size(); ++i) {\n\t\t_customizable_slots.write[i].clear();\n\t}\n\n\tfor (int i = 0; i < _customizable_color_slots.size(); ++i) {\n\t\t_customizable_color_slots.write[i].colors.clear();\n\t}\n\n\t_customizable_slots.clear();\n\t_customizable_color_slots.clear();\n}\n\nbool SpeciesModelData::_set(const StringName &p_name, const Variant &p_value) {\n\tString name = p_name;\n\n\tif (name.begins_with(\"customizable_slots\")) {\n\t\tint index = name.get_slicec('/', 1).get_slicec('_', 0).to_int();\n\n\t\tif (_customizable_slots.size() <= index) {\n\t\t\t_customizable_slots.resize(index + 1);\n\t\t}\n\n\t\tset_customizable_slot_entries(index, p_value);\n\n\t\treturn true;\n\t} else if (name.begins_with(\"customizable_color_slots\")) {\n\t\tint index = name.get_slicec('/', 1).get_slicec('_', 0).to_int();\n\n\t\tif (_customizable_color_slots.size() <= index) {\n\t\t\t_customizable_color_slots.resize(index + 1);\n\t\t}\n\n\t\tString prop = name.get_slicec('/', 2);\n\n\t\tif (prop == \"texture_layer\") {\n\t\t\t_customizable_color_slots.write[index].texture_layer = p_value;\n\t\t\treturn true;\n\t\t} else if (prop == \"bone_slot_mask\") {\n\t\t\t_customizable_color_slots.write[index].bone_slot_mask = p_value;\n\t\t\treturn true;\n\t\t} else if (prop == \"colors\") {\n\t\t\t_customizable_color_slots.write[index].colors = p_value;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn false;\n}\nbool SpeciesModelData::_get(const StringName &p_name, Variant &r_ret) const {\n\tString name = p_name;\n\n\tif (name.begins_with(\"customizable_slots\")) {\n\t\tint index = name.get_slicec('/', 1).get_slicec('_', 0).to_int();\n\n\t\tif (_customizable_slots.size() <= index) {\n\t\t\treturn false;\n\t\t}\n\n\t\tr_ret = get_customizable_slot_entries(index);\n\t\treturn true;\n\t} else if (name.begins_with(\"customizable_color_slots\")) {\n\t\tint index = name.get_slicec('/', 1).get_slicec('_', 0).to_int();\n\n\t\tif (_customizable_color_slots.size() <= index) {\n\t\t\treturn false;\n\t\t}\n\n\t\tString prop = name.get_slicec('/', 2);\n\n\t\tif (prop == \"texture_layer\") {\n\t\t\tr_ret = _customizable_color_slots[index].texture_layer;\n\t\t\treturn true;\n\t\t} else if (prop == \"bone_slot_mask\") {\n\t\t\tr_ret = _customizable_color_slots[index].bone_slot_mask;\n\t\t\treturn true;\n\t\t} else if (prop == \"colors\") {\n\t\t\tr_ret = _customizable_color_slots[index].colors;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn false;\n}\nvoid SpeciesModelData::_get_property_list(List<PropertyInfo> *p_list) const {\n\tint count = _customizable_slots_string.get_slice_count(\",\");\n\n\tfor (int i = 0; i < count; ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::ARRAY, \"customizable_slots/\" + itos(i) + \"_\" + _customizable_slots_string.get_slicec(',', i), PROPERTY_HINT_NONE, \"17/17:ModelVisualEntry\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL, \"ModelVisualEntry\"));\n\t}\n\n\tcount = _customizable_color_slots_string.get_slice_count(\",\");\n\n\tfor (int i = 0; i < count; ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::INT, \"customizable_color_slots/\" + itos(i) + \"_\" + _customizable_color_slots_string.get_slicec(',', i) + \"/texture_layer\", PROPERTY_HINT_ENUM, ESS::get_singleton()->texture_layers_get(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED));\n\t\tp_list->push_back(PropertyInfo(Variant::INT, \"customizable_color_slots/\" + itos(i) + \"_\" + _customizable_color_slots_string.get_slicec(',', i) + \"/bone_slot_mask\", PROPERTY_HINT_FLAGS, ESS::get_singleton()->skeletons_bones_index_get(_bone_structure), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL));\n\t\tp_list->push_back(PropertyInfo(Variant::ARRAY, \"customizable_color_slots/\" + itos(i) + \"_\" + _customizable_color_slots_string.get_slicec(',', i) + \"/colors\", PROPERTY_HINT_NONE, \"17/17:Color\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL, \"Color\"));\n\t}\n}\nvoid SpeciesModelData::_validate_property(PropertyInfo &property) const {\n\tString prop = property.name;\n\n\tif (prop == \"bone_structure\") {\n\t\tproperty.hint_string = ESS::get_singleton()->entity_types_get();\n\t}\n}\n\nvoid SpeciesModelData::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &SpeciesModelData::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &SpeciesModelData::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_bone_structure\"), &SpeciesModelData::get_bone_structure);\n\tClassDB::bind_method(D_METHOD(\"set_bone_structure\", \"value\"), &SpeciesModelData::set_bone_structure);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"bone_structure\", PROPERTY_HINT_ENUM, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_bone_structure\", \"get_bone_structure\");\n\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_name\", \"get_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_body\"), &SpeciesModelData::get_body);\n\tClassDB::bind_method(D_METHOD(\"set_body\", \"value\"), &SpeciesModelData::set_body);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"body\", PROPERTY_HINT_RESOURCE_TYPE, \"PackedScene\"), \"set_body\", \"get_body\");\n\n\t//Entries\n\tClassDB::bind_method(D_METHOD(\"get_visual\", \"index\"), &SpeciesModelData::get_visual);\n\tClassDB::bind_method(D_METHOD(\"set_visual\", \"index\", \"data\"), &SpeciesModelData::set_visual);\n\tClassDB::bind_method(D_METHOD(\"add_visual\", \"visual\"), &SpeciesModelData::add_visual);\n\tClassDB::bind_method(D_METHOD(\"remove_visual\", \"index\"), &SpeciesModelData::remove_visual);\n\n\tClassDB::bind_method(D_METHOD(\"get_visual_count\"), &SpeciesModelData::get_visual_count);\n\n\tClassDB::bind_method(D_METHOD(\"get_visuals\"), &SpeciesModelData::get_visuals);\n\tClassDB::bind_method(D_METHOD(\"set_visuals\", \"visuals\"), &SpeciesModelData::set_visuals);\n\n\t//Customizable Slots\n\tClassDB::bind_method(D_METHOD(\"get_customizable_slots_string\"), &SpeciesModelData::get_customizable_slots_string);\n\tClassDB::bind_method(D_METHOD(\"set_customizable_slots_string\", \"value\"), &SpeciesModelData::set_customizable_slots_string);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"customizable_slots_string\"), \"set_customizable_slots_string\", \"get_customizable_slots_string\");\n\n\tClassDB::bind_method(D_METHOD(\"get_customizable_slot_entry\", \"slot_index\", \"index\"), &SpeciesModelData::get_customizable_slot_entry);\n\tClassDB::bind_method(D_METHOD(\"set_customizable_slot_entry\", \"slot_index\", \"index\", \"data\"), &SpeciesModelData::set_customizable_slot_entry);\n\tClassDB::bind_method(D_METHOD(\"add_customizable_slot_entry\", \"slot_index\", \"customizable_slot\"), &SpeciesModelData::add_customizable_slot_entry);\n\tClassDB::bind_method(D_METHOD(\"remove_customizable_slot_entry\", \"slot_index\", \"index\"), &SpeciesModelData::remove_customizable_slot_entry);\n\n\tClassDB::bind_method(D_METHOD(\"get_customizable_slot_count\"), &SpeciesModelData::get_customizable_slot_count);\n\tClassDB::bind_method(D_METHOD(\"get_customizable_slot_entry_count\", \"slot_index\"), &SpeciesModelData::get_customizable_slot_entry_count);\n\n\tClassDB::bind_method(D_METHOD(\"get_customizable_slot_entries\", \"slot_index\"), &SpeciesModelData::get_customizable_slot_entries);\n\tClassDB::bind_method(D_METHOD(\"set_customizable_slot_entries\", \"slot_index\", \"customizable_slots\"), &SpeciesModelData::set_customizable_slot_entries);\n\n\t//Color Slots\n\tClassDB::bind_method(D_METHOD(\"get_customizable_color_slots_string\"), &SpeciesModelData::get_customizable_color_slots_string);\n\tClassDB::bind_method(D_METHOD(\"set_customizable_color_slots_string\", \"value\"), &SpeciesModelData::set_customizable_color_slots_string);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"customizable_color_slots_string\"), \"set_customizable_color_slots_string\", \"get_customizable_color_slots_string\");\n\n\tClassDB::bind_method(D_METHOD(\"get_color_customizable_slot_color\", \"slot_index\", \"index\"), &SpeciesModelData::get_color_customizable_slot_color);\n\tClassDB::bind_method(D_METHOD(\"set_color_customizable_slot_color\", \"slot_index\", \"index\", \"data\"), &SpeciesModelData::set_color_customizable_slot_color);\n\tClassDB::bind_method(D_METHOD(\"add_color_customizable_slot_color\", \"slot_index\", \"color_customizable_slot\"), &SpeciesModelData::add_color_customizable_slot_color);\n\tClassDB::bind_method(D_METHOD(\"remove_color_customizable_slot_color\", \"slot_index\", \"index\"), &SpeciesModelData::remove_color_customizable_slot_color);\n\n\tClassDB::bind_method(D_METHOD(\"get_color_customizable_slot_colors\", \"slot_index\"), &SpeciesModelData::get_color_customizable_slot_colors);\n\tClassDB::bind_method(D_METHOD(\"set_color_customizable_slot_colors\", \"slot_index\", \"colors\"), &SpeciesModelData::set_color_customizable_slot_colors);\n\n\tClassDB::bind_method(D_METHOD(\"get_color_customizable_slot_bone_slot_mask\", \"slot_index\"), &SpeciesModelData::get_color_customizable_slot_bone_slot_mask);\n\tClassDB::bind_method(D_METHOD(\"set_color_customizable_slot_bone_slot_mask\", \"slot_index\", \"value\"), &SpeciesModelData::set_color_customizable_slot_bone_slot_mask);\n\n\tClassDB::bind_method(D_METHOD(\"get_color_customizable_slot_texture_layer\", \"slot_index\"), &SpeciesModelData::get_color_customizable_slot_texture_layer);\n\tClassDB::bind_method(D_METHOD(\"set_color_customizable_slot_texture_layer\", \"slot_index\", \"value\"), &SpeciesModelData::set_color_customizable_slot_texture_layer);\n\n\tClassDB::bind_method(D_METHOD(\"get_color_customizable_count\"), &SpeciesModelData::get_color_customizable_count);\n\tClassDB::bind_method(D_METHOD(\"get_color_customizable_slot_count\", \"slot_index\"), &SpeciesModelData::get_color_customizable_slot_count);\n}\n"
  },
  {
    "path": "data/species/species_model_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPECIES_MODEL_DATA_H\n#define SPECIES_MODEL_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n#include \"core/string/ustring.h\"\n#include \"core/math/color.h\"\n\n\n#include \"scene/resources/packed_scene.h\"\n\n#include \"../items/model_visual_entry.h\"\n\n#include \"../../entity_enums.h\"\n\nclass ModelVisual;\n\nclass SpeciesModelData : public Resource {\n\tGDCLASS(SpeciesModelData, Resource);\n\npublic:\n\tint get_id();\n\tvoid set_id(int value);\n\n\tint get_bone_structure() const;\n\tvoid set_bone_structure(const int value);\n\n\tRef<PackedScene> get_body();\n\tvoid set_body(Ref<PackedScene> value);\n\n\t//Entries\n\tRef<ModelVisualEntry> get_visual(const int index) const;\n\tvoid set_visual(const int index, const Ref<ModelVisualEntry> visual);\n\tvoid add_visual(const Ref<ModelVisualEntry> &visual);\n\tvoid remove_visual(const int index);\n\n\tint get_visual_count() const;\n\n\tVector<Variant> get_visuals();\n\tvoid set_visuals(const Vector<Variant> &visuals);\n\n\t//Customizable Slots\n\tString get_customizable_slots_string() const;\n\tvoid set_customizable_slots_string(const String &value);\n\n\tRef<ModelVisualEntry> get_customizable_slot_entry(const int slot_index, const int index) const;\n\tvoid set_customizable_slot_entry(const int slot_index, const int index, const Ref<ModelVisualEntry> customizable_slot);\n\tvoid add_customizable_slot_entry(const int slot_index, const Ref<ModelVisualEntry> customizable_slot);\n\tvoid remove_customizable_slot_entry(const int slot_index, const int index);\n\n\tint get_customizable_slot_count() const;\n\tint get_customizable_slot_entry_count(const int slot_index) const;\n\n\tVector<Variant> get_customizable_slot_entries(const int slot_index) const;\n\tvoid set_customizable_slot_entries(const int slot_index, const Vector<Variant> &customizable_slots);\n\n\t//Color Customizable Slots\n\tString get_customizable_color_slots_string() const;\n\tvoid set_customizable_color_slots_string(const String &value);\n\n\tColor get_color_customizable_slot_color(const int slot_index, const int index) const;\n\tvoid set_color_customizable_slot_color(const int slot_index, const int index, const Color color_customizable_slot);\n\tvoid add_color_customizable_slot_color(const int slot_index, const Color color_customizable_slot);\n\tvoid remove_color_customizable_slot_color(const int slot_index, const int index);\n\n\tVector<Color> get_color_customizable_slot_colors(const int slot_index) const;\n\tvoid set_color_customizable_slot_colors(const int slot_index, const Vector<Color> &colors);\n\n\tuint64_t get_color_customizable_slot_bone_slot_mask(const int slot_index) const;\n\tvoid set_color_customizable_slot_bone_slot_mask(const int slot_index, const uint64_t value);\n\n\tint get_color_customizable_slot_texture_layer(const int slot_index) const;\n\tvoid set_color_customizable_slot_texture_layer(const int slot_index, const int value);\n\n\tint get_color_customizable_count() const;\n\tint get_color_customizable_slot_count(const int slot_index) const;\n\n\tSpeciesModelData();\n\t~SpeciesModelData();\n\nprotected:\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tvoid _validate_property(PropertyInfo &property) const;\n\n\tstatic void _bind_methods();\n\nprotected:\n\tstruct ColorSlotData {\n\t\tint texture_layer;\n\t\tuint64_t bone_slot_mask;\n\t\tVector<Color> colors;\n\t};\n\nprivate:\n\tint _id;\n\tint _bone_structure;\n\n\tRef<PackedScene> _body;\n\n\tString _customizable_slots_string;\n\tString _customizable_color_slots_string;\n\n\tVector<Ref<ModelVisualEntry> > _visuals;\n\n\tVector<Vector<Ref<ModelVisualEntry> > > _customizable_slots;\n\tVector<ColorSlotData> _customizable_color_slots;\n};\n\n#endif\n"
  },
  {
    "path": "data/spells/spell.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"spell.h\"\n\n#include \"../../entities/auras/aura_data.h\"\n#include \"../../entities/resources/entity_resource_cost_data.h\"\n#include \"../../entities/skills/entity_skill_data.h\"\n#include \"../items/craft_recipe.h\"\n\n#include \"../../entities/auras/aura_data.h\"\n#include \"../../entities/data/entity_data.h\"\n#include \"../../infos/aura_infos.h\"\n#include \"../auras/aura_group.h\"\n\n#include \"../../singletons/ess.h\"\n\n#include \"../../pipelines/spell_damage_info.h\"\n#include \"../../pipelines/spell_heal_info.h\"\n\n#include \"../../defines.h\"\n\nint Spell::get_id() const {\n\treturn _id;\n}\nvoid Spell::set_id(const int value) {\n\t_id = value;\n}\n\nint Spell::spell_type_get() const {\n\treturn _spell_type;\n}\nvoid Spell::spell_type_set(int value) {\n\t_spell_type = value;\n}\n\nSpellEnums::SpellCategory Spell::get_spell_category() const {\n\treturn _spell_category;\n}\nvoid Spell::set_spell_category(SpellEnums::SpellCategory value) {\n\t_spell_category = value;\n}\n\nbool Spell::get_hide_from_actionbar() const {\n\treturn _hide_from_actionbar;\n}\nvoid Spell::set_hide_from_actionbar(const bool value) {\n\t_hide_from_actionbar = value;\n}\n\nfloat Spell::get_cooldown() const {\n\treturn _cooldown;\n}\nvoid Spell::set_cooldown(const float value) {\n\t_cooldown = value;\n}\n\nSpellTargetType Spell::get_target_type() const {\n\treturn _target_type;\n}\nvoid Spell::set_target_type(const SpellTargetType value) {\n\t_target_type = value;\n}\n\nTargetRelationType Spell::get_target_relation_type() const {\n\treturn _target_relation_type;\n}\nvoid Spell::set_target_relation_type(const TargetRelationType value) {\n\t_target_relation_type = value;\n}\n\nint Spell::get_level() const {\n\treturn _level;\n}\nvoid Spell::set_level(const int value) {\n\t_level = value;\n}\n\nint Spell::get_rank() const {\n\treturn _rank;\n}\nvoid Spell::set_rank(const int value) {\n\t_rank = value;\n}\n\nbool Spell::get_scale_with_level() const {\n\treturn _scale_with_level;\n}\nvoid Spell::set_scale_with_level(const bool value) {\n\t_scale_with_level = value;\n}\n\nRef<ItemTemplate> Spell::get_item_cost() {\n\treturn _item_cost;\n}\nvoid Spell::set_item_cost(const Ref<ItemTemplate> &value) {\n\t_item_cost = value;\n}\n\nRef<ItemTemplate> Spell::get_required_item() {\n\treturn _required_item;\n}\nvoid Spell::set_required_item(const Ref<ItemTemplate> &value) {\n\t_required_item = value;\n}\n\nRef<EntityResourceCostData> Spell::get_resource_cost() {\n\treturn _resource_cost;\n}\nvoid Spell::set_resource_cost(const Ref<EntityResourceCostData> &value) {\n\t_resource_cost = value;\n}\n\nRef<EntityResourceCostData> Spell::get_resource_give() {\n\treturn _resource_give;\n}\nvoid Spell::set_resource_give(const Ref<EntityResourceCostData> &value) {\n\t_resource_give = value;\n}\n\nbool Spell::get_global_cooldown_enabled() const {\n\treturn _global_cooldown_enabled;\n}\nvoid Spell::set_global_cooldown_enabled(const bool value) {\n\t_global_cooldown_enabled = value;\n}\n\nbool Spell::get_is_local_spell() const {\n\treturn _is_local_spell;\n}\nvoid Spell::set_is_local_spell(const bool value) {\n\t_is_local_spell = value;\n}\n\nRef<Texture> Spell::get_icon() {\n\treturn _icon;\n}\nvoid Spell::set_icon(const Ref<Texture> &value) {\n\t_icon = Ref<Texture>(value);\n}\n\nString Spell::get_text_translation_key() const {\n\treturn _text_translation_key;\n}\nvoid Spell::set_text_translation_key(const String &value) {\n\t_text_translation_key = value;\n}\n\nString Spell::get_text_description() const {\n\treturn _text_description;\n}\nvoid Spell::set_text_description(const String &value) {\n\t_text_description = value;\n}\n\nRef<SpellEffectVisual> Spell::get_visual_spell_effects() {\n\treturn _visual_spell_effects;\n}\nvoid Spell::set_visual_spell_effects(const Ref<SpellEffectVisual> &value) {\n\t_visual_spell_effects = value;\n}\n\nRef<CraftRecipe> Spell::get_teaches_craft_recipe() {\n\treturn _teaches_craft_recipe;\n}\nvoid Spell::set_teaches_craft_recipe(const Ref<CraftRecipe> &value) {\n\t_teaches_craft_recipe = value;\n}\n\n////    Caster Aura Apply    ////\n\nint Spell::spells_cast_on_caster_num_get() const {\n\treturn _spells_cast_on_caster.size();\n}\nvoid Spell::spells_cast_on_caster_num_set(const int value) {\n\t_spells_cast_on_caster.resize(value);\n}\n\nRef<Spell> Spell::spell_cast_on_caster_get(const int index) {\n\tERR_FAIL_INDEX_V(index, _spells_cast_on_caster.size(), Ref<Spell>());\n\n\treturn _spells_cast_on_caster[index];\n}\nvoid Spell::spell_cast_on_caster_set(const int index, const Ref<Spell> &spell) {\n\tERR_FAIL_INDEX(index, _spells_cast_on_caster.size());\n\n\t_spells_cast_on_caster.set(index, Ref<Spell>(spell));\n}\n\nVector<Variant> Spell::spells_cast_on_caster_get() {\n\tVARIANT_ARRAY_GET(_spells_cast_on_caster);\n}\nvoid Spell::spells_cast_on_caster_set(const Vector<Variant> &spells) {\n\tVARIANT_ARRAY_SET(spells, _spells_cast_on_caster, Spell);\n}\n\n////    Target Aura Apply    ////\n\nint Spell::spells_cast_on_target_num_get() const {\n\treturn _spells_cast_on_target.size();\n}\nvoid Spell::spells_cast_on_target_num_set(const int value) {\n\t_spells_cast_on_target.resize(value);\n}\n\nRef<Spell> Spell::spell_cast_on_target_get(const int index) {\n\tERR_FAIL_INDEX_V(index, _spells_cast_on_target.size(), Ref<Spell>());\n\n\treturn _spells_cast_on_target[index];\n}\nvoid Spell::spell_cast_on_target_set(const int index, const Ref<Spell> &spell) {\n\tERR_FAIL_INDEX(index, _spells_cast_on_target.size());\n\n\t_spells_cast_on_target.set(index, Ref<Spell>(spell));\n}\n\nVector<Variant> Spell::spells_cast_on_target_get() {\n\tVARIANT_ARRAY_GET(_spells_cast_on_target);\n}\nvoid Spell::spells_cast_on_target_set(const Vector<Variant> &spells) {\n\tVARIANT_ARRAY_SET(spells, _spells_cast_on_target, Spell);\n}\n\n////    Apply Auras On Learn    ////\n\nint Spell::on_learn_cast_spells_num_get() const {\n\treturn _on_learn_cast_spells.size();\n}\nvoid Spell::on_learn_cast_spells_num_set(const int value) {\n\t_on_learn_cast_spells.resize(value);\n}\n\nRef<Spell> Spell::spell_cast_on_learn_get(int index) {\n\tERR_FAIL_INDEX_V(index, _on_learn_cast_spells.size(), Ref<Spell>());\n\n\treturn _on_learn_cast_spells[index];\n}\nvoid Spell::spell_cast_on_learn_set(const int index, const Ref<Spell> &spell) {\n\tERR_FAIL_INDEX(index, _on_learn_cast_spells.size());\n\n\t_on_learn_cast_spells.set(index, Ref<Spell>(spell));\n}\n\nVector<Variant> Spell::spells_cast_on_learn_get() {\n\tVARIANT_ARRAY_GET(_on_learn_cast_spells);\n}\nvoid Spell::spells_cast_on_learn_set(const Vector<Variant> &spells) {\n\tVARIANT_ARRAY_SET(spells, _on_learn_cast_spells, Spell);\n}\n\n////    Range    ////\n\nbool Spell::range_get_enabled() const {\n\treturn _range_enabled;\n}\nvoid Spell::range_set_enabled(const bool value) {\n\t_range_enabled = value;\n}\n\nfloat Spell::range_get() const {\n\treturn _range;\n}\nvoid Spell::range_set(const float value) {\n\t_range = value;\n}\n\nbool Spell::cast_time_get_enabled() const {\n\treturn _cast_time_enabled;\n}\nvoid Spell::cast_time_set_enabled(const bool value) {\n\t_cast_time_enabled = value;\n}\n\nfloat Spell::cast_time_get() const {\n\treturn _cast_time;\n}\nvoid Spell::cast_time_set(const float value) {\n\t_cast_time = value;\n}\n\nbool Spell::projectile_get_use_time() const {\n\treturn _projectile_use_time;\n}\nvoid Spell::projectile_set_use_time(const bool value) {\n\t_projectile_use_time = value;\n}\n\nfloat Spell::projectile_get_time() const {\n\treturn _projectile_time;\n}\nvoid Spell::projectile_set_time(const float value) {\n\t_projectile_time = value;\n}\n\nbool Spell::projectile_get_use_speed() const {\n\treturn _projectile_use_speed;\n}\nvoid Spell::projectile_set_use_speed(const bool value) {\n\t_projectile_use_speed = value;\n}\n\nfloat Spell::projectile_get_speed() const {\n\treturn _projectile_speed;\n}\nvoid Spell::projectile_set_speed(const float value) {\n\t_projectile_speed = value;\n}\n\nRef<PackedScene> Spell::projectile_get_scene() const {\n\treturn _projectile_scene;\n}\nvoid Spell::projectile_set_scene(const Ref<PackedScene> &value) {\n\t_projectile_scene = value;\n}\n\nbool Spell::damage_get_enabled() const {\n\treturn _damage_enabled;\n}\nvoid Spell::damage_set_enabled(const bool value) {\n\t_damage_enabled = value;\n}\n\nint Spell::damage_get_type() const {\n\treturn _damage_type;\n}\nvoid Spell::damage_set_type(const int value) {\n\t_damage_type = value;\n}\n\nint Spell::damage_get_min() const {\n\treturn _damage_min;\n}\nvoid Spell::damage_set_min(const int value) {\n\t_damage_min = value;\n}\n\nint Spell::damage_get_max() const {\n\treturn _damage_max;\n}\nvoid Spell::damage_set_max(const int value) {\n\t_damage_max = value;\n}\n\nint Spell::damage_get_scale_stat() const {\n\treturn _damage_scale_stat;\n}\nvoid Spell::damage_set_scale_stat(const int value) {\n\t_damage_scale_stat = value;\n}\n\nfloat Spell::damage_get_scale_coeff() const {\n\treturn _damage_scale_coeff;\n}\nvoid Spell::damage_set_scale_coeff(const float value) {\n\t_damage_scale_coeff = value;\n}\n\nbool Spell::heal_get_enabled() const {\n\treturn _heal_enabled;\n}\nvoid Spell::heal_set_enabled(const bool value) {\n\t_heal_enabled = value;\n}\n\nint Spell::heal_get_min() const {\n\treturn _heal_min;\n}\nvoid Spell::heal_set_min(const int value) {\n\t_heal_min = value;\n}\n\nint Spell::heal_get_max() const {\n\treturn _heal_max;\n}\nvoid Spell::heal_set_max(const int value) {\n\t_heal_max = value;\n}\n\nint Spell::heal_get_scale_stat() const {\n\treturn _heal_scale_stat;\n}\nvoid Spell::heal_set_scale_stat(const int value) {\n\t_heal_scale_stat = value;\n}\n\nfloat Spell::heal_get_scale_coeff() const {\n\treturn _heal_scale_coeff;\n}\nvoid Spell::heal_set_scale_coeff(const float value) {\n\t_heal_scale_coeff = value;\n}\n\nbool Spell::dispell_get_enabled() const {\n\treturn _dispell_enabled;\n}\nvoid Spell::dispell_set_enabled(const bool value) {\n\t_dispell_enabled = value;\n}\n\nint Spell::dispell_get_count_min() const {\n\treturn _dispell_count_min;\n}\nvoid Spell::dispell_set_count_min(const int value) {\n\t_dispell_count_min = value;\n}\n\nint Spell::dispell_get_count_max() const {\n\treturn _dispell_count_max;\n}\nvoid Spell::dispell_set_count_max(const int value) {\n\t_dispell_count_max = value;\n}\n\nint Spell::dispell_get_aura_types() const {\n\treturn _dispell_aura_types;\n}\nvoid Spell::dispell_set_aura_types(const int value) {\n\t_dispell_aura_types = value;\n}\n\nbool Spell::get_needs_target() const {\n\treturn _needs_target;\n}\nvoid Spell::set_needs_target(const bool value) {\n\t_needs_target = value;\n}\n\nbool Spell::get_can_move_while_casting() const {\n\treturn _can_move_while_casting;\n}\nvoid Spell::set_can_move_while_casting(const bool value) {\n\t_can_move_while_casting = value;\n}\n\nbool Spell::get_interrupt_enabled() const {\n\treturn _interrupt_enabled;\n}\nvoid Spell::set_interrupt_enabled(const bool value) {\n\t_interrupt_enabled = value;\n}\n\nfloat Spell::get_interrupt_time() const {\n\treturn _interrupt_time;\n}\nvoid Spell::set_interrupt_time(const float value) {\n\t_interrupt_time = value;\n}\n\nbool Spell::get_is_aoe() const {\n\treturn _is_aoe;\n}\nvoid Spell::set_is_aoe(const bool value) {\n\t_is_aoe = value;\n}\n\nSpellAOETargetType Spell::get_aoe_target_type() const {\n\treturn _aoe_targetType;\n}\nvoid Spell::set_aoe_target_type(const SpellAOETargetType value) {\n\t_aoe_targetType = value;\n}\n\nSpellEnums::ColliderType Spell::get_aoe_collider_type() const {\n\treturn _aoe_colliderType;\n}\nvoid Spell::set_aoe_collider_type(const SpellEnums::ColliderType value) {\n\t_aoe_colliderType = value;\n}\n\nfloat Spell::get_aoe_radius() const {\n\treturn _aoe_radius;\n}\nvoid Spell::set_aoe_radius(float value) {\n\t_aoe_radius = value;\n}\n\nVector3 Spell::get_aoe_box_extents() const {\n\treturn _aoe_box_extents;\n}\nvoid Spell::set_aoe_box_extents(Vector3 value) {\n\t_aoe_box_extents = value;\n}\n\nint Spell::get_spell_cooldown_mainpulation_data_count() const {\n\treturn _spell_cooldown_mainpulation_data_count;\n}\nvoid Spell::set_spell_cooldown_mainpulation_data_count(int value) {\n\t_spell_cooldown_mainpulation_data_count = value;\n}\n\nint Spell::get_training_cost() const {\n\treturn _training_cost;\n}\nvoid Spell::set_training_cost(const int value) {\n\t_training_cost = value;\n}\n\nRef<Spell> Spell::get_training_required_spell() {\n\treturn _training_required_spell;\n}\nvoid Spell::set_training_required_spell(const Ref<Spell> &spell) {\n\t_training_required_spell = spell;\n}\n\nRef<EntitySkillData> Spell::get_training_required_skill() {\n\treturn _training_required_skill;\n}\nvoid Spell::set_training_required_skill(const Ref<EntitySkillData> &skill) {\n\t_training_required_skill = skill;\n}\n\nint Spell::get_training_required_skill_level() const {\n\treturn _training_required_skill_level;\n}\nvoid Spell::set_training_required_skill_level(const int value) {\n\t_training_required_skill_level = value;\n}\n\n// Aura\n\nbool Spell::aura_get_permanent() const {\n\treturn _aura_permanent;\n}\nvoid Spell::aura_set_permanent(const bool value) {\n\t_aura_permanent = value;\n}\n\nfloat Spell::aura_get_time() const {\n\treturn _aura_time;\n}\nvoid Spell::aura_set_time(const float value) {\n\t_aura_time = value;\n}\n\nfloat Spell::aura_get_tick() const {\n\treturn _aura_tick;\n}\nvoid Spell::aura_set_tick(const float value) {\n\t_aura_tick = value;\n}\n\nRef<AuraGroup> Spell::aura_get_aura_group() {\n\treturn _aura_group;\n}\nvoid Spell::aura_set_aura_group(const Ref<AuraGroup> &value) {\n\t_aura_group = value;\n}\n\nbool Spell::aura_get_is_debuff() const {\n\treturn _aura_is_debuff;\n}\nvoid Spell::aura_set_is_debuff(const bool value) {\n\t_aura_is_debuff = value;\n}\n\nSpellEnums::AuraType Spell::aura_get_aura_type() const {\n\treturn _aura_type;\n}\nvoid Spell::aura_set_aura_type(SpellEnums::AuraType value) {\n\t_aura_type = value;\n}\n\nbool Spell::aura_get_scale_with_level() const {\n\treturn _aura_scale_with_level;\n}\nvoid Spell::aura_set_scale_with_level(const bool value) {\n\t_aura_scale_with_level = value;\n}\n\nString Spell::aura_get_text_translation_key() const {\n\treturn _aura_text_translation_key;\n}\nvoid Spell::aura_set_text_translation_key(const String &value) {\n\t_aura_text_translation_key = value;\n}\n\nString Spell::aura_get_text_description() const {\n\treturn _aura_text_description;\n}\nvoid Spell::aura_set_text_description(const String description) {\n\t_aura_text_description = description;\n}\n\nbool Spell::aura_get_hide() const {\n\treturn _aura_hide;\n}\nvoid Spell::aura_set_hide(const bool value) {\n\t_aura_hide = value;\n}\n\nRef<SpellEffectVisual> Spell::aura_get_visual_spell_effects() {\n\treturn _aura_visual_spell_effects;\n}\nvoid Spell::aura_set_visual_spell_effects(const Ref<SpellEffectVisual> &value) {\n\t_aura_visual_spell_effects = value;\n}\n\nint Spell::aura_get_ability_scale_data_id() const {\n\treturn _aura_ability_scale_data_id;\n}\nvoid Spell::aura_set_ability_scale_data_id(const int value) {\n\t_aura_ability_scale_data_id = value;\n}\n\nfloat Spell::aura_damage_get_scale_for_level(const int level) const {\n\t//return this->getDamageLevelScaling()->Evaluate((float)(level));\n\treturn 1;\n}\nfloat Spell::aura_heal_get_scale_for_level(const int level) const {\n\t//return this->getHealLevelScaling()->Evaluate((float)(level));\n\treturn 1;\n}\n\nfloat Spell::aura_absorb_get_scale_for_level(const int level) const {\n\t//return this->getAbsorbLevelScaling()->Evaluate((float)(level));\n\treturn 1;\n}\n\nbool Spell::aura_diminishing_return_enabled_get() const {\n\treturn _aura_diminishing_return_enabled;\n}\nvoid Spell::aura_diminishing_return_enabled_set(const bool value) {\n\t_aura_diminishing_return_enabled = value;\n}\n\nint Spell::aura_diminishing_return_category_get() const {\n\treturn _aura_diminishing_return_category;\n}\nvoid Spell::aura_diminishing_return_category_set(const int value) {\n\t_aura_diminishing_return_category = value;\n}\n\nRef<Spell> Spell::aura_get_teaches_spell() {\n\treturn _aura_teaches_spell;\n}\nvoid Spell::aura_set_teaches_spell(const Ref<Spell> &spell) {\n\t_aura_teaches_spell = spell;\n}\n\n/*\nvoid Spell::SetScalingData(AbilityScalingData *scalingData) {\nscalingData->getDamageCurve();\nscalingData->getAbsorbCurve();\nscalingData->getHealingCurve();\n}*/\n/*\nvoid Spell::OnAuraAbilityScalingDataLoaded(AbilityScalingDataLoaderHelper *h) {\nthis->SetScalingData(h->getData());\n}\n*/\n\n//Damage\nbool Spell::aura_damage_get_enabled() const {\n\treturn _aura_damage_enabled;\n}\nvoid Spell::aura_damage_set_enabled(const bool value) {\n\t_aura_damage_enabled = value;\n}\n\nint Spell::aura_damage_get_type() const {\n\treturn _aura_damage_type;\n}\n\nvoid Spell::aura_damage_set_type(const int value) {\n\t_aura_damage_type = value;\n}\n\nint Spell::aura_damage_get_min() const {\n\treturn _aura_damage_min;\n}\nvoid Spell::aura_damage_set_min(const int value) {\n\t_aura_damage_min = value;\n}\n\nint Spell::aura_damage_get_max() const {\n\treturn _aura_damage_max;\n}\nvoid Spell::aura_damage_set_max(const int value) {\n\t_aura_damage_max = value;\n}\n\nbool Spell::aura_damage_get_can_crit() const {\n\treturn _aura_damage_can_crit;\n}\nvoid Spell::aura_damage_set_can_crit(const bool value) {\n\t_aura_damage_can_crit = value;\n}\n\nvoid Spell::aura_damage_set(const int min, const int max, const bool can_crit) {\n\taura_damage_set_enabled(true);\n\taura_damage_set_min(min);\n\taura_damage_set_max(max);\n\taura_damage_set_can_crit(can_crit);\n}\n\n//Absorb\nbool Spell::aura_absorb_get_enabled() const {\n\treturn _aura_absorb_enabled;\n}\nvoid Spell::aura_absorb_set_enabled(const bool value) {\n\t_aura_absorb_enabled = value;\n}\n\nint Spell::aura_absorb_damage_get_type() const {\n\treturn _aura_absorb_damage_type;\n}\n\nvoid Spell::aura_absorb_damage_set_type(const int value) {\n\t_aura_absorb_damage_type = value;\n}\n\nint Spell::aura_absorb_get_min() const {\n\treturn _aura_absorb_min;\n}\nvoid Spell::aura_absorb_set_min(const int value) {\n\t_aura_absorb_min = value;\n}\n\nint Spell::aura_absorb_get_max() const {\n\treturn _aura_absorb_max;\n}\nvoid Spell::aura_absorb_set_max(const int value) {\n\t_aura_absorb_max = value;\n}\n\n//Heal\nbool Spell::aura_heal_get_enabled() const {\n\treturn _aura_heal_enabled;\n}\nvoid Spell::aura_heal_set_enabled(const bool value) {\n\t_aura_heal_enabled = value;\n}\n\nint Spell::aura_heal_get_min() const {\n\treturn _aura_heal_min;\n}\nvoid Spell::aura_heal_set_min(const int value) {\n\t_aura_heal_min = value;\n}\n\nint Spell::aura_heal_get_max() const {\n\treturn _aura_heal_max;\n}\nvoid Spell::aura_heal_set_max(const int value) {\n\t_aura_heal_max = value;\n}\n\nbool Spell::aura_heal_get_can_crit() const {\n\treturn _aura_heal_can_crit;\n}\nvoid Spell::aura_heal_set_can_crit(const bool value) {\n\t_aura_heal_can_crit = value;\n}\n\nvoid Spell::aura_heal_set(const int min, const int max, const bool can_crit) {\n\taura_heal_set_enabled(true);\n\taura_heal_set_min(min);\n\taura_heal_set_max(max);\n\taura_heal_set_can_crit(can_crit);\n}\n\n//Dispell\nbool Spell::aura_dispell_get_enabled() const {\n\treturn _aura_dispell_enabled;\n}\nvoid Spell::aura_dispell_set_enabled(const bool value) {\n\t_aura_dispell_enabled = value;\n}\n\nint Spell::aura_dispell_get_count_min() const {\n\treturn _aura_dispell_count_min;\n}\nvoid Spell::aura_dispell_set_count_min(const int value) {\n\t_aura_dispell_count_min = value;\n}\n\nint Spell::aura_dispell_get_count_max() const {\n\treturn _aura_dispell_count_max;\n}\nvoid Spell::aura_dispell_set_count_max(const int value) {\n\t_aura_dispell_count_max = value;\n}\n\nint Spell::aura_dispell_get_aura_types() const {\n\treturn _aura_dispell_aura_types;\n}\nvoid Spell::aura_dispell_set_aura_types(const int value) {\n\t_aura_dispell_aura_types = value;\n}\n\nRef<EntityResourceCostData> Spell::aura_get_resource_cost() {\n\treturn _aura_resource_cost;\n}\nvoid Spell::aura_set_resource_cost(const Ref<EntityResourceCostData> &value) {\n\t_aura_resource_cost = value;\n}\n\nRef<EntityResourceCostData> Spell::aura_get_resource_give() {\n\treturn _aura_resource_give;\n}\nvoid Spell::aura_set_resource_give(const Ref<EntityResourceCostData> &value) {\n\t_aura_resource_give = value;\n}\n\n//////     Triggers      ///////\n\nint Spell::aura_trigger_get_count() const {\n\treturn _aura_trigger_count;\n}\n\nvoid Spell::aura_trigger_set_count(const int count) {\n\tERR_FAIL_COND(count < 0 || count > MAX_TRIGGER_DATA);\n\n\t_aura_trigger_count = count;\n}\n\nSpellEnums::TriggerNotificationType Spell::aura_trigger_get_notification_type(const int index) const {\n\tERR_FAIL_INDEX_V(index, _aura_trigger_count, SpellEnums::TRIGGER_NOTIFICATION_TYPE_AURA);\n\n\treturn _aura_trigger_datas[index].notification_type;\n}\n\nvoid Spell::aura_trigger_set_notification_type(const int index, const SpellEnums::TriggerNotificationType value) {\n\tERR_FAIL_COND(index < 0 || index > _aura_trigger_count);\n\n\t_aura_trigger_datas[index].notification_type = value;\n}\n\nint Spell::aura_trigger_get_notification_data(const int index) const {\n\tERR_FAIL_INDEX_V(index, _aura_trigger_count, 0);\n\n\treturn _aura_trigger_datas[index].notification_data;\n}\n\nvoid Spell::aura_trigger_set_notification_data(const int index, const int value) {\n\tERR_FAIL_COND(index < 0 || index > _aura_trigger_count);\n\n\t_aura_trigger_datas[index].notification_data = value;\n}\n\nSpellEnums::TriggerType Spell::aura_trigger_get_trigger_type(const int index) const {\n\tERR_FAIL_INDEX_V(index, _aura_trigger_count, SpellEnums::TRIGGER_TYPE_NONE);\n\n\treturn _aura_trigger_datas[index].trigger_type;\n}\n\nvoid Spell::aura_trigger_set_trigger_type(const int index, const SpellEnums::TriggerType value) {\n\tERR_FAIL_COND(index < 0 || index > _aura_trigger_count);\n\n\t_aura_trigger_datas[index].trigger_type = value;\n}\n\nfloat Spell::aura_trigger_get_trigger_type_data(const int index) const {\n\tERR_FAIL_INDEX_V(index, _aura_trigger_count, 0);\n\n\treturn _aura_trigger_datas[index].trigger_type_data;\n}\n\nvoid Spell::aura_trigger_set_trigger_type_data(const int index, const float value) {\n\tERR_FAIL_COND(index < 0 || index > _aura_trigger_count);\n\n\t_aura_trigger_datas[index].trigger_type_data = value;\n}\n\nRef<Spell> Spell::aura_trigger_get_spell(const int index) const {\n\tERR_FAIL_INDEX_V(index, _aura_trigger_count, Ref<Spell>());\n\n\treturn _aura_trigger_datas[index].spell;\n}\n\nvoid Spell::aura_trigger_set_spell(const int index, const Ref<Spell> &value) {\n\tERR_FAIL_COND(index < 0 || index > _aura_trigger_count);\n\n\t_aura_trigger_datas[index].spell = value;\n}\n\n////    Talent    ////\nRef<Spell> Spell::aura_get_talent_required_talent() const {\n\treturn _aura_talent_required_talent;\n}\nvoid Spell::aura_set_talent_required_talent(const Ref<Spell> rank) {\n\t_aura_talent_required_talent = rank;\n}\n\nRef<Spell> Spell::aura_get_talent_required_spell() const {\n\treturn _aura_talent_required_talent;\n}\nvoid Spell::aura_set_talent_required_spell(const Ref<Spell> spell) {\n\t_aura_talent_required_spell = spell;\n}\n\n////// Aura Stat Attributes //////\n\nint Spell::aura_stat_attribute_get_count() const {\n\treturn _aura_stat_attribute_count;\n}\nvoid Spell::aura_stat_attribute_set_count(int count) {\n\tERR_FAIL_COND(count < 0 || count > MAX_AURA_STATS);\n\n\t_aura_stat_attribute_count = count;\n}\n\nint Spell::aura_stat_attribute_get_stat(int index) const {\n\tERR_FAIL_INDEX_V(index, MAX_AURA_STATS, 0);\n\n\treturn _aura_stat_attributes[index].stat;\n}\nvoid Spell::aura_stat_attribute_set_stat(int index, const int value) {\n\tERR_FAIL_INDEX(index, MAX_AURA_STATS);\n\n\t_aura_stat_attributes[index].stat = value;\n}\n\nfloat Spell::aura_stat_attribute_get_base_mod(int index) const {\n\tERR_FAIL_INDEX_V(index, MAX_AURA_STATS, 0);\n\n\treturn _aura_stat_attributes[index].base_mod;\n}\nvoid Spell::aura_stat_attribute_set_base_mod(int index, float value) {\n\tERR_FAIL_INDEX(index, MAX_AURA_STATS);\n\n\t_aura_stat_attributes[index].base_mod = value;\n}\n\nfloat Spell::aura_stat_attribute_get_bonus_mod(int index) const {\n\tERR_FAIL_INDEX_V(index, MAX_AURA_STATS, 0);\n\n\treturn _aura_stat_attributes[index].bonus_mod;\n}\nvoid Spell::aura_stat_attribute_set_bonus_mod(int index, float value) {\n\tERR_FAIL_INDEX(index, MAX_AURA_STATS);\n\n\t_aura_stat_attributes[index].bonus_mod = value;\n}\n\nfloat Spell::aura_stat_attribute_get_percent_mod(int index) const {\n\tERR_FAIL_INDEX_V(index, MAX_AURA_STATS, 0);\n\n\treturn _aura_stat_attributes[index].percent_mod;\n}\nvoid Spell::aura_stat_attribute_set_percent_mod(int index, float value) {\n\tERR_FAIL_INDEX(index, MAX_AURA_STATS);\n\n\t_aura_stat_attributes[index].percent_mod = value;\n}\n\n////    Spell System    ////\n\nvoid Spell::cast_starts_simple(Entity *caster, float spell_scale) {\n\tERR_FAIL_COND(!caster || !INSTANCE_VALIDATE(caster));\n\n\tRef<SpellCastInfo> info = Ref<SpellCastInfo>(memnew(SpellCastInfo()));\n\n\tinfo->caster_set(caster);\n\tinfo->target_set(caster->gets_target());\n\tinfo->has_cast_time_set(cast_time_get_enabled());\n\tinfo->cast_time_set(cast_time_get());\n\tinfo->spell_scale_set(spell_scale);\n\tinfo->set_spell(Ref<Spell>(this));\n\n\tcast_starts(info);\n}\n\nvoid Spell::cast_interrupts_simple(Entity *caster) {\n\tERR_FAIL_COND(!caster || !INSTANCE_VALIDATE(caster));\n\n\tRef<SpellCastInfo> info(memnew(SpellCastInfo()));\n\n\tinfo->caster_set(caster);\n\tinfo->set_spell(Ref<Spell>(this));\n\n\tcast_interrupts(info);\n}\n\nvoid Spell::cast_starts_triggered_simple(Entity *caster) {\n\tERR_FAIL_COND(!caster || !INSTANCE_VALIDATE(caster));\n\n\tRef<SpellCastInfo> info(memnew(SpellCastInfo()));\n\n\tinfo->caster_set(caster);\n\tinfo->set_spell(Ref<Spell>(this));\n\n\tcast_starts_triggered(info);\n}\n\nvoid Spell::aura_sapply_simple(Entity *caster, Entity *target, float spell_scale) {\n\tERR_FAIL_COND(caster == NULL || target == NULL);\n\n\tRef<AuraApplyInfo> info(memnew(AuraApplyInfo(caster, target, spell_scale, this)));\n\n\taura_sapply(info);\n}\n\n//Script methods\n\nvoid Spell::cast_starts(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\t//Auto self cast. Note: Remove needs_target, and skip this if spell should only target enemies.\n\tif (info->target_get() == NULL) {\n\t\tinfo->target_set(info->caster_get());\n\t}\n\n\tif (has_method(\"_cast_starts\")) {\n\t\tcall(\"_cast_starts\", info);\n\t}\n}\n\nvoid Spell::cast_starts_triggered(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_cast_starts_triggered\")) {\n\t\tcall(\"_cast_starts_triggered\", info);\n\t}\n}\n\nvoid Spell::cast_interrupts(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_cast_interrupts\")) {\n\t\tcall(\"_cast_interrupts\", info);\n\t}\n}\n\nvoid Spell::cast_finishs(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_cast_finishs\")) {\n\t\tcall(\"_cast_finishs\", info);\n\t}\n}\n\nvoid Spell::aura_sapply(Ref<AuraApplyInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\t//always exists\n\tcall(\"_aura_sapply\", info);\n}\n\nvoid Spell::aura_sdeapply(Ref<AuraData> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\t//always exists\n\tcall(\"_aura_sdeapply\", info);\n}\n\nvoid Spell::aura_sadd(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\t//always exists\n\tcall(\"_aura_sadd\", aura);\n}\n\nvoid Spell::aura_sremove(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\t//always exists\n\tcall(\"_aura_sremove\", aura);\n}\n\nvoid Spell::aura_removes_expired(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\t//always exists\n\tcall(\"_aura_removes_expired\", aura);\n}\n\nvoid Spell::aura_removes_dispell(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\t//always exists\n\tcall(\"_aura_removes_dispell\", aura);\n}\n\nvoid Spell::aura_supdate(Ref<AuraData> aura, float delta) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\t//always exists\n\tcall(\"_aura_supdate\", aura, delta);\n}\n\n//eventhandlers\n\nvoid Spell::son_cast_player_moved(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_son_cast_player_moved\")) {\n\t\tcall(\"_son_cast_player_moved\", info);\n\t}\n}\n\nvoid Spell::son_cast_damage_received(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_son_cast_damage_received\")) {\n\t\tcall(\"_son_cast_damage_received\", info);\n\t}\n}\n\nvoid Spell::son_spell_hit(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_son_spell_hit\")) {\n\t\tcall(\"_son_spell_hit\", info);\n\t}\n}\n\nvoid Spell::son_physics_process(Ref<SpellCastInfo> info, float delta) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_son_physics_process\")) {\n\t\tcall(\"_son_physics_process\", info, delta);\n\t}\n}\n\nvoid Spell::notification_scast(int what, Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_notification_scast\")) {\n\t\tcall(\"_notification_scast\", what, info);\n\t}\n}\n\nvoid Spell::notification_ccast(int what, Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_notification_ccast\")) {\n\t\tcall(\"_notification_ccast\", what, info);\n\t}\n}\n\nvoid Spell::notification_saura(int what, Ref<AuraData> data) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_saura\"))\n\t\tcall(\"_notification_saura\", what, data);\n}\nvoid Spell::notification_sheal(int what, Ref<AuraData> aura, Ref<SpellHealInfo> data) {\n\tERR_FAIL_COND(!aura.is_valid());\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_sheal\"))\n\t\tcall(\"_notification_sheal\", what, aura, data);\n}\nvoid Spell::notification_aura_scast(int what, Ref<AuraData> aura, Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!aura.is_valid());\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_notification_aura_scast\"))\n\t\tcall(\"_notification_aura_scast\", what, aura, info);\n}\nvoid Spell::notification_sdamage(int what, Ref<AuraData> aura, Ref<SpellDamageInfo> data) {\n\tERR_FAIL_COND(!aura.is_valid());\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_sdamage\"))\n\t\tcall(\"_notification_sdamage\", what, aura, data);\n}\n\nvoid Spell::son_remove_expired(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tif (has_method(\"_son_remove_expired\"))\n\t\tcall(\"_son_remove_expired\", aura);\n}\n\nvoid Spell::son_remove(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tif (has_method(\"_son_remove\"))\n\t\tcall(\"_son_remove\", aura);\n}\n\nvoid Spell::son_remove_dispell(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tif (has_method(\"_son_remove_dispell\"))\n\t\tcall(\"_son_remove_dispell\", aura);\n}\n\nvoid Spell::notification_sdeath(Ref<AuraData> data) {\n\tif (has_method(\"_notification_sdeath\"))\n\t\tcall(\"_notification_sdeath\", data);\n}\n\nvoid Spell::notification_scooldown_added(Ref<AuraData> data, int id, float value) {\n\tif (has_method(\"_notification_scooldown_added\"))\n\t\tcall(\"_notification_scooldown_added\", data, id, value);\n}\nvoid Spell::notification_scooldown_removed(Ref<AuraData> data, int id, float value) {\n\tif (has_method(\"_notification_scooldown_removed\"))\n\t\tcall(\"_notification_scooldown_removed\", data, id, value);\n}\n\nvoid Spell::notification_scategory_cooldown_added(Ref<AuraData> data, int id, float value) {\n\tif (has_method(\"_notification_scategory_cooldown_added\"))\n\t\tcall(\"_notification_scategory_cooldown_added\", data, id, value);\n}\nvoid Spell::notification_scategory_cooldown_removed(Ref<AuraData> data, int id, float value) {\n\tif (has_method(\"_notification_scategory_cooldown_removed\"))\n\t\tcall(\"_notification_scategory_cooldown_removed\", data, id, value);\n}\n\nvoid Spell::notification_sgcd_started(Ref<AuraData> data, float gcd) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_sgcd_started\"))\n\t\tcall(\"_notification_sgcd_started\", data, gcd);\n}\nvoid Spell::notification_sgcd_finished(Ref<AuraData> data) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_sgcd_finished\"))\n\t\tcall(\"_notification_sgcd_finished\", data);\n}\n\nvoid Spell::son_physics_process_aura(Ref<AuraData> data) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_son_physics_process_aura\"))\n\t\tcall(\"_son_physics_process_aura\", data);\n}\n\nvoid Spell::notification_sxp_gained(Ref<AuraData> data, int value) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_sxp_gained\"))\n\t\tcall(\"_notification_sxp_gained\", data, value);\n}\n\nvoid Spell::notification_slevel_up(Ref<AuraData> data, int value) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_slevel_up\"))\n\t\tcall(\"_notification_slevel_up\", data, value);\n}\n\nvoid Spell::notification_sentity_resource_added(Ref<AuraData> data, Ref<EntityResource> resource) {\n\tERR_FAIL_COND(!data.is_valid());\n\tERR_FAIL_COND(!resource.is_valid());\n\n\tif (has_method(\"_notification_sentity_resource_added\"))\n\t\tcall(\"_notification_sentity_resource_added\", data, resource);\n}\nvoid Spell::notification_sentity_resource_removed(Ref<AuraData> data, Ref<EntityResource> resource) {\n\tERR_FAIL_COND(!data.is_valid());\n\tERR_FAIL_COND(!resource.is_valid());\n\n\tif (has_method(\"_notification_sentity_resource_removed\"))\n\t\tcall(\"_notification_sentity_resource_removed\", data, resource);\n}\n\nvoid Spell::notification_caura(int what, Ref<AuraData> data) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_caura\"))\n\t\tcall(\"_notification_caura\", what, data);\n}\nvoid Spell::notification_cheal(int what, Ref<AuraData> aura, Ref<SpellHealInfo> data) {\n\tERR_FAIL_COND(!aura.is_valid());\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_cheal\"))\n\t\tcall(\"_notification_cheal\", what, aura, data);\n}\nvoid Spell::notification_aura_ccast(int what, Ref<AuraData> aura, Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!aura.is_valid());\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_notification_aura_ccast\"))\n\t\tcall(\"_notification_aura_ccast\", what, aura, info);\n}\nvoid Spell::notification_cdamage(int what, Ref<AuraData> aura, Ref<SpellDamageInfo> data) {\n\tERR_FAIL_COND(!aura.is_valid());\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_cdamage\"))\n\t\tcall(\"_notification_cdamage\", what, aura, data);\n}\n\nvoid Spell::notification_cdeath(Ref<AuraData> data) {\n\tif (has_method(\"_notification_cdeath\"))\n\t\tcall(\"_notification_cdeath\", data);\n}\n\nvoid Spell::notification_ccooldown_added(Ref<AuraData> data, int id, float value) {\n\tif (has_method(\"_notification_ccooldown_added\"))\n\t\tcall(\"_notification_ccooldown_added\", data, id, value);\n}\nvoid Spell::notification_ccooldown_removed(Ref<AuraData> data, int id, float value) {\n\tif (has_method(\"_notification_ccooldown_removed\"))\n\t\tcall(\"_notification_ccooldown_removed\", data, id, value);\n}\nvoid Spell::notification_ccategory_cooldown_added(Ref<AuraData> data, int id, float value) {\n\tif (has_method(\"_notification_ccategory_cooldown_added\"))\n\t\tcall(\"_notification_ccategory_cooldown_added\", data, id, value);\n}\nvoid Spell::notification_ccategory_cooldown_removed(Ref<AuraData> data, int id, float value) {\n\tif (has_method(\"_notification_ccategory_cooldown_removed\"))\n\t\tcall(\"_notification_ccategory_cooldown_removed\", data, id, value);\n}\n\nvoid Spell::notification_cgcd_started(Ref<AuraData> data, float gcd) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_cgcd_started\"))\n\t\tcall(\"_notification_cgcd_started\", data, gcd);\n}\nvoid Spell::notification_cgcd_finished(Ref<AuraData> data) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_cgcd_finished\"))\n\t\tcall(\"_notification_cgcd_finished\", data);\n}\n\nvoid Spell::notification_cxp_gained(Ref<AuraData> data, int value) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_cxp_gained\"))\n\t\tcall(\"_notification_cxp_gained\", data, value);\n}\n\nvoid Spell::notification_clevel_up(Ref<AuraData> data, int value) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_clevel_up\"))\n\t\tcall(\"_notification_clevel_up\", data, value);\n}\n\nvoid Spell::notification_centity_resource_added(Ref<AuraData> data, Ref<EntityResource> resource) {\n\tERR_FAIL_COND(!data.is_valid());\n\tERR_FAIL_COND(!resource.is_valid());\n\n\tif (has_method(\"_notification_centity_resource_added\"))\n\t\tcall(\"_notification_centity_resource_added\", data, resource);\n}\nvoid Spell::notification_centity_resource_removed(Ref<AuraData> data, Ref<EntityResource> resource) {\n\tERR_FAIL_COND(!data.is_valid());\n\tERR_FAIL_COND(!resource.is_valid());\n\n\tif (has_method(\"_notification_centity_resource_removed\"))\n\t\tcall(\"_notification_centity_resource_removed\", data, resource);\n}\n\n//Equipment\n\nbool Spell::equip_should_deny(Ref<AuraData> data, int equip_slot, Ref<ItemInstance> item) {\n\tERR_FAIL_COND_V(!data.is_valid(), false);\n\n\tif (has_method(\"_equip_should_deny\"))\n\t\tif (call(\"_equip_should_deny\", data, equip_slot, item))\n\t\t\treturn true;\n\n\treturn false;\n}\n\nvoid Spell::equip_son_success(Ref<AuraData> data, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_equip_son_success\"))\n\t\tcall(\"_equip_son_success\", data, equip_slot, item, old_item, bag_slot);\n}\nvoid Spell::equip_son_fail(Ref<AuraData> data, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_equip_son_fail\"))\n\t\tcall(\"_equip_son_fail\", data, equip_slot, item, old_item, bag_slot);\n}\n\nvoid Spell::equip_con_success(Ref<AuraData> data, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_equip_con_success\"))\n\t\tcall(\"_equip_con_success\", data, equip_slot, item, old_item, bag_slot);\n}\nvoid Spell::equip_con_fail(Ref<AuraData> data, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_equip_con_fail\"))\n\t\tcall(\"_equip_con_fail\", data, equip_slot, item, old_item, bag_slot);\n}\n\n//Calculations / Queries\n\nvoid Spell::calculate_initial_damage(Ref<SpellDamageInfo> data) {\n\tERR_FAIL_COND(!data.is_valid() || data->receiver_get() == NULL);\n\n\tcall(\"_calculate_initial_damage\", data);\n}\n\nvoid Spell::handle_spell_damage(Ref<SpellDamageInfo> data) {\n\tERR_FAIL_COND(!data.is_valid() || data->receiver_get() == NULL);\n\n\tcall(\"_handle_spell_damage\", data);\n}\n\nvoid Spell::calculate_initial_heal(Ref<SpellHealInfo> data) {\n\tERR_FAIL_COND(!data.is_valid() || data->receiver_get() == NULL);\n\n\tcall(\"_calculate_initial_heal\", data);\n}\n\nvoid Spell::handle_spell_heal(Ref<SpellHealInfo> data) {\n\tERR_FAIL_COND(!data.is_valid() || data->receiver_get() == NULL);\n\n\tcall(\"_handle_spell_heal\", data);\n}\n\nvoid Spell::handle_projectile(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tcall(\"_handle_projectile\", info);\n}\n\nvoid Spell::handle_effect(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tcall(\"_handle_effect\", info);\n}\n\nvoid Spell::handle_gcd(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (_global_cooldown_enabled && _cast_time_enabled) {\n\t\tfloat gcd = info->caster_get()->stat_gets_current(ESS::get_singleton()->stat_get_id(\"Global Cooldown\"));\n\n\t\tinfo->caster_get()->gcd_starts(gcd);\n\t}\n}\nvoid Spell::handle_cooldown(Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (_cooldown > 0.00001) {\n\t\tinfo->caster_get()->cooldown_adds(_id, _cooldown);\n\t}\n}\n\nvoid Spell::setup_aura_data(Ref<AuraData> data, Ref<AuraApplyInfo> info) {\n\tERR_FAIL_COND(!data.is_valid() || !info.is_valid());\n\n\t//always exists\n\tcall(\"_setup_aura_data\", data, info);\n}\n\nvoid Spell::aura_sapply_passives_damage_receive(Ref<SpellDamageInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\t//always exists\n\tcall(\"_aura_sapply_passives_damage_receive\", info);\n}\n\nvoid Spell::aura_sapply_passives_damage_deal(Ref<SpellDamageInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\t//always exists\n\tcall(\"_aura_sapply_passives_damage_deal\", info);\n}\n\nvoid Spell::aura_calculate_initial_damage(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info) {\n\tERR_FAIL_COND(!aura_data.is_valid() || !info.is_valid());\n\n\t//always exists\n\tcall(\"_aura_calculate_initial_damage\", aura_data, info);\n}\n\nvoid Spell::handle_aura_damage(Ref<AuraData> aura_data, Ref<SpellDamageInfo> info) {\n\tERR_FAIL_COND(!aura_data.is_valid() || !info.is_valid());\n\n\t//always exists\n\tcall(\"_handle_aura_damage\", aura_data, info);\n}\n\nvoid Spell::aura_sapply_passives_heal_receive(Ref<SpellHealInfo> data) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\t//always exists\n\tcall(\"_aura_sapply_passives_heal_receive\", data);\n}\n\nvoid Spell::aura_sapply_passives_heal_deal(Ref<SpellHealInfo> data) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\t//always exists\n\tcall(\"_aura_sapply_passives_heal_deal\", data);\n}\n\nvoid Spell::aura_calculate_initial_heal(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info) {\n\tERR_FAIL_COND(!aura_data.is_valid() || !info.is_valid());\n\n\t//always exists\n\tcall(\"_aura_calculate_initial_heal\", aura_data, info);\n}\n\nvoid Spell::handle_aura_heal(Ref<AuraData> aura_data, Ref<SpellHealInfo> data) {\n\tERR_FAIL_COND(!aura_data.is_valid() || !data.is_valid());\n\n\t//always exists\n\tcall(\"_handle_aura_heal\", aura_data, data);\n}\n\nString Spell::get_name_translated() const {\n\tif (_text_translation_key != \"\") {\n\t\treturn tr(_text_translation_key);\n\t}\n\n\treturn get_name();\n}\n\nString Spell::get_description(const int class_level, const int character_level) {\n\treturn call(\"_get_description\", class_level, character_level);\n}\n\nString Spell::_get_description(const int class_level, const int character_level) {\n\tString str;\n\n\tif (_text_translation_key != \"\") {\n\t\tstr = tr(_text_translation_key + \"_DESC\");\n\t}\n\n\tstr = _text_description;\n\n\tint pos = str.find_char('%');\n\n\twhile (pos > 0) {\n\t\tif (pos == str.size() - 1)\n\t\t\tbreak;\n\n#if GODOT4\n\t\tchar32_t o = str[pos + 1];\n#else\n\t\tCharType o = str[pos + 1];\n#endif\n\n\t\tif (o == '#' || o == '$' || o == '%') {\n\t\t\tint nsp = str.find_char(' ', pos + 1);\n\n\t\t\tif (pos < 0)\n\t\t\t\tbreak;\n\n\t\t\tString prop = str.substr(pos + 2, nsp - pos - 2);\n\t\t\tStringName psm = prop;\n\t\t\tbool valid = false;\n\t\t\tVariant value = get(psm, &valid);\n\n\t\t\tif (valid) {\n\t\t\t\tif (o == '#') {\n\t\t\t\t\tvalue = Variant::evaluate(Variant::OP_MULTIPLY, value, class_level / static_cast<float>(ESS::get_singleton()->get_max_class_level()));\n\n\t\t\t\t\tvalue = static_cast<int>(value);\n\t\t\t\t}\n\n\t\t\t\tif (o == '$') {\n\t\t\t\t\tvalue = Variant::evaluate(Variant::OP_MULTIPLY, value, character_level / static_cast<float>(ESS::get_singleton()->get_max_character_level()));\n\n\t\t\t\t\tvalue = static_cast<int>(value);\n\t\t\t\t}\n\n\t\t\t\tstr = str.replace(str.substr(pos, nsp - pos) + \" \", value);\n\t\t\t}\n\t\t}\n\n\t\tpos = str.find_char('%', pos + 1);\n\t}\n\n\treturn str;\n}\n\nString Spell::aura_get_name_translated() const {\n\tif (_aura_text_translation_key != \"\") {\n\t\treturn tr(_aura_text_translation_key);\n\t}\n\n\treturn get_name();\n}\n\nString Spell::aura_get_description(const int class_level, const int character_level) {\n\treturn call(\"_aura_get_description\", class_level, character_level);\n}\n\nString Spell::_aura_get_description(const int class_level, const int character_level) {\n\tString str;\n\n\tif (_aura_text_translation_key != \"\") {\n\t\tstr = tr(_aura_text_translation_key + \"_DESC\");\n\t}\n\n\tstr = _aura_text_description;\n\n\tint pos = str.find_char('%');\n\n\twhile (pos > 0) {\n\t\tif (pos == str.size() - 1)\n\t\t\tbreak;\n\n#if GODOT4\n\t\tchar32_t o = str[pos + 1];\n#else\n\t\tCharType o = str[pos + 1];\n#endif\n\n\t\tif (o == '#' || o == '$' || o == '%') {\n\t\t\tint nsp = str.find_char(' ', pos + 1);\n\n\t\t\tif (pos < 0)\n\t\t\t\tbreak;\n\n\t\t\tString prop = str.substr(pos + 2, nsp - pos - 2);\n\t\t\tStringName psm = prop;\n\t\t\tbool valid = false;\n\t\t\tVariant value = get(psm, &valid);\n\n\t\t\tif (valid) {\n\t\t\t\tif (o == '#') {\n\t\t\t\t\tvalue = Variant::evaluate(Variant::OP_MULTIPLY, value, class_level / static_cast<float>(ESS::get_singleton()->get_max_class_level()));\n\n\t\t\t\t\tvalue = static_cast<int>(value);\n\t\t\t\t}\n\n\t\t\t\tif (o == '$') {\n\t\t\t\t\tvalue = Variant::evaluate(Variant::OP_MULTIPLY, value, character_level / static_cast<float>(ESS::get_singleton()->get_max_character_level()));\n\n\t\t\t\t\tvalue = static_cast<int>(value);\n\t\t\t\t}\n\n\t\t\t\tstr = str.replace(str.substr(pos, nsp - pos) + \" \", value);\n\t\t\t}\n\t\t}\n\n\t\tpos = str.find_char('%', pos + 1);\n\t}\n\n\treturn str;\n}\n\nSpell::Spell() {\n\tPLAYER_HIT_RADIUS = (float)0.5;\n\n\t_id = 1;\n\t_spell_type = SpellEnums::SPELL_TYPE_NONE;\n\t_spell_category = SpellEnums::SPELL_CATEGORY_NORMAL;\n\n\t_hide_from_actionbar = false;\n\n\t_cooldown = 0;\n\t_cast_time = 0;\n\n\t_target_type = SpellTargetType::SPELL_TARGET_TYPE_TARGET;\n\t_target_relation_type = TargetRelationType::TARGET_ENEMY;\n\n\t_level = 1;\n\t_rank = 0;\n\t_scale_with_level = ESS::get_singleton()->get_scale_spells_by_default();\n\n\t_global_cooldown_enabled = true;\n\t_is_local_spell = false;\n\n\t_range_enabled = false;\n\t_range = 0;\n\n\t_damage_enabled = false;\n\t_damage_type = 0;\n\t_damage_min = 0;\n\t_damage_max = 0;\n\t_damage_scale_stat = 0;\n\t_damage_scale_coeff = 0;\n\n\t_heal_enabled = false;\n\t_heal_min = 0;\n\t_heal_max = 0;\n\t_heal_scale_stat = 0;\n\t_heal_scale_coeff = 0;\n\n\t_dispell_enabled = false;\n\t_dispell_count_min = 0;\n\t_dispell_count_max = 0;\n\t_dispell_aura_types = 0;\n\n\t_cast_time_enabled = false;\n\t_cast_time = 0;\n\n\t_needs_target = false;\n\t_can_move_while_casting = false;\n\n\t_interrupt_enabled = false;\n\t_interrupt_time = 0;\n\n\t_is_aoe = false;\n\t_aoe_targetType = SpellAOETargetType::SPELL_AOE_TARGET_TYPE_CASTER;\n\t_aoe_colliderType = SpellEnums::COLLIDER_TYPE_NONE;\n\t_aoe_radius = 0;\n\n\t_spell_cooldown_mainpulation_data_count = 0;\n\n\t_training_cost = 0;\n\t_training_required_skill_level = 0;\n\n\t_projectile_use_time = false;\n\t_projectile_time = 0;\n\t_projectile_use_speed = false;\n\t_projectile_speed = 0;\n\n\t_aura_permanent = false;\n\t_aura_ability_scale_data_id = 1;\n\t_aura_time = 0;\n\t_aura_tick = 0;\n\t_aura_type = SpellEnums::AURA_TYPE_NONE;\n\t_aura_is_debuff = false;\n\t_aura_hide = false;\n\n\t_aura_scale_with_level = ESS::get_singleton()->get_scale_spells_by_default();\n\n\t_aura_damage_enabled = false;\n\t_aura_damage_type = 0;\n\t_aura_damage_min = 0;\n\t_aura_damage_max = 0;\n\t_aura_damage_can_crit = false;\n\n\t_aura_absorb_enabled = false;\n\t_aura_absorb_damage_type = 0;\n\t_aura_absorb_min = 0;\n\t_aura_absorb_max = 0;\n\n\t_aura_heal_enabled = false;\n\t_aura_heal_min = 0;\n\t_aura_heal_max = 0;\n\n\t_aura_heal_can_crit = false;\n\n\t_aura_dispell_enabled = false;\n\t_aura_dispell_count_min = 0;\n\t_aura_dispell_count_max = 0;\n\t_aura_dispell_aura_types = 0;\n\n\t_aura_add_states = 0;\n\t_aura_remove_effects_with_states = 0;\n\t_aura_supress_states = 0;\n\n\t_aura_stat_attribute_count = 0;\n\t_aura_trigger_count = 0;\n\n\t_aura_diminishing_return_enabled = false;\n\t_aura_diminishing_return_category = 0;\n}\n\nSpell::~Spell() {\n\t_spells_cast_on_caster.clear();\n\t_spells_cast_on_target.clear();\n\t_on_learn_cast_spells.clear();\n\n\t_item_cost.unref();\n\t_required_item.unref();\n\n\t_resource_cost.unref();\n\t_resource_give.unref();\n\n\t_icon.unref();\n\n\t_visual_spell_effects.unref();\n\n\t_teaches_craft_recipe.unref();\n\t_training_required_spell.unref();\n\t_training_required_skill.unref();\n\n\t_projectile_scene.unref();\n\n\t_aura_teaches_spell.unref();\n\n\t_aura_visual_spell_effects.unref();\n\n\t_aura_damage_scaling_curve.unref();\n\t_aura_absorb_scaling_curve.unref();\n\t_aura_heal_scaling_curve.unref();\n\n\tfor (int i = 0; i < MAX_TRIGGER_DATA; ++i) {\n\t\t_aura_trigger_datas[i].spell.unref();\n\t}\n\n\t_aura_talent_required_talent.unref();\n\t_aura_talent_required_spell.unref();\n}\n\nvoid Spell::_cast_starts(Ref<SpellCastInfo> info) {\n\tif (info->caster_get()->cast_is_castings()) {\n\t\treturn;\n\t}\n\n\tif ((get_global_cooldown_enabled() && info->caster_get()->gcd_hass()) ||\n\t\t\tinfo->caster_get()->category_cooldown_hass(spell_type_get()) ||\n\t\t\tinfo->caster_get()->cooldown_hass(get_id())) {\n\t\treturn;\n\t}\n\n\tif (!info->caster_get()->spell_hass_id(get_id())) {\n\t\treturn;\n\t}\n\n\tif (cast_time_get_enabled()) {\n\t\tinfo->caster_get()->cast_starts(info);\n\t\treturn;\n\t}\n\n\tinfo->caster_get()->cast_spell_successs(info);\n\n\tinfo->target_get()->notification_scast(SpellEnums::NOTIFICATION_CAST_FINISHED_TARGET, info);\n\n\t//if (get_projectile().is_valid()) {\n\t//\thandle_projectile(info);\n\t//} else {\n\t//\thandle_effect(info);\n\t//}\n\n\thandle_cooldown(info);\n\n\thandle_gcd(info);\n}\n\nvoid Spell::_cast_finishs(Ref<SpellCastInfo> info) {\n\tinfo->caster_get()->notification_scast(SpellEnums::NOTIFICATION_CAST_FINISHED, info);\n\tinfo->caster_get()->cast_spell_successs(info);\n\n\tif (INSTANCE_VALIDATE(info->target_get())) {\n\t\tinfo->target_get()->notification_scast(SpellEnums::NOTIFICATION_CAST_FINISHED_TARGET, info);\n\t}\n\n\t//if (get_projectile().is_valid()) {\n\t//\thandle_projectile(info);\n\t//} else {\n\t//\thandle_effect(info);\n\t//}\n\n\thandle_cooldown(info);\n}\n\nvoid Spell::_son_cast_player_moved(Ref<SpellCastInfo> info) {\n\tif (get_can_move_while_casting()) {\n\t\tinfo->caster_get()->cast_fails();\n\t}\n}\n\nvoid Spell::_son_spell_hit(Ref<SpellCastInfo> info) {\n\thandle_effect(info);\n}\n\nvoid Spell::_calculate_initial_damage(Ref<SpellDamageInfo> data) {\n\tMath::randomize();\n\n\tdata->damage_set(damage_get_min() + (damage_get_max() - damage_get_min()) * Math::randf());\n}\n\nvoid Spell::_handle_spell_damage(Ref<SpellDamageInfo> data) {\n\tcalculate_initial_damage(data);\n\n\tdata->dealer_get()->sdeal_damage_to(data);\n}\n\nvoid Spell::_calculate_initial_heal(Ref<SpellHealInfo> data) {\n\tMath::randomize();\n\n\tdata->heal_set(heal_get_min() + (heal_get_max() - heal_get_min()) * Math::randf());\n}\n\nvoid Spell::_handle_spell_heal(Ref<SpellHealInfo> data) {\n\tcalculate_initial_heal(data);\n\n\tdata->dealer_get()->sdeal_heal_to(data);\n}\n\nvoid Spell::_handle_projectile(Ref<SpellCastInfo> info) {\n\tif (_projectile_scene.is_valid()) {\n\t\tNode *projectile = _projectile_scene->instantiate();\n\n\t\tNode *p = info->caster_get()->get_parent();\n\n\t\tERR_FAIL_COND(!INSTANCE_VALIDATE(p));\n\n\t\tp->add_child(projectile);\n\n\t\tif (projectile->has_method(\"setup_projectile\"))\n\t\t\tprojectile->call(\"setup_projectile\", info);\n\t}\n}\n\nvoid Spell::_handle_effect(Ref<SpellCastInfo> info) {\n\t/*\n#\t\tvar ok : bool = false\n\n#\t\tif (target_relation_type & TARGET_SELF):\n#\t\t\tok = true\n\n#\t\tif not ok and (target_relation_type & TARGET_ENEMY and info.target is Entity):\n#\t\t\tok = true\n#\n#\t\tif not ok and (target_relation_type & TARGET_FRIENDLY and info.target is Player):\n#\t\t\tok = true\n\n#\t\tif not ok:\n#\t\t\treturn\n\t\t\t*/\n\n\tbool has_target = INSTANCE_VALIDATE(info->target_get());\n\n\tif (_target_type == SPELL_TARGET_TYPE_TARGET) {\n\t\tif (!has_target)\n\t\t\treturn;\n\t} else if (_target_type == SPELL_TARGET_TYPE_SELF) {\n\t\tinfo->target_set(info->caster_get());\n\t}\n\n\tif (_damage_enabled && has_target) {\n\t\tRef<SpellDamageInfo> sdi;\n\t\tsdi.instantiate();\n\n\t\tsdi->spell_source_set(Ref<Spell>(this));\n\t\tsdi->dealer_set(info->caster_get());\n\t\tsdi->receiver_set(info->target_get());\n\n\t\thandle_spell_damage(sdi);\n\t}\n\n\tif (is_aura()) {\n\t\tRef<AuraData> ad;\n\n\t\tif (aura_get_aura_group().is_valid()) {\n\t\t\tad = info->target_get()->aura_gets_with_group_by_bind(info->caster_get(), aura_get_aura_group());\n\t\t} else {\n\t\t\tad = info->target_get()->aura_gets_by(info->caster_get(), get_id());\n\t\t}\n\n\t\tif (ad.is_valid()) {\n\t\t\tinfo->target_get()->aura_removes_exact(ad);\n\t\t}\n\n\t\tRef<AuraApplyInfo> aai;\n\t\taai.instantiate();\n\n\t\taai->caster_set(info->caster_get());\n\t\taai->target_set(info->target_get());\n\t\taai->spell_scale_set(1);\n\t\taai->set_aura(Ref<Spell>(this));\n\n\t\taura_sapply(aai);\n\t}\n\n\tfor (int i = 0; i < _spells_cast_on_caster.size(); ++i) {\n\t\tRef<Spell> spell = _spells_cast_on_caster.get(i);\n\n\t\tif (!spell.is_valid()) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tRef<SpellCastInfo> sci;\n\t\tsci.instantiate();\n\n\t\tsci->caster_set(info->caster_get());\n\t\tsci->target_set(info->caster_get());\n\t\tsci->has_cast_time_set(spell->cast_time_get_enabled());\n\t\tsci->cast_time_set(spell->cast_time_get());\n\t\tsci->spell_scale_set(info->spell_scale_get());\n\t\tsci->set_spell(spell);\n\n\t\tspell->cast_starts(sci);\n\t}\n\n\tif (has_target) {\n\t\tfor (int i = 0; i < _spells_cast_on_target.size(); ++i) {\n\t\t\tRef<Spell> spell = _spells_cast_on_target.get(i);\n\n\t\t\tif (!spell.is_valid()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tRef<SpellCastInfo> sci;\n\t\t\tsci.instantiate();\n\n\t\t\tsci->caster_set(info->caster_get());\n\t\t\tsci->target_set(info->target_get());\n\t\t\tsci->has_cast_time_set(spell->cast_time_get_enabled());\n\t\t\tsci->cast_time_set(spell->cast_time_get());\n\t\t\tsci->spell_scale_set(info->spell_scale_get());\n\t\t\tsci->set_spell(spell);\n\n\t\t\tspell->cast_starts(sci);\n\t\t}\n\t}\n}\n\nvoid Spell::_aura_sapply(Ref<AuraApplyInfo> info) {\n\tERR_FAIL_COND(info->target_get() == NULL || info->caster_get() == NULL || !info->get_aura().is_valid());\n\n\tRef<AuraData> ad = info->target_get()->aura_gets_by(info->caster_get(), _id);\n\n\tif (!ad.is_valid()) {\n\t\tad.instantiate();\n\n\t\tsetup_aura_data(ad, info);\n\n\t\tEntity *owner = ad->get_owner();\n\n\t\tfor (int i = 0; i < _aura_stat_attribute_count; ++i) {\n\t\t\towner->stat_mod(_aura_stat_attributes[i].stat, _aura_stat_attributes[i].base_mod, _aura_stat_attributes[i].bonus_mod, _aura_stat_attributes[i].percent_mod);\n\t\t}\n\n\t\tif (_aura_add_states != 0) {\n\t\t\tfor (int i = 0; i < EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX; ++i) {\n\t\t\t\tint t = 1 << i;\n\n\t\t\t\tif ((_aura_add_states & t) != 0) {\n\t\t\t\t\tinfo->target_get()->adds_state_ref(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tinfo->target_get()->aura_adds(ad);\n\t} else {\n\t\tad->set_remaining_time(_aura_time);\n\t}\n}\n\nvoid Spell::_aura_sdeapply(Ref<AuraData> data) {\n\tERR_FAIL_COND(data->get_owner() == NULL || data->caster_get() == NULL || !data->get_aura().is_valid());\n\n\tEntity *owner = data->get_owner();\n\n\tfor (int i = 0; i < _aura_stat_attribute_count; ++i) {\n\t\towner->stat_mod(_aura_stat_attributes[i].stat, -_aura_stat_attributes[i].base_mod, -_aura_stat_attributes[i].bonus_mod, -_aura_stat_attributes[i].percent_mod);\n\t}\n\n\tif (_aura_add_states != 0) {\n\t\tfor (int i = 0; i < EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX; ++i) {\n\t\t\tint t = 1 << i;\n\n\t\t\tif ((_aura_add_states & t) != 0) {\n\t\t\t\tdata->get_owner()->removes_state_ref(i);\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid Spell::_aura_sadd(Ref<AuraData> aura) {\n\tERR_FAIL_COND(aura->get_owner() == NULL);\n\n\t//sapply(aura);\n\n\taura->get_owner()->aura_removes(aura);\n\taura->get_owner()->aura_adds(aura);\n}\n\nvoid Spell::_aura_sremove(Ref<AuraData> aura) {\n\tERR_FAIL_COND(aura->get_owner() == NULL);\n\n\taura_sdeapply(aura);\n\n\taura->get_owner()->aura_removes(aura);\n}\n\nvoid Spell::_aura_removes_expired(Ref<AuraData> aura) {\n\tERR_FAIL_COND(aura->get_owner() == NULL);\n\n\taura_sdeapply(aura);\n\n\taura->get_owner()->aura_removes_expired(aura);\n}\n\nvoid Spell::_aura_removes_dispell(Ref<AuraData> aura) {\n\tERR_FAIL_COND(aura->get_owner() == NULL);\n\n\taura_sdeapply(aura);\n\n\taura->get_owner()->aura_removes_dispelled(aura);\n}\n\nvoid Spell::_aura_supdate(Ref<AuraData> aura, float delta) {\n\tbool remove = false;\n\n\tremove = aura->update(delta);\n\n\t//ontick\n\twhile (aura->get_unhandled_ticks() > 0) {\n\t\tif (aura->damage_get() != 0) {\n\t\t\tRef<SpellDamageInfo> dpd = Ref<SpellDamageInfo>(memnew(SpellDamageInfo()));\n\n\t\t\tdpd->aura_source_set(Ref<Spell>(this));\n\t\t\tdpd->dealer_set(aura->caster_get());\n\t\t\tdpd->receiver_set(aura->get_owner());\n\n\t\t\thandle_aura_damage(aura, dpd);\n\t\t}\n\n\t\tif (aura->heal_get() != 0) {\n\t\t\tRef<SpellHealInfo> shi = Ref<SpellHealInfo>(memnew(SpellHealInfo()));\n\n\t\t\tshi->aura_source_set(Ref<Spell>(this));\n\t\t\tshi->dealer_set(aura->caster_get());\n\t\t\tshi->receiver_set(aura->get_owner());\n\n\t\t\thandle_aura_heal(aura, shi);\n\t\t}\n\n\t\taura->set_unhandled_ticks(aura->get_unhandled_ticks() - 1);\n\t}\n\n\tif (remove) {\n\t\taura_removes_expired(aura);\n\t}\n}\n\nvoid Spell::_setup_aura_data(Ref<AuraData> data, Ref<AuraApplyInfo> info) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(info->caster_get()));\n\n\tdata->set_aura(Ref<Spell>(this));\n\tdata->set_aura_id(get_id());\n\tdata->set_owner(info->target_get());\n\tdata->caster_set(info->caster_get());\n\tdata->set_tick(info->get_aura()->aura_get_tick());\n\n\tif (aura_get_time() > 0.2) {\n\t\tdata->set_is_timed(true);\n\t\tdata->set_remaining_time(aura_get_time());\n\n\t} else {\n\t\tdata->set_is_timed(false);\n\t}\n\n\tif (aura_damage_get_enabled()) {\n\t\taura_calculate_initial_damage(data, info);\n\t}\n\n\tif (aura_heal_get_enabled()) {\n\t\taura_calculate_initial_heal(data, info);\n\t}\n}\n\nvoid Spell::_aura_sapply_passives_damage_receive(Ref<SpellDamageInfo> info) {\n}\n\nvoid Spell::_aura_sapply_passives_damage_deal(Ref<SpellDamageInfo> info) {\n}\n\nvoid Spell::_aura_calculate_initial_damage(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info) {\n\tint min_damage = aura_damage_get_min();\n\tint max_damage = aura_damage_get_max();\n\n\tMath::randomize();\n\tint damage = min_damage + Math::rand() % (max_damage - min_damage);\n\n\tif (aura_get_scale_with_level()) {\n\t\tdamage = static_cast<int>(damage * static_cast<float>(info->caster_get()->gets_level()) / static_cast<float>(ESS::get_singleton()->get_max_character_level()));\n\t}\n\n\taura_data->damage_set(damage);\n}\n\nvoid Spell::_handle_aura_damage(Ref<AuraData> aura_data, Ref<SpellDamageInfo> info) {\n\tif (info->dealer_get() && !INSTANCE_VALIDATE(info->dealer_get())) {\n\t\tinfo->dealer_set(NULL);\n\t}\n\n\tinfo->damage_set(aura_data->damage_get());\n\tinfo->aura_source_set(Ref<Spell>(this));\n\n\tif (info->dealer_get()) {\n\t\tinfo->dealer_get()->sdeal_damage_to(info);\n\t} else {\n\t\tinfo->receiver_get()->stake_damage(info);\n\t}\n}\n\nvoid Spell::_aura_sapply_passives_heal_receive(Ref<SpellHealInfo> data) {\n\tERR_FAIL_COND(!data.is_valid());\n}\n\nvoid Spell::_aura_sapply_passives_heal_deal(Ref<SpellHealInfo> data) {\n\tERR_FAIL_COND(!data.is_valid());\n}\n\nvoid Spell::_aura_calculate_initial_heal(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info) {\n\tint min_heal = aura_heal_get_min();\n\tint max_heal = aura_heal_get_max();\n\n\tMath::randomize();\n\tint heal = min_heal + Math::rand() % (max_heal - min_heal);\n\n\tif (aura_get_scale_with_level()) {\n\t\theal = static_cast<int>(heal * static_cast<float>(info->caster_get()->gets_level()) / static_cast<float>(ESS::get_singleton()->get_max_character_level()));\n\t}\n\n\taura_data->heal_set(heal);\n}\n\nvoid Spell::_handle_aura_heal(Ref<AuraData> aura_data, Ref<SpellHealInfo> info) {\n\tif (info->dealer_get() && !INSTANCE_VALIDATE(info->dealer_get())) {\n\t\tinfo->dealer_set(NULL);\n\t}\n\n\tinfo->heal_set(aura_data->heal_get());\n\n\tif (info->dealer_get()) {\n\t\tinfo->dealer_get()->sdeal_heal_to(info);\n\t} else {\n\t\tinfo->receiver_get()->stake_heal(info);\n\t}\n}\n\nvoid Spell::_validate_property(PropertyInfo &property) const {\n\tString prop = property.name;\n\n\tif (prop.begins_with(\"aura_stat_attribute_\")) {\n\t\tif (prop.ends_with(\"count\"))\n\t\t\treturn;\n\n\t\tint frame = prop.get_slicec('/', 0).get_slicec('_', 2).to_int();\n\t\tif (frame >= _aura_stat_attribute_count) {\n\t\t\tproperty.usage = 0;\n\t\t}\n\n\t\tif (property.name.ends_with(\"stat\"))\n\t\t\tproperty.hint_string = ESS::get_singleton()->stat_get_string();\n\t} else if (prop == \"diminishing_return_category\") {\n\t\tproperty.hint_string = ESS::get_singleton()->dminishing_return_categories_get();\n\t} else if (prop.begins_with(\"aura_trigger_\")) {\n\t\tif (prop.ends_with(\"count\"))\n\t\t\treturn;\n\n\t\tint frame = prop.get_slicec('/', 0).get_slicec('_', 1).to_int();\n\t\tif (frame >= _aura_trigger_count) {\n\t\t\tproperty.usage = 0;\n\t\t} else {\n\t\t\tif (prop.ends_with(\"notification_data\")) {\n\t\t\t\tswitch (_aura_trigger_datas[frame].notification_type) {\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_AURA:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_ENUM;\n\t\t\t\t\t\tproperty.hint_string = SpellEnums::BINDING_STRING_NOTIFICATION_AURAS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_DAMAGE:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_ENUM;\n\t\t\t\t\t\tproperty.hint_string = SpellEnums::BINDING_STRING_NOTIFICATION_DAMAGES;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_HEAL:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_ENUM;\n\t\t\t\t\t\tproperty.hint_string = SpellEnums::BINDING_STRING_NOTIFICATION_HEALS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_CAST:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_ENUM;\n\t\t\t\t\t\tproperty.hint_string = SpellEnums::BINDING_STRING_NOTIFICATION_CASTS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_DEATH:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_COOLDOWN_ADDED:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_COOLDOWN_REMOVED:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_CATEGORY_COOLDOWN_ADDED:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_CATEGORY_COOLDOWN_REMOVED:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_GCD_STARTED:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_GCD_FINISHED:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_XP_GAINED:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_CLASS_LEVELUP:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_CHARACTER_LEVELUP:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_ENTITY_RESOURCE_ADDED:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_ENTITY_RESOURCE_REMOVED:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_AURA_CUSTOM:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_DAMAGE_CUSTOM:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_HEAL_CUSTOM:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_CAST_CUSTOM:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SpellEnums::TRIGGER_NOTIFICATION_TYPE_CUSTOM:\n\t\t\t\t\t\tproperty.hint = PROPERTY_HINT_NONE;\n\t\t\t\t\t\tproperty.hint_string = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else if (property.name.ends_with(\"_stat\")) {\n\t\tproperty.hint_string = ESS::get_singleton()->stat_get_string();\n\t}\n}\n\nvoid Spell::_bind_methods() {\n\t//Commands\n\tClassDB::bind_method(D_METHOD(\"cast_starts\", \"info\"), &Spell::cast_starts);\n\tClassDB::bind_method(D_METHOD(\"cast_starts_triggered\", \"info\"), &Spell::cast_starts_triggered);\n\tClassDB::bind_method(D_METHOD(\"cast_interrupts\", \"info\"), &Spell::cast_interrupts);\n\tClassDB::bind_method(D_METHOD(\"cast_finishs\", \"info\"), &Spell::cast_finishs);\n\n\t//GDVIRTUAL_BIND(\"_cast_starts\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_cast_starts_triggered\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_cast_interrupts\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_cast_finishs\", \"info\", \"SpellCastInfo\");\n\n\t//Aura Commands\n\tClassDB::bind_method(D_METHOD(\"aura_sapply\", \"info\"), &Spell::aura_sapply);\n\tClassDB::bind_method(D_METHOD(\"aura_sdeapply\", \"aura\"), &Spell::aura_sdeapply);\n\tClassDB::bind_method(D_METHOD(\"aura_sadd\", \"aura\"), &Spell::aura_sadd);\n\tClassDB::bind_method(D_METHOD(\"aura_sremove\", \"aura\"), &Spell::aura_sremove);\n\tClassDB::bind_method(D_METHOD(\"aura_removes_expired\", \"aura\"), &Spell::aura_removes_expired);\n\tClassDB::bind_method(D_METHOD(\"aura_removes_dispell\", \"aura\"), &Spell::aura_removes_dispell);\n\tClassDB::bind_method(D_METHOD(\"aura_supdate\", \"aura\", \"delta\"), &Spell::aura_supdate);\n\n\t//GDVIRTUAL_BIND(\"_aura_sapply\", \"info\", \"AuraApplyInfo\");\n\t//GDVIRTUAL_BIND(\"_aura_sdeapply\", \"info\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_aura_sadd\", \"aura\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_aura_sremove\", \"aura\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_aura_removes_expired\", \"info\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_aura_removes_dispell\", \"info\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_aura_supdate\", \"info\", \"AuraData\", \"delta\");\n\n\tClassDB::bind_method(D_METHOD(\"_aura_sapply\", \"info\"), &Spell::_aura_sapply);\n\tClassDB::bind_method(D_METHOD(\"_aura_sdeapply\", \"aura\"), &Spell::_aura_sdeapply);\n\tClassDB::bind_method(D_METHOD(\"_aura_sadd\", \"aura\"), &Spell::_aura_sadd);\n\tClassDB::bind_method(D_METHOD(\"_aura_sremove\", \"aura\"), &Spell::_aura_sremove);\n\tClassDB::bind_method(D_METHOD(\"_aura_removes_expired\", \"aura\"), &Spell::_aura_removes_expired);\n\tClassDB::bind_method(D_METHOD(\"_aura_removes_dispell\", \"aura\"), &Spell::_aura_removes_dispell);\n\tClassDB::bind_method(D_METHOD(\"_aura_supdate\", \"aura\", \"delta\"), &Spell::_aura_supdate);\n\n\t//Eventhandlers\n\tClassDB::bind_method(D_METHOD(\"son_cast_player_moved\", \"info\"), &Spell::son_cast_player_moved);\n\tClassDB::bind_method(D_METHOD(\"son_cast_damage_received\", \"info\"), &Spell::son_cast_damage_received);\n\tClassDB::bind_method(D_METHOD(\"son_spell_hit\", \"info\"), &Spell::son_spell_hit);\n\tClassDB::bind_method(D_METHOD(\"son_physics_process\", \"info\", \"delta\"), &Spell::son_physics_process);\n\n\t//GDVIRTUAL_BIND(\"_son_cast_player_moved\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_son_cast_damage_received\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_son_spell_hit\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_son_physics_process\", \"info\", \"SpellCastInfo\", \"delta\");\n\n\t//Clientside Event Handlers\n\t//GDVIRTUAL_BIND(\"_notification_scast\", \"what\", \"info\", \"SpellCastInfo\");\n\tClassDB::bind_method(D_METHOD(\"notification_scast\", \"what\", \"info\"), &Spell::notification_scast);\n\n\t//GDVIRTUAL_BIND(\"_notification_ccast\", \"what\", \"info\", \"SpellCastInfo\");\n\tClassDB::bind_method(D_METHOD(\"notification_ccast\", \"what\", \"info\"), &Spell::notification_ccast);\n\n\t//Aura EventHandlers\n\t//GDVIRTUAL_BIND(\"_notification_saura\", \"what\", \"data\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_notification_sheal\", \"what\", \"data\", \"AuraData\", \"data\", \"SpellHealInfo\");\n\t//GDVIRTUAL_BIND(\"_notification_aura_scast\", \"what\", \"data\", \"AuraData\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_notification_sdamage\", \"what\", \"data\", \"AuraData\", \"data\", \"SpellDamageInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"notification_saura\", \"what\", \"data\"), &Spell::notification_saura);\n\tClassDB::bind_method(D_METHOD(\"notification_sheal\", \"what\", \"aura\", \"info\"), &Spell::notification_sheal);\n\tClassDB::bind_method(D_METHOD(\"notification_aura_scast\", \"what\", \"aura\", \"info\"), &Spell::notification_aura_scast);\n\tClassDB::bind_method(D_METHOD(\"notification_sdamage\", \"what\", \"aura\", \"info\"), &Spell::notification_sdamage);\n\n\tClassDB::bind_method(D_METHOD(\"son_remove\", \"aura\"), &Spell::son_remove);\n\tClassDB::bind_method(D_METHOD(\"son_remove_expired\", \"aura\"), &Spell::son_remove_expired);\n\tClassDB::bind_method(D_METHOD(\"son_remove_dispell\", \"aura\"), &Spell::son_remove_dispell);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sdeath\", \"data\"), &Spell::notification_sdeath);\n\n\tClassDB::bind_method(D_METHOD(\"notification_scooldown_added\", \"data\", \"cooldown\"), &Spell::notification_scooldown_added);\n\tClassDB::bind_method(D_METHOD(\"notification_scooldown_removed\", \"data\", \"cooldown\"), &Spell::notification_scooldown_removed);\n\n\tClassDB::bind_method(D_METHOD(\"notification_scategory_cooldown_added\", \"data\", \"category_cooldown\"), &Spell::notification_scategory_cooldown_added);\n\tClassDB::bind_method(D_METHOD(\"notification_scategory_cooldown_removed\", \"data\", \"category_cooldown\"), &Spell::notification_scategory_cooldown_removed);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sgcd_started\", \"data\", \"gcd\"), &Spell::notification_sgcd_started);\n\tClassDB::bind_method(D_METHOD(\"notification_sgcd_finished\", \"data\"), &Spell::notification_sgcd_finished);\n\n\tClassDB::bind_method(D_METHOD(\"son_physics_process_aura\", \"data\"), &Spell::son_physics_process_aura);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sxp_gained\", \"data\", \"value\"), &Spell::notification_sxp_gained);\n\tClassDB::bind_method(D_METHOD(\"notification_slevel_up\", \"data\", \"value\"), &Spell::notification_slevel_up);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sentity_resource_added\", \"data\", \"value\"), &Spell::notification_sentity_resource_added);\n\tClassDB::bind_method(D_METHOD(\"notification_sentity_resource_removed\", \"data\", \"value\"), &Spell::notification_sentity_resource_removed);\n\n\t//GDVIRTUAL_BIND(\"_son_remove\", \"data\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_son_remove_expired\", \"data\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_son_remove_dispell\", \"data\", \"AuraData\");\n\n\t//GDVIRTUAL_BIND(\"_notification_sdeath\", \"data\", \"AuraData\");\n\n\t//GDVIRTUAL_BIND(\"_notification_scooldown_added\", \"data\", \"AuraData\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_scooldown_removed\", \"data\", \"AuraData\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_scategory_cooldown_added\", \"data\", \"AuraData\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_scategory_cooldown_removed\", \"data\", \"AuraData\", \"id\", \"value\");\n\n\t//GDVIRTUAL_BIND(\"_notification_sgcd_started\", \"data\", \"AuraData\", \"gcd\");\n\t//GDVIRTUAL_BIND(\"_notification_sgcd_finished\", \"data\", \"AuraData\");\n\n\t//GDVIRTUAL_BIND(\"_son_physics_process_aura\", \"data\", \"AuraData\");\n\n\t//GDVIRTUAL_BIND(\"_notification_sxp_gained\", \"data\", \"AuraData\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_slevel_up\", \"data\", \"AuraData\", \"value\");\n\n\t//GDVIRTUAL_BIND(\"_notification_sentity_resource_added\", \"data\", \"AuraData\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_sentity_resource_removed\", \"data\", \"AuraData\", \"value\");\n\n\t//Aura Clientside Event Handlers\n\t//GDVIRTUAL_BIND(\"_notification_caura\", \"what\", \"data\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_notification_cheal\", \"what\", \"data\", \"AuraData\", \"data\", \"SpellHealInfo\");\n\t//GDVIRTUAL_BIND(\"_notification_aura_ccast\", \"what\", \"data\", \"AuraData\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_notification_cdamage\", \"what\", \"data\", \"AuraData\", \"data\", \"SpellDamageInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"notification_caura\", \"what\", \"data\"), &Spell::notification_caura);\n\tClassDB::bind_method(D_METHOD(\"notification_cheal\", \"what\", \"aura\", \"info\"), &Spell::notification_cheal);\n\tClassDB::bind_method(D_METHOD(\"notification_aura_ccast\", \"what\", \"aura\", \"info\"), &Spell::notification_aura_ccast);\n\tClassDB::bind_method(D_METHOD(\"notification_cdamage\", \"what\", \"aura\", \"info\"), &Spell::notification_cdamage);\n\n\tClassDB::bind_method(D_METHOD(\"notification_cdeath\", \"data\"), &Spell::notification_cdeath);\n\n\tClassDB::bind_method(D_METHOD(\"notification_ccooldown_added\", \"data\", \"info\"), &Spell::notification_ccooldown_added);\n\tClassDB::bind_method(D_METHOD(\"notification_ccooldown_removed\", \"data\", \"info\"), &Spell::notification_ccooldown_removed);\n\tClassDB::bind_method(D_METHOD(\"notification_ccategory_cooldown_added\", \"data\", \"info\"), &Spell::notification_ccategory_cooldown_added);\n\tClassDB::bind_method(D_METHOD(\"notification_ccategory_cooldown_removed\", \"data\", \"info\"), &Spell::notification_ccategory_cooldown_removed);\n\n\tClassDB::bind_method(D_METHOD(\"notification_cgcd_started\", \"data\", \"info\"), &Spell::notification_cgcd_started);\n\tClassDB::bind_method(D_METHOD(\"notification_cgcd_finished\", \"data\"), &Spell::notification_cgcd_finished);\n\n\tClassDB::bind_method(D_METHOD(\"notification_cxp_gained\", \"data\", \"value\"), &Spell::notification_cxp_gained);\n\tClassDB::bind_method(D_METHOD(\"notification_clevel_up\", \"data\", \"value\"), &Spell::notification_clevel_up);\n\n\tClassDB::bind_method(D_METHOD(\"notification_centity_resource_added\", \"data\", \"value\"), &Spell::notification_centity_resource_added);\n\tClassDB::bind_method(D_METHOD(\"notification_centity_resource_removed\", \"data\", \"value\"), &Spell::notification_centity_resource_removed);\n\n\t//GDVIRTUAL_BIND(\"_con_cast_failed\", \"data\", \"AuraData\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_con_cast_started\", \"data\", \"AuraData\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_con_cast_state_changed\", \"data\", \"AuraData\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_con_cast_finished\", \"data\", \"AuraData\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_con_spell_cast_success\", \"data\", \"AuraData\", \"info\", \"SpellCastInfo\");\n\n\t//GDVIRTUAL_BIND(\"_notification_cdeath\", \"data\", \"AuraData\");\n\n\t//GDVIRTUAL_BIND(\"_notification_ccooldown_added\", \"data\", \"AuraData\",  \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_ccooldown_removed\", \"data\", \"AuraData\",  \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_ccategory_cooldown_added\", \"data\", \"AuraData\",  \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_ccategory_cooldown_removed\", \"data\", \"AuraData\",  \"id\", \"value\");\n\n\t//GDVIRTUAL_BIND(\"_con_aura_added\", \"data\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_con_aura_removed\", \"data\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_con_aura_refresh\", \"data\", \"AuraData\");\n\n\t//GDVIRTUAL_BIND(\"_con_damage_dealt\", \"data\", \"AuraData\", \"info\", \"SpellDamageInfo\");\n\t//GDVIRTUAL_BIND(\"_con_dealt_damage\", \"data\", \"AuraData\", \"info\", \"SpellDamageInfo\");\n\t//GDVIRTUAL_BIND(\"_con_heal_dealt\", \"data\", \"AuraData\", \"info\", \"SpellHealInfo\");\n\t//GDVIRTUAL_BIND(\"_con_dealt_heal\", \"data\", \"AuraData\", \"info\", \"SpellHealInfo\");\n\n\t//GDVIRTUAL_BIND(\"_notification_cgcd_started\", \"data\", \"AuraData\", \"gcd\");\n\t//GDVIRTUAL_BIND(\"_notification_cgcd_finished\", \"data\", \"AuraData\");\n\n\t//GDVIRTUAL_BIND(\"_notification_cxp_gained\", \"data\", \"AuraData\",  \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_clevel_up\", \"data\", \"AuraData\",  \"value\");\n\n\t//GDVIRTUAL_BIND(\"_notification_centity_resource_added\", \"data\", \"AuraData\",  \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_centity_resource_removed\", \"data\", \"AuraData\",  \"value\");\n\n\t//Equipment\n\n\t//GDVIRTUAL_BIND(\"_equip_should_deny\", \"data\", \"AuraData\", \"equip_slot\", \"item\", \"ItemInstance\");\n\n\t//GDVIRTUAL_BIND(\"_equip_son_success\", \"data\", \"AuraData\", \"equip_slot\", \"item\", \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\t//GDVIRTUAL_BIND(\"_equip_son_fail\", \"data\", \"AuraData\", \"equip_slot\", \"item\", \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\t//GDVIRTUAL_BIND(\"_equip_con_success\", \"data\", \"AuraData\", \"equip_slot\", \"item\", \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\t//GDVIRTUAL_BIND(\"_equip_con_fail\", \"data\", \"AuraData\", \"equip_slot\", \"item\", \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\n\tClassDB::bind_method(D_METHOD(\"equip_should_deny\", \"data\", \"equip_slot\", \"item\"), &Spell::equip_should_deny);\n\n\tClassDB::bind_method(D_METHOD(\"equip_son_success\", \"data\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &Spell::equip_son_success);\n\tClassDB::bind_method(D_METHOD(\"equip_son_fail\", \"data\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &Spell::equip_son_fail);\n\tClassDB::bind_method(D_METHOD(\"equip_con_success\", \"data\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &Spell::equip_con_success);\n\tClassDB::bind_method(D_METHOD(\"equip_con_fail\", \"data\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &Spell::equip_con_fail);\n\n\t//Calculations / Queries\n\tClassDB::bind_method(D_METHOD(\"calculate_initial_damage\", \"data\"), &Spell::calculate_initial_damage);\n\tClassDB::bind_method(D_METHOD(\"handle_spell_damage\", \"data\"), &Spell::handle_spell_damage);\n\n\t//GDVIRTUAL_BIND(\"_calculate_initial_damage\", \"data\", \"SpellDamageInfo\");\n\t//GDVIRTUAL_BIND(\"_handle_spell_damage\", \"data\", \"SpellDamageInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"calculate_initial_heal\", \"data\"), &Spell::calculate_initial_heal);\n\tClassDB::bind_method(D_METHOD(\"handle_spell_heal\", \"data\"), &Spell::handle_spell_heal);\n\n\t//GDVIRTUAL_BIND(\"_calculate_initial_heal\", \"data\", \"SpellHealInfo\");\n\t//GDVIRTUAL_BIND(\"_handle_spell_heal\", \"data\", \"SpellHealInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"handle_projectile\", \"info\"), &Spell::handle_projectile);\n\tClassDB::bind_method(D_METHOD(\"handle_effect\", \"info\"), &Spell::handle_effect);\n\n\t//GDVIRTUAL_BIND(\"_handle_projectile\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_handle_effect\", \"info\", \"SpellCastInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"handle_gcd\", \"info\"), &Spell::handle_gcd);\n\tClassDB::bind_method(D_METHOD(\"handle_cooldown\", \"info\"), &Spell::handle_cooldown);\n\n\t//Implementations\n\tClassDB::bind_method(D_METHOD(\"_cast_starts\", \"info\"), &Spell::_cast_starts);\n\tClassDB::bind_method(D_METHOD(\"_cast_finishs\", \"info\"), &Spell::_cast_finishs);\n\n\tClassDB::bind_method(D_METHOD(\"_son_cast_player_moved\", \"info\"), &Spell::_son_cast_player_moved);\n\tClassDB::bind_method(D_METHOD(\"_son_spell_hit\", \"info\"), &Spell::_son_spell_hit);\n\n\tClassDB::bind_method(D_METHOD(\"_calculate_initial_damage\", \"info\"), &Spell::_calculate_initial_damage);\n\tClassDB::bind_method(D_METHOD(\"_handle_spell_damage\", \"info\"), &Spell::_handle_spell_damage);\n\n\tClassDB::bind_method(D_METHOD(\"_calculate_initial_heal\", \"info\"), &Spell::_calculate_initial_heal);\n\tClassDB::bind_method(D_METHOD(\"_handle_spell_heal\", \"info\"), &Spell::_handle_spell_heal);\n\n\tClassDB::bind_method(D_METHOD(\"_handle_projectile\", \"info\"), &Spell::_handle_projectile);\n\tClassDB::bind_method(D_METHOD(\"_handle_effect\", \"info\"), &Spell::_handle_effect);\n\n\t//Aura Calculations / Queries\n\tClassDB::bind_method(D_METHOD(\"setup_aura_data\", \"data\", \"info\"), &Spell::setup_aura_data);\n\n\t//GDVIRTUAL_BIND(\"_setup_aura_data\", \"data\", \"AuraData\", \"info\", \"AuraApplyInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"_setup_aura_data\", \"data\", \"info\"), &Spell::_setup_aura_data);\n\n\t//damage\n\tClassDB::bind_method(D_METHOD(\"aura_sapply_passives_damage_receive\", \"data\"), &Spell::aura_sapply_passives_damage_receive);\n\tClassDB::bind_method(D_METHOD(\"aura_sapply_passives_damage_deal\", \"data\"), &Spell::aura_sapply_passives_damage_deal);\n\tClassDB::bind_method(D_METHOD(\"aura_calculate_initial_damage\", \"aura_data\", \"info\"), &Spell::aura_calculate_initial_damage);\n\tClassDB::bind_method(D_METHOD(\"handle_aura_damage\", \"aura_data\", \"data\"), &Spell::handle_aura_damage);\n\n\t//GDVIRTUAL_BIND(\"_aura_sapply_passives_damage_receive\", \"data\", \"SpellDamageInfo\");\n\t//GDVIRTUAL_BIND(\"_aura_sapply_passives_damage_deal\", \"data\", \"SpellDamageInfo\");\n\t//GDVIRTUAL_BIND(\"_aura_calculate_initial_damage\", \"data\", \"AuraData\", \"info\", \"AuraApplyInfo\");\n\t//GDVIRTUAL_BIND(\"_handle_aura_damage\", \"data\", \"AuraData\", \"info\", \"SpellDamageInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"_aura_sapply_passives_damage_receive\", \"info\"), &Spell::_aura_sapply_passives_damage_receive);\n\tClassDB::bind_method(D_METHOD(\"_aura_sapply_passives_damage_deal\", \"info\"), &Spell::_aura_sapply_passives_damage_deal);\n\tClassDB::bind_method(D_METHOD(\"_aura_calculate_initial_damage\", \"aura_data\", \"info\"), &Spell::_aura_calculate_initial_damage);\n\tClassDB::bind_method(D_METHOD(\"_handle_aura_damage\", \"aura_data\", \"info\"), &Spell::_handle_aura_damage);\n\n\t//heal\n\tClassDB::bind_method(D_METHOD(\"aura_sapply_passives_heal_receive\", \"data\"), &Spell::aura_sapply_passives_heal_receive);\n\tClassDB::bind_method(D_METHOD(\"aura_sapply_passives_heal_deal\", \"data\"), &Spell::aura_sapply_passives_heal_deal);\n\tClassDB::bind_method(D_METHOD(\"aura_calculate_initial_heal\", \"aura_data\", \"info\"), &Spell::aura_calculate_initial_heal);\n\tClassDB::bind_method(D_METHOD(\"handle_aura_heal\", \"aura_data\", \"data\"), &Spell::handle_aura_heal);\n\n\t//GDVIRTUAL_BIND(\"_aura_sapply_passives_heal_receive\", \"info\", \"SpellDamageInfo\");\n\t//GDVIRTUAL_BIND(\"_aura_sapply_passives_heal_deal\", \"info\", \"SpellDamageInfo\");\n\t//GDVIRTUAL_BIND(\"_aura_calculate_initial_heal\", \"aura_data\", \"AuraData\", \"info\", \"AuraApplyInfo\");\n\t//GDVIRTUAL_BIND(\"_handle_aura_heal\", \"aura_data\", \"AuraData\", \"spell_heal_info\", \"SpellHealInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"_aura_sapply_passives_heal_receive\", \"info\"), &Spell::_aura_sapply_passives_heal_receive);\n\tClassDB::bind_method(D_METHOD(\"_aura_sapply_passives_heal_deal\", \"info\"), &Spell::_aura_sapply_passives_heal_deal);\n\tClassDB::bind_method(D_METHOD(\"_aura_calculate_initial_heal\", \"aura_data\", \"info\"), &Spell::_aura_calculate_initial_heal);\n\tClassDB::bind_method(D_METHOD(\"_handle_aura_heal\", \"aura_data\", \"info\"), &Spell::_handle_aura_heal);\n\n\t//Properties\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &Spell::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &Spell::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"spell_type_get\"), &Spell::spell_type_get);\n\tClassDB::bind_method(D_METHOD(\"spell_type_set\", \"value\"), &Spell::spell_type_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"spell_type\", PROPERTY_HINT_FLAGS, SpellEnums::BINDING_STRING_SPELL_TYPES), \"spell_type_set\", \"spell_type_get\");\n\n\tClassDB::bind_method(D_METHOD(\"get_spell_category\"), &Spell::get_spell_category);\n\tClassDB::bind_method(D_METHOD(\"set_spell_category\", \"value\"), &Spell::set_spell_category);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"spell_category\", PROPERTY_HINT_ENUM, SpellEnums::BINDING_STRING_SPELL_CATEGORY), \"set_spell_category\", \"get_spell_category\");\n\n\tClassDB::bind_method(D_METHOD(\"get_hide_from_actionbar\"), &Spell::get_hide_from_actionbar);\n\tClassDB::bind_method(D_METHOD(\"set_hide_from_actionbar\", \"value\"), &Spell::set_hide_from_actionbar);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"hide_from_actionbar\"), \"set_hide_from_actionbar\", \"get_hide_from_actionbar\");\n\n\tClassDB::bind_method(D_METHOD(\"get_target_type\"), &Spell::get_target_type);\n\tClassDB::bind_method(D_METHOD(\"set_target_type\", \"value\"), &Spell::set_target_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"target_type\", PROPERTY_HINT_ENUM, \"Self, Target, Around, Front, Around Target\"), \"set_target_type\", \"get_target_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_target_relation_type\"), &Spell::get_target_relation_type);\n\tClassDB::bind_method(D_METHOD(\"set_target_relation_type\", \"value\"), &Spell::set_target_relation_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"target_relation_type\", PROPERTY_HINT_FLAGS, \"Self, Enemy, Friendly\"), \"set_target_relation_type\", \"get_target_relation_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_level\"), &Spell::get_level);\n\tClassDB::bind_method(D_METHOD(\"set_level\", \"value\"), &Spell::set_level);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"level\"), \"set_level\", \"get_level\");\n\n\tClassDB::bind_method(D_METHOD(\"get_rank\"), &Spell::get_rank);\n\tClassDB::bind_method(D_METHOD(\"set_rank\", \"value\"), &Spell::set_rank);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"rank\"), \"set_rank\", \"get_rank\");\n\n\tClassDB::bind_method(D_METHOD(\"get_is_local_spell\"), &Spell::get_is_local_spell);\n\tClassDB::bind_method(D_METHOD(\"set_is_local_spell\", \"value\"), &Spell::set_is_local_spell);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"is_local_spell\"), \"set_is_local_spell\", \"get_is_local_spell\");\n\n\tClassDB::bind_method(D_METHOD(\"get_icon\"), &Spell::get_icon);\n\tClassDB::bind_method(D_METHOD(\"set_icon\", \"value\"), &Spell::set_icon);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"icon\", PROPERTY_HINT_RESOURCE_TYPE, \"Texture\"), \"set_icon\", \"get_icon\");\n\n\tClassDB::bind_method(D_METHOD(\"get_needs_target\"), &Spell::get_needs_target);\n\tClassDB::bind_method(D_METHOD(\"set_needs_target\", \"value\"), &Spell::set_needs_target);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"needs_target\"), \"set_needs_target\", \"get_needs_target\");\n\n\tClassDB::bind_method(D_METHOD(\"get_scale_with_level\"), &Spell::get_scale_with_level);\n\tClassDB::bind_method(D_METHOD(\"set_scale_with_level\", \"value\"), &Spell::set_scale_with_level);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"scale_with_level\"), \"set_scale_with_level\", \"get_scale_with_level\");\n\n\tClassDB::bind_method(D_METHOD(\"get_visual_spell_effects\"), &Spell::get_visual_spell_effects);\n\tClassDB::bind_method(D_METHOD(\"set_visual_spell_effects\", \"value\"), &Spell::set_visual_spell_effects);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"visual_spell_effects\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellEffectVisual\"), \"set_visual_spell_effects\", \"get_visual_spell_effects\");\n\n\tClassDB::bind_method(D_METHOD(\"get_teaches_craft_recipe\"), &Spell::get_teaches_craft_recipe);\n\tClassDB::bind_method(D_METHOD(\"set_teaches_craft_recipe\", \"value\"), &Spell::set_teaches_craft_recipe);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"teaches_craft_recipe\", PROPERTY_HINT_RESOURCE_TYPE, \"CraftRecipe\"), \"set_teaches_craft_recipe\", \"get_teaches_craft_recipe\");\n\n\tADD_GROUP(\"Spells Cast\", \"spells_cast_\");\n\n\t//ADD_GROUP(\"Caster Aura Applys\", \"caster_aura_applys\");\n\tClassDB::bind_method(D_METHOD(\"spells_cast_on_caster_num_get\"), &Spell::spells_cast_on_caster_num_get);\n\tClassDB::bind_method(D_METHOD(\"spells_cast_on_caster_num_set\", \"value\"), &Spell::spells_cast_on_caster_num_set);\n\n\tClassDB::bind_method(D_METHOD(\"spell_cast_on_caster_get\", \"index\"), &Spell::spell_cast_on_caster_get);\n\tClassDB::bind_method(D_METHOD(\"spell_cast_on_caster_set\", \"index\", \"spell\"), &Spell::spell_cast_on_caster_set);\n\n\tClassDB::bind_method(D_METHOD(\"spells_cast_on_caster_get\"), &Spell::spells_cast_on_caster_get);\n\tClassDB::bind_method(D_METHOD(\"spells_cast_on_caster_set\", \"caster_aura_applys\"), &Spell::spells_cast_on_caster_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"spells_cast_on_caster\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"spells_cast_on_caster_set\", \"spells_cast_on_caster_get\");\n\n\t//ADD_GROUP(\"Target Aura Apply\", \"target_aura_applys\");\n\tClassDB::bind_method(D_METHOD(\"spells_cast_on_target_num_get\"), &Spell::spells_cast_on_target_num_get);\n\tClassDB::bind_method(D_METHOD(\"spells_cast_on_target_num_set\", \"value\"), &Spell::spells_cast_on_target_num_set);\n\n\tClassDB::bind_method(D_METHOD(\"spell_cast_on_target_get\", \"index\"), &Spell::spell_cast_on_target_get);\n\tClassDB::bind_method(D_METHOD(\"spell_cast_on_target_set\", \"index\", \"spell\"), &Spell::spell_cast_on_target_set);\n\n\tClassDB::bind_method(D_METHOD(\"spells_cast_on_target_get\"), &Spell::spells_cast_on_target_get);\n\tClassDB::bind_method(D_METHOD(\"spells_cast_on_target_set\", \"target_aura_applys\"), &Spell::spells_cast_on_target_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"spells_cast_on_target\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"spells_cast_on_target_set\", \"spells_cast_on_target_get\");\n\n\t//ADD_GROUP(\"Apply Auras On Learn\", \"on_learn_auras\");\n\tClassDB::bind_method(D_METHOD(\"on_learn_cast_spells_num_get\"), &Spell::on_learn_cast_spells_num_get);\n\tClassDB::bind_method(D_METHOD(\"on_learn_cast_spells_num_set\", \"value\"), &Spell::on_learn_cast_spells_num_set);\n\n\tClassDB::bind_method(D_METHOD(\"spell_cast_on_learn_get\", \"index\"), &Spell::spell_cast_on_learn_get);\n\tClassDB::bind_method(D_METHOD(\"spell_cast_on_learn_set\", \"index\", \"spell\"), &Spell::spell_cast_on_learn_set);\n\n\tClassDB::bind_method(D_METHOD(\"spells_cast_on_learn_get\"), &Spell::spells_cast_on_learn_get);\n\tClassDB::bind_method(D_METHOD(\"spells_cast_on_learn_set\", \"spells\"), &Spell::spells_cast_on_learn_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"spells_cast_on_learn\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"spells_cast_on_learn_set\", \"spells_cast_on_learn_get\");\n\n\tADD_GROUP(\"Texts\", \"text\");\n\t//GDVIRTUAL_BIND(\"_get_description\", \"class_level\", \"character_level\");\n\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_name\", \"get_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_text_translation_key\"), &Spell::get_text_translation_key);\n\tClassDB::bind_method(D_METHOD(\"set_text_translation_key\", \"value\"), &Spell::set_text_description);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_translation_key\"), \"set_text_translation_key\", \"get_text_translation_key\");\n\n\tClassDB::bind_method(D_METHOD(\"get_text_description\"), &Spell::get_text_description);\n\tClassDB::bind_method(D_METHOD(\"set_text_description\", \"value\"), &Spell::set_text_description);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_description\", PROPERTY_HINT_MULTILINE_TEXT), \"set_text_description\", \"get_text_description\");\n\n\tClassDB::bind_method(D_METHOD(\"get_name_translated\"), &Spell::get_name_translated);\n\tClassDB::bind_method(D_METHOD(\"get_description\", \"class_level\", \"character_level\"), &Spell::get_description);\n\tClassDB::bind_method(D_METHOD(\"_get_description\", \"class_level\", \"character_level\"), &Spell::_get_description);\n\n\tADD_GROUP(\"Cooldown\", \"cooldown\");\n\tClassDB::bind_method(D_METHOD(\"get_cooldown\"), &Spell::get_cooldown);\n\tClassDB::bind_method(D_METHOD(\"set_cooldown\", \"value\"), &Spell::set_cooldown);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"cooldown_cooldown\"), \"set_cooldown\", \"get_cooldown\");\n\n\tClassDB::bind_method(D_METHOD(\"get_global_cooldown_enabled\"), &Spell::get_global_cooldown_enabled);\n\tClassDB::bind_method(D_METHOD(\"set_global_cooldown_enabled\", \"value\"), &Spell::set_global_cooldown_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"cooldown_global_cooldown_enabled\"), \"set_global_cooldown_enabled\", \"get_global_cooldown_enabled\");\n\n\tADD_GROUP(\"Range\", \"range\");\n\tClassDB::bind_method(D_METHOD(\"range_get_enabled\"), &Spell::range_get_enabled);\n\tClassDB::bind_method(D_METHOD(\"range_set_enabled\", \"value\"), &Spell::range_set_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"range_enabled\"), \"range_set_enabled\", \"range_get_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"range_get\"), &Spell::range_get);\n\tClassDB::bind_method(D_METHOD(\"range_set\", \"value\"), &Spell::range_set);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"range_range\"), \"range_set\", \"range_get\");\n\n\tADD_GROUP(\"Cast\", \"cast\");\n\tClassDB::bind_method(D_METHOD(\"cast_time_get_enabled\"), &Spell::cast_time_get_enabled);\n\tClassDB::bind_method(D_METHOD(\"cast_time_set_enabled\", \"value\"), &Spell::cast_time_set_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"cast_enabled\"), \"cast_time_set_enabled\", \"cast_time_get_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"cast_time_get\"), &Spell::cast_time_get);\n\tClassDB::bind_method(D_METHOD(\"cast_time_set\", \"value\"), &Spell::cast_time_set);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"cast_cast_time\"), \"cast_time_set\", \"cast_time_get\");\n\n\tClassDB::bind_method(D_METHOD(\"get_can_move_while_casting\"), &Spell::get_can_move_while_casting);\n\tClassDB::bind_method(D_METHOD(\"set_can_move_while_casting\", \"value\"), &Spell::set_can_move_while_casting);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"cast_can_move_while_casting\"), \"set_can_move_while_casting\", \"get_can_move_while_casting\");\n\n\tADD_GROUP(\"Projectile\", \"projectile\");\n\tClassDB::bind_method(D_METHOD(\"projectile_get_use_time\"), &Spell::projectile_get_use_time);\n\tClassDB::bind_method(D_METHOD(\"projectile_set_use_time\", \"value\"), &Spell::projectile_set_use_time);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"projectile_use_time\"), \"projectile_set_use_time\", \"projectile_get_use_time\");\n\n\tClassDB::bind_method(D_METHOD(\"projectile_get_time\"), &Spell::projectile_get_time);\n\tClassDB::bind_method(D_METHOD(\"projectile_set_time\", \"value\"), &Spell::projectile_set_time);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"projectile_time\"), \"projectile_set_time\", \"projectile_get_time\");\n\n\tClassDB::bind_method(D_METHOD(\"projectile_get_use_speed\"), &Spell::projectile_get_use_speed);\n\tClassDB::bind_method(D_METHOD(\"projectile_set_use_speed\", \"value\"), &Spell::projectile_set_use_speed);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"projectile_use_speed\"), \"projectile_set_use_speed\", \"projectile_get_use_speed\");\n\n\tClassDB::bind_method(D_METHOD(\"projectile_get_speed\"), &Spell::projectile_get_speed);\n\tClassDB::bind_method(D_METHOD(\"projectile_set_speed\", \"value\"), &Spell::projectile_set_speed);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"projectile_speed\"), \"projectile_set_speed\", \"projectile_get_speed\");\n\n\tClassDB::bind_method(D_METHOD(\"projectile_get_scene\"), &Spell::projectile_get_scene);\n\tClassDB::bind_method(D_METHOD(\"projectile_set_scene\", \"value\"), &Spell::projectile_set_scene);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"projectile_scene\", PROPERTY_HINT_RESOURCE_TYPE, \"PackedScene\"), \"projectile_set_scene\", \"projectile_get_scene\");\n\n\tADD_GROUP(\"Damage\", \"damage\");\n\tClassDB::bind_method(D_METHOD(\"damage_get_enabled\"), &Spell::damage_get_enabled);\n\tClassDB::bind_method(D_METHOD(\"damage_set_enabled\", \"value\"), &Spell::damage_set_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"damage_enabled\"), \"damage_set_enabled\", \"damage_get_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"damage_get_type\"), &Spell::damage_get_type);\n\tClassDB::bind_method(D_METHOD(\"damage_set_type\", \"value\"), &Spell::damage_set_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"damage_type\", PROPERTY_HINT_FLAGS, SpellEnums::BINDING_STRING_DAMAGE_TYPES), \"damage_set_type\", \"damage_get_type\");\n\n\tClassDB::bind_method(D_METHOD(\"damage_get_min\"), &Spell::damage_get_min);\n\tClassDB::bind_method(D_METHOD(\"damage_set_min\", \"value\"), &Spell::damage_set_min);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"damage_min\"), \"damage_set_min\", \"damage_get_min\");\n\n\tClassDB::bind_method(D_METHOD(\"damage_get_max\"), &Spell::damage_get_max);\n\tClassDB::bind_method(D_METHOD(\"damage_set_max\", \"value\"), &Spell::damage_set_max);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"damage_max\"), \"damage_set_max\", \"damage_get_max\");\n\n\tClassDB::bind_method(D_METHOD(\"damage_get_scale_stat\"), &Spell::damage_get_scale_stat);\n\tClassDB::bind_method(D_METHOD(\"damage_set_scale_stat\", \"value\"), &Spell::damage_set_scale_stat);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"damage_scale_stat\", PROPERTY_HINT_ENUM, \"\"), \"damage_set_scale_stat\", \"damage_get_scale_stat\");\n\n\tClassDB::bind_method(D_METHOD(\"damage_get_scale_coeff\"), &Spell::damage_get_scale_coeff);\n\tClassDB::bind_method(D_METHOD(\"damage_set_scale_coeff\", \"value\"), &Spell::damage_set_scale_coeff);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"damage_scale_coeff\"), \"damage_set_scale_coeff\", \"damage_get_scale_coeff\");\n\n\tADD_GROUP(\"Heal\", \"heal\");\n\tClassDB::bind_method(D_METHOD(\"heal_get_enabled\"), &Spell::heal_get_enabled);\n\tClassDB::bind_method(D_METHOD(\"heal_set_enabled\", \"value\"), &Spell::heal_set_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"heal_enabled\"), \"heal_set_enabled\", \"heal_get_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"heal_get_min\"), &Spell::heal_get_min);\n\tClassDB::bind_method(D_METHOD(\"heal_set_min\", \"value\"), &Spell::heal_set_min);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"heal_min\"), \"heal_set_min\", \"heal_get_min\");\n\n\tClassDB::bind_method(D_METHOD(\"heal_get_max\"), &Spell::heal_get_max);\n\tClassDB::bind_method(D_METHOD(\"heal_set_max\", \"value\"), &Spell::heal_set_max);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"heal_max\"), \"heal_set_max\", \"heal_get_max\");\n\n\tClassDB::bind_method(D_METHOD(\"heal_get_scale_stat\"), &Spell::heal_get_scale_stat);\n\tClassDB::bind_method(D_METHOD(\"heal_set_scale_stat\", \"value\"), &Spell::heal_set_scale_stat);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"heal_scale_stat\", PROPERTY_HINT_ENUM, \"\"), \"heal_set_scale_stat\", \"heal_get_scale_stat\");\n\n\tClassDB::bind_method(D_METHOD(\"heal_get_scale_coeff\"), &Spell::heal_get_scale_coeff);\n\tClassDB::bind_method(D_METHOD(\"heal_set_scale_coeff\", \"value\"), &Spell::heal_set_scale_coeff);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"heal_scale_coeff\"), \"heal_set_scale_coeff\", \"heal_get_scale_coeff\");\n\n\tADD_GROUP(\"Dispell\", \"dispell\");\n\tClassDB::bind_method(D_METHOD(\"dispell_get_enabled\"), &Spell::dispell_get_enabled);\n\tClassDB::bind_method(D_METHOD(\"dispell_set_enabled\", \"value\"), &Spell::dispell_set_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"dispell_enabled\"), \"dispell_set_enabled\", \"dispell_get_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"dispell_get_count_min\"), &Spell::dispell_get_count_min);\n\tClassDB::bind_method(D_METHOD(\"dispell_set_count_min\", \"value\"), &Spell::dispell_set_count_min);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"dispell_count_min\"), \"dispell_set_count_min\", \"dispell_get_count_min\");\n\n\tClassDB::bind_method(D_METHOD(\"dispell_get_count_max\"), &Spell::dispell_get_count_max);\n\tClassDB::bind_method(D_METHOD(\"dispell_set_count_max\", \"value\"), &Spell::dispell_set_count_max);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"dispell_count_max\"), \"dispell_set_count_max\", \"dispell_get_count_max\");\n\n\tClassDB::bind_method(D_METHOD(\"dispell_get_aura_types\"), &Spell::dispell_get_aura_types);\n\tClassDB::bind_method(D_METHOD(\"dispell_set_aura_types\", \"value\"), &Spell::dispell_set_aura_types);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"dispell_aura_types\", PROPERTY_HINT_FLAGS, SpellEnums::BINDING_STRING_AURA_FLAG_TYPES), \"dispell_set_aura_types\", \"dispell_get_aura_types\");\n\n\tADD_GROUP(\"Interrupt\", \"interrupt\");\n\tClassDB::bind_method(D_METHOD(\"get_interrupt_enabled\"), &Spell::get_interrupt_enabled);\n\tClassDB::bind_method(D_METHOD(\"set_interrupt_enabled\", \"value\"), &Spell::set_interrupt_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"interrupt_enabled\"), \"set_interrupt_enabled\", \"get_interrupt_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"get_interrupt_time\"), &Spell::get_interrupt_time);\n\tClassDB::bind_method(D_METHOD(\"set_interrupt_time\", \"value\"), &Spell::set_interrupt_time);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"interrupt_time\"), \"set_interrupt_time\", \"get_interrupt_time\");\n\n\tADD_GROUP(\"Cost\", \"cost\");\n\tClassDB::bind_method(D_METHOD(\"get_item_cost\"), &Spell::get_item_cost);\n\tClassDB::bind_method(D_METHOD(\"set_item_cost\", \"value\"), &Spell::set_item_cost);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"cost_item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemTemplate\"), \"set_item_cost\", \"get_item_cost\");\n\n\tClassDB::bind_method(D_METHOD(\"get_required_item\"), &Spell::get_required_item);\n\tClassDB::bind_method(D_METHOD(\"set_required_item\", \"value\"), &Spell::set_required_item);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"cost_required_item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemTemplate\"), \"set_required_item\", \"get_required_item\");\n\n\tADD_GROUP(\"Resources\", \"resource\");\n\tClassDB::bind_method(D_METHOD(\"get_resource_cost\"), &Spell::get_resource_cost);\n\tClassDB::bind_method(D_METHOD(\"set_resource_cost\", \"value\"), &Spell::set_resource_cost);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"resource_cost\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityResourceCostData\"), \"set_resource_cost\", \"get_resource_cost\");\n\n\tClassDB::bind_method(D_METHOD(\"get_resource_give\"), &Spell::get_resource_give);\n\tClassDB::bind_method(D_METHOD(\"set_resource_give\", \"value\"), &Spell::set_resource_give);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"resource_give\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityResourceCostData\"), \"set_resource_give\", \"get_resource_give\");\n\n\tADD_GROUP(\"AOE\", \"aoe\");\n\tClassDB::bind_method(D_METHOD(\"get_is_aoe\"), &Spell::get_is_aoe);\n\tClassDB::bind_method(D_METHOD(\"set_is_aoe\", \"value\"), &Spell::set_is_aoe);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aoe\"), \"set_is_aoe\", \"get_is_aoe\");\n\n\tClassDB::bind_method(D_METHOD(\"get_aoe_target_type\"), &Spell::get_aoe_target_type);\n\tClassDB::bind_method(D_METHOD(\"set_aoe_target_type\", \"value\"), &Spell::set_aoe_target_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aoe_targetType\", PROPERTY_HINT_ENUM, \"Caster, Target, Ground Target Selection, Random\"), \"set_aoe_target_type\", \"get_aoe_target_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_aoe_collider_type\"), &Spell::get_aoe_collider_type);\n\tClassDB::bind_method(D_METHOD(\"set_aoe_collider_type\", \"value\"), &Spell::set_aoe_collider_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aoe_colliderType\", PROPERTY_HINT_ENUM, SpellEnums::BINDING_STRING_COLLIDER_TYPE), \"set_aoe_collider_type\", \"get_aoe_collider_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_aoe_radius\"), &Spell::get_aoe_radius);\n\tClassDB::bind_method(D_METHOD(\"set_aoe_radius\", \"value\"), &Spell::set_aoe_radius);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"aoe_radius\"), \"set_aoe_radius\", \"get_aoe_radius\");\n\n\tClassDB::bind_method(D_METHOD(\"get_aoe_box_extents\"), &Spell::get_aoe_box_extents);\n\tClassDB::bind_method(D_METHOD(\"set_aoe_box_extents\", \"value\"), &Spell::set_aoe_box_extents);\n\tADD_PROPERTY(PropertyInfo(Variant::VECTOR3, \"aoe_box_extents\"), \"set_aoe_box_extents\", \"get_aoe_box_extents\");\n\n\tADD_GROUP(\"Spell Cooldown Mainpulation\", \"spell_cooldown_mainpulation\");\n\tClassDB::bind_method(D_METHOD(\"get_spell_cooldown_mainpulation_data_count\"), &Spell::get_spell_cooldown_mainpulation_data_count);\n\tClassDB::bind_method(D_METHOD(\"set_spell_cooldown_mainpulation_data_count\", \"value\"), &Spell::set_spell_cooldown_mainpulation_data_count);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"spell_cooldown_mainpulation_data_count\"), \"set_spell_cooldown_mainpulation_data_count\", \"get_spell_cooldown_mainpulation_data_count\");\n\n\tADD_GROUP(\"Training\", \"training\");\n\tClassDB::bind_method(D_METHOD(\"get_training_cost\"), &Spell::get_training_cost);\n\tClassDB::bind_method(D_METHOD(\"set_training_cost\", \"value\"), &Spell::set_training_cost);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"training_cost\"), \"set_training_cost\", \"get_training_cost\");\n\n\tClassDB::bind_method(D_METHOD(\"get_training_required_spell\"), &Spell::get_training_required_spell);\n\tClassDB::bind_method(D_METHOD(\"set_training_required_spell\", \"curspellve\"), &Spell::set_training_required_spell);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"training_required_spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"set_training_required_spell\", \"get_training_required_spell\");\n\n\tClassDB::bind_method(D_METHOD(\"get_training_required_skill\"), &Spell::get_training_required_skill);\n\tClassDB::bind_method(D_METHOD(\"set_training_required_skill\", \"curve\"), &Spell::set_training_required_skill);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"training_required_skill\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySkillData\"), \"set_training_required_skill\", \"get_training_required_skill\");\n\n\tClassDB::bind_method(D_METHOD(\"get_training_required_skill_level\"), &Spell::get_training_required_skill_level);\n\tClassDB::bind_method(D_METHOD(\"set_training_required_skill_level\", \"value\"), &Spell::set_training_required_skill_level);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"training_required_skill_level\"), \"set_training_required_skill_level\", \"get_training_required_skill_level\");\n\n\tADD_GROUP(\"Aura\", \"aura\");\n\tClassDB::bind_method(D_METHOD(\"aura_get_permanent\"), &Spell::aura_get_permanent);\n\tClassDB::bind_method(D_METHOD(\"aura_set_permanent\", \"value\"), &Spell::aura_set_permanent);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_permanent\"), \"aura_set_permanent\", \"aura_get_permanent\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_time\"), &Spell::aura_get_time);\n\tClassDB::bind_method(D_METHOD(\"aura_set_time\", \"value\"), &Spell::aura_set_time);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"aura_time\"), \"aura_set_time\", \"aura_get_time\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_tick\"), &Spell::aura_get_tick);\n\tClassDB::bind_method(D_METHOD(\"aura_set_tick\", \"value\"), &Spell::aura_set_tick);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"aura_tick\"), \"aura_set_tick\", \"aura_get_tick\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_is_debuff\"), &Spell::aura_get_is_debuff);\n\tClassDB::bind_method(D_METHOD(\"aura_set_is_debuff\", \"value\"), &Spell::aura_set_is_debuff);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_debuff\"), \"aura_set_is_debuff\", \"aura_get_is_debuff\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_scale_with_level\"), &Spell::aura_get_scale_with_level);\n\tClassDB::bind_method(D_METHOD(\"aura_set_scale_with_level\", \"value\"), &Spell::aura_set_scale_with_level);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_scale_with_level\"), \"aura_set_scale_with_level\", \"aura_get_scale_with_level\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_aura_type\"), &Spell::aura_get_aura_type);\n\tClassDB::bind_method(D_METHOD(\"aura_set_aura_type\", \"value\"), &Spell::aura_set_aura_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_type\", PROPERTY_HINT_ENUM, SpellEnums::BINDING_STRING_AURA_TYPES), \"aura_set_aura_type\", \"aura_get_aura_type\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_aura_group\"), &Spell::aura_get_aura_group);\n\tClassDB::bind_method(D_METHOD(\"aura_set_aura_group\", \"value\"), &Spell::aura_set_aura_group);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_group\", PROPERTY_HINT_RESOURCE_TYPE, \"AuraGroup\"), \"aura_set_aura_group\", \"aura_get_aura_group\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_hide\"), &Spell::aura_get_hide);\n\tClassDB::bind_method(D_METHOD(\"aura_set_hide\", \"value\"), &Spell::aura_set_hide);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_hide\"), \"aura_set_hide\", \"aura_get_hide\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_ability_scale_data_id\"), &Spell::aura_get_ability_scale_data_id);\n\tClassDB::bind_method(D_METHOD(\"aura_set_ability_scale_data_id\", \"value\"), &Spell::aura_set_ability_scale_data_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_ability_scale_data_id\"), \"aura_set_ability_scale_data_id\", \"aura_get_ability_scale_data_id\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_visual_spell_effects\"), &Spell::aura_get_visual_spell_effects);\n\tClassDB::bind_method(D_METHOD(\"aura_set_visual_spell_effects\", \"value\"), &Spell::aura_set_visual_spell_effects);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_visual_spell_effects\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellEffectVisual\"), \"aura_set_visual_spell_effects\", \"aura_get_visual_spell_effects\");\n\n\t//GDVIRTUAL_BIND(\"_aura_get_description\", \"class_level\", \"character_level\");\n\n\tADD_GROUP(\"Aura Texts\", \"aura_text\");\n\tClassDB::bind_method(D_METHOD(\"aura_get_text_translation_key\"), &Spell::aura_get_text_translation_key);\n\tClassDB::bind_method(D_METHOD(\"aura_set_text_translation_key\", \"value\"), &Spell::aura_set_text_translation_key);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"aura_text_translation_key\"), \"aura_set_text_translation_key\", \"aura_get_text_translation_key\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_text_description\"), &Spell::aura_get_text_description);\n\tClassDB::bind_method(D_METHOD(\"aura_set_text_description\", \"value\"), &Spell::aura_set_text_description);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"aura_text_description\", PROPERTY_HINT_MULTILINE_TEXT), \"aura_set_text_description\", \"aura_get_text_description\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_name_translated\"), &Spell::aura_get_name_translated);\n\tClassDB::bind_method(D_METHOD(\"aura_get_description\", \"class_level\", \"character_level\"), &Spell::aura_get_description);\n\tClassDB::bind_method(D_METHOD(\"_aura_get_description\", \"class_level\", \"character_level\"), &Spell::_aura_get_description);\n\n\tADD_GROUP(\"Aura Damage\", \"aura_damage\");\n\t//Damage\n\tClassDB::bind_method(D_METHOD(\"aura_damage_get_enabled\"), &Spell::aura_damage_get_enabled);\n\tClassDB::bind_method(D_METHOD(\"aura_damage_set_enabled\", \"value\"), &Spell::aura_damage_set_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_damage_enabled\"), \"aura_damage_set_enabled\", \"aura_damage_get_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_damage_get_type\"), &Spell::aura_damage_get_type);\n\tClassDB::bind_method(D_METHOD(\"aura_damage_set_type\", \"value\"), &Spell::aura_damage_set_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_damage_type\", PROPERTY_HINT_FLAGS, SpellEnums::BINDING_STRING_DAMAGE_TYPES), \"aura_damage_set_type\", \"aura_damage_get_type\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_damage_get_min\"), &Spell::aura_damage_get_min);\n\tClassDB::bind_method(D_METHOD(\"aura_damage_set_min\", \"value\"), &Spell::aura_damage_set_min);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_damage_min\"), \"aura_damage_set_min\", \"aura_damage_get_min\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_damage_get_max\"), &Spell::aura_damage_get_max);\n\tClassDB::bind_method(D_METHOD(\"aura_damage_set_max\", \"value\"), &Spell::aura_damage_set_max);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_damage_max\"), \"aura_damage_set_max\", \"aura_damage_get_max\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_damage_get_can_crit\"), &Spell::aura_damage_get_can_crit);\n\tClassDB::bind_method(D_METHOD(\"aura_damage_set_can_crit\", \"value\"), &Spell::aura_damage_set_can_crit);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_damage_can_crit\"), \"aura_damage_set_can_crit\", \"aura_damage_get_can_crit\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_damage_set\", \"min\", \"max\", \"can_crit\"), &Spell::aura_damage_set);\n\n\tClassDB::bind_method(D_METHOD(\"aura_damage_get_scaling_curve\"), &Spell::aura_damage_get_scaling_curve);\n\tClassDB::bind_method(D_METHOD(\"aura_damage_set_scaling_curve\", \"curve\"), &Spell::aura_damage_set_scaling_curve);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_damage_scaling_curve\", PROPERTY_HINT_RESOURCE_TYPE, \"Curve\"), \"aura_damage_set_scaling_curve\", \"aura_damage_get_scaling_curve\");\n\n\tADD_GROUP(\"Aura Absorb\", \"aura_absorb\");\n\t//Absorb\n\tClassDB::bind_method(D_METHOD(\"aura_absorb_get_enabled\"), &Spell::aura_absorb_get_enabled);\n\tClassDB::bind_method(D_METHOD(\"aura_absorb_set_enabled\", \"value\"), &Spell::aura_absorb_set_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_absorb_enabled\"), \"aura_absorb_set_enabled\", \"aura_absorb_get_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_absorb_damage_get_type\"), &Spell::aura_absorb_damage_get_type);\n\tClassDB::bind_method(D_METHOD(\"aura_absorb_damage_set_type\", \"value\"), &Spell::aura_absorb_damage_set_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_absorb_damage_type\", PROPERTY_HINT_FLAGS, SpellEnums::BINDING_STRING_DAMAGE_TYPES), \"aura_absorb_damage_set_type\", \"aura_absorb_damage_get_type\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_absorb_get_min\"), &Spell::aura_absorb_get_min);\n\tClassDB::bind_method(D_METHOD(\"aura_absorb_set_min\", \"value\"), &Spell::aura_absorb_set_min);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_absorb_min\"), \"aura_absorb_set_min\", \"aura_absorb_get_min\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_absorb_get_max\"), &Spell::aura_absorb_get_max);\n\tClassDB::bind_method(D_METHOD(\"aura_absorb_set_max\", \"value\"), &Spell::aura_absorb_set_max);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_absorb_max\"), \"aura_absorb_set_max\", \"aura_absorb_get_max\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_absorb_get_scaling_curve\"), &Spell::aura_absorb_get_scaling_curve);\n\tClassDB::bind_method(D_METHOD(\"aura_absorb_set_scaling_curve\", \"curve\"), &Spell::aura_absorb_set_scaling_curve);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_absorb_scaling_curve\", PROPERTY_HINT_RESOURCE_TYPE, \"Curve\"), \"aura_absorb_set_scaling_curve\", \"aura_absorb_get_scaling_curve\");\n\n\tADD_GROUP(\"Aura Heal\", \"aura_heal\");\n\t//Heal\n\tClassDB::bind_method(D_METHOD(\"aura_heal_get_enabled\"), &Spell::aura_heal_get_enabled);\n\tClassDB::bind_method(D_METHOD(\"aura_heal_set_enabled\", \"value\"), &Spell::aura_heal_set_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_heal_enabled\"), \"aura_heal_set_enabled\", \"aura_heal_get_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_heal_get_min\"), &Spell::aura_heal_get_min);\n\tClassDB::bind_method(D_METHOD(\"aura_heal_set_min\", \"value\"), &Spell::aura_heal_set_min);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_heal_min\"), \"aura_heal_set_min\", \"aura_heal_get_min\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_heal_get_max\"), &Spell::aura_heal_get_max);\n\tClassDB::bind_method(D_METHOD(\"aura_heal_set_max\", \"value\"), &Spell::aura_heal_set_max);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_heal_max\"), \"aura_heal_set_max\", \"aura_heal_get_max\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_heal_get_can_crit\"), &Spell::aura_heal_get_can_crit);\n\tClassDB::bind_method(D_METHOD(\"aura_heal_set_can_crit\", \"value\"), &Spell::aura_heal_set_can_crit);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_heal_can_crit\"), \"aura_heal_set_can_crit\", \"aura_heal_get_can_crit\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_heal_set\", \"min\", \"max\", \"can_crit\"), &Spell::aura_heal_set);\n\n\tClassDB::bind_method(D_METHOD(\"aura_heal_get_scaling_curve\"), &Spell::aura_heal_get_scaling_curve);\n\tClassDB::bind_method(D_METHOD(\"aura_heal_set_scaling_curve\", \"curve\"), &Spell::aura_heal_set_scaling_curve);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_heal_scaling_curve\", PROPERTY_HINT_RESOURCE_TYPE, \"Curve\"), \"aura_heal_set_scaling_curve\", \"aura_heal_get_scaling_curve\");\n\n\tADD_GROUP(\"Aura Dispell\", \"aura_dispell\");\n\tClassDB::bind_method(D_METHOD(\"aura_dispell_get_enabled\"), &Spell::aura_dispell_get_enabled);\n\tClassDB::bind_method(D_METHOD(\"aura_dispell_set_enabled\", \"value\"), &Spell::aura_dispell_set_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_dispell_enabled\"), \"aura_dispell_set_enabled\", \"aura_dispell_get_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_dispell_get_count_min\"), &Spell::aura_dispell_get_count_min);\n\tClassDB::bind_method(D_METHOD(\"aura_dispell_set_count_min\", \"value\"), &Spell::aura_dispell_set_count_min);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_dispell_count_min\"), \"aura_dispell_set_count_min\", \"aura_dispell_get_count_min\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_dispell_get_count_max\"), &Spell::aura_dispell_get_count_max);\n\tClassDB::bind_method(D_METHOD(\"aura_dispell_set_count_max\", \"value\"), &Spell::aura_dispell_set_count_max);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_dispell_count_max\"), \"aura_dispell_set_count_max\", \"aura_dispell_get_count_max\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_dispell_get_aura_types\"), &Spell::aura_dispell_get_aura_types);\n\tClassDB::bind_method(D_METHOD(\"aura_dispell_set_aura_types\", \"value\"), &Spell::aura_dispell_set_aura_types);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_dispell_aura_types\", PROPERTY_HINT_FLAGS, SpellEnums::BINDING_STRING_AURA_FLAG_TYPES), \"aura_dispell_set_aura_types\", \"aura_dispell_get_aura_types\");\n\n\t//Resources\n\tADD_GROUP(\"Aura Resources\", \"aura_resource\");\n\tClassDB::bind_method(D_METHOD(\"aura_get_resource_cost\"), &Spell::aura_get_resource_cost);\n\tClassDB::bind_method(D_METHOD(\"aura_set_resource_cost\", \"value\"), &Spell::aura_set_resource_cost);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_resource_cost\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityResourceCostData\"), \"aura_set_resource_cost\", \"aura_get_resource_cost\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_resource_give\"), &Spell::aura_get_resource_give);\n\tClassDB::bind_method(D_METHOD(\"aura_set_resource_give\", \"value\"), &Spell::aura_set_resource_give);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_resource_give\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityResourceCostData\"), \"aura_set_resource_give\", \"aura_get_resource_give\");\n\n\tADD_GROUP(\"Aura States\", \"aura_states\");\n\tClassDB::bind_method(D_METHOD(\"aura_get_add_states\"), &Spell::aura_get_add_states);\n\tClassDB::bind_method(D_METHOD(\"aura_set_add_states\", \"value\"), &Spell::aura_set_add_states);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_states_add\", PROPERTY_HINT_FLAGS, EntityEnums::BINDING_STRING_ENTITY_STATE_TYPES), \"aura_set_add_states\", \"aura_get_add_states\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_remove_effects_with_states\"), &Spell::aura_get_remove_effects_with_states);\n\tClassDB::bind_method(D_METHOD(\"aura_set_remove_effects_with_states\", \"value\"), &Spell::aura_set_remove_effects_with_states);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_states_remove_effects\", PROPERTY_HINT_FLAGS, EntityEnums::BINDING_STRING_ENTITY_STATE_TYPES), \"aura_set_remove_effects_with_states\", \"aura_get_remove_effects_with_states\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_supress_states\"), &Spell::aura_get_supress_states);\n\tClassDB::bind_method(D_METHOD(\"aura_set_supress_states\", \"value\"), &Spell::aura_set_supress_states);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_states_supress\", PROPERTY_HINT_FLAGS, EntityEnums::BINDING_STRING_ENTITY_STATE_TYPES), \"aura_set_supress_states\", \"aura_get_supress_states\");\n\n\t//Diminishing Returns\n\tADD_GROUP(\"Aura Diminishing Returns\", \"aura_diminishing_return\");\n\tClassDB::bind_method(D_METHOD(\"aura_diminishing_return_enabled_get\"), &Spell::aura_diminishing_return_enabled_get);\n\tClassDB::bind_method(D_METHOD(\"aura_diminishing_return_enabled_set\", \"value\"), &Spell::aura_diminishing_return_enabled_set);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"aura_diminishing_return_enabled\"), \"aura_diminishing_return_enabled_set\", \"aura_diminishing_return_enabled_get\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_diminishing_return_category_get\"), &Spell::aura_diminishing_return_category_get);\n\tClassDB::bind_method(D_METHOD(\"aura_diminishing_return_category_set\", \"value\"), &Spell::aura_diminishing_return_category_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_diminishing_return_category\", PROPERTY_HINT_ENUM, \"\"), \"aura_diminishing_return_category_set\", \"aura_diminishing_return_category_get\");\n\n\t////    Talents    ////\n\tADD_GROUP(\"Aura Talent\", \"aura_talent\");\n\tClassDB::bind_method(D_METHOD(\"aura_get_talent_required_talent\"), &Spell::aura_get_talent_required_talent);\n\tClassDB::bind_method(D_METHOD(\"aura_set_talent_required_talent\", \"next_rank\"), &Spell::aura_set_talent_required_talent);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_talent_required_talent\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"aura_set_talent_required_talent\", \"aura_get_talent_required_talent\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_get_talent_required_spell\"), &Spell::aura_get_talent_required_spell);\n\tClassDB::bind_method(D_METHOD(\"aura_set_talent_required_spell\", \"next_rank\"), &Spell::aura_set_talent_required_spell);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_talent_required_spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"aura_set_talent_required_spell\", \"aura_get_talent_required_spell\");\n\n\tADD_GROUP(\"Aura Teaches\", \"aura_teaches\");\n\tClassDB::bind_method(D_METHOD(\"aura_get_teaches_spell\"), &Spell::aura_get_teaches_spell);\n\tClassDB::bind_method(D_METHOD(\"aura_set_teaches_spell\", \"next_rank\"), &Spell::aura_set_teaches_spell);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_teaches_spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"aura_set_teaches_spell\", \"aura_get_teaches_spell\");\n\n\t////    Triggers    ////\n\tADD_GROUP(\"Aura Triggers\", \"aura_trigger\");\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_get_count\"), &Spell::aura_trigger_get_count);\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_set_count\", \"count\"), &Spell::aura_trigger_set_count);\n\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_get_notification_type\", \"index\"), &Spell::aura_trigger_get_notification_type);\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_set_notification_type\", \"index\", \"value\"), &Spell::aura_trigger_set_notification_type);\n\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_get_notification_data\", \"index\"), &Spell::aura_trigger_get_notification_data);\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_set_notification_data\", \"index\", \"value\"), &Spell::aura_trigger_set_notification_data);\n\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_get_trigger_type\", \"index\"), &Spell::aura_trigger_get_trigger_type);\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_set_trigger_type\", \"index\", \"value\"), &Spell::aura_trigger_set_trigger_type);\n\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_get_trigger_type_data\", \"index\"), &Spell::aura_trigger_get_trigger_type_data);\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_set_trigger_type_data\", \"index\", \"value\"), &Spell::aura_trigger_set_trigger_type_data);\n\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_get_spell\", \"index\"), &Spell::aura_trigger_get_spell);\n\tClassDB::bind_method(D_METHOD(\"aura_trigger_set_spell\", \"index\", \"value\"), &Spell::aura_trigger_set_spell);\n\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_trigger_count\", PROPERTY_HINT_RANGE, \"0,\" + itos(MAX_TRIGGER_DATA), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"aura_trigger_set_count\", \"aura_trigger_get_count\");\n\n\tfor (int i = 0; i < MAX_TRIGGER_DATA; i++) {\n\t\tADD_PROPERTYI(PropertyInfo(Variant::INT, \"aura_trigger_\" + itos(i) + \"/notification_type\", PROPERTY_HINT_ENUM, SpellEnums::BINDING_STRING_TRIGGER_NOTIFICATION_TYPE, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"aura_trigger_set_notification_type\", \"aura_trigger_get_notification_type\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::INT, \"aura_trigger_\" + itos(i) + \"/notification_data\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"aura_trigger_set_notification_data\", \"aura_trigger_get_notification_data\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::INT, \"aura_trigger_\" + itos(i) + \"/trigger_type\", PROPERTY_HINT_ENUM, SpellEnums::BINDING_STRING_TRIGGER_TYPE, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"aura_trigger_set_trigger_type\", \"aura_trigger_get_trigger_type\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"aura_trigger_\" + itos(i) + \"/trigger_type_data\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"aura_trigger_set_trigger_type_data\", \"aura_trigger_get_trigger_type_data\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::OBJECT, \"aura_trigger_\" + itos(i) + \"/spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"aura_trigger_set_spell\", \"aura_trigger_get_spell\", i);\n\t}\n\n\tADD_GROUP(\"Aura Stat Attributes\", \"aura_stat_attribute\");\n\t//AuraStatAttributes\n\tClassDB::bind_method(D_METHOD(\"aura_stat_attribute_get_count\"), &Spell::aura_stat_attribute_get_count);\n\tClassDB::bind_method(D_METHOD(\"aura_stat_attribute_set_count\", \"count\"), &Spell::aura_stat_attribute_set_count);\n\n\tClassDB::bind_method(D_METHOD(\"aura_stat_attribute_get_stat\", \"index\"), &Spell::aura_stat_attribute_get_stat);\n\tClassDB::bind_method(D_METHOD(\"aura_stat_attribute_set_stat\", \"index\", \"value\"), &Spell::aura_stat_attribute_set_stat);\n\n\tClassDB::bind_method(D_METHOD(\"aura_stat_attribute_get_base_mod\", \"index\"), &Spell::aura_stat_attribute_get_base_mod);\n\tClassDB::bind_method(D_METHOD(\"aura_stat_attribute_set_base_mod\", \"index\", \"value\"), &Spell::aura_stat_attribute_set_base_mod);\n\n\tClassDB::bind_method(D_METHOD(\"aura_stat_attribute_get_bonus_mod\", \"index\"), &Spell::aura_stat_attribute_get_bonus_mod);\n\tClassDB::bind_method(D_METHOD(\"aura_stat_attribute_set_bonus_mod\", \"index\", \"value\"), &Spell::aura_stat_attribute_set_bonus_mod);\n\n\tClassDB::bind_method(D_METHOD(\"aura_stat_attribute_get_percent_mod\", \"index\"), &Spell::aura_stat_attribute_get_percent_mod);\n\tClassDB::bind_method(D_METHOD(\"aura_stat_attribute_set_percent_mod\", \"index\", \"value\"), &Spell::aura_stat_attribute_set_percent_mod);\n\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_stat_attribute_count\", PROPERTY_HINT_RANGE, \"0,\" + itos(MAX_AURA_STATS), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"aura_stat_attribute_set_count\", \"aura_stat_attribute_get_count\");\n\n\tfor (int i = 0; i < MAX_AURA_STATS; i++) {\n\t\tADD_PROPERTYI(PropertyInfo(Variant::INT, \"aura_stat_attribute_\" + itos(i) + \"/stat\", PROPERTY_HINT_ENUM, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"aura_stat_attribute_set_stat\", \"aura_stat_attribute_get_stat\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"aura_stat_attribute_\" + itos(i) + \"/base_mod\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"aura_stat_attribute_set_base_mod\", \"aura_stat_attribute_get_base_mod\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"aura_stat_attribute_\" + itos(i) + \"/bonus_mod\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"aura_stat_attribute_set_bonus_mod\", \"aura_stat_attribute_get_bonus_mod\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"aura_stat_attribute_\" + itos(i) + \"/percent_mod\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"aura_stat_attribute_set_percent_mod\", \"aura_stat_attribute_get_percent_mod\", i);\n\t}\n\n\tClassDB::bind_method(D_METHOD(\"is_aura\"), &Spell::is_aura);\n\tClassDB::bind_method(D_METHOD(\"aura_is_talent\"), &Spell::aura_is_talent);\n\n\tBIND_ENUM_CONSTANT(TARGET_SELF);\n\tBIND_ENUM_CONSTANT(TARGET_ENEMY);\n\tBIND_ENUM_CONSTANT(TARGET_FRIENDLY);\n\n\tBIND_ENUM_CONSTANT(SPELL_TARGET_TYPE_SELF);\n\tBIND_ENUM_CONSTANT(SPELL_TARGET_TYPE_TARGET);\n\tBIND_ENUM_CONSTANT(SPELL_TARGET_TYPE_AROUND);\n\tBIND_ENUM_CONSTANT(SPELL_TARGET_TYPE_FRONT);\n\tBIND_ENUM_CONSTANT(SPELL_TARGET_TYPE_AROUND_TARGET);\n\n\tBIND_ENUM_CONSTANT(SPELL_AOE_TARGET_TYPE_CASTER);\n\tBIND_ENUM_CONSTANT(SPELL_AOE_TARGET_TYPE_TARGET);\n\tBIND_ENUM_CONSTANT(SPELL_AOE_TARGET_TYPE_GOUND_TARGET_SELECTION);\n\tBIND_ENUM_CONSTANT(SPELL_AOE_TARGET_TYPE_RANDOM);\n\n\tBIND_CONSTANT(MAX_AURA_STATS);\n\tBIND_CONSTANT(MAX_TRIGGER_DATA);\n}\n"
  },
  {
    "path": "data/spells/spell.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPELL_H\n#define SPELL_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"scene/resources/texture.h\"\n\n#include \"../../entities/entity.h\"\n#include \"../../entity_enums.h\"\n#include \"../../infos/aura_infos.h\"\n#include \"../../infos/spell_cast_info.h\"\n#include \"../../spell_enums.h\"\n\n#include \"spell_effect_visual.h\"\n\nclass Entity;\nclass SpellCastInfo;\nclass Spell;\nclass CraftRecipe;\nclass EntityResourceCostData;\nclass EntitySkillData;\nclass SpellDamageInfo;\nclass SpellHealInfo;\nclass AuraData;\nclass AuraGroup;\nclass AuraApplyInfo;\nclass EntityResource;\n\nenum TargetRelationType {\n\tTARGET_SELF = 1 << 0,\n\tTARGET_ENEMY = 1 << 1,\n\tTARGET_FRIENDLY = 1 << 2\n};\n\nVARIANT_ENUM_CAST(TargetRelationType);\n\nenum SpellTargetType {\n\tSPELL_TARGET_TYPE_SELF,\n\tSPELL_TARGET_TYPE_TARGET,\n\tSPELL_TARGET_TYPE_AROUND,\n\tSPELL_TARGET_TYPE_FRONT,\n\tSPELL_TARGET_TYPE_AROUND_TARGET\n};\n\nVARIANT_ENUM_CAST(SpellTargetType);\n\nenum SpellAOETargetType {\n\tSPELL_AOE_TARGET_TYPE_CASTER,\n\tSPELL_AOE_TARGET_TYPE_TARGET,\n\tSPELL_AOE_TARGET_TYPE_GOUND_TARGET_SELECTION,\n\tSPELL_AOE_TARGET_TYPE_RANDOM\n};\n\nVARIANT_ENUM_CAST(SpellAOETargetType);\n\nclass Spell : public Resource {\n\tGDCLASS(Spell, Resource);\n\npublic:\n\tint get_id() const;\n\tvoid set_id(const int value);\n\n\tint spell_type_get() const;\n\tvoid spell_type_set(const int value);\n\n\tSpellEnums::SpellCategory get_spell_category() const;\n\tvoid set_spell_category(const SpellEnums::SpellCategory value);\n\n\tbool get_hide_from_actionbar() const;\n\tvoid set_hide_from_actionbar(const bool value);\n\n\tfloat get_cooldown() const;\n\tvoid set_cooldown(const float value);\n\n\tSpellTargetType get_target_type() const;\n\tvoid set_target_type(const SpellTargetType value);\n\n\tTargetRelationType get_target_relation_type() const;\n\tvoid set_target_relation_type(const TargetRelationType value);\n\n\tint get_level() const;\n\tvoid set_level(const int value);\n\n\tint get_rank() const;\n\tvoid set_rank(const int value);\n\n\tbool get_scale_with_level() const;\n\tvoid set_scale_with_level(const bool value);\n\n\tRef<ItemTemplate> get_item_cost();\n\tvoid set_item_cost(const Ref<ItemTemplate> &value);\n\n\tRef<ItemTemplate> get_required_item();\n\tvoid set_required_item(const Ref<ItemTemplate> &value);\n\n\tRef<EntityResourceCostData> get_resource_cost();\n\tvoid set_resource_cost(const Ref<EntityResourceCostData> &value);\n\n\tRef<EntityResourceCostData> get_resource_give();\n\tvoid set_resource_give(const Ref<EntityResourceCostData> &value);\n\n\tbool get_global_cooldown_enabled() const;\n\tvoid set_global_cooldown_enabled(const bool value);\n\n\tbool get_is_local_spell() const;\n\tvoid set_is_local_spell(const bool value);\n\n\tRef<Texture> get_icon();\n\tvoid set_icon(const Ref<Texture> &value);\n\n\tString get_text_translation_key() const;\n\tvoid set_text_translation_key(const String &value);\n\n\tString get_text_description() const;\n\tvoid set_text_description(const String &value);\n\n\tRef<SpellEffectVisual> get_visual_spell_effects();\n\tvoid set_visual_spell_effects(const Ref<SpellEffectVisual> &value);\n\n\tRef<CraftRecipe> get_teaches_craft_recipe();\n\tvoid set_teaches_craft_recipe(const Ref<CraftRecipe> &value);\n\n\t//Spells cast on caster\n\tint spells_cast_on_caster_num_get() const;\n\tvoid spells_cast_on_caster_num_set(const int value);\n\n\tRef<Spell> spell_cast_on_caster_get(const int index);\n\tvoid spell_cast_on_caster_set(const int index, const Ref<Spell> &spell);\n\n\tVector<Variant> spells_cast_on_caster_get();\n\tvoid spells_cast_on_caster_set(const Vector<Variant> &spells);\n\n\t//Spells cast on target\n\tint spells_cast_on_target_num_get() const;\n\tvoid spells_cast_on_target_num_set(const int value);\n\n\tRef<Spell> spell_cast_on_target_get(const int index);\n\tvoid spell_cast_on_target_set(const int index, const Ref<Spell> &spell);\n\n\tVector<Variant> spells_cast_on_target_get();\n\tvoid spells_cast_on_target_set(const Vector<Variant> &target_aura_applys);\n\n\t//Spells cast On Learn\n\tint on_learn_cast_spells_num_get() const;\n\tvoid on_learn_cast_spells_num_set(const int value);\n\n\tRef<Spell> spell_cast_on_learn_get(const int index);\n\tvoid spell_cast_on_learn_set(const int index, const Ref<Spell> &spell);\n\n\tVector<Variant> spells_cast_on_learn_get();\n\tvoid spells_cast_on_learn_set(const Vector<Variant> &spells);\n\n\t//Range\n\tbool range_get_enabled() const;\n\tvoid range_set_enabled(const bool value);\n\n\tfloat range_get() const;\n\tvoid range_set(const float value);\n\n\tbool cast_time_get_enabled() const;\n\tvoid cast_time_set_enabled(const bool value);\n\n\tfloat cast_time_get() const;\n\tvoid cast_time_set(const float value);\n\n\t//Delay\n\tbool projectile_get_use_time() const;\n\tvoid projectile_set_use_time(const bool value);\n\n\tfloat projectile_get_time() const;\n\tvoid projectile_set_time(const float value);\n\n\tbool projectile_get_use_speed() const;\n\tvoid projectile_set_use_speed(const bool value);\n\n\tfloat projectile_get_speed() const;\n\tvoid projectile_set_speed(const float value);\n\n\tRef<PackedScene> projectile_get_scene() const;\n\tvoid projectile_set_scene(const Ref<PackedScene> &value);\n\n\t//Damage\n\tbool damage_get_enabled() const;\n\tvoid damage_set_enabled(const bool value);\n\n\tint damage_get_type() const;\n\tvoid damage_set_type(const int value);\n\n\tint damage_get_min() const;\n\tvoid damage_set_min(const int value);\n\n\tint damage_get_max() const;\n\tvoid damage_set_max(const int value);\n\n\tint damage_get_scale_stat() const;\n\tvoid damage_set_scale_stat(const int value);\n\n\tfloat damage_get_scale_coeff() const;\n\tvoid damage_set_scale_coeff(const float value);\n\n\tbool heal_get_enabled() const;\n\tvoid heal_set_enabled(const bool value);\n\n\tint heal_get_min() const;\n\tvoid heal_set_min(const int value);\n\n\tint heal_get_max() const;\n\tvoid heal_set_max(const int value);\n\n\tint heal_get_scale_stat() const;\n\tvoid heal_set_scale_stat(const int value);\n\n\tfloat heal_get_scale_coeff() const;\n\tvoid heal_set_scale_coeff(const float value);\n\n\t//Dispells\n\tbool dispell_get_enabled() const;\n\tvoid dispell_set_enabled(const bool value);\n\n\tint dispell_get_count_min() const;\n\tvoid dispell_set_count_min(const int value);\n\n\tint dispell_get_count_max() const;\n\tvoid dispell_set_count_max(const int value);\n\n\tint dispell_get_aura_types() const;\n\tvoid dispell_set_aura_types(const int value);\n\n\t//Target\n\tbool get_needs_target() const;\n\tvoid set_needs_target(const bool value);\n\n\tbool get_can_move_while_casting() const;\n\tvoid set_can_move_while_casting(const bool value);\n\n\tbool get_interrupt_enabled() const;\n\tvoid set_interrupt_enabled(const bool value);\n\n\tfloat get_interrupt_time() const;\n\tvoid set_interrupt_time(const float value);\n\n\t//AOE\n\tbool get_is_aoe() const;\n\tvoid set_is_aoe(const bool value);\n\n\tSpellAOETargetType get_aoe_target_type() const;\n\tvoid set_aoe_target_type(const SpellAOETargetType value);\n\n\tSpellEnums::ColliderType get_aoe_collider_type() const;\n\tvoid set_aoe_collider_type(const SpellEnums::ColliderType value);\n\n\tfloat get_aoe_radius() const;\n\tvoid set_aoe_radius(const float value);\n\n\tVector3 get_aoe_box_extents() const;\n\tvoid set_aoe_box_extents(const Vector3 value);\n\n\tint get_spell_cooldown_mainpulation_data_count() const;\n\tvoid set_spell_cooldown_mainpulation_data_count(const int value);\n\n\tint get_training_cost() const;\n\tvoid set_training_cost(int value);\n\n\tRef<Spell> get_training_required_spell();\n\tvoid set_training_required_spell(const Ref<Spell> &spell);\n\n\tRef<EntitySkillData> get_training_required_skill();\n\tvoid set_training_required_skill(const Ref<EntitySkillData> &skill);\n\n\tint get_training_required_skill_level() const;\n\tvoid set_training_required_skill_level(const int value);\n\n\t//Auras\n\tbool aura_get_permanent() const;\n\tvoid aura_set_permanent(const bool value);\n\n\tfloat aura_get_time() const;\n\tvoid aura_set_time(const float value);\n\n\tRef<AuraGroup> aura_get_aura_group();\n\tvoid aura_set_aura_group(const Ref<AuraGroup> &value);\n\n\tbool aura_get_is_debuff() const;\n\tvoid aura_set_is_debuff(const bool value);\n\n\tfloat aura_get_tick() const;\n\tvoid aura_set_tick(const float value);\n\n\tSpellEnums::AuraType aura_get_aura_type() const;\n\tvoid aura_set_aura_type(const SpellEnums::AuraType value);\n\n\tbool aura_get_scale_with_level() const;\n\tvoid aura_set_scale_with_level(const bool value);\n\n\tString aura_get_text_translation_key() const;\n\tvoid aura_set_text_translation_key(const String &value);\n\n\tString aura_get_text_description() const;\n\tvoid aura_set_text_description(const String description);\n\n\tbool aura_get_hide() const;\n\tvoid aura_set_hide(const bool value);\n\n\tRef<SpellEffectVisual> aura_get_visual_spell_effects();\n\tvoid aura_set_visual_spell_effects(const Ref<SpellEffectVisual> &value);\n\n\tint aura_get_ability_scale_data_id() const;\n\tvoid aura_set_ability_scale_data_id(const int value);\n\n\tfloat aura_damage_get_scale_for_level(int level) const;\n\tfloat aura_heal_get_scale_for_level(int level) const;\n\tfloat aura_absorb_get_scale_for_level(int level) const;\n\n\tRef<Spell> aura_get_teaches_spell();\n\tvoid aura_set_teaches_spell(const Ref<Spell> &spell);\n\n\t//Damage\n\tbool aura_damage_get_enabled() const;\n\tvoid aura_damage_set_enabled(const bool value);\n\n\tint aura_damage_get_type() const;\n\n\tvoid aura_damage_set_type(const int value);\n\n\tint aura_damage_get_min() const;\n\tvoid aura_damage_set_min(const int value);\n\n\tint aura_damage_get_max() const;\n\tvoid aura_damage_set_max(const int value);\n\n\tbool aura_damage_get_can_crit() const;\n\tvoid aura_damage_set_can_crit(const bool value);\n\n\tvoid aura_damage_set(const int min, const int max, const bool can_crit);\n\n\t//Absorb\n\tbool aura_absorb_get_enabled() const;\n\tvoid aura_absorb_set_enabled(const bool value);\n\n\tint aura_absorb_damage_get_type() const;\n\tvoid aura_absorb_damage_set_type(const int value);\n\n\tint aura_absorb_get_min() const;\n\tvoid aura_absorb_set_min(const int value);\n\n\tint aura_absorb_get_max() const;\n\tvoid aura_absorb_set_max(const int value);\n\n\t//Heal\n\tbool aura_heal_get_enabled() const;\n\tvoid aura_heal_set_enabled(const bool value);\n\n\tint aura_heal_get_min() const;\n\tvoid aura_heal_set_min(const int value);\n\n\tint aura_heal_get_max() const;\n\tvoid aura_heal_set_max(const int value);\n\n\tbool aura_heal_get_can_crit() const;\n\tvoid aura_heal_set_can_crit(const bool value);\n\n\tvoid aura_heal_set(const int min, const int max, const bool can_crit);\n\n\t//Dispells\n\tbool aura_dispell_get_enabled() const;\n\tvoid aura_dispell_set_enabled(const bool value);\n\n\tint aura_dispell_get_count_min() const;\n\tvoid aura_dispell_set_count_min(const int value);\n\n\tint aura_dispell_get_count_max() const;\n\tvoid aura_dispell_set_count_max(const int value);\n\n\tint aura_dispell_get_aura_types() const;\n\tvoid aura_dispell_set_aura_types(const int value);\n\n\t//Resources\n\tRef<EntityResourceCostData> aura_get_resource_cost();\n\tvoid aura_set_resource_cost(const Ref<EntityResourceCostData> &value);\n\n\tRef<EntityResourceCostData> aura_get_resource_give();\n\tvoid aura_set_resource_give(const Ref<EntityResourceCostData> &value);\n\n\tRef<Curve> aura_damage_get_scaling_curve() { return _aura_damage_scaling_curve; }\n\tvoid aura_damage_set_scaling_curve(const Ref<Curve> &curve) { _aura_damage_scaling_curve = curve; }\n\n\tRef<Curve> aura_heal_get_scaling_curve() { return _aura_heal_scaling_curve; }\n\tvoid aura_heal_set_scaling_curve(const Ref<Curve> &curve) { _aura_heal_scaling_curve = curve; }\n\n\tRef<Curve> aura_absorb_get_scaling_curve() { return _aura_absorb_scaling_curve; }\n\tvoid aura_absorb_set_scaling_curve(const Ref<Curve> &curve) { _aura_absorb_scaling_curve = curve; }\n\n\t//states\n\tint aura_get_add_states() const { return _aura_add_states; }\n\tvoid aura_set_add_states(const int value) { _aura_add_states = value; }\n\n\tint aura_get_remove_effects_with_states() const { return _aura_remove_effects_with_states; }\n\tvoid aura_set_remove_effects_with_states(const int value) { _aura_remove_effects_with_states = value; }\n\n\tint aura_get_supress_states() const { return _aura_supress_states; }\n\tvoid aura_set_supress_states(const int value) { _aura_supress_states = value; }\n\n\t//DiminishingReturns\n\tbool aura_diminishing_return_enabled_get() const;\n\tvoid aura_diminishing_return_enabled_set(const bool value);\n\n\tint aura_diminishing_return_category_get() const;\n\tvoid aura_diminishing_return_category_set(const int value);\n\n\t//Triggers\n\tint aura_trigger_get_count() const;\n\tvoid aura_trigger_set_count(const int count);\n\n\tSpellEnums::TriggerNotificationType aura_trigger_get_notification_type(const int index) const;\n\tvoid aura_trigger_set_notification_type(const int index, const SpellEnums::TriggerNotificationType value);\n\n\tint aura_trigger_get_notification_data(const int index) const;\n\tvoid aura_trigger_set_notification_data(const int index, const int value);\n\n\tSpellEnums::TriggerType aura_trigger_get_trigger_type(const int index) const;\n\tvoid aura_trigger_set_trigger_type(const int index, const SpellEnums::TriggerType value);\n\n\tfloat aura_trigger_get_trigger_type_data(const int index) const;\n\tvoid aura_trigger_set_trigger_type_data(const int index, const float value);\n\n\tRef<Spell> aura_trigger_get_spell(const int index) const;\n\tvoid aura_trigger_set_spell(const int index, const Ref<Spell> &value);\n\n\t//Talent\n\tRef<Spell> aura_get_talent_required_talent() const;\n\tvoid aura_set_talent_required_talent(const Ref<Spell> rank);\n\n\tRef<Spell> aura_get_talent_required_spell() const;\n\tvoid aura_set_talent_required_spell(const Ref<Spell> spell);\n\n\t//AuraStatAttributes\n\tint aura_stat_attribute_get_count() const;\n\tvoid aura_stat_attribute_set_count(int count);\n\n\tint aura_stat_attribute_get_stat(int index) const;\n\tvoid aura_stat_attribute_set_stat(int index, const int value);\n\n\tfloat aura_stat_attribute_get_base_mod(int index) const;\n\tvoid aura_stat_attribute_set_base_mod(int index, float value);\n\n\tfloat aura_stat_attribute_get_bonus_mod(int index) const;\n\tvoid aura_stat_attribute_set_bonus_mod(int index, float value);\n\n\tfloat aura_stat_attribute_get_percent_mod(int index) const;\n\tvoid aura_stat_attribute_set_percent_mod(int index, float value);\n\n\t////    Spell Script    ////\n\n\tfloat PLAYER_HIT_RADIUS;\n\n\t//Commands, c++ only\n\tvoid cast_starts_simple(Entity *caster, float spell_scale);\n\tvoid cast_interrupts_simple(Entity *caster);\n\tvoid cast_starts_triggered_simple(Entity *caster);\n\tvoid aura_sapply_simple(Entity *caster, Entity *target, float spell_scale);\n\n\t//Commands\n\tvoid cast_starts(Ref<SpellCastInfo> info);\n\tvoid cast_starts_triggered(Ref<SpellCastInfo> info);\n\tvoid cast_interrupts(Ref<SpellCastInfo> info);\n\tvoid cast_finishs(Ref<SpellCastInfo> info);\n\n\tvoid aura_sapply(Ref<AuraApplyInfo> info);\n\tvoid aura_sdeapply(Ref<AuraData> info);\n\tvoid aura_sadd(Ref<AuraData> aura);\n\tvoid aura_sremove(Ref<AuraData> aura);\n\tvoid aura_removes_expired(Ref<AuraData> aura);\n\tvoid aura_removes_dispell(Ref<AuraData> aura);\n\tvoid aura_supdate(Ref<AuraData> aura, float delta);\n\n\t//eventhandlers\n\tvoid son_cast_player_moved(Ref<SpellCastInfo> info);\n\tvoid son_cast_damage_received(Ref<SpellCastInfo> info);\n\tvoid son_spell_hit(Ref<SpellCastInfo> info);\n\tvoid son_physics_process(Ref<SpellCastInfo> info, float delta);\n\n\tvoid notification_saura(int what, Ref<AuraData> data);\n\tvoid notification_sheal(int what, Ref<AuraData> aura, Ref<SpellHealInfo> data);\n\tvoid notification_aura_scast(int what, Ref<AuraData> aura, Ref<SpellCastInfo> info);\n\tvoid notification_sdamage(int what, Ref<AuraData> aura, Ref<SpellDamageInfo> data);\n\n\tvoid son_remove(Ref<AuraData> aura);\n\tvoid son_remove_expired(Ref<AuraData> aura);\n\tvoid son_remove_dispell(Ref<AuraData> aura);\n\n\tvoid notification_sdeath(Ref<AuraData> data);\n\n\tvoid notification_scooldown_added(Ref<AuraData> data, int id, float value);\n\tvoid notification_scooldown_removed(Ref<AuraData> data, int id, float value);\n\n\tvoid notification_scategory_cooldown_added(Ref<AuraData> data, int id, float value);\n\tvoid notification_scategory_cooldown_removed(Ref<AuraData> data, int id, float value);\n\n\tvoid notification_sgcd_started(Ref<AuraData> data, float gcd);\n\tvoid notification_sgcd_finished(Ref<AuraData> data);\n\n\tvoid son_physics_process_aura(Ref<AuraData> data);\n\n\tvoid notification_sxp_gained(Ref<AuraData> data, int value);\n\tvoid notification_slevel_up(Ref<AuraData> data, int value);\n\n\tvoid notification_sentity_resource_added(Ref<AuraData> data, Ref<EntityResource> resource);\n\tvoid notification_sentity_resource_removed(Ref<AuraData> data, Ref<EntityResource> resource);\n\n\t//Clientside Event Handlers\n\tvoid notification_scast(int what, Ref<SpellCastInfo> info);\n\tvoid notification_ccast(int what, Ref<SpellCastInfo> info);\n\n\tvoid notification_caura(int what, Ref<AuraData> data);\n\tvoid notification_cheal(int what, Ref<AuraData> aura, Ref<SpellHealInfo> data);\n\tvoid notification_aura_ccast(int what, Ref<AuraData> aura, Ref<SpellCastInfo> info);\n\tvoid notification_cdamage(int what, Ref<AuraData> aura, Ref<SpellDamageInfo> data);\n\n\tvoid notification_cdeath(Ref<AuraData> data);\n\n\tvoid notification_ccooldown_added(Ref<AuraData> data, int id, float value);\n\tvoid notification_ccooldown_removed(Ref<AuraData> data, int id, float value);\n\tvoid notification_ccategory_cooldown_added(Ref<AuraData> data, int id, float value);\n\tvoid notification_ccategory_cooldown_removed(Ref<AuraData> data, int id, float value);\n\n\tvoid notification_cgcd_started(Ref<AuraData> data, float gcd);\n\tvoid notification_cgcd_finished(Ref<AuraData> data);\n\n\tvoid notification_cxp_gained(Ref<AuraData> data, int value);\n\tvoid notification_clevel_up(Ref<AuraData> data, int value);\n\n\tvoid notification_centity_resource_added(Ref<AuraData> data, Ref<EntityResource> resource);\n\tvoid notification_centity_resource_removed(Ref<AuraData> data, Ref<EntityResource> resource);\n\n\t//Equipment\n\tbool equip_should_deny(Ref<AuraData> data, int equip_slot, Ref<ItemInstance> item);\n\n\tvoid equip_son_success(Ref<AuraData> data, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\tvoid equip_son_fail(Ref<AuraData> data, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\n\tvoid equip_con_success(Ref<AuraData> data, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\tvoid equip_con_fail(Ref<AuraData> data, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\n\t//Calculations / Queries\n\tvoid calculate_initial_damage(Ref<SpellDamageInfo> data);\n\tvoid handle_spell_damage(Ref<SpellDamageInfo> data);\n\n\tvoid calculate_initial_heal(Ref<SpellHealInfo> data);\n\tvoid handle_spell_heal(Ref<SpellHealInfo> data);\n\n\tvoid handle_projectile(Ref<SpellCastInfo> info);\n\tvoid handle_effect(Ref<SpellCastInfo> info);\n\n\tvoid handle_gcd(Ref<SpellCastInfo> info);\n\tvoid handle_cooldown(Ref<SpellCastInfo> info);\n\n\tvoid setup_aura_data(Ref<AuraData> data, Ref<AuraApplyInfo> info);\n\n\tvoid aura_sapply_passives_damage_receive(Ref<SpellDamageInfo> info);\n\tvoid aura_sapply_passives_damage_deal(Ref<SpellDamageInfo> info);\n\tvoid aura_calculate_initial_damage(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info);\n\tvoid handle_aura_damage(Ref<AuraData> aura_data, Ref<SpellDamageInfo> info);\n\n\tvoid aura_sapply_passives_heal_receive(Ref<SpellHealInfo> info);\n\tvoid aura_sapply_passives_heal_deal(Ref<SpellHealInfo> info);\n\tvoid aura_calculate_initial_heal(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info);\n\tvoid handle_aura_heal(Ref<AuraData> aura_data, Ref<SpellHealInfo> info);\n\n\t_FORCE_INLINE_ bool is_aura() const { return _aura_permanent || (_aura_time > CMP_EPSILON); }\n\t_FORCE_INLINE_ bool aura_is_talent() const { return _aura_type == SpellEnums::AURA_TYPE_TALENT; }\n\n\tString get_name_translated() const;\n\tString get_description(const int class_level, const int character_level);\n\tString _get_description(const int class_level, const int character_level);\n\n\tString aura_get_name_translated() const;\n\tString aura_get_description(const int class_level, const int character_level);\n\tString _aura_get_description(const int class_level, const int character_level);\n\n\tSpell();\n\t~Spell();\n\nprotected:\n\tvirtual void _cast_starts(Ref<SpellCastInfo> info);\n\tvirtual void _cast_finishs(Ref<SpellCastInfo> info);\n\n\tvirtual void _son_cast_player_moved(Ref<SpellCastInfo> info);\n\tvirtual void _son_spell_hit(Ref<SpellCastInfo> info);\n\n\tvirtual void _calculate_initial_damage(Ref<SpellDamageInfo> data);\n\tvirtual void _handle_spell_damage(Ref<SpellDamageInfo> data);\n\n\tvirtual void _calculate_initial_heal(Ref<SpellHealInfo> data);\n\tvirtual void _handle_spell_heal(Ref<SpellHealInfo> data);\n\n\tvirtual void _handle_projectile(Ref<SpellCastInfo> info);\n\tvirtual void _handle_effect(Ref<SpellCastInfo> info);\n\n\tvirtual void _aura_sapply(Ref<AuraApplyInfo> info);\n\tvirtual void _aura_sdeapply(Ref<AuraData> info);\n\tvirtual void _aura_sadd(Ref<AuraData> aura);\n\tvirtual void _aura_sremove(Ref<AuraData> aura);\n\tvirtual void _aura_removes_expired(Ref<AuraData> aura);\n\tvirtual void _aura_removes_dispell(Ref<AuraData> aura);\n\tvirtual void _aura_supdate(Ref<AuraData> aura, float delta);\n\n\tvirtual void _setup_aura_data(Ref<AuraData> data, Ref<AuraApplyInfo> info);\n\n\tvirtual void _aura_sapply_passives_damage_receive(Ref<SpellDamageInfo> info);\n\tvirtual void _aura_sapply_passives_damage_deal(Ref<SpellDamageInfo> info);\n\tvirtual void _aura_calculate_initial_damage(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info);\n\tvirtual void _handle_aura_damage(Ref<AuraData> aura_data, Ref<SpellDamageInfo> info);\n\n\tvirtual void _aura_sapply_passives_heal_receive(Ref<SpellHealInfo> info);\n\tvirtual void _aura_sapply_passives_heal_deal(Ref<SpellHealInfo> info);\n\tvirtual void _aura_calculate_initial_heal(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info);\n\tvirtual void _handle_aura_heal(Ref<AuraData> aura_data, Ref<SpellHealInfo> info);\n\n\tvoid _validate_property(PropertyInfo &property) const;\n\tstatic void _bind_methods();\n\nprotected:\n\tstruct AuraTriggerData {\n\t\tSpellEnums::TriggerNotificationType notification_type;\n\t\tint notification_data;\n\t\tSpellEnums::TriggerType trigger_type;\n\t\tfloat trigger_type_data;\n\t\tRef<Spell> spell;\n\n\t\tAuraTriggerData() {\n\t\t\tnotification_type = SpellEnums::TRIGGER_NOTIFICATION_TYPE_AURA;\n\t\t\ttrigger_type = SpellEnums::TRIGGER_TYPE_NONE;\n\t\t\tnotification_data = 0;\n\t\t\ttrigger_type_data = 0;\n\t\t}\n\t};\n\n\tstruct AuraStatAttribute {\n\t\tint stat;\n\t\tfloat base_mod;\n\t\tfloat bonus_mod;\n\t\tfloat percent_mod;\n\n\t\tAuraStatAttribute() {\n\t\t\tstat = 0;\n\t\t\tbase_mod = 0;\n\t\t\tbonus_mod = 0;\n\t\t\tpercent_mod = 0;\n\t\t}\n\t};\n\nprivate:\n\tenum {\n\t\tMAX_AURA_STATS = 5, //Increase if necessary, should be enough for now\n\t\tMAX_TRIGGER_DATA = 5,\n\t};\n\n\tint _id;\n\tint _spell_type;\n\tSpellEnums::SpellCategory _spell_category;\n\n\tbool _hide_from_actionbar;\n\tfloat _cooldown;\n\tSpellTargetType _target_type;\n\tTargetRelationType _target_relation_type;\n\n\tVector<Ref<Spell>> _spells_cast_on_caster;\n\tVector<Ref<Spell>> _spells_cast_on_target;\n\tVector<Ref<Spell>> _on_learn_cast_spells;\n\n\tint _level;\n\tint _rank;\n\n\tbool _scale_with_level;\n\n\tRef<ItemTemplate> _item_cost;\n\tRef<ItemTemplate> _required_item;\n\n\tRef<EntityResourceCostData> _resource_cost;\n\tRef<EntityResourceCostData> _resource_give;\n\n\tbool _global_cooldown_enabled;\n\tbool _is_local_spell;\n\tRef<Texture> _icon;\n\n\tString _text_translation_key;\n\tString _text_description;\n\n\tRef<SpellEffectVisual> _visual_spell_effects;\n\n\tRef<CraftRecipe> _teaches_craft_recipe;\n\n\tbool _range_enabled;\n\tfloat _range;\n\n\t//Delay\n\tbool _projectile_use_time;\n\tfloat _projectile_time;\n\tbool _projectile_use_speed;\n\tfloat _projectile_speed;\n\tRef<PackedScene> _projectile_scene;\n\n\tbool _damage_enabled;\n\tint _damage_type;\n\tint _damage_min;\n\tint _damage_max;\n\tint _damage_scale_stat;\n\tfloat _damage_scale_coeff;\n\n\tbool _heal_enabled;\n\tint _heal_min;\n\tint _heal_max;\n\tint _heal_scale_stat;\n\tfloat _heal_scale_coeff;\n\n\tbool _dispell_enabled;\n\tint _dispell_count_min;\n\tint _dispell_count_max;\n\tint _dispell_aura_types;\n\n\tbool _cast_time_enabled;\n\tfloat _cast_time;\n\n\tbool _needs_target;\n\tbool _can_move_while_casting;\n\n\tbool _interrupt_enabled;\n\tfloat _interrupt_time;\n\n\tbool _is_aoe;\n\tSpellAOETargetType _aoe_targetType;\n\tSpellEnums::ColliderType _aoe_colliderType;\n\tfloat _aoe_radius;\n\tVector3 _aoe_box_extents;\n\n\tint _spell_cooldown_mainpulation_data_count;\n\n\tint _training_cost;\n\tRef<Spell> _training_required_spell;\n\tRef<EntitySkillData> _training_required_skill;\n\tint _training_required_skill_level;\n\n\t//Aura\n\tbool _aura_permanent;\n\tfloat _aura_time;\n\tfloat _aura_tick;\n\tRef<AuraGroup> _aura_group;\n\n\tSpellEnums::AuraType _aura_type;\n\tbool _aura_is_debuff;\n\tbool _aura_hide;\n\tRef<Spell> _aura_teaches_spell;\n\n\tString _aura_text_translation_key;\n\tString _aura_text_description;\n\tint _aura_ability_scale_data_id;\n\n\tbool _aura_scale_with_level;\n\n\tRef<SpellEffectVisual> _aura_visual_spell_effects;\n\n\tbool _aura_damage_enabled;\n\tint _aura_damage_type;\n\tint _aura_damage_min;\n\tint _aura_damage_max;\n\tbool _aura_damage_can_crit;\n\tRef<Curve> _aura_damage_scaling_curve;\n\n\tbool _aura_absorb_enabled;\n\tint _aura_absorb_damage_type;\n\tint _aura_absorb_min;\n\tint _aura_absorb_max;\n\tRef<Curve> _aura_absorb_scaling_curve;\n\n\tbool _aura_heal_enabled;\n\tint _aura_heal_min;\n\tint _aura_heal_max;\n\tbool _aura_heal_can_crit;\n\tRef<Curve> _aura_heal_scaling_curve;\n\n\tbool _aura_dispell_enabled;\n\tint _aura_dispell_count_min;\n\tint _aura_dispell_count_max;\n\tint _aura_dispell_aura_types;\n\n\tRef<EntityResourceCostData> _aura_resource_cost;\n\tRef<EntityResourceCostData> _aura_resource_give;\n\n\tint _aura_add_states;\n\tint _aura_remove_effects_with_states;\n\tint _aura_supress_states;\n\n\tint _aura_trigger_count;\n\tAuraTriggerData _aura_trigger_datas[MAX_TRIGGER_DATA];\n\n\tint _aura_stat_attribute_count;\n\tAuraStatAttribute _aura_stat_attributes[MAX_AURA_STATS];\n\n\tbool _aura_diminishing_return_enabled;\n\tint _aura_diminishing_return_category;\n\n\t//Talent\n\tRef<Spell> _aura_talent_required_talent;\n\tRef<Spell> _aura_talent_required_spell;\n};\n\n#endif\n"
  },
  {
    "path": "data/spells/spell_cooldown_manipulation_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"spell_cooldown_manipulation_data.h\"\n"
  },
  {
    "path": "data/spells/spell_cooldown_manipulation_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPELL_COOLDOWN_MANIPULATION_DATA_H\n#define SPELL_COOLDOWN_MANIPULATION_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\nclass SpellCooldownManipulationData : public RefCounted {\n\tGDCLASS(SpellCooldownManipulationData, RefCounted);\n\npublic:\n\tvoid set_id() {}\n\n\tSpellCooldownManipulationData() {\n\t\t_spell_id = 0;\n\t\t_mod_value = 0;\n\t\t_remove_if_exists = false;\n\t\t_add_if_not_exists = false;\n\t}\n\nprotected:\n\tstatic void _bind_methods() {\n\t}\n\nprivate:\n\tint _spell_id;\n\tint _mod_value;\n\tbool _remove_if_exists;\n\tbool _add_if_not_exists;\n};\n\n#endif\n"
  },
  {
    "path": "data/spells/spell_effect_visual.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"spell_effect_visual.h\"\n\nSpellEffectVisual::SpellEffectVisual() {\n}\n\nSpellEffectVisual::~SpellEffectVisual() {\n}\n\nvoid SpellEffectVisual::_bind_methods() {\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_name\", \"get_name\");\n}\n"
  },
  {
    "path": "data/spells/spell_effect_visual.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPELL_EFFECT_VISUAL_H\n#define SPELL_EFFECT_VISUAL_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\nclass SpellEffectVisual : public Resource {\n\tGDCLASS(SpellEffectVisual, Resource);\n\npublic:\n\tSpellEffectVisual();\n\t~SpellEffectVisual();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n};\n\n#endif\n"
  },
  {
    "path": "data/spells/spell_effect_visual_simple.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"spell_effect_visual_simple.h\"\n\nbool SpellEffectVisualSimple::has_spell_effect_visual() {\n\treturn _effect_visual.is_valid();\n}\n\nEntityEnums::CommonCharacterSkeletonPoints SpellEffectVisualSimple::get_spell_effect_visual_point() {\n\treturn _effect_visual_point;\n}\nvoid SpellEffectVisualSimple::set_spell_effect_visual_point(EntityEnums::CommonCharacterSkeletonPoints point) {\n\t_effect_visual_point = point;\n}\n\nRef<PackedScene> SpellEffectVisualSimple::get_spell_effect_visual() {\n\treturn _effect_visual;\n}\nvoid SpellEffectVisualSimple::set_spell_effect_visual(Ref<PackedScene> value) {\n\t_effect_visual = value;\n}\n\nbool SpellEffectVisualSimple::has_spell_cast_finish_effect() {\n\treturn _spell_cast_finish_effect.is_valid();\n}\n\nEntityEnums::CommonCharacterSkeletonPoints SpellEffectVisualSimple::get_spell_cast_finish_effect_point() {\n\treturn _spell_cast_finish_effect_point;\n}\nvoid SpellEffectVisualSimple::set_spell_cast_finish_effect_point(EntityEnums::CommonCharacterSkeletonPoints point) {\n\t_spell_cast_finish_effect_point = point;\n}\n\nRef<PackedScene> SpellEffectVisualSimple::get_spell_cast_finish_effect() {\n\treturn _spell_cast_finish_effect;\n}\nvoid SpellEffectVisualSimple::set_spell_cast_finish_effect(Ref<PackedScene> value) {\n\t_spell_cast_finish_effect = value;\n}\n\nbool SpellEffectVisualSimple::has_spell_cast_effect() {\n\treturn _spell_cast_effect.is_valid();\n}\nRef<PackedScene> SpellEffectVisualSimple::get_spell_cast_effect() {\n\treturn _spell_cast_effect;\n}\nvoid SpellEffectVisualSimple::set_spell_cast_effect(Ref<PackedScene> value) {\n\t_spell_cast_effect = value;\n}\n\n//Visual Effect\n\nbool SpellEffectVisualSimple::has_aura_effect_visual() {\n\treturn _effect_visual.is_valid();\n}\n\nEntityEnums::CommonCharacterSkeletonPoints SpellEffectVisualSimple::get_aura_effect_visual_point() {\n\treturn _aura_effect_visual_point;\n}\nvoid SpellEffectVisualSimple::set_aura_effect_visual_point(EntityEnums::CommonCharacterSkeletonPoints point) {\n\t_aura_effect_visual_point = point;\n}\n\nRef<PackedScene> SpellEffectVisualSimple::get_aura_effect_visual() {\n\treturn _aura_effect_visual;\n}\nvoid SpellEffectVisualSimple::set_aura_effect_visual(Ref<PackedScene> value) {\n\t_aura_effect_visual = value;\n}\n\nSpellEffectVisualSimple::SpellEffectVisualSimple() {\n}\n\nSpellEffectVisualSimple::~SpellEffectVisualSimple() {\n}\n\nvoid SpellEffectVisualSimple::_bind_methods() {\n\n\tADD_GROUP(\"Effect\", \"spell_effect\");\n\tClassDB::bind_method(D_METHOD(\"has_spell_effect_visual\"), &SpellEffectVisualSimple::has_spell_effect_visual);\n\n\tClassDB::bind_method(D_METHOD(\"get_spell_effect_visual_point\"), &SpellEffectVisualSimple::get_spell_effect_visual_point);\n\tClassDB::bind_method(D_METHOD(\"set_spell_effect_visual_point\", \"value\"), &SpellEffectVisualSimple::set_spell_effect_visual_point);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"spell_effect_visual_point\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_COMMON_CHARCATER_SKELETON_POINTS), \"set_spell_effect_visual_point\", \"get_spell_effect_visual_point\");\n\n\tClassDB::bind_method(D_METHOD(\"get_spell_effect_visual\"), &SpellEffectVisualSimple::get_spell_effect_visual);\n\tClassDB::bind_method(D_METHOD(\"set_spell_effect_visual\", \"value\"), &SpellEffectVisualSimple::set_spell_effect_visual);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"spell_effect_visual\", PROPERTY_HINT_RESOURCE_TYPE, \"PackedScene\"), \"set_spell_effect_visual\", \"get_spell_effect_visual\");\n\n\tClassDB::bind_method(D_METHOD(\"has_spell_spell_cast_finish_effect\"), &SpellEffectVisualSimple::has_spell_cast_finish_effect);\n\n\tClassDB::bind_method(D_METHOD(\"get_spell_cast_finish_effect_point\"), &SpellEffectVisualSimple::get_spell_cast_finish_effect_point);\n\tClassDB::bind_method(D_METHOD(\"set_spell_cast_finish_effect_point\", \"value\"), &SpellEffectVisualSimple::set_spell_cast_finish_effect_point);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"spell_cast_finish_effect_point\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_COMMON_CHARCATER_SKELETON_POINTS), \"set_spell_cast_finish_effect_point\", \"get_spell_cast_finish_effect_point\");\n\n\tClassDB::bind_method(D_METHOD(\"get_spell_cast_finish_effect\"), &SpellEffectVisualSimple::get_spell_cast_finish_effect);\n\tClassDB::bind_method(D_METHOD(\"set_spell_cast_finish_effect\", \"value\"), &SpellEffectVisualSimple::set_spell_cast_finish_effect);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"effect_spell_cast_finish_effect\", PROPERTY_HINT_RESOURCE_TYPE, \"PackedScene\"), \"set_spell_cast_finish_effect\", \"get_spell_cast_finish_effect\");\n\n\tClassDB::bind_method(D_METHOD(\"has_spell_cast_effect\"), &SpellEffectVisualSimple::has_spell_cast_effect);\n\tClassDB::bind_method(D_METHOD(\"get_spell_cast_effect\"), &SpellEffectVisualSimple::get_spell_cast_effect);\n\tClassDB::bind_method(D_METHOD(\"set_spell_cast_effect\", \"value\"), &SpellEffectVisualSimple::set_spell_cast_effect);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"effect_spell_cast_effect_id\", PROPERTY_HINT_RESOURCE_TYPE, \"PackedScene\"), \"set_spell_cast_effect\", \"get_spell_cast_effect\");\n\n\t//Visual Effect\n\tADD_GROUP(\"Aura Effect\", \"aura_effect\");\n\tClassDB::bind_method(D_METHOD(\"has_aura_effect_visual\"), &SpellEffectVisualSimple::has_aura_effect_visual);\n\n\tClassDB::bind_method(D_METHOD(\"get_aura_effect_visual_point\"), &SpellEffectVisualSimple::get_aura_effect_visual_point);\n\tClassDB::bind_method(D_METHOD(\"set_aura_effect_visual_point\", \"value\"), &SpellEffectVisualSimple::set_aura_effect_visual_point);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_effect_visual_point\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_COMMON_CHARCATER_SKELETON_POINTS), \"set_aura_effect_visual_point\", \"get_aura_effect_visual_point\");\n\n\tClassDB::bind_method(D_METHOD(\"get_aura_effect_visual\"), &SpellEffectVisualSimple::get_aura_effect_visual);\n\tClassDB::bind_method(D_METHOD(\"set_aura_effect_visual\", \"value\"), &SpellEffectVisualSimple::set_aura_effect_visual);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_effect_visual\", PROPERTY_HINT_RESOURCE_TYPE, \"PackedScene\"), \"set_aura_effect_visual\", \"get_aura_effect_visual\");\n}\n"
  },
  {
    "path": "data/spells/spell_effect_visual_simple.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPELL_EFFECT_VISUAL_SIMPLE_H\n#define SPELL_EFFECT_VISUAL_SIMPLE_H\n\n#include \"spell_effect_visual.h\"\n\n#include \"scene/resources/packed_scene.h\"\n\n#include \"../../entity_enums.h\"\n\nclass SpellEffectVisualSimple : public SpellEffectVisual {\n\tGDCLASS(SpellEffectVisualSimple, SpellEffectVisual);\n\npublic:\n\tbool has_spell_effect_visual();\n\n\tEntityEnums::CommonCharacterSkeletonPoints get_spell_effect_visual_point();\n\tvoid set_spell_effect_visual_point(EntityEnums::CommonCharacterSkeletonPoints point);\n\n\tRef<PackedScene> get_spell_effect_visual();\n\tvoid set_spell_effect_visual(Ref<PackedScene> value);\n\n\tbool has_spell_cast_finish_effect();\n\n\tEntityEnums::CommonCharacterSkeletonPoints get_spell_cast_finish_effect_point();\n\tvoid set_spell_cast_finish_effect_point(EntityEnums::CommonCharacterSkeletonPoints point);\n\n\tRef<PackedScene> get_spell_cast_finish_effect();\n\tvoid set_spell_cast_finish_effect(Ref<PackedScene> value);\n\n\tbool has_spell_cast_effect();\n\tRef<PackedScene> get_spell_cast_effect();\n\tvoid set_spell_cast_effect(Ref<PackedScene> value);\n\n\t//VisualEffect\n\tbool has_aura_effect_visual();\n\n\tEntityEnums::CommonCharacterSkeletonPoints get_aura_effect_visual_point();\n\tvoid set_aura_effect_visual_point(EntityEnums::CommonCharacterSkeletonPoints point);\n\n\tRef<PackedScene> get_aura_effect_visual();\n\tvoid set_aura_effect_visual(Ref<PackedScene> value);\n\n\tSpellEffectVisualSimple();\n\t~SpellEffectVisualSimple();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tEntityEnums::CommonCharacterSkeletonPoints _effect_visual_point;\n\tRef<PackedScene> _effect_visual;\n\n\tEntityEnums::CommonCharacterSkeletonPoints _spell_cast_finish_effect_point;\n\tRef<PackedScene> _spell_cast_finish_effect;\n\n\tRef<PackedScene> _spell_cast_effect;\n\n\tEntityEnums::CommonCharacterSkeletonPoints _aura_effect_visual_point;\n\tRef<PackedScene> _aura_effect_visual;\n};\n\n#endif\n"
  },
  {
    "path": "database/ess_resource_db.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"ess_resource_db.h\"\n\n#include \"../data/items/craft_recipe.h\"\n#include \"../data/species/entity_species_data.h\"\n#include \"../data/spells/spell.h\"\n#include \"../entities/data/entity_data.h\"\n#include \"../entities/resources/entity_resource.h\"\n#include \"../entities/skills/entity_skill_data.h\"\n\nRef<Spell> ESSResourceDB::get_skill_for_armor_type(const int index) {\n\tERR_FAIL_INDEX_V(index, ItemEnums::ARMOR_TYPE_MAX, Ref<Spell>());\n\n\treturn _armor_type_skills[index];\n}\nvoid ESSResourceDB::set_skill_for_armor_type(const int index, const Ref<Spell> &aura) {\n\tERR_FAIL_INDEX(index, ItemEnums::ARMOR_TYPE_MAX);\n\n\t_armor_type_skills[index] = aura;\n}\n\nvoid ESSResourceDB::add_entity_resource(Ref<EntityResource> cls) {\n\tif (!cls.is_valid())\n\t\treturn;\n\n\t_entity_resources_id_to_path.insert(cls->get_id(), cls->get_path());\n\t_entity_resources_path_to_id.insert(cls->get_path(), cls->get_id());\n}\n\nRef<EntityResource> ESSResourceDB::get_entity_resource_path(const StringName &path) {\n\treturn get_entity_resource(entity_resource_path_to_id(path));\n}\n\nvoid ESSResourceDB::add_entity_skill(Ref<EntitySkillData> cls) {\n\tif (!cls.is_valid())\n\t\treturn;\n\n\t_entity_skill_id_to_path.insert(cls->get_id(), cls->get_path());\n\t_entity_skill_path_to_id.insert(cls->get_path(), cls->get_id());\n}\n\nRef<EntitySkillData> ESSResourceDB::get_entity_skill_path(const StringName &path) {\n\treturn get_entity_skill(entity_skill_path_to_id(path));\n}\n\nvoid ESSResourceDB::add_entity_data(Ref<EntityData> cls) {\n\tif (!cls.is_valid())\n\t\treturn;\n\n\t_entity_data_id_to_path.insert(cls->get_id(), cls->get_path());\n\t_entity_data_path_to_id.insert(cls->get_path(), cls->get_id());\n}\n\nRef<EntityData> ESSResourceDB::get_entity_data_path(const StringName &path) {\n\treturn get_entity_data(entity_data_path_to_id(path));\n}\n\nvoid ESSResourceDB::add_spell(Ref<Spell> spell) {\n\tif (!spell.is_valid())\n\t\treturn;\n\n\t_spell_id_to_path.insert(spell->get_id(), spell->get_path());\n\t_spell_path_to_id.insert(spell->get_path(), spell->get_id());\n}\n\nRef<Spell> ESSResourceDB::get_spell_path(const StringName &path) {\n\treturn get_spell(spell_path_to_id(path));\n}\n\nvoid ESSResourceDB::add_craft_recipe(Ref<CraftRecipe> cda) {\n\tif (!cda.is_valid())\n\t\treturn;\n\n\t_craft_recipe_id_to_path.insert(cda->get_id(), cda->get_path());\n\t_craft_recipe_path_to_id.insert(cda->get_path(), cda->get_id());\n}\n\nRef<CraftRecipe> ESSResourceDB::get_craft_recipe_path(const StringName &path) {\n\treturn get_craft_recipe(craft_recipe_path_to_id(path));\n}\n\nvoid ESSResourceDB::add_item_template(Ref<ItemTemplate> cda) {\n\tif (!cda.is_valid())\n\t\treturn;\n\n\t_item_template_id_to_path.insert(cda->get_id(), cda->get_path());\n\t_item_template_path_to_id.insert(cda->get_path(), cda->get_id());\n}\n\nRef<ItemTemplate> ESSResourceDB::get_item_template_path(const StringName &path) {\n\treturn get_item_template(item_template_path_to_id(path));\n}\n\nvoid ESSResourceDB::add_entity_species_data(Ref<EntitySpeciesData> cda) {\n\tif (!cda.is_valid())\n\t\treturn;\n\n\t_entity_species_id_to_path.insert(cda->get_id(), cda->get_path());\n\t_entity_species_path_to_id.insert(cda->get_path(), cda->get_id());\n}\n\nRef<EntitySpeciesData> ESSResourceDB::get_entity_species_data_path(const StringName &path) {\n\treturn get_entity_species_data(entity_species_path_to_id(path));\n}\n\nStringName ESSResourceDB::entity_resource_id_to_path(const int id) const {\n\tERR_FAIL_COND_V(!_entity_resources_id_to_path.has(id), StringName());\n\n\treturn _entity_resources_id_to_path[id];\n}\nint ESSResourceDB::entity_resource_path_to_id(const StringName &path) const {\n\tERR_FAIL_COND_V(!_entity_resources_path_to_id.has(path), 0);\n\n\treturn _entity_resources_path_to_id[path];\n}\n\nStringName ESSResourceDB::entity_skill_id_to_path(const int id) const {\n\tERR_FAIL_COND_V(!_entity_skill_id_to_path.has(id), StringName());\n\n\treturn _entity_skill_id_to_path[id];\n}\nint ESSResourceDB::entity_skill_path_to_id(const StringName &path) const {\n\tERR_FAIL_COND_V(!_entity_skill_path_to_id.has(path), 0);\n\n\treturn _entity_skill_path_to_id[path];\n}\n\nStringName ESSResourceDB::entity_data_id_to_path(const int id) const {\n\tERR_FAIL_COND_V(!_entity_data_id_to_path.has(id), StringName());\n\n\treturn _entity_data_id_to_path[id];\n}\nint ESSResourceDB::entity_data_path_to_id(const StringName &path) const {\n\tERR_FAIL_COND_V(!_entity_data_path_to_id.has(path), 0);\n\n\treturn _entity_data_path_to_id[path];\n}\n\nStringName ESSResourceDB::spell_id_to_path(const int id) const {\n\tERR_FAIL_COND_V(!_spell_id_to_path.has(id), StringName());\n\n\treturn _spell_id_to_path[id];\n}\nint ESSResourceDB::spell_path_to_id(const StringName &path) const {\n\tERR_FAIL_COND_V(!_spell_path_to_id.has(path), 0);\n\n\treturn _spell_path_to_id[path];\n}\n\nStringName ESSResourceDB::craft_recipe_id_to_path(const int id) const {\n\tERR_FAIL_COND_V(!_craft_recipe_id_to_path.has(id), StringName());\n\n\treturn _craft_recipe_id_to_path[id];\n}\nint ESSResourceDB::craft_recipe_path_to_id(const StringName &path) const {\n\tERR_FAIL_COND_V(!_craft_recipe_path_to_id.has(path), 0);\n\n\treturn _craft_recipe_path_to_id[path];\n}\n\nStringName ESSResourceDB::item_template_id_to_path(const int id) const {\n\tERR_FAIL_COND_V(!_item_template_id_to_path.has(id), StringName());\n\n\treturn _item_template_id_to_path[id];\n}\nint ESSResourceDB::item_template_path_to_id(const StringName &path) const {\n\tERR_FAIL_COND_V(!_item_template_path_to_id.has(path), 0);\n\n\treturn _item_template_path_to_id[path];\n}\n\nStringName ESSResourceDB::entity_species_id_to_path(const int id) const {\n\tERR_FAIL_COND_V(!_entity_species_id_to_path.has(id), StringName());\n\n\treturn _entity_species_id_to_path[id];\n}\nint ESSResourceDB::entity_species_path_to_id(const StringName &path) const {\n\tERR_FAIL_COND_V(!_entity_species_path_to_id.has(path), 0);\n\n\treturn _entity_species_path_to_id[path];\n}\n\nvoid ESSResourceDB::clear() {\n}\n\nvoid ESSResourceDB::add_entity_resource_db(Ref<ESSResourceDB> other) {\n\tif (!other.is_valid())\n\t\treturn;\n\n\tfor (int i = 0; i < other->get_entity_resource_count(); ++i) {\n\t\tadd_entity_resource(other->get_entity_resource_index(i));\n\t}\n\n\tfor (int i = 0; i < other->get_entity_skill_count(); ++i) {\n\t\tadd_entity_skill(other->get_entity_skill_index(i));\n\t}\n\n\tfor (int i = 0; i < other->get_entity_data_count(); ++i) {\n\t\tadd_entity_data(other->get_entity_data_index(i));\n\t}\n\n\tfor (int i = 0; i < other->get_spell_count(); ++i) {\n\t\tadd_spell(other->get_spell_index(i));\n\t}\n\n\tfor (int i = 0; i < other->get_craft_recipe_count(); ++i) {\n\t\tadd_craft_recipe(other->get_craft_recipe_index(i));\n\t}\n\n\tfor (int i = 0; i < other->get_item_template_count(); ++i) {\n\t\tadd_item_template(other->get_item_template_index(i));\n\t}\n\n\tfor (int i = 0; i < other->get_entity_species_data_count(); ++i) {\n\t\tadd_entity_species_data(other->get_entity_species_data_index(i));\n\t}\n}\n\nvoid ESSResourceDB::initialize() {\n\tif (has_method(\"_initialize\"))\n\t\tcall(\"_initialize\");\n}\n\nESSResourceDB::ESSResourceDB() {\n}\n\nESSResourceDB::~ESSResourceDB() {\n\t_entity_resources_path_to_id.clear();\n\t_entity_resources_id_to_path.clear();\n\n\t_entity_skill_path_to_id.clear();\n\t_entity_skill_id_to_path.clear();\n\n\t_entity_data_path_to_id.clear();\n\t_entity_data_id_to_path.clear();\n\n\t_spell_path_to_id.clear();\n\t_spell_id_to_path.clear();\n\n\t_craft_recipe_path_to_id.clear();\n\t_craft_recipe_id_to_path.clear();\n\n\t_item_template_path_to_id.clear();\n\t_item_template_id_to_path.clear();\n\n\t_entity_species_path_to_id.clear();\n\t_entity_species_id_to_path.clear();\n}\n\nvoid ESSResourceDB::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_skill_for_armor_type\", \"index\"), &ESSResourceDB::get_skill_for_armor_type);\n\tClassDB::bind_method(D_METHOD(\"set_skill_for_armor_type\", \"index\", \"aura\"), &ESSResourceDB::set_skill_for_armor_type);\n\n\tfor (int i = 0; i < ItemEnums::ARMOR_TYPE_MAX; ++i) {\n\t\tADD_PROPERTYI(PropertyInfo(Variant::OBJECT, \"skill_for_armor_type_\" + itos(i), PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"set_skill_for_armor_type\", \"get_skill_for_armor_type\", i);\n\t}\n\n\t//EntityResource\n\tClassDB::bind_method(D_METHOD(\"add_entity_resource\", \"cls\"), &ESSResourceDB::add_entity_resource);\n\tClassDB::bind_method(D_METHOD(\"get_entity_resource\", \"class_id\"), &ESSResourceDB::get_entity_resource);\n\tClassDB::bind_method(D_METHOD(\"get_entity_resource_index\", \"index\"), &ESSResourceDB::get_entity_resource_index);\n\tClassDB::bind_method(D_METHOD(\"get_entity_resource_count\"), &ESSResourceDB::get_entity_resource_count);\n\tClassDB::bind_method(D_METHOD(\"get_entity_resources\"), &ESSResourceDB::get_entity_resources);\n\tClassDB::bind_method(D_METHOD(\"set_entity_resources\", \"recipe\"), &ESSResourceDB::set_entity_resources);\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_resource_path\", \"path\"), &ESSResourceDB::get_entity_resource_path);\n\tClassDB::bind_method(D_METHOD(\"entity_resource_id_to_path\", \"id\"), &ESSResourceDB::entity_resource_id_to_path);\n\tClassDB::bind_method(D_METHOD(\"entity_resource_path_to_id\", \"path\"), &ESSResourceDB::entity_resource_path_to_id);\n\n\t//EntitySkills\n\tClassDB::bind_method(D_METHOD(\"add_entity_skill\", \"cls\"), &ESSResourceDB::add_entity_skill);\n\tClassDB::bind_method(D_METHOD(\"get_entity_skill\", \"class_id\"), &ESSResourceDB::get_entity_skill);\n\tClassDB::bind_method(D_METHOD(\"get_entity_skill_index\", \"index\"), &ESSResourceDB::get_entity_skill_index);\n\tClassDB::bind_method(D_METHOD(\"get_entity_skill_count\"), &ESSResourceDB::get_entity_skill_count);\n\tClassDB::bind_method(D_METHOD(\"get_entity_skills\"), &ESSResourceDB::get_entity_skills);\n\tClassDB::bind_method(D_METHOD(\"set_entity_skills\", \"recipe\"), &ESSResourceDB::set_entity_skills);\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_skill_path\", \"path\"), &ESSResourceDB::get_entity_skill_path);\n\tClassDB::bind_method(D_METHOD(\"entity_skill_id_to_path\", \"id\"), &ESSResourceDB::entity_skill_id_to_path);\n\tClassDB::bind_method(D_METHOD(\"entity_skill_path_to_id\", \"path\"), &ESSResourceDB::entity_skill_path_to_id);\n\n\t//EntityData\n\tClassDB::bind_method(D_METHOD(\"add_entity_data\", \"cls\"), &ESSResourceDB::add_entity_data);\n\tClassDB::bind_method(D_METHOD(\"get_entity_data\", \"class_id\"), &ESSResourceDB::get_entity_data);\n\tClassDB::bind_method(D_METHOD(\"get_entity_data_index\", \"index\"), &ESSResourceDB::get_entity_data_index);\n\tClassDB::bind_method(D_METHOD(\"get_entity_data_count\"), &ESSResourceDB::get_entity_data_count);\n\tClassDB::bind_method(D_METHOD(\"get_entity_datas\"), &ESSResourceDB::get_entity_datas);\n\tClassDB::bind_method(D_METHOD(\"set_entity_datas\", \"recipe\"), &ESSResourceDB::set_entity_datas);\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_data_path\", \"path\"), &ESSResourceDB::get_entity_data_path);\n\tClassDB::bind_method(D_METHOD(\"entity_data_id_to_path\", \"id\"), &ESSResourceDB::entity_data_id_to_path);\n\tClassDB::bind_method(D_METHOD(\"entity_data_path_to_id\", \"path\"), &ESSResourceDB::entity_data_path_to_id);\n\n\t//Spell\n\tClassDB::bind_method(D_METHOD(\"add_spell\", \"spell\"), &ESSResourceDB::add_spell);\n\tClassDB::bind_method(D_METHOD(\"get_spell\", \"spell_id\"), &ESSResourceDB::get_spell);\n\tClassDB::bind_method(D_METHOD(\"get_spell_index\", \"index\"), &ESSResourceDB::get_spell_index);\n\tClassDB::bind_method(D_METHOD(\"get_spell_count\"), &ESSResourceDB::get_spell_count);\n\tClassDB::bind_method(D_METHOD(\"get_spells\"), &ESSResourceDB::get_spells);\n\tClassDB::bind_method(D_METHOD(\"set_spells\", \"recipe\"), &ESSResourceDB::set_spells);\n\n\tClassDB::bind_method(D_METHOD(\"get_spell_path\", \"path\"), &ESSResourceDB::get_spell_path);\n\tClassDB::bind_method(D_METHOD(\"spell_id_to_path\", \"id\"), &ESSResourceDB::spell_id_to_path);\n\tClassDB::bind_method(D_METHOD(\"spell_path_to_id\", \"path\"), &ESSResourceDB::spell_path_to_id);\n\n\t//Craft Data\n\tClassDB::bind_method(D_METHOD(\"add_craft_recipe\", \"craft_recipe\"), &ESSResourceDB::add_craft_recipe);\n\tClassDB::bind_method(D_METHOD(\"get_craft_recipe\", \"craft_recipe_id\"), &ESSResourceDB::get_craft_recipe);\n\tClassDB::bind_method(D_METHOD(\"get_craft_recipe_index\", \"index\"), &ESSResourceDB::get_craft_recipe_index);\n\tClassDB::bind_method(D_METHOD(\"get_craft_recipe_count\"), &ESSResourceDB::get_craft_recipe_count);\n\tClassDB::bind_method(D_METHOD(\"get_craft_recipes\"), &ESSResourceDB::get_craft_recipes);\n\tClassDB::bind_method(D_METHOD(\"set_craft_recipes\", \"recipe\"), &ESSResourceDB::set_craft_recipes);\n\n\tClassDB::bind_method(D_METHOD(\"get_craft_recipe_path\", \"path\"), &ESSResourceDB::get_craft_recipe_path);\n\tClassDB::bind_method(D_METHOD(\"craft_recipe_id_to_path\", \"id\"), &ESSResourceDB::craft_recipe_id_to_path);\n\tClassDB::bind_method(D_METHOD(\"craft_recipe_path_to_id\", \"path\"), &ESSResourceDB::craft_recipe_path_to_id);\n\n\t//Item Templates\n\tClassDB::bind_method(D_METHOD(\"add_item_template\", \"item_template\"), &ESSResourceDB::add_item_template);\n\tClassDB::bind_method(D_METHOD(\"get_item_template\", \"item_template_id\"), &ESSResourceDB::get_item_template);\n\tClassDB::bind_method(D_METHOD(\"get_item_template_index\", \"index\"), &ESSResourceDB::get_item_template_index);\n\tClassDB::bind_method(D_METHOD(\"get_item_template_count\"), &ESSResourceDB::get_item_template_count);\n\tClassDB::bind_method(D_METHOD(\"get_item_templates\"), &ESSResourceDB::get_item_templates);\n\tClassDB::bind_method(D_METHOD(\"set_item_templates\", \"recipe\"), &ESSResourceDB::set_item_templates);\n\n\tClassDB::bind_method(D_METHOD(\"get_item_template_path\", \"path\"), &ESSResourceDB::get_item_template_path);\n\tClassDB::bind_method(D_METHOD(\"item_template_id_to_path\", \"id\"), &ESSResourceDB::item_template_id_to_path);\n\tClassDB::bind_method(D_METHOD(\"item_template_path_to_id\", \"path\"), &ESSResourceDB::item_template_path_to_id);\n\n\t//Entity Species\n\tClassDB::bind_method(D_METHOD(\"add_entity_species_data\", \"pcd\"), &ESSResourceDB::add_entity_species_data);\n\tClassDB::bind_method(D_METHOD(\"get_entity_species_data\", \"pcd_id\"), &ESSResourceDB::get_entity_species_data);\n\tClassDB::bind_method(D_METHOD(\"get_entity_species_data_index\", \"index\"), &ESSResourceDB::get_entity_species_data_index);\n\tClassDB::bind_method(D_METHOD(\"get_entity_species_data_count\"), &ESSResourceDB::get_entity_species_data_count);\n\tClassDB::bind_method(D_METHOD(\"get_entity_species_datas\"), &ESSResourceDB::get_entity_species_datas);\n\tClassDB::bind_method(D_METHOD(\"set_entity_species_datas\", \"recipe\"), &ESSResourceDB::set_entity_species_datas);\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_species_data_path\", \"path\"), &ESSResourceDB::get_entity_species_data_path);\n\tClassDB::bind_method(D_METHOD(\"entity_species_id_to_path\", \"id\"), &ESSResourceDB::entity_species_id_to_path);\n\tClassDB::bind_method(D_METHOD(\"entity_species_path_to_id\", \"path\"), &ESSResourceDB::entity_species_path_to_id);\n\n\tClassDB::bind_method(D_METHOD(\"clear\"), &ESSResourceDB::clear);\n\tClassDB::bind_method(D_METHOD(\"add_entity_resource_db\", \"other\"), &ESSResourceDB::add_entity_resource_db);\n\n\t////GDVIRTUAL_BIND(\"_initialize\");\n\tClassDB::bind_method(D_METHOD(\"initialize\"), &ESSResourceDB::initialize);\n}\n"
  },
  {
    "path": "database/ess_resource_db.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ESS_RESOURCE_DB_H\n#define ESS_RESOURCE_DB_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n#include \"core/templates/hash_map.h\"\n#include \"core/string/ustring.h\"\n#include \"core/core_bind.h\"\n#include \"core/variant/variant.h\"\n\n\n#include \"../item_enums.h\"\n\nclass Spell;\nclass EntityData;\nclass CraftRecipe;\nclass ItemTemplate;\nclass EntityResource;\nclass EntitySkillData;\nclass EntityCreateInfo;\nclass SpellCastInfo;\nclass EntitySpeciesData;\n\nclass ESSResourceDB : public Resource {\n\tGDCLASS(ESSResourceDB, Resource);\n\npublic:\n\tRef<Spell> get_skill_for_armor_type(const int index);\n\tvoid set_skill_for_armor_type(const int index, const Ref<Spell> &aura);\n\n\tvirtual Ref<EntityResource> get_entity_resource(int class_id) = 0;\n\tvirtual Ref<EntityResource> get_entity_resource_index(int index) = 0;\n\tvirtual int get_entity_resource_count() = 0;\n\tvirtual void add_entity_resource(Ref<EntityResource> cls);\n\tvirtual Vector<Variant> get_entity_resources() const = 0;\n\tvirtual void set_entity_resources(const Vector<Variant> &data) = 0;\n\n\tRef<EntityResource> get_entity_resource_path(const StringName &path);\n\tStringName entity_resource_id_to_path(const int id) const;\n\tint entity_resource_path_to_id(const StringName &path) const;\n\n\tvirtual Ref<EntitySkillData> get_entity_skill(int class_id) = 0;\n\tvirtual Ref<EntitySkillData> get_entity_skill_index(int index) = 0;\n\tvirtual int get_entity_skill_count() = 0;\n\tvirtual void add_entity_skill(Ref<EntitySkillData> cls);\n\tvirtual Vector<Variant> get_entity_skills() const = 0;\n\tvirtual void set_entity_skills(const Vector<Variant> &data) = 0;\n\n\tRef<EntitySkillData> get_entity_skill_path(const StringName &path);\n\tStringName entity_skill_id_to_path(const int id) const;\n\tint entity_skill_path_to_id(const StringName &path) const;\n\n\tvirtual Ref<EntityData> get_entity_data(int class_id) = 0;\n\tvirtual Ref<EntityData> get_entity_data_index(int index) = 0;\n\tvirtual int get_entity_data_count() = 0;\n\tvirtual void add_entity_data(Ref<EntityData> cls);\n\tvirtual Vector<Variant> get_entity_datas() const = 0;\n\tvirtual void set_entity_datas(const Vector<Variant> &data) = 0;\n\n\tRef<EntityData> get_entity_data_path(const StringName &path);\n\tStringName entity_data_id_to_path(const int id) const;\n\tint entity_data_path_to_id(const StringName &path) const;\n\n\tvirtual Ref<Spell> get_spell(int spell_id) = 0;\n\tvirtual Ref<Spell> get_spell_index(int index) = 0;\n\tvirtual int get_spell_count() = 0;\n\tvirtual void add_spell(Ref<Spell> spell);\n\tvirtual Vector<Variant> get_spells() const = 0;\n\tvirtual void set_spells(const Vector<Variant> &data) = 0;\n\n\tRef<Spell> get_spell_path(const StringName &path);\n\tStringName spell_id_to_path(const int id) const;\n\tint spell_path_to_id(const StringName &path) const;\n\n\tvirtual Ref<CraftRecipe> get_craft_recipe(int craft_id) = 0;\n\tvirtual Ref<CraftRecipe> get_craft_recipe_index(int index) = 0;\n\tvirtual int get_craft_recipe_count() = 0;\n\tvirtual void add_craft_recipe(Ref<CraftRecipe> aura);\n\tvirtual Vector<Variant> get_craft_recipes() const = 0;\n\tvirtual void set_craft_recipes(const Vector<Variant> &data) = 0;\n\n\tRef<CraftRecipe> get_craft_recipe_path(const StringName &path);\n\tStringName craft_recipe_id_to_path(const int id) const;\n\tint craft_recipe_path_to_id(const StringName &path) const;\n\n\tvirtual void add_item_template(Ref<ItemTemplate> aura);\n\tvirtual Ref<ItemTemplate> get_item_template(int item_id) = 0;\n\tvirtual Ref<ItemTemplate> get_item_template_index(int index) = 0;\n\tvirtual int get_item_template_count() = 0;\n\tvirtual Vector<Variant> get_item_templates() const = 0;\n\tvirtual void set_item_templates(const Vector<Variant> &data) = 0;\n\n\tRef<ItemTemplate> get_item_template_path(const StringName &path);\n\tStringName item_template_id_to_path(const int id) const;\n\tint item_template_path_to_id(const StringName &path) const;\n\n\tvirtual void add_entity_species_data(Ref<EntitySpeciesData> aura);\n\tvirtual Ref<EntitySpeciesData> get_entity_species_data(int item_id) = 0;\n\tvirtual Ref<EntitySpeciesData> get_entity_species_data_index(int index) = 0;\n\tvirtual int get_entity_species_data_count() = 0;\n\tvirtual Vector<Variant> get_entity_species_datas() const = 0;\n\tvirtual void set_entity_species_datas(const Vector<Variant> &data) = 0;\n\n\tRef<EntitySpeciesData> get_entity_species_data_path(const StringName &path);\n\tStringName entity_species_id_to_path(const int id) const;\n\tint entity_species_path_to_id(const StringName &path) const;\n\n\tvirtual void clear();\n\n\tvoid add_entity_resource_db(Ref<ESSResourceDB> other);\n\n\tvoid initialize();\n\n\tESSResourceDB();\n\t~ESSResourceDB();\n\nprotected:\n\tstatic void _bind_methods();\n\n\tRef<Spell> _armor_type_skills[ItemEnums::ARMOR_TYPE_MAX];\n\n\tHashMap<int, StringName> _entity_resources_id_to_path;\n\tHashMap<StringName, int> _entity_resources_path_to_id;\n\n\tHashMap<int, StringName> _entity_skill_id_to_path;\n\tHashMap<StringName, int> _entity_skill_path_to_id;\n\n\tHashMap<int, StringName> _entity_data_id_to_path;\n\tHashMap<StringName, int> _entity_data_path_to_id;\n\n\tHashMap<int, StringName> _spell_id_to_path;\n\tHashMap<StringName, int> _spell_path_to_id;\n\n\tHashMap<int, StringName> _craft_recipe_id_to_path;\n\tHashMap<StringName, int> _craft_recipe_path_to_id;\n\n\tHashMap<int, StringName> _item_template_id_to_path;\n\tHashMap<StringName, int> _item_template_path_to_id;\n\n\tHashMap<int, StringName> _entity_species_id_to_path;\n\tHashMap<StringName, int> _entity_species_path_to_id;\n};\n\n#endif\n"
  },
  {
    "path": "database/ess_resource_db_folders.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"ess_resource_db_folders.h\"\n\n#include \"../data/items/craft_recipe.h\"\n#include \"../data/species/entity_species_data.h\"\n#include \"../data/spells/spell.h\"\n#include \"../entities/data/entity_data.h\"\n#include \"../entities/resources/entity_resource.h\"\n#include \"../entities/skills/entity_skill_data.h\"\n#include \"core/io/dir_access.h\"\n\nbool ESSResourceDBFolders::get_automatic_load() const {\n\treturn _automatic_load;\n}\nvoid ESSResourceDBFolders::set_automatic_load(const bool load) {\n\t_automatic_load = load;\n}\n\nbool ESSResourceDBFolders::get_load_folders() const {\n\treturn _load_folders;\n}\nvoid ESSResourceDBFolders::set_load_folders(const bool load) {\n\t_load_folders = load;\n}\n\nPoolStringArray ESSResourceDBFolders::get_folders() const {\n\treturn _folders;\n}\nvoid ESSResourceDBFolders::set_folders(const PoolStringArray &data) {\n\t_folders = data;\n}\n\nvoid ESSResourceDBFolders::_initialize() {\n\tload_all();\n}\n\nvoid ESSResourceDBFolders::load_all() {\n\tload_folders();\n}\n\nvoid ESSResourceDBFolders::load_folders() {\n\tfor (int i = 0; i < _folders.size(); ++i) {\n\t\tload_folder(_folders[i]);\n\t}\n}\n\nvoid ESSResourceDBFolders::load_folder(const String &folder) {\n\tRef<DirAccess> dir = DirAccess::open(folder);\n\n\tbool ew = folder.ends_with(\"/\");\n\n\tif (dir.is_valid()) {\n\t\tdir->list_dir_begin();\n\n\t\tString filename;\n\n\t\twhile (true) {\n\t\t\tfilename = dir->get_next();\n\n\t\t\tif (filename == \"\")\n\t\t\t\tbreak;\n\n\t\t\tif (!dir->current_is_dir()) {\n\t\t\t\tString path;\n\n\t\t\t\tif (ew)\n\t\t\t\t\tpath = folder + filename;\n\t\t\t\telse\n\t\t\t\t\tpath = folder + \"/\" + filename;\n\n\t\t\t\tRef<Resource> res = load_resource(path);\n\n\t\t\t\tERR_CONTINUE(!res.is_valid());\n\n\t\t\t\tadd_resource(res);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tprint_error(\"An error occurred when trying to access the path.\");\n\t}\n}\n\nvoid ESSResourceDBFolders::add_resource(const Ref<Resource> &resource) {\n\tStringName cls = resource->get_class_name();\n\n\tif (cls == \"EntityResource\") {\n\t\tadd_entity_resource(resource);\n\t} else if (cls == \"EntitySkillData\") {\n\t\tadd_entity_skill(resource);\n\t} else if (cls == \"EntityData\") {\n\t\tadd_entity_data(resource);\n\t} else if (cls == \"Spell\") {\n\t\tadd_spell(resource);\n\t} else if (cls == \"CraftRecipe\") {\n\t\tadd_craft_recipe(resource);\n\t} else if (cls == \"ItemTemplate\") {\n\t\tadd_item_template(resource);\n\t} else if (cls == \"EntitySpeciesData\") {\n\t\tadd_entity_species_data(resource);\n\t}\n}\n\nRef<Resource> ESSResourceDBFolders::load_resource(const String &path, const String &type_hint) {\n\treturn ResourceLoader::load(path, type_hint);\n}\n\nESSResourceDBFolders::ESSResourceDBFolders() {\n\t_automatic_load = false;\n\n\t_xp_data_path = \"\";\n\n\tif (_automatic_load) {\n\t\tcall_deferred(\"load_all\");\n\t}\n}\n\nESSResourceDBFolders::~ESSResourceDBFolders() {\n}\n\nvoid ESSResourceDBFolders::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_automatic_load\"), &ESSResourceDBFolders::get_automatic_load);\n\tClassDB::bind_method(D_METHOD(\"set_automatic_load\", \"load\"), &ESSResourceDBFolders::set_automatic_load);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"automatic_load\"), \"set_automatic_load\", \"get_automatic_load\");\n\n\tClassDB::bind_method(D_METHOD(\"get_folders\"), &ESSResourceDBFolders::get_folders);\n\tClassDB::bind_method(D_METHOD(\"set_folders\", \"recipe\"), &ESSResourceDBFolders::set_folders);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, \"folders\"), \"set_folders\", \"get_folders\");\n\n\t//load\n\tClassDB::bind_method(D_METHOD(\"_initialize\"), &ESSResourceDBFolders::_initialize);\n\tClassDB::bind_method(D_METHOD(\"load_all\"), &ESSResourceDBFolders::load_all);\n\tClassDB::bind_method(D_METHOD(\"load_folders\"), &ESSResourceDBFolders::load_folders);\n\tClassDB::bind_method(D_METHOD(\"load_folder\", \"folder\"), &ESSResourceDBFolders::load_folder);\n\tClassDB::bind_method(D_METHOD(\"add_resource\", \"resource\"), &ESSResourceDBFolders::add_resource);\n\n\tClassDB::bind_method(D_METHOD(\"load_resource\", \"path\", \"type_hint\"), &ESSResourceDBFolders::load_resource, DEFVAL(\"\"));\n}\n"
  },
  {
    "path": "database/ess_resource_db_folders.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ESS_RESOURCE_DB_FOLDERS_H\n#define ESS_RESOURCE_DB_FOLDERS_H\n\n#include \"core/version.h\"\n\n#include \"core/variant/variant.h\"\n#include \"core/templates/vector.h\"\n#include \"core/templates/hash_map.h\"\n#include \"core/string/ustring.h\"\n#include \"core/config/engine.h\"\n#include \"core/variant/array.h\"\n#include \"core/core_bind.h\"\n\n\n#include \"ess_resource_db_map.h\"\n\n#include \"scene/main/node.h\"\n\n#include \"../item_enums.h\"\n\n#include \"../defines.h\"\n\nclass Spell;\nclass EntityData;\nclass CraftRecipe;\nclass ItemTemplate;\nclass EntityResource;\nclass EntitySkillData;\nclass EntityCreateInfo;\nclass SpellCastInfo;\nclass EntitySpeciesData;\n\nclass ESSResourceDBFolders : public ESSResourceDBMap {\n\tGDCLASS(ESSResourceDBFolders, ESSResourceDBMap);\n\npublic:\n\tbool get_automatic_load() const;\n\tvoid set_automatic_load(const bool load);\n\n\tbool get_load_folders() const;\n\tvoid set_load_folders(const bool load);\n\n\tPoolStringArray get_folders() const;\n\tvoid set_folders(const PoolStringArray &folders);\n\n\tvirtual void _initialize();\n\tvoid load_all();\n\tvoid load_folders();\n\tvoid load_folder(const String &folder);\n\tvoid add_resource(const Ref<Resource> &resource);\n\n\tRef<Resource> load_resource(const String &path, const String &type_hint = \"\");\n\n\tESSResourceDBFolders();\n\t~ESSResourceDBFolders();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tString _xp_data_path;\n\n\tPoolStringArray _folders;\n\n\tbool _automatic_load;\n\tbool _load_folders;\n};\n\n#endif\n"
  },
  {
    "path": "database/ess_resource_db_map.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"ess_resource_db_map.h\"\n\n#include \"../data/items/craft_recipe.h\"\n#include \"../data/species/entity_species_data.h\"\n#include \"../data/spells/spell.h\"\n#include \"../entities/data/entity_data.h\"\n#include \"../entities/resources/entity_resource.h\"\n#include \"../entities/skills/entity_skill_data.h\"\n\nRef<EntityResource> ESSResourceDBMap::get_entity_resource(int class_id) {\n\t//ERR_FAIL_COND_V_MSG(!_entity_resource_map.has(class_id), Ref<EntityResource>(), \"Could not find EntityResource! Id:\" + String::num(class_id));\n\n\tif (!_entity_resource_map.has(class_id)) {\n\t\treturn Ref<EntityResource>();\n\t}\n\n\treturn _entity_resource_map.get(class_id);\n}\nRef<EntityResource> ESSResourceDBMap::get_entity_resource_index(int index) {\n\tERR_FAIL_INDEX_V(index, _entity_resources.size(), Ref<EntityResource>(NULL));\n\n\treturn _entity_resources.get(index);\n}\nint ESSResourceDBMap::get_entity_resource_count() {\n\treturn _entity_resources.size();\n}\nvoid ESSResourceDBMap::add_entity_resource(Ref<EntityResource> cls) {\n\tERR_FAIL_COND(!cls.is_valid());\n\n\t_entity_resources.push_back(cls);\n\t_entity_resource_map[cls->get_id()] = cls;\n\n\tESSResourceDB::add_entity_resource(cls);\n}\nVector<Variant> ESSResourceDBMap::get_entity_resources() const {\n\tVARIANT_ARRAY_GET(_entity_resources);\n}\nvoid ESSResourceDBMap::set_entity_resources(const Vector<Variant> &data) {\n\t_entity_resources.clear();\n\t_entity_resource_map.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<EntityResource> d = Ref<EntityResource>(data[i]);\n\n\t\tERR_CONTINUE(!d.is_valid());\n\n\t\tadd_entity_resource(d);\n\t}\n}\n\nRef<EntitySkillData> ESSResourceDBMap::get_entity_skill(int class_id) {\n\tERR_FAIL_COND_V_MSG(!_entity_skill_map.has(class_id), Ref<EntitySkillData>(), \"Could not find EntitySkillData! Id:\" + String::num(class_id));\n\n\treturn _entity_skill_map.get(class_id);\n}\nRef<EntitySkillData> ESSResourceDBMap::get_entity_skill_index(int index) {\n\tERR_FAIL_INDEX_V(index, _entity_skills.size(), Ref<EntitySkillData>(NULL));\n\n\treturn _entity_skills.get(index);\n}\nint ESSResourceDBMap::get_entity_skill_count() {\n\treturn _entity_skills.size();\n}\nvoid ESSResourceDBMap::add_entity_skill(Ref<EntitySkillData> cls) {\n\tERR_FAIL_COND(!cls.is_valid());\n\n\t_entity_skills.push_back(cls);\n\t_entity_skill_map[cls->get_id()] = cls;\n\n\tESSResourceDB::add_entity_skill(cls);\n}\nVector<Variant> ESSResourceDBMap::get_entity_skills() const {\n\tVARIANT_ARRAY_GET(_entity_skills);\n}\nvoid ESSResourceDBMap::set_entity_skills(const Vector<Variant> &data) {\n\t_entity_skills.clear();\n\t_entity_skill_map.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<EntitySkillData> d = Ref<EntitySkillData>(data[i]);\n\n\t\tERR_CONTINUE(!d.is_valid());\n\n\t\tadd_entity_skill(d);\n\t}\n}\n\nRef<EntityData> ESSResourceDBMap::get_entity_data(int class_id) {\n\tERR_FAIL_COND_V_MSG(!_entity_data_map.has(class_id), Ref<EntityData>(), \"Could not find EntityData! Id:\" + String::num(class_id));\n\n\treturn _entity_data_map.get(class_id);\n}\nRef<EntityData> ESSResourceDBMap::get_entity_data_index(int index) {\n\tERR_FAIL_INDEX_V(index, _entity_datas.size(), Ref<EntityData>(NULL));\n\n\treturn _entity_datas.get(index);\n}\nint ESSResourceDBMap::get_entity_data_count() {\n\treturn _entity_datas.size();\n}\nvoid ESSResourceDBMap::add_entity_data(Ref<EntityData> cls) {\n\tERR_FAIL_COND(!cls.is_valid());\n\n\t_entity_datas.push_back(cls);\n\t_entity_data_map[cls->get_id()] = cls;\n\n\tESSResourceDB::add_entity_data(cls);\n}\nVector<Variant> ESSResourceDBMap::get_entity_datas() const {\n\tVARIANT_ARRAY_GET(_entity_datas);\n}\nvoid ESSResourceDBMap::set_entity_datas(const Vector<Variant> &data) {\n\t_craft_recipes.clear();\n\t_craft_recipe_map.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<EntityResource> d = Ref<EntityResource>(data[i]);\n\n\t\tERR_CONTINUE(!d.is_valid());\n\n\t\tadd_entity_data(d);\n\t}\n}\n\nRef<Spell> ESSResourceDBMap::get_spell(int spell_id) {\n\tERR_FAIL_COND_V_MSG(!_spell_map.has(spell_id), Ref<Spell>(), \"Could not find Spell! Id:\" + String::num(spell_id));\n\n\treturn _spell_map.get(spell_id);\n}\n\nRef<Spell> ESSResourceDBMap::get_spell_index(int index) {\n\tERR_FAIL_INDEX_V(index, _spells.size(), Ref<Spell>(NULL));\n\n\treturn _spells.get(index);\n}\nint ESSResourceDBMap::get_spell_count() {\n\treturn _spells.size();\n}\nvoid ESSResourceDBMap::add_spell(Ref<Spell> spell) {\n\tERR_FAIL_COND(!spell.is_valid());\n\n\t_spells.push_back(spell);\n\t_spell_map[spell->get_id()] = spell;\n\n\tESSResourceDB::add_spell(spell);\n}\nVector<Variant> ESSResourceDBMap::get_spells() const {\n\tVARIANT_ARRAY_GET(_spells);\n}\nvoid ESSResourceDBMap::set_spells(const Vector<Variant> &data) {\n\t_spells.clear();\n\t_spell_map.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<Spell> d = Ref<Spell>(data[i]);\n\n\t\tERR_CONTINUE(!d.is_valid());\n\n\t\tadd_spell(d);\n\t}\n}\n\n//Craft Data\nvoid ESSResourceDBMap::add_craft_recipe(Ref<CraftRecipe> cda) {\n\tERR_FAIL_COND(!cda.is_valid());\n\n\t_craft_recipes.push_back(cda);\n\t_craft_recipe_map[cda->get_id()] = cda;\n\n\tESSResourceDB::add_craft_recipe(cda);\n}\n\nRef<CraftRecipe> ESSResourceDBMap::get_craft_recipe(int craft_id) {\n\tERR_FAIL_COND_V_MSG(!_craft_recipe_map.has(craft_id), Ref<CraftRecipe>(), \"Could not find CraftRecipe! Id:\" + String::num(craft_id));\n\n\treturn _craft_recipe_map.get(craft_id);\n}\n\nRef<CraftRecipe> ESSResourceDBMap::get_craft_recipe_index(int index) {\n\tERR_FAIL_INDEX_V(index, _craft_recipes.size(), Ref<CraftRecipe>());\n\n\treturn _craft_recipes.get(index);\n}\n\nint ESSResourceDBMap::get_craft_recipe_count() {\n\treturn _craft_recipes.size();\n}\n\nVector<Variant> ESSResourceDBMap::get_craft_recipes() const {\n\tVARIANT_ARRAY_GET(_craft_recipes);\n}\nvoid ESSResourceDBMap::set_craft_recipes(const Vector<Variant> &data) {\n\t_craft_recipes.clear();\n\t_craft_recipe_map.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<CraftRecipe> d = Ref<CraftRecipe>(data[i]);\n\n\t\tERR_CONTINUE(!d.is_valid());\n\n\t\tadd_craft_recipe(d);\n\t}\n}\n\nvoid ESSResourceDBMap::add_item_template(Ref<ItemTemplate> cda) {\n\tERR_FAIL_COND(!cda.is_valid());\n\n\t_item_templates.push_back(cda);\n\t_item_template_map[cda->get_id()] = cda;\n\n\tESSResourceDB::add_item_template(cda);\n}\n\nRef<ItemTemplate> ESSResourceDBMap::get_item_template(int item_id) {\n\tERR_FAIL_COND_V_MSG(!_item_template_map.has(item_id), Ref<ItemTemplate>(), \"Could not find ItemTemplate! Id:\" + String::num(item_id));\n\n\treturn _item_template_map.get(item_id);\n}\n\nRef<ItemTemplate> ESSResourceDBMap::get_item_template_index(int index) {\n\tERR_FAIL_INDEX_V(index, _item_templates.size(), Ref<ItemTemplate>());\n\n\treturn _item_templates.get(index);\n}\n\nint ESSResourceDBMap::get_item_template_count() {\n\treturn _item_templates.size();\n}\nVector<Variant> ESSResourceDBMap::get_item_templates() const {\n\tVARIANT_ARRAY_GET(_item_templates);\n}\nvoid ESSResourceDBMap::set_item_templates(const Vector<Variant> &data) {\n\t_item_templates.clear();\n\t_item_template_map.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<ItemTemplate> d = Ref<ItemTemplate>(data[i]);\n\n\t\tERR_CONTINUE(!d.is_valid());\n\n\t\tadd_item_template(d);\n\t}\n}\n\nvoid ESSResourceDBMap::add_entity_species_data(Ref<EntitySpeciesData> cda) {\n\tERR_FAIL_COND(!cda.is_valid());\n\n\t_entity_species_datas.push_back(cda);\n\t_entity_species_data_map[cda->get_id()] = cda;\n\n\tESSResourceDB::add_entity_species_data(cda);\n}\nRef<EntitySpeciesData> ESSResourceDBMap::get_entity_species_data(int item_id) {\n\tif (!_entity_species_data_map.has(item_id))\n\t\treturn Ref<EntitySpeciesData>();\n\n\treturn _entity_species_data_map.get(item_id);\n}\nRef<EntitySpeciesData> ESSResourceDBMap::get_entity_species_data_index(int index) {\n\tERR_FAIL_INDEX_V(index, _entity_species_datas.size(), Ref<EntitySpeciesData>());\n\n\treturn _entity_species_datas.get(index);\n}\nint ESSResourceDBMap::get_entity_species_data_count() {\n\treturn _entity_species_datas.size();\n}\nVector<Variant> ESSResourceDBMap::get_entity_species_datas() const {\n\tVARIANT_ARRAY_GET(_entity_species_datas);\n}\nvoid ESSResourceDBMap::set_entity_species_datas(const Vector<Variant> &data) {\n\t_entity_species_datas.clear();\n\t_entity_species_data_map.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<EntitySpeciesData> d = Ref<EntitySpeciesData>(data[i]);\n\n\t\tERR_CONTINUE(!d.is_valid());\n\n\t\tadd_item_template(d);\n\t}\n}\n\nESSResourceDBMap::ESSResourceDBMap() {\n}\n\nESSResourceDBMap::~ESSResourceDBMap() {\n\t_entity_resources.clear();\n\t_entity_resource_map.clear();\n\n\t_entity_skills.clear();\n\t_entity_skill_map.clear();\n\n\t_entity_datas.clear();\n\t_entity_data_map.clear();\n\n\t_spells.clear();\n\t_spell_map.clear();\n\n\t_craft_recipes.clear();\n\t_craft_recipe_map.clear();\n\n\t_item_templates.clear();\n\t_item_template_map.clear();\n\n\t_entity_species_datas.clear();\n\t_entity_species_data_map.clear();\n}\n\nvoid ESSResourceDBMap::_bind_methods() {\n}\n"
  },
  {
    "path": "database/ess_resource_db_map.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ESS_RESOURCE_DB_MAP_H\n#define ESS_RESOURCE_DB_MAP_H\n\n#include \"ess_resource_db.h\"\n\n#include \"core/version.h\"\n\n#include \"core/variant/variant.h\"\n#include \"core/templates/vector.h\"\n#include \"core/templates/hash_map.h\"\n#include \"core/string/ustring.h\"\n#include \"core/config/engine.h\"\n#include \"core/variant/array.h\"\n#include \"core/core_bind.h\"\n\n\n#include \"scene/main/node.h\"\n\n#include \"../item_enums.h\"\n\n#include \"../defines.h\"\n\nclass Spell;\nclass EntityData;\nclass CraftRecipe;\nclass ItemTemplate;\nclass EntityResource;\nclass EntitySkillData;\nclass EntityCreateInfo;\nclass SpellCastInfo;\nclass EntitySpeciesData;\n\nclass ESSResourceDBMap : public ESSResourceDB {\n\tGDCLASS(ESSResourceDBMap, ESSResourceDB);\n\npublic:\n\tRef<EntityResource> get_entity_resource(int class_id);\n\tRef<EntityResource> get_entity_resource_index(int index);\n\tint get_entity_resource_count();\n\tvoid add_entity_resource(Ref<EntityResource> cls);\n\tVector<Variant> get_entity_resources() const;\n\tvoid set_entity_resources(const Vector<Variant> &data);\n\n\tRef<EntitySkillData> get_entity_skill(int class_id);\n\tRef<EntitySkillData> get_entity_skill_index(int index);\n\tint get_entity_skill_count();\n\tvoid add_entity_skill(Ref<EntitySkillData> cls);\n\tVector<Variant> get_entity_skills() const;\n\tvoid set_entity_skills(const Vector<Variant> &data);\n\n\tRef<EntityData> get_entity_data(int class_id);\n\tRef<EntityData> get_entity_data_index(int index);\n\tint get_entity_data_count();\n\tvoid add_entity_data(Ref<EntityData> cls);\n\tVector<Variant> get_entity_datas() const;\n\tvoid set_entity_datas(const Vector<Variant> &data);\n\n\tRef<Spell> get_spell(int spell_id);\n\tRef<Spell> get_spell_index(int index);\n\tint get_spell_count();\n\tvoid add_spell(Ref<Spell> spell);\n\tVector<Variant> get_spells() const;\n\tvoid set_spells(const Vector<Variant> &data);\n\n\tRef<CraftRecipe> get_craft_recipe(int craft_id);\n\tRef<CraftRecipe> get_craft_recipe_index(int index);\n\tint get_craft_recipe_count();\n\tvoid add_craft_recipe(Ref<CraftRecipe> aura);\n\tVector<Variant> get_craft_recipes() const;\n\tvoid set_craft_recipes(const Vector<Variant> &data);\n\n\tvoid add_item_template(Ref<ItemTemplate> aura);\n\tRef<ItemTemplate> get_item_template(int item_id);\n\tRef<ItemTemplate> get_item_template_index(int index);\n\tint get_item_template_count();\n\tVector<Variant> get_item_templates() const;\n\tvoid set_item_templates(const Vector<Variant> &data);\n\n\tvoid add_entity_species_data(Ref<EntitySpeciesData> aura);\n\tRef<EntitySpeciesData> get_entity_species_data(int item_id);\n\tRef<EntitySpeciesData> get_entity_species_data_index(int index);\n\tint get_entity_species_data_count();\n\tVector<Variant> get_entity_species_datas() const;\n\tvoid set_entity_species_datas(const Vector<Variant> &data);\n\n\tESSResourceDBMap();\n\t~ESSResourceDBMap();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tVector<Ref<EntityResource> > _entity_resources;\n\tHashMap<int, Ref<EntityResource> > _entity_resource_map;\n\n\tVector<Ref<EntitySkillData> > _entity_skills;\n\tHashMap<int, Ref<EntitySkillData> > _entity_skill_map;\n\n\tVector<Ref<EntityData> > _entity_datas;\n\tHashMap<int, Ref<EntityData> > _entity_data_map;\n\n\tVector<Ref<Spell> > _spells;\n\tHashMap<int, Ref<Spell> > _spell_map;\n\n\tVector<Ref<CraftRecipe> > _craft_recipes;\n\tHashMap<int, Ref<CraftRecipe> > _craft_recipe_map;\n\n\tVector<Ref<ItemTemplate> > _item_templates;\n\tHashMap<int, Ref<ItemTemplate> > _item_template_map;\n\n\tVector<Ref<EntitySpeciesData> > _entity_species_datas;\n\tHashMap<int, Ref<EntitySpeciesData> > _entity_species_data_map;\n};\n\n#endif\n"
  },
  {
    "path": "database/ess_resource_db_static.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"ess_resource_db_static.h\"\n\n#include \"../data/items/craft_recipe.h\"\n#include \"../data/species/entity_species_data.h\"\n#include \"../data/spells/spell.h\"\n#include \"../entities/data/entity_data.h\"\n#include \"../entities/resources/entity_resource.h\"\n#include \"../entities/skills/entity_skill_data.h\"\n\nbool ESSResourceDBStatic::get_remap_ids() const {\n\treturn _remap_ids;\n}\nvoid ESSResourceDBStatic::set_remap_ids(const bool value) {\n\t_remap_ids = value;\n}\n\nRef<EntityResource> ESSResourceDBStatic::get_entity_resource(int id) {\n\tif (id < 0 || id >= _entity_resources.size())\n\t\treturn Ref<EntityResource>();\n\n\treturn _entity_resources.get(id);\n}\nRef<EntityResource> ESSResourceDBStatic::get_entity_resource_index(int index) {\n\tERR_FAIL_INDEX_V(index, _entity_resources.size(), Ref<EntityResource>(NULL));\n\n\treturn _entity_resources.get(index);\n}\nint ESSResourceDBStatic::get_entity_resource_count() {\n\treturn _entity_resources.size();\n}\nvoid ESSResourceDBStatic::add_entity_resource(Ref<EntityResource> cls) {\n\tif (_remap_ids && cls.is_valid())\n\t\tcls->set_id(_entity_resources.size());\n\n\t_entity_resources.push_back(cls);\n\n\tESSResourceDB::add_entity_resource(cls);\n}\nVector<Variant> ESSResourceDBStatic::get_entity_resources() const {\n\tVARIANT_ARRAY_GET(_entity_resources);\n}\nvoid ESSResourceDBStatic::set_entity_resources(const Vector<Variant> &data) {\n\t_entity_resources.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<EntityResource> d = Ref<EntityResource>(data[i]);\n\n\t\tadd_entity_resource(d);\n\t}\n}\n\nRef<EntitySkillData> ESSResourceDBStatic::get_entity_skill(int id) {\n\tif (id < 0 || id >= _entity_skills.size())\n\t\treturn Ref<EntitySkillData>();\n\n\treturn _entity_skills.get(id);\n}\nRef<EntitySkillData> ESSResourceDBStatic::get_entity_skill_index(int index) {\n\tERR_FAIL_INDEX_V(index, _entity_skills.size(), Ref<EntitySkillData>(NULL));\n\n\treturn _entity_skills.get(index);\n}\nint ESSResourceDBStatic::get_entity_skill_count() {\n\treturn _entity_skills.size();\n}\nvoid ESSResourceDBStatic::add_entity_skill(Ref<EntitySkillData> cls) {\n\tif (_remap_ids && cls.is_valid())\n\t\tcls->set_id(_entity_skills.size());\n\n\t_entity_skills.push_back(cls);\n\n\tESSResourceDB::add_entity_skill(cls);\n}\nVector<Variant> ESSResourceDBStatic::get_entity_skills() const {\n\tVARIANT_ARRAY_GET(_entity_skills);\n}\nvoid ESSResourceDBStatic::set_entity_skills(const Vector<Variant> &data) {\n\t_entity_skills.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<EntitySkillData> d = Ref<EntitySkillData>(data[i]);\n\n\t\tadd_entity_skill(d);\n\t}\n}\n\nRef<EntityData> ESSResourceDBStatic::get_entity_data(int id) {\n\tif (id < 0 || id >= _entity_datas.size())\n\t\treturn Ref<EntityData>();\n\n\treturn _entity_datas.get(id);\n}\nRef<EntityData> ESSResourceDBStatic::get_entity_data_index(int index) {\n\tERR_FAIL_INDEX_V(index, _entity_datas.size(), Ref<EntityData>(NULL));\n\n\treturn _entity_datas.get(index);\n}\nint ESSResourceDBStatic::get_entity_data_count() {\n\treturn _entity_datas.size();\n}\nvoid ESSResourceDBStatic::add_entity_data(Ref<EntityData> cls) {\n\tif (_remap_ids && cls.is_valid())\n\t\tcls->set_id(_entity_datas.size());\n\n\t_entity_datas.push_back(cls);\n\n\tESSResourceDB::add_entity_data(cls);\n}\nVector<Variant> ESSResourceDBStatic::get_entity_datas() const {\n\tVARIANT_ARRAY_GET(_entity_datas);\n}\nvoid ESSResourceDBStatic::set_entity_datas(const Vector<Variant> &data) {\n\t_entity_datas.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<EntityData> d = Ref<EntityData>(data[i]);\n\n\t\tadd_entity_data(d);\n\t}\n}\n\nRef<Spell> ESSResourceDBStatic::get_spell(int id) {\n\tif (id < 0 || id >= _spells.size())\n\t\treturn Ref<Spell>();\n\n\treturn _spells.get(id);\n}\n\nRef<Spell> ESSResourceDBStatic::get_spell_index(int index) {\n\tERR_FAIL_INDEX_V(index, _spells.size(), Ref<Spell>(NULL));\n\n\treturn _spells.get(index);\n}\nint ESSResourceDBStatic::get_spell_count() {\n\treturn _spells.size();\n}\nvoid ESSResourceDBStatic::add_spell(Ref<Spell> spell) {\n\tif (_remap_ids && spell.is_valid())\n\t\tspell->set_id(_spells.size());\n\n\t_spells.push_back(spell);\n\n\tESSResourceDB::add_spell(spell);\n}\nVector<Variant> ESSResourceDBStatic::get_spells() const {\n\tVARIANT_ARRAY_GET(_spells);\n}\nvoid ESSResourceDBStatic::set_spells(const Vector<Variant> &data) {\n\t_spells.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<Spell> d = Ref<Spell>(data[i]);\n\n\t\tadd_spell(d);\n\t}\n}\n\n//Craft Data\nvoid ESSResourceDBStatic::add_craft_recipe(Ref<CraftRecipe> cda) {\n\tif (_remap_ids && cda.is_valid())\n\t\tcda->set_id(_craft_recipes.size());\n\n\t_craft_recipes.push_back(cda);\n\n\tESSResourceDB::add_craft_recipe(cda);\n}\n\nRef<CraftRecipe> ESSResourceDBStatic::get_craft_recipe(int id) {\n\tif (id < 0 || id >= _craft_recipes.size())\n\t\treturn Ref<CraftRecipe>();\n\n\treturn _craft_recipes.get(id);\n}\n\nRef<CraftRecipe> ESSResourceDBStatic::get_craft_recipe_index(int index) {\n\tERR_FAIL_INDEX_V(index, _craft_recipes.size(), Ref<CraftRecipe>());\n\n\treturn _craft_recipes.get(index);\n}\n\nint ESSResourceDBStatic::get_craft_recipe_count() {\n\treturn _craft_recipes.size();\n}\n\nVector<Variant> ESSResourceDBStatic::get_craft_recipes() const {\n\tVARIANT_ARRAY_GET(_craft_recipes);\n}\nvoid ESSResourceDBStatic::set_craft_recipes(const Vector<Variant> &data) {\n\t_craft_recipes.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<CraftRecipe> d = Ref<CraftRecipe>(data[i]);\n\n\t\tadd_craft_recipe(d);\n\t}\n}\n\nvoid ESSResourceDBStatic::add_item_template(Ref<ItemTemplate> cda) {\n\tif (_remap_ids && cda.is_valid())\n\t\tcda->set_id(_item_templates.size());\n\n\t_item_templates.push_back(cda);\n\n\tESSResourceDB::add_item_template(cda);\n}\n\nRef<ItemTemplate> ESSResourceDBStatic::get_item_template(int item_id) {\n\tif (item_id < 0 || item_id >= _item_templates.size())\n\t\treturn Ref<ItemTemplate>();\n\n\treturn _item_templates.get(item_id);\n}\n\nRef<ItemTemplate> ESSResourceDBStatic::get_item_template_index(int index) {\n\tERR_FAIL_INDEX_V(index, _item_templates.size(), Ref<ItemTemplate>());\n\n\treturn _item_templates.get(index);\n}\n\nint ESSResourceDBStatic::get_item_template_count() {\n\treturn _item_templates.size();\n}\nVector<Variant> ESSResourceDBStatic::get_item_templates() const {\n\tVARIANT_ARRAY_GET(_item_templates);\n}\nvoid ESSResourceDBStatic::set_item_templates(const Vector<Variant> &data) {\n\t_item_templates.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<ItemTemplate> d = Ref<ItemTemplate>(data[i]);\n\n\t\tadd_item_template(d);\n\t}\n}\n\nvoid ESSResourceDBStatic::add_entity_species_data(Ref<EntitySpeciesData> cda) {\n\tif (_remap_ids && cda.is_valid())\n\t\tcda->set_id(_entity_species_datas.size());\n\n\t_entity_species_datas.push_back(cda);\n\n\tESSResourceDB::add_entity_species_data(cda);\n}\nRef<EntitySpeciesData> ESSResourceDBStatic::get_entity_species_data(int id) {\n\tif (id < 0 || id > _entity_species_datas.size())\n\t\treturn Ref<EntitySpeciesData>();\n\n\treturn _entity_species_datas.get(id);\n}\nRef<EntitySpeciesData> ESSResourceDBStatic::get_entity_species_data_index(int index) {\n\tERR_FAIL_INDEX_V(index, _entity_species_datas.size(), Ref<EntitySpeciesData>());\n\n\treturn _entity_species_datas.get(index);\n}\nint ESSResourceDBStatic::get_entity_species_data_count() {\n\treturn _entity_species_datas.size();\n}\nVector<Variant> ESSResourceDBStatic::get_entity_species_datas() const {\n\tVARIANT_ARRAY_GET(_entity_species_datas);\n}\nvoid ESSResourceDBStatic::set_entity_species_datas(const Vector<Variant> &data) {\n\t_entity_species_datas.clear();\n\tfor (int i = 0; i < data.size(); i++) {\n\t\tRef<EntitySpeciesData> d = Ref<EntitySpeciesData>(data[i]);\n\n\t\tadd_entity_species_data(d);\n\t}\n}\n\nvoid ESSResourceDBStatic::clear() {\n\t_entity_resources.clear();\n\t_entity_skills.clear();\n\t_entity_datas.clear();\n\t_spells.clear();\n\t_craft_recipes.clear();\n\t_item_templates.clear();\n\t_entity_species_datas.clear();\n}\n\nESSResourceDBStatic::ESSResourceDBStatic() {\n\t_remap_ids = false;\n}\n\nESSResourceDBStatic::~ESSResourceDBStatic() {\n\t_entity_resources.clear();\n\t_entity_skills.clear();\n\t_entity_datas.clear();\n\t_spells.clear();\n\t_craft_recipes.clear();\n\t_item_templates.clear();\n\t_entity_species_datas.clear();\n}\n\nvoid ESSResourceDBStatic::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_remap_ids\"), &ESSResourceDBStatic::get_remap_ids);\n\tClassDB::bind_method(D_METHOD(\"set_remap_ids\", \"value\"), &ESSResourceDBStatic::set_remap_ids);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"remap_ids\"), \"set_remap_ids\", \"get_remap_ids\");\n\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"entity_resources\", PROPERTY_HINT_NONE, \"17/17:EntityResource\", PROPERTY_USAGE_DEFAULT, \"EntityResource\"), \"set_entity_resources\", \"get_entity_resources\");\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"entity_skills\", PROPERTY_HINT_NONE, \"17/17:EntitySkillData\", PROPERTY_USAGE_DEFAULT, \"EntitySkillData\"), \"set_entity_skills\", \"get_entity_skills\");\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"entity_datas\", PROPERTY_HINT_NONE, \"17/17:EntityData\", PROPERTY_USAGE_DEFAULT, \"EntityData\"), \"set_entity_datas\", \"get_entity_datas\");\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"spells\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"set_spells\", \"get_spells\");\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"craft_recipes\", PROPERTY_HINT_NONE, \"17/17:CraftRecipe\", PROPERTY_USAGE_DEFAULT, \"CraftRecipe\"), \"set_craft_recipes\", \"get_craft_recipes\");\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"item_templates\", PROPERTY_HINT_NONE, \"17/17:ItemTemplate\", PROPERTY_USAGE_DEFAULT, \"ItemTemplate\"), \"set_item_templates\", \"get_item_templates\");\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"entity_species_datas\", PROPERTY_HINT_NONE, \"17/17:EntitySpeciesData\", PROPERTY_USAGE_DEFAULT, \"EntitySpeciesData\"), \"set_entity_species_datas\", \"get_entity_species_datas\");\n}\n"
  },
  {
    "path": "database/ess_resource_db_static.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ESS_RESOURCE_DB_STATIC_H\n#define ESS_RESOURCE_DB_STATIC_H\n\n#include \"core/version.h\"\n\n#include \"core/templates/hash_map.h\"\n\n\n#include \"ess_resource_db.h\"\n\n#include \"../item_enums.h\"\n\n#include \"../defines.h\"\n\nclass Spell;\nclass EntityData;\nclass CraftRecipe;\nclass ItemTemplate;\nclass EntityResource;\nclass EntitySkillData;\nclass EntityCreateInfo;\nclass SpellCastInfo;\nclass EntitySpeciesData;\n\nclass ESSResourceDBStatic : public ESSResourceDB {\n\tGDCLASS(ESSResourceDBStatic, ESSResourceDB);\n\npublic:\n\tbool get_remap_ids() const;\n\tvoid set_remap_ids(const bool value);\n\n\tString get_xp_data_path();\n\tvoid set_xp_data_path(String path);\n\n\tPoolStringArray get_folders() const;\n\tvoid set_folders(const PoolStringArray &folders);\n\n\tRef<EntityResource> get_entity_resource(int class_id);\n\tRef<EntityResource> get_entity_resource_index(int index);\n\tint get_entity_resource_count();\n\tvoid add_entity_resource(Ref<EntityResource> cls);\n\tVector<Variant> get_entity_resources() const;\n\tvoid set_entity_resources(const Vector<Variant> &data);\n\n\tRef<EntitySkillData> get_entity_skill(int class_id);\n\tRef<EntitySkillData> get_entity_skill_index(int index);\n\tint get_entity_skill_count();\n\tvoid add_entity_skill(Ref<EntitySkillData> cls);\n\tVector<Variant> get_entity_skills() const;\n\tvoid set_entity_skills(const Vector<Variant> &data);\n\n\tRef<EntityData> get_entity_data(int class_id);\n\tRef<EntityData> get_entity_data_index(int index);\n\tint get_entity_data_count();\n\tvoid add_entity_data(Ref<EntityData> cls);\n\tVector<Variant> get_entity_datas() const;\n\tvoid set_entity_datas(const Vector<Variant> &data);\n\n\tRef<Spell> get_spell(int spell_id);\n\tRef<Spell> get_spell_index(int index);\n\tint get_spell_count();\n\tvoid add_spell(Ref<Spell> spell);\n\tVector<Variant> get_spells() const;\n\tvoid set_spells(const Vector<Variant> &data);\n\n\tRef<CraftRecipe> get_craft_recipe(int craft_id);\n\tRef<CraftRecipe> get_craft_recipe_index(int index);\n\tint get_craft_recipe_count();\n\tvoid add_craft_recipe(Ref<CraftRecipe> aura);\n\tVector<Variant> get_craft_recipes() const;\n\tvoid set_craft_recipes(const Vector<Variant> &data);\n\n\tvoid add_item_template(Ref<ItemTemplate> aura);\n\tRef<ItemTemplate> get_item_template(int item_id);\n\tRef<ItemTemplate> get_item_template_index(int index);\n\tint get_item_template_count();\n\tVector<Variant> get_item_templates() const;\n\tvoid set_item_templates(const Vector<Variant> &data);\n\n\tvoid add_entity_species_data(Ref<EntitySpeciesData> aura);\n\tRef<EntitySpeciesData> get_entity_species_data(int item_id);\n\tRef<EntitySpeciesData> get_entity_species_data_index(int index);\n\tint get_entity_species_data_count();\n\tVector<Variant> get_entity_species_datas() const;\n\tvoid set_entity_species_datas(const Vector<Variant> &data);\n\n\tvoid clear();\n\n\tESSResourceDBStatic();\n\t~ESSResourceDBStatic();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tbool _remap_ids;\n\n\tVector<Ref<EntityResource> > _entity_resources;\n\tVector<Ref<EntitySkillData> > _entity_skills;\n\tVector<Ref<EntityData> > _entity_datas;\n\tVector<Ref<Spell> > _spells;\n\tVector<Ref<CraftRecipe> > _craft_recipes;\n\tVector<Ref<ItemTemplate> > _item_templates;\n\tVector<Ref<EntitySpeciesData> > _entity_species_datas;\n};\n\n#endif\n"
  },
  {
    "path": "defines.h",
    "content": "\n#ifndef ESS_DEFINES_H\n#define ESS_DEFINES_H\n\n#include \"core/version.h\"\n\n#if VERSION_MAJOR >= 4\n#define GODOT4 true\n#endif\n\n//includes\n#if GODOT4\n#define spatial_h_path \"scene/3d/node_3d.h\"\n#define visual_server_h_path include \"servers/rendering_server.h\"\n\n//#include \"core/input/input_event.h\"\n//#include \"editor/plugins/node_3d_editor_plugin.h\"\n//#include \"scene/3d/camera_3d.h\"\n#else\n#define spatial_h_path \"scene/3d/spatial.h\"\n#define visual_server_h_path include \"servers/visual_server.h\"\n\n//#include \"core/os/input.h\"\n//#include \"editor/plugins/spatial_editor_plugin.h\"\n//#include \"scene/3d/camera.h\"\n\n#endif\n\n//Type Defines\n#if GODOT4\n#define PhysicsDirectSpaceState PhysicsDirectSpaceState3D\n#define SpatialEditor Node3DEditor\n#define SpatialEditorPlugin Node3DEditorPlugin\n#define SpatialEditorViewport Node3DEditorViewport\n#define PoolStringArray PackedStringArray\n\n#define REAL FLOAT\n\n#define POOL_STRING_ARRAY PACKED_STRING_ARRAY\n#define POOL_INT_ARRAY PACKED_INT32_ARRAY\n#define POOL_REAL_ARRAY PACKED_FLOAT32_ARRAY\n\n#define Spatial Node3D\n\ntypedef class RenderingServer VisualServer;\ntypedef class RenderingServer VS;\n\n#define PoolVector3Array PackedVector3Array\n#define PoolVector2Array PackedVector2Array\n#define PoolColorArray PackedColorArray\n#define PoolIntArray PackedInt64Array\n#define PoolRealArray PackedFloat32Array\n\n//toodo figure out a way to have this\n//#define Variant::CallError Callable::CallError\n#endif\n\n#if GODOT4\n\n#define VARIANT_ARRAY_GET(arr)             \\\n\tVector<Variant> r;                     \\\n\tfor (int i = 0; i < arr.size(); i++) { \\\n\t\tr.push_back(arr[i]);               \\\n\t}                                      \\\n\treturn r;\n\n#else\n\n#define VARIANT_ARRAY_GET(arr)             \\\n\tVector<Variant> r;                     \\\n\tfor (int i = 0; i < arr.size(); i++) { \\\n\t\tr.push_back(arr[i].get_ref_ptr()); \\\n\t}                                      \\\n\treturn r;\n\n#endif\n\n#define VARIANT_ARRAY_SET(arr, arr_into, type) \\\n\tarr_into.clear();                          \\\n\tfor (int i = 0; i < arr.size(); i++) {     \\\n\t\tRef<type> e = Ref<type>(arr[i]);       \\\n\t\tarr_into.push_back(e);                 \\\n\t}\n\n#if GODOT4\n//TODO do this properly\n#define INSTANCE_VALIDATE(var) var\n#define CONNECT(sig, obj, target_method_class, method) connect(sig, callable_mp(obj, &target_method_class::method))\n#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, callable_mp(obj, &target_method_class::method))\n#else\n#define INSTANCE_VALIDATE(var) ObjectDB::instance_validate(var)\n#define CONNECT(sig, obj, target_method_class, method) connect(sig, obj, #method)\n#define DISCONNECT(sig, obj, target_method_class, method) disconnect(sig, obj, #method)\n#endif\n\n#endif"
  },
  {
    "path": "doc_classes/AIFormation.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"AIFormation\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tClass for scriptable AI formations. Not yet used. Needs pet support.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_get_position\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Vector3\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_on_set_owner\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_position\">\n\t\t\t<return type=\"Vector3\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"owner\" type=\"Entity\" setter=\"set_owner\" getter=\"get_owner\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ActionBarButtonEntry.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ActionBarButtonEntry\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tStores the data for an actionbar button. ProfileManager uses it.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"emit_change\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_owner\">\n\t\t\t<return type=\"ActionBarEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\" qualifiers=\"const\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"action_bar_id\" type=\"int\" setter=\"set_action_bar_id\" getter=\"get_action_bar_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"item_path\" type=\"String\" setter=\"set_item_path\" getter=\"get_item_path\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"slot_id\" type=\"int\" setter=\"set_slot_id\" getter=\"get_slot_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"type\" type=\"int\" setter=\"set_type\" getter=\"get_type\" enum=\"ActionBarButtonEntry.ActionBarButtonEntryType\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"changed\">\n\t\t\t<argument index=\"0\" name=\"action_bar_button_entry\" type=\"ActionBarButtonEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t\t<constant name=\"ACTION_BAR_BUTTON_ENTRY_TYPE_NONE\" value=\"0\" enum=\"ActionBarButtonEntryType\">\n\t\t</constant>\n\t\t<constant name=\"ACTION_BAR_BUTTON_ENTRY_TYPE_SPELL\" value=\"1\" enum=\"ActionBarButtonEntryType\">\n\t\t</constant>\n\t\t<constant name=\"ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM\" value=\"2\" enum=\"ActionBarButtonEntryType\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ActionBarEntry.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ActionBarEntry\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tStores the data for an actionbar. Also see [ProfileManager].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"emit_change\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_action_bar_entry_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_button\">\n\t\t\t<return type=\"ActionBarButtonEntry\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_button_for_slotid\">\n\t\t\t<return type=\"ActionBarButtonEntry\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_owner\">\n\t\t\t<return type=\"ActionBarProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\" qualifiers=\"const\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"action_bar_id\" type=\"int\" setter=\"set_action_bar_id\" getter=\"get_action_bar_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"size\" type=\"float\" setter=\"set_size\" getter=\"get_size\" default=\"45.0\">\n\t\t</member>\n\t\t<member name=\"slot_num\" type=\"int\" setter=\"set_slot_num\" getter=\"get_slot_num\" default=\"12\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"changed\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ActionBarProfile.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ActionBarProfile\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tStores all actionbar-related data for a class. Also see [ProfileManager].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"add_action_bar\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"actionbar\" type=\"ActionBarEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"clear_action_bars\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"emit_change\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_actionbar_profile\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"other\" type=\"ActionBarProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_action_bar\">\n\t\t\t<return type=\"ActionBarEntry\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_action_bar_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_owner\">\n\t\t\t<return type=\"ClassProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_defaults\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_action_bar\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\" qualifiers=\"const\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"action_bar_profile_name\" type=\"String\" setter=\"set_action_bar_profile_name\" getter=\"get_action_bar_profile_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"changed\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/AuraApplyInfo.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"AuraApplyInfo\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tHelper class, which is used to apply an [Aura] to an [Entity].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"aura\" type=\"Spell\" setter=\"set_aura\" getter=\"get_aura\">\n\t\t</member>\n\t\t<member name=\"caster\" type=\"Entity\" setter=\"caster_set\" getter=\"caster_get\">\n\t\t</member>\n\t\t<member name=\"spell_scale\" type=\"float\" setter=\"spell_scale_set\" getter=\"spell_scale_get\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"target\" type=\"Entity\" setter=\"target_set\" getter=\"target_get\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/AuraData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"AuraData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tStores an [Aura]'s runtime data on an [Entity].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_from_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_from_send_array\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"arr\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_to_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_to_send_array\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_send_array\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"arr\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"refresh\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"remaining\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_remaining_absorb\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_send_array\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"aura\" type=\"Spell\" setter=\"set_aura\" getter=\"get_aura\">\n\t\t</member>\n\t\t<member name=\"aura_id\" type=\"int\" setter=\"set_aura_id\" getter=\"get_aura_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"caster\" type=\"Entity\" setter=\"caster_set\" getter=\"caster_get\">\n\t\t</member>\n\t\t<member name=\"caster_path\" type=\"NodePath\" setter=\"caster_set_path\" getter=\"caster_get_path\" default=\"NodePath(&quot;&quot;)\">\n\t\t</member>\n\t\t<member name=\"damage\" type=\"int\" setter=\"damage_set\" getter=\"damage_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"damage_count\" type=\"float\" setter=\"damage_set_count\" getter=\"damage_get_count\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"damage_taken\" type=\"int\" setter=\"damage_set_taken\" getter=\"damage_get_taken\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"heal\" type=\"int\" setter=\"heal_set\" getter=\"heal_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"is_timed\" type=\"bool\" setter=\"set_is_timed\" getter=\"get_is_timed\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"owner\" type=\"Entity\" setter=\"set_owner\" getter=\"get_owner\">\n\t\t</member>\n\t\t<member name=\"remaining_absorb\" type=\"int\" setter=\"heal_set\" getter=\"get_remaining_absorb\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"remaining_time\" type=\"float\" setter=\"set_remaining_time\" getter=\"get_remaining_time\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"slow\" type=\"float\" setter=\"set_slow\" getter=\"get_slow\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"tick\" type=\"float\" setter=\"set_tick\" getter=\"get_tick\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"time_since_last_tick\" type=\"float\" setter=\"set_time_since_last_tick\" getter=\"get_time_since_last_tick\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"unhandled_ticks\" type=\"int\" setter=\"set_unhandled_ticks\" getter=\"get_unhandled_ticks\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/AuraGroup.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"AuraGroup\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tUsed to make some [Aura]s override each other.\n\t</brief_description>\n\t<description>\n\t\tOnly one [Aura] with the same group is allowed on an [Entity] by the same caster by default.\n\t\tFor example if an [Entity] wants to apply the same [Aura] except different ranks to a target, this is how you can prevent it easily.\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"text_description\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/Bag.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"Bag\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tStores [Entity] inventory.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_add_item\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_add_item_at\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"signal\" type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_can_add_item\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_change_item_equip\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_from_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_get_item\" qualifiers=\"virtual\">\n\t\t\t<return type=\"ItemInstance\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_get_item_count\" qualifiers=\"virtual\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_get_size\" qualifiers=\"virtual\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_get_valid_item_count\" qualifiers=\"virtual\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_has_item\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemTemplate\" />\n\t\t\t<argument index=\"1\" name=\"count\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_is_full\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_is_overburdened\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_remove_item\" qualifiers=\"virtual\">\n\t\t\t<return type=\"ItemInstance\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_remove_items\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemTemplate\" />\n\t\t\t<argument index=\"1\" name=\"count\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_set_size\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"size\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_swap_items\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item1_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item2_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_to_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_item\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_item_at\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"signal\" type=\"bool\" default=\"true\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"can_add_item\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"change_item_equip\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_item\">\n\t\t\t<return type=\"ItemInstance\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_item_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"has_item\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemTemplate\" />\n\t\t\t<argument index=\"1\" name=\"count\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"is_full\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"is_overburdened\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_item\">\n\t\t\t<return type=\"ItemInstance\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_items\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemTemplate\" />\n\t\t\t<argument index=\"1\" name=\"count\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"swap_items\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item1_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item2_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"allowed_item_types\" type=\"int\" setter=\"set_allowed_item_types\" getter=\"get_allowed_item_types\" default=\"16777215\">\n\t\t</member>\n\t\t<member name=\"size\" type=\"int\" setter=\"set_size\" getter=\"get_size\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"change_item_equip\">\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"slot_id\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"item_added\">\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"item_count_changed\">\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"item_removed\">\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"item_swapped\">\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"overburden_removed\">\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"overburdened\">\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"size_changed\">\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/CharacterAtlas.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"CharacterAtlas\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/CharacterAtlasEntry.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"CharacterAtlasEntry\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/CharacterBones.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"CharacterBones\" inherits=\"Node2D\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/CharacterSkeleton2D.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"CharacterSkeleton2D\" inherits=\"Node2D\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_build_model\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_common_attach_point_index_get\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_model_visual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"vis\" type=\"ModelVisual\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_model_visual_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"vis\" type=\"ModelVisual\" />\n\t\t\t<argument index=\"1\" name=\"ive\" type=\"ModelVisualEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"attach_point_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"attach_point_node_get\">\n\t\t\t<return type=\"Node\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"attach_point_path_get\" qualifiers=\"const\">\n\t\t\t<return type=\"NodePath\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"attach_point_path_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"path\" type=\"NodePath\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"bake_mesh_array_uv\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<argument index=\"0\" name=\"arr\" type=\"Array\" />\n\t\t\t<argument index=\"1\" name=\"tex\" type=\"Texture\" />\n\t\t\t<argument index=\"2\" name=\"mul_color\" type=\"float\" default=\"0.7\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"build_model\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"clear_model_visuals\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"common_attach_point_add\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" />\n\t\t\t<argument index=\"1\" name=\"scene\" type=\"PackedScene\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"common_attach_point_add_timed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" />\n\t\t\t<argument index=\"1\" name=\"scene\" type=\"PackedScene\" />\n\t\t\t<argument index=\"2\" name=\"time\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"common_attach_point_index_get\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"common_attach_point_node_get\">\n\t\t\t<return type=\"Node\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"common_attach_point_remove\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" />\n\t\t\t<argument index=\"1\" name=\"scene\" type=\"PackedScene\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_animation_player\">\n\t\t\t<return type=\"AnimationPlayer\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_animation_tree\">\n\t\t\t<return type=\"AnimationTree\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_model_entry\">\n\t\t\t<return type=\"SkeletonModelEntry\" />\n\t\t\t<argument index=\"0\" name=\"bone_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_model_entry_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"bone_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_model_visual\">\n\t\t\t<return type=\"ModelVisual\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_model_visual_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"merge_mesh_array\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<argument index=\"0\" name=\"arr\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_model_visual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"vis\" type=\"ModelVisual\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_model_visual_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"vis\" type=\"ModelVisual\" />\n\t\t\t<argument index=\"1\" name=\"ive\" type=\"ModelVisualEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_model_visual_index\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sort_layers\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"update_nodes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"animation_player_path\" type=\"NodePath\" setter=\"set_animation_player_path\" getter=\"get_animation_player_path\" default=\"NodePath(&quot;&quot;)\">\n\t\t</member>\n\t\t<member name=\"animation_tree_path\" type=\"NodePath\" setter=\"set_animation_tree_path\" getter=\"get_animation_tree_path\" default=\"NodePath(&quot;&quot;)\">\n\t\t</member>\n\t\t<member name=\"entity_type\" type=\"int\" setter=\"set_entity_type\" getter=\"get_entity_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"model_dirty\" type=\"bool\" setter=\"set_model_dirty\" getter=\"get_model_dirty\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"model_index\" type=\"int\" setter=\"set_model_index\" getter=\"get_model_index\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/CharacterSkeleton3D.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"CharacterSkeleton3D\" inherits=\"Spatial\" version=\"3.5\">\n\t<brief_description>\n\t\t3d implementation for [CharacterSkeleton].\n\n\t\tNote: Most of the logic implementation for this is still in gdscript. It will be ported.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_build_model\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_common_attach_point_index_get\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_model_visual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"vis\" type=\"ModelVisual\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_model_visual_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"vis\" type=\"ModelVisual\" />\n\t\t\t<argument index=\"1\" name=\"ive\" type=\"ModelVisualEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"attach_point_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"attach_point_node_get\">\n\t\t\t<return type=\"Node\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"attach_point_path_get\" qualifiers=\"const\">\n\t\t\t<return type=\"NodePath\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"attach_point_path_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"path\" type=\"NodePath\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"bake_mesh_array_uv\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<argument index=\"0\" name=\"arr\" type=\"Array\" />\n\t\t\t<argument index=\"1\" name=\"tex\" type=\"Texture\" />\n\t\t\t<argument index=\"2\" name=\"mul_color\" type=\"float\" default=\"0.7\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"bone_additional_mesh_transform_bone_index_get\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"bone_additional_mesh_transform_bone_index_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"bone_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"bone_additional_mesh_transform_transform_get\" qualifiers=\"const\">\n\t\t\t<return type=\"Transform\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"bone_additional_mesh_transform_transform_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"transform\" type=\"Transform\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"bone_additional_mesh_transform_user_transform_get\" qualifiers=\"const\">\n\t\t\t<return type=\"Transform\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"bone_additional_mesh_transform_user_transform_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"transform\" type=\"Transform\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"build_model\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"clear_model_visuals\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"common_attach_point_add\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" />\n\t\t\t<argument index=\"1\" name=\"scene\" type=\"PackedScene\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"common_attach_point_add_timed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" />\n\t\t\t<argument index=\"1\" name=\"scene\" type=\"PackedScene\" />\n\t\t\t<argument index=\"2\" name=\"time\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"common_attach_point_index_get\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"common_attach_point_node_get\">\n\t\t\t<return type=\"Node\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"common_attach_point_remove\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"point\" type=\"int\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" />\n\t\t\t<argument index=\"1\" name=\"scene\" type=\"PackedScene\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_animation_player\">\n\t\t\t<return type=\"AnimationPlayer\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_animation_tree\">\n\t\t\t<return type=\"AnimationTree\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_model_entry\">\n\t\t\t<return type=\"SkeletonModelEntry\" />\n\t\t\t<argument index=\"0\" name=\"bone_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_model_entry_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"bone_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_model_visual\">\n\t\t\t<return type=\"ModelVisual\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_model_visual_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"merge_mesh_array\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<argument index=\"0\" name=\"arr\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_model_visual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"vis\" type=\"ModelVisual\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_model_visual_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"vis\" type=\"ModelVisual\" />\n\t\t\t<argument index=\"1\" name=\"ive\" type=\"ModelVisualEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_model_visual_index\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sort_layers\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"update_nodes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"animation_player_path\" type=\"NodePath\" setter=\"set_animation_player_path\" getter=\"get_animation_player_path\" default=\"NodePath(&quot;&quot;)\">\n\t\t</member>\n\t\t<member name=\"animation_tree_path\" type=\"NodePath\" setter=\"set_animation_tree_path\" getter=\"get_animation_tree_path\" default=\"NodePath(&quot;&quot;)\">\n\t\t</member>\n\t\t<member name=\"bone_additional_mesh_transform_count\" type=\"int\" setter=\"bone_additional_mesh_transform_set_count\" getter=\"bone_additional_mesh_transform_get_count\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"entity_type\" type=\"int\" setter=\"set_entity_type\" getter=\"get_entity_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"model_dirty\" type=\"bool\" setter=\"set_model_dirty\" getter=\"get_model_dirty\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"model_index\" type=\"int\" setter=\"set_model_index\" getter=\"get_model_index\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/CharacterSpec.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"CharacterSpec\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains data for a character's specialization.\n\t</brief_description>\n\t<description>\n\t\tSpecialization in ESS means talents, and talent tabs.\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"get_num_columns\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"row\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_ranks\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"row\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"culomn\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_talent\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"row\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"culomn\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"rank\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_talent_with_id\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_talents\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"has_talent_with_id\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_columns\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"row\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_ranks\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"row\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"culomn\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_talent\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"row\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"culomn\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"rank\" type=\"int\" />\n\t\t\t<argument index=\"3\" name=\"arg3\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"num_rows\" type=\"int\" setter=\"set_num_rows\" getter=\"get_num_rows\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ClassProfile.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ClassProfile\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tContains all profile information for an [Entity]'s class. Related to [ProfileManager].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_custom_data\" qualifiers=\"const\">\n\t\t\t<return type=\"Variant\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_default_action_bar_profile\">\n\t\t\t<return type=\"ActionBarProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_input_profile\">\n\t\t\t<return type=\"InputProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"has_custom_data\" qualifiers=\"const\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_custom_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_custom_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"Variant\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\" qualifiers=\"const\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"actionbar_locked\" type=\"bool\" setter=\"set_actionbar_locked\" getter=\"get_actionbar_locked\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"character_class_name\" type=\"String\" setter=\"set_character_class_name\" getter=\"get_character_class_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"class_path\" type=\"String\" setter=\"set_class_path\" getter=\"get_class_path\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"level\" type=\"int\" setter=\"set_level\" getter=\"get_level\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"xp\" type=\"int\" setter=\"set_xp\" getter=\"get_xp\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"changed\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ComplexLevelStatData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ComplexLevelStatData\" inherits=\"LevelStatData\" version=\"3.5\">\n\t<brief_description>\n\t\tPer level stat information for an [Entity].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"get_stat_for_level\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"main_stat\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_stat_for_level\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"main_stat\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"level\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/CraftRecipe.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"CraftRecipe\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tRecipe data for the crafting system.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"get_required_material\">\n\t\t\t<return type=\"CraftRecipeHelper\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_required_tool\">\n\t\t\t<return type=\"CraftRecipeHelper\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_required_material\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"mat\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"CraftRecipeHelper\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_required_tool\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"CraftRecipeHelper\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"category\" type=\"int\" setter=\"set_category\" getter=\"get_category\" enum=\"CraftRecipe.CraftCategories\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"item\" type=\"CraftRecipeHelper\" setter=\"set_item\" getter=\"get_item\">\n\t\t</member>\n\t\t<member name=\"required_materials_count\" type=\"int\" setter=\"set_required_materials_count\" getter=\"get_required_materials_count\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"required_tools_count\" type=\"int\" setter=\"set_required_tools_count\" getter=\"get_required_tools_count\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sub_category\" type=\"int\" setter=\"set_sub_category\" getter=\"get_sub_category\" enum=\"CraftRecipe.CraftSubCategories\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t\t<constant name=\"MAX_REQUIRED_TOOLS\" value=\"6\">\n\t\t</constant>\n\t\t<constant name=\"MAX_REQUIRED_MATERIALS\" value=\"6\">\n\t\t</constant>\n\t\t<constant name=\"CRAFT_CATEGORY_NONE\" value=\"0\" enum=\"CraftCategories\">\n\t\t</constant>\n\t\t<constant name=\"CRAFT_CATEGORY_ALCHEMY\" value=\"1\" enum=\"CraftCategories\">\n\t\t</constant>\n\t\t<constant name=\"CRAFT_CATEGORY_SMITHING\" value=\"2\" enum=\"CraftCategories\">\n\t\t</constant>\n\t\t<constant name=\"CRAFT_CATEGORY_TAILORING\" value=\"3\" enum=\"CraftCategories\">\n\t\t</constant>\n\t\t<constant name=\"CRAFT_CATEGORY_ENCHANTING\" value=\"4\" enum=\"CraftCategories\">\n\t\t</constant>\n\t\t<constant name=\"CRAFT_CATEGORY_ENGINEERING\" value=\"5\" enum=\"CraftCategories\">\n\t\t</constant>\n\t\t<constant name=\"CRAFT_SUB_CATEGORY_NONE\" value=\"0\" enum=\"CraftSubCategories\">\n\t\t</constant>\n\t\t<constant name=\"CRAFT_SUB_CATEGORY_POTIONS\" value=\"1\" enum=\"CraftSubCategories\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/CraftRecipeHelper.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"CraftRecipeHelper\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains one item entry for [CraftRecipes]s\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"count\" type=\"int\" setter=\"set_count\" getter=\"get_count\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"item\" type=\"ItemTemplate\" setter=\"set_item\" getter=\"get_item\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ESDragAndDrop.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ESDragAndDrop\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tDrag and drop helper class for the actionbars, and inventory.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"item_path\" type=\"String\" setter=\"set_item_path\" getter=\"get_item_path\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"origin\" type=\"Node\" setter=\"set_origin\" getter=\"get_origin\">\n\t\t</member>\n\t\t<member name=\"type\" type=\"int\" setter=\"set_type\" getter=\"get_type\" enum=\"ESDragAndDrop.ESDragAndDropType\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t\t<constant name=\"ES_DRAG_AND_DROP_TYPE_NONE\" value=\"0\" enum=\"ESDragAndDropType\">\n\t\t</constant>\n\t\t<constant name=\"ES_DRAG_AND_DROP_TYPE_SPELL\" value=\"1\" enum=\"ESDragAndDropType\">\n\t\t</constant>\n\t\t<constant name=\"ES_DRAG_AND_DROP_TYPE_ITEM\" value=\"2\" enum=\"ESDragAndDropType\">\n\t\t</constant>\n\t\t<constant name=\"ES_DRAG_AND_DROP_TYPE_INVENTORY_ITEM\" value=\"3\" enum=\"ESDragAndDropType\">\n\t\t</constant>\n\t\t<constant name=\"ES_DRAG_AND_DROP_TYPE_EQUIPPED_ITEM\" value=\"4\" enum=\"ESDragAndDropType\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ESS.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ESS\" inherits=\"Object\" version=\"3.5\">\n\t<brief_description>\n\t\tThe ESS singleton.\n\t</brief_description>\n\t<description>\n\t\tGives easy access to entity and spell related data, providing easy lookups.\n\t\tMake sure that you add everything both server and clientside before use, because the system uses ids (get_id()) for server clinet communications. This also means that ids should be unique per resources for every ESS-related resources. \n\t\tFor example you shouldn't register 2 spells with id 1 (you will get an error), but you can register a [Spell] with id1 and an [Aura] with an id 1.\n\t\tAlso grants access easy to ESS-related project settings.\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"can_character_level_up\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"current_level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"can_class_level_up\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"current_level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"ensure_materials_loaded\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_slot_get_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_slot_get_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_slot_get_name\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_slot_get_property_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_slot_get_property_name\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_slot_is_property\" qualifiers=\"const\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_character_xp\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"current_level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_class_xp\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"current_level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_all\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_resource\">\n\t\t\t<return type=\"Resource\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<argument index=\"1\" name=\"type_hint\" type=\"String\" default=\"&quot;&quot;\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_resource_db\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_add\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"Material\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_cache_get\">\n\t\t\t<return type=\"ESSMaterialCache\" />\n\t\t\t<argument index=\"0\" name=\"key\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_cache_unref\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"key\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_get\">\n\t\t\t<return type=\"Material\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_get_num\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_remove\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"Material\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"materials_clear\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"materials_load\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"request_entity_spawn\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"EntityCreateInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"request_entity_spawn_deferred\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"EntityCreateInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_character_xp\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"current_level\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_class_xp\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"current_level\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skeletons_bone_attachment_index_get\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skeletons_bone_attachments_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skeletons_bones_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skeletons_bones_index_get\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_get_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_get_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_get_name\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_get_property_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_get_property_name\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_is_property\" qualifiers=\"const\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"allow_class_recipe_learning\" type=\"bool\" setter=\"set_allow_class_recipe_learning\" getter=\"get_allow_class_recipe_learning\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"allow_class_spell_learning\" type=\"bool\" setter=\"set_allow_class_spell_learning\" getter=\"get_allow_class_spell_learning\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"auto_learn_spells\" type=\"int\" setter=\"set_auto_learn_spells\" getter=\"get_auto_learn_spells\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"automatic_load\" type=\"bool\" setter=\"set_automatic_load\" getter=\"get_automatic_load\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"background_color\" type=\"Color\" setter=\"set_background_color\" getter=\"get_background_color\" default=\"Color( 0, 0, 0, 1 )\">\n\t\t</member>\n\t\t<member name=\"character_xp_data\" type=\"PoolIntArray\" setter=\"set_character_xp_data\" getter=\"get_character_xp_data\" default=\"PoolIntArray(  )\">\n\t\t</member>\n\t\t<member name=\"class_xp_data\" type=\"PoolIntArray\" setter=\"set_class_xp_data\" getter=\"get_class_xp_data\" default=\"PoolIntArray(  )\">\n\t\t</member>\n\t\t<member name=\"default_ess_material_cache_class\" type=\"String\" setter=\"set_default_ess_material_cache_class\" getter=\"get_default_ess_material_cache_class\" default=\"&quot;ESSMaterialCachePCM&quot;\">\n\t\t</member>\n\t\t<member name=\"entity_spawner\" type=\"ESSEntitySpawner\" setter=\"set_entity_spawner\" getter=\"get_entity_spawner\">\n\t\t</member>\n\t\t<member name=\"entity_types\" type=\"String\" setter=\"entity_types_set\" getter=\"entity_types_get\" default=\"&quot;None,Creature,Totem,Idol,Humanoid,Mechanical,Beast,Dragonkin,Elemental,Ghost,Energy,Anomaly,Demon,Object&quot;\">\n\t\t</member>\n\t\t<member name=\"equip_slot_string\" type=\"String\" setter=\"equip_slot_set_string\" getter=\"equip_slot_get_string\" default=\"&quot;Head,Neck,Shoulder,Chest,Gloves,Belt,Legs,Feet,Ring_1,Ring_2,Trinket_1,Trinket_2,Main_Hand,Off_Hand,None&quot;\">\n\t\t</member>\n\t\t<member name=\"equip_slots\" type=\"PoolStringArray\" setter=\"equip_slots_set\" getter=\"equip_slots_get\" default=\"PoolStringArray( &quot;Head&quot;, &quot;Neck&quot;, &quot;Shoulder&quot;, &quot;Chest&quot;, &quot;Gloves&quot;, &quot;Belt&quot;, &quot;Legs&quot;, &quot;Feet&quot;, &quot;Ring_1&quot;, &quot;Ring_2&quot;, &quot;Trinket_1&quot;, &quot;Trinket_2&quot;, &quot;Main_Hand&quot;, &quot;Off_Hand&quot; )\">\n\t\t</member>\n\t\t<member name=\"keep_original_atlases\" type=\"bool\" setter=\"set_keep_original_atlases\" getter=\"get_keep_original_atlases\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"main_stat_count\" type=\"int\" setter=\"stat_set_main_stat_count\" getter=\"stat_get_main_stat_count\" default=\"5\">\n\t\t</member>\n\t\t<member name=\"margin\" type=\"int\" setter=\"set_margin\" getter=\"get_margin\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"material_paths\" type=\"PoolStringArray\" setter=\"material_paths_set\" getter=\"material_paths_get\" default=\"PoolStringArray(  )\">\n\t\t</member>\n\t\t<member name=\"materials\" type=\"Array\" setter=\"materials_set\" getter=\"materials_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"max_atlas_size\" type=\"int\" setter=\"set_max_atlas_size\" getter=\"get_max_atlas_size\" default=\"1024\">\n\t\t</member>\n\t\t<member name=\"max_character_level\" type=\"int\" setter=\"\" getter=\"get_max_character_level\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"max_class_level\" type=\"int\" setter=\"\" getter=\"get_max_class_level\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"model_visual_groups\" type=\"String\" setter=\"model_visual_groups_set\" getter=\"model_visual_groups_get\" default=\"&quot;None,Bodypart,Alt Bodypart,Attachment&quot;\">\n\t\t</member>\n\t\t<member name=\"resource_db\" type=\"ESSResourceDB\" setter=\"set_resource_db\" getter=\"get_resource_db\">\n\t\t</member>\n\t\t<member name=\"resource_db_path\" type=\"String\" setter=\"set_resource_db_path\" getter=\"get_resource_db_path\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"scale_spells_by_default\" type=\"bool\" setter=\"set_scale_spells_by_default\" getter=\"get_scale_spells_by_default\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"skeletons_bone_attachment_points\" type=\"PoolStringArray\" setter=\"skeletons_bone_attachment_points_set\" getter=\"skeletons_bone_attachment_points_get\" default=\"PoolStringArray(  )\">\n\t\t</member>\n\t\t<member name=\"skeletons_bones\" type=\"PoolStringArray\" setter=\"skeletons_bones_set\" getter=\"skeletons_bones_get\" default=\"PoolStringArray(  )\">\n\t\t</member>\n\t\t<member name=\"stat_string\" type=\"String\" setter=\"stat_set_string\" getter=\"stat_get_string\" default=\"&quot;Agility,Strength,Stamina,Intellect,Spirit,Health,Speed,Global Cooldown,Haste&quot;\">\n\t\t</member>\n\t\t<member name=\"stats\" type=\"PoolStringArray\" setter=\"stats_set\" getter=\"stats_get\" default=\"PoolStringArray( &quot;Agility&quot;, &quot;Strength&quot;, &quot;Stamina&quot;, &quot;Intellect&quot;, &quot;Spirit&quot;, &quot;Health&quot;, &quot;Speed&quot;, &quot;Global Cooldown&quot;, &quot;Haste&quot; )\">\n\t\t</member>\n\t\t<member name=\"texture_flags\" type=\"int\" setter=\"set_texture_flags\" getter=\"get_texture_flags\" default=\"5\">\n\t\t</member>\n\t\t<member name=\"texture_layers\" type=\"String\" setter=\"texture_layers_set\" getter=\"texture_layers_get\" default=\"&quot;None,Skin,Underwear,Shirt,Clothes Base,Clothes 1,Clothes 2,Clothes 3,Clothes 4,Clothes 5,Belt,Tabard,Overlay&quot;\">\n\t\t</member>\n\t\t<member name=\"use_class_xp\" type=\"bool\" setter=\"set_use_class_xp\" getter=\"get_use_class_xp\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"use_spell_points\" type=\"bool\" setter=\"set_use_spell_points\" getter=\"get_use_spell_points\" default=\"false\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ESSEntitySpawner.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ESSEntitySpawner\" inherits=\"Node\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_request_entity_spawn\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"EntityCreateInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"request_entity_spawn\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"EntityCreateInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"request_entity_spawn_deferred\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"EntityCreateInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<signals>\n\t\t<signal name=\"on_entity_spawn\">\n\t\t\t<argument index=\"0\" name=\"info\" type=\"EntityCreateInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ESSMaterialCache.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ESSMaterialCache\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_setup_material_albedo\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"texture\" type=\"Texture\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"dec_ref_count\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"inc_ref_count\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"initial_setup_default\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_add\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"Material\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_get\">\n\t\t\t<return type=\"Material\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_get_num\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_lod_get\">\n\t\t\t<return type=\"Material\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_remove\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"material_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"Material\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"materials_clear\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"mutex_lock\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"mutex_locked\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"mutex_unlock\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"refresh_rects\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"setup_material_albedo\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"texture\" type=\"Texture\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"texture_add\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"texture\" type=\"Texture\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"texture_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"texture_get\">\n\t\t\t<return type=\"Texture\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"texture_get_atlas\">\n\t\t\t<return type=\"AtlasTexture\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"texture_get_atlas_tex\">\n\t\t\t<return type=\"AtlasTexture\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"Texture\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"texture_get_uv_rect\">\n\t\t\t<return type=\"Rect2\" />\n\t\t\t<argument index=\"0\" name=\"texture\" type=\"Texture\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"texture_remove\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"texture\" type=\"Texture\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"texture_remove_index\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"textures_clear\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"initialized\" type=\"bool\" setter=\"set_initialized\" getter=\"get_initialized\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"mat_ref_count\" type=\"int\" setter=\"set_ref_count\" getter=\"get_ref_count\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"materials\" type=\"Array\" setter=\"materials_set\" getter=\"materials_get\" default=\"[  ]\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ESSMaterialCachePCM.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ESSMaterialCachePCM\" inherits=\"ESSMaterialCache\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"background_color\" type=\"Color\" setter=\"set_background_color\" getter=\"get_background_color\" default=\"Color( 0, 0, 0, 1 )\">\n\t\t</member>\n\t\t<member name=\"keep_original_atlases\" type=\"bool\" setter=\"set_keep_original_atlases\" getter=\"get_keep_original_atlases\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"margin\" type=\"int\" setter=\"set_margin\" getter=\"get_margin\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"max_atlas_size\" type=\"int\" setter=\"set_max_atlas_size\" getter=\"get_max_atlas_size\" default=\"1024\">\n\t\t</member>\n\t\t<member name=\"texture_flags\" type=\"int\" setter=\"set_texture_flags\" getter=\"get_texture_flags\" default=\"5\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ESSResourceDB.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ESSResourceDB\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_initialize\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_craft_recipe\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"craft_recipe\" type=\"CraftRecipe\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_entity_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"cls\" type=\"EntityData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_entity_resource\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"cls\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_entity_resource_db\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"other\" type=\"ESSResourceDB\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_entity_skill\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"cls\" type=\"EntitySkillData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_entity_species_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"pcd\" type=\"EntitySpeciesData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_item_template\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item_template\" type=\"ItemTemplate\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_spell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"clear\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_recipe_id_to_path\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_recipe_path_to_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"entity_data_id_to_path\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"entity_data_path_to_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"entity_resource_id_to_path\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"entity_resource_path_to_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"entity_skill_id_to_path\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"entity_skill_path_to_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"entity_species_id_to_path\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"entity_species_path_to_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_craft_recipe\">\n\t\t\t<return type=\"CraftRecipe\" />\n\t\t\t<argument index=\"0\" name=\"craft_recipe_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_craft_recipe_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_craft_recipe_index\">\n\t\t\t<return type=\"CraftRecipe\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_craft_recipe_path\">\n\t\t\t<return type=\"CraftRecipe\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_craft_recipes\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_data\">\n\t\t\t<return type=\"EntityData\" />\n\t\t\t<argument index=\"0\" name=\"class_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_data_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_data_index\">\n\t\t\t<return type=\"EntityData\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_data_path\">\n\t\t\t<return type=\"EntityData\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_datas\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_resource\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<argument index=\"0\" name=\"class_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_resource_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_resource_index\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_resource_path\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_resources\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_skill\">\n\t\t\t<return type=\"EntitySkillData\" />\n\t\t\t<argument index=\"0\" name=\"class_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_skill_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_skill_index\">\n\t\t\t<return type=\"EntitySkillData\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_skill_path\">\n\t\t\t<return type=\"EntitySkillData\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_skills\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_species_data\">\n\t\t\t<return type=\"EntitySpeciesData\" />\n\t\t\t<argument index=\"0\" name=\"pcd_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_species_data_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_species_data_index\">\n\t\t\t<return type=\"EntitySpeciesData\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_species_data_path\">\n\t\t\t<return type=\"EntitySpeciesData\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_species_datas\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_item_template\">\n\t\t\t<return type=\"ItemTemplate\" />\n\t\t\t<argument index=\"0\" name=\"item_template_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_item_template_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_item_template_index\">\n\t\t\t<return type=\"ItemTemplate\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_item_template_path\">\n\t\t\t<return type=\"ItemTemplate\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_item_templates\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_skill_for_armor_type\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_spell\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_spell_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_spell_index\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_spell_path\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_spells\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"initialize\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_template_id_to_path\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_template_path_to_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_craft_recipes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"recipe\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_entity_datas\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"recipe\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_entity_resources\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"recipe\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_entity_skills\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"recipe\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_entity_species_datas\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"recipe\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_item_templates\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"recipe\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_skill_for_armor_type\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_spells\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"recipe\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_id_to_path\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_path_to_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"skill_for_armor_type_0\" type=\"Spell\" setter=\"set_skill_for_armor_type\" getter=\"get_skill_for_armor_type\">\n\t\t</member>\n\t\t<member name=\"skill_for_armor_type_1\" type=\"Spell\" setter=\"set_skill_for_armor_type\" getter=\"get_skill_for_armor_type\">\n\t\t</member>\n\t\t<member name=\"skill_for_armor_type_2\" type=\"Spell\" setter=\"set_skill_for_armor_type\" getter=\"get_skill_for_armor_type\">\n\t\t</member>\n\t\t<member name=\"skill_for_armor_type_3\" type=\"Spell\" setter=\"set_skill_for_armor_type\" getter=\"get_skill_for_armor_type\">\n\t\t</member>\n\t\t<member name=\"skill_for_armor_type_4\" type=\"Spell\" setter=\"set_skill_for_armor_type\" getter=\"get_skill_for_armor_type\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ESSResourceDBFolders.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ESSResourceDBFolders\" inherits=\"ESSResourceDBMap\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"add_resource\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"Resource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_all\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_folder\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"folder\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_folders\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_resource\">\n\t\t\t<return type=\"Resource\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"String\" />\n\t\t\t<argument index=\"1\" name=\"type_hint\" type=\"String\" default=\"&quot;&quot;\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"automatic_load\" type=\"bool\" setter=\"set_automatic_load\" getter=\"get_automatic_load\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"folders\" type=\"PoolStringArray\" setter=\"set_folders\" getter=\"get_folders\" default=\"PoolStringArray(  )\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ESSResourceDBMap.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ESSResourceDBMap\" inherits=\"ESSResourceDB\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ESSResourceDBStatic.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ESSResourceDBStatic\" inherits=\"ESSResourceDB\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"craft_recipes\" type=\"Array\" setter=\"set_craft_recipes\" getter=\"get_craft_recipes\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"entity_datas\" type=\"Array\" setter=\"set_entity_datas\" getter=\"get_entity_datas\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"entity_resources\" type=\"Array\" setter=\"set_entity_resources\" getter=\"get_entity_resources\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"entity_skills\" type=\"Array\" setter=\"set_entity_skills\" getter=\"get_entity_skills\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"entity_species_datas\" type=\"Array\" setter=\"set_entity_species_datas\" getter=\"get_entity_species_datas\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"item_templates\" type=\"Array\" setter=\"set_item_templates\" getter=\"get_item_templates\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"remap_ids\" type=\"bool\" setter=\"set_remap_ids\" getter=\"get_remap_ids\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"spells\" type=\"Array\" setter=\"set_spells\" getter=\"get_spells\" default=\"[  ]\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/Entity.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"Entity\" inherits=\"Node\" version=\"3.5\">\n\t<brief_description>\n\t\tRepresents an [Entity] inside the world. Entities can be players, mobs, chests, or any kind of interactable things.\n\t</brief_description>\n\t<description>\n\t\tFunctions starting, or having an 's' in them (like cooldown_adds, or equip_applys_item etc) are only called, or meant to be called by serverside code.\n\t\tFunctions with a 'c' in them (like cooldown_addc, equip_deapplyc_item etc) are only called, or meant to be called from clientside code.\n\t\tFunctions that have a virtual variant starting with an underscore, should be called, they will call the virtual version.\n\t\tThey will check if the virtual properly exists, also usually they check if the parameters are valid, so you don't have to do it every time in gdscript.\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_body_changed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_canc_interact\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_cans_interact\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_character_talent_sreceive_learn_request\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spec_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"character_talent_row\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"character_talent_culomn\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_character_talent_sreceive_reset_request\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_class_talent_sreceive_learn_request\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spec_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"class_talent_row\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"class_talent_culomn\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_class_talent_sreceive_reset_request\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_character_talent_learned\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"character_talent_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_character_talent_reset\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_class_talent_learned\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"class_talent_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_class_talent_reset\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_target_changed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"old_target\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_crafts\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_applyc_item\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_applys_item\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_can_equip_item\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_con_fail\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_con_success\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_deapplyc_item\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_deapplys_item\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_should_deny\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_son_fail\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_son_success\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equips\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_from_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_getc_relation_to\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"to\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_gets_relation_to\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"to\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_initialize\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_isc_target_in_interact_range\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_iss_target_in_interact_range\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_item_uses\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_moved\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_caura\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_ccast\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cdamage\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cdeath\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_centity_resource_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_centity_resource_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cgcd_finished\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cgcd_started\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"gcd\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cheal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_clevel_up\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cmouse_enter\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cmouse_exit\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_ctargeted\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cuntargeted\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cxp_gained\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_saura\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scast\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sdamage\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sdeath\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sentity_resource_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sentity_resource_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sgcd_finished\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sgcd_started\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"gcd\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sheal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_slevel_up\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sxp_gained\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_setup\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_sinteract\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_character_talent_learned\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"character_talent_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_character_talent_reset\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_class_talent_learned\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"class_talent_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_class_talent_reset\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_target_changed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"old_target\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_to_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_vendor_item_sbuy\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"count\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_vendor_item_ssell\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"adds_state_ref\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"state_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_addc_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_getc\">\n\t\t\t<return type=\"AuraData\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_getc_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_gets\">\n\t\t\t<return type=\"AuraData\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_gets_by\">\n\t\t\t<return type=\"AuraData\" />\n\t\t\t<argument index=\"0\" name=\"caster\" type=\"Node\" />\n\t\t\t<argument index=\"1\" name=\"aura_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_gets_with_group_by\">\n\t\t\t<return type=\"AuraData\" />\n\t\t\t<argument index=\"0\" name=\"caster\" type=\"Node\" />\n\t\t\t<argument index=\"1\" name=\"aura_group\" type=\"AuraGroup\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removec_dispelled\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removec_dispelled_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removec_exact\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removec_exact_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removec_expired\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removec_expired_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removec_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removes_dispelled\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removes_exact\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removes_expired\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removess_with_group\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura_group\" type=\"AuraGroup\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"canc_interact\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cans_interact\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_delayc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_delays\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_failc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_fails\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_finishc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_finishs\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_interruptc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_interrupts\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_is_castingc\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_is_castings\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_spell_successc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_spell_successc_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_spell_successs\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_startc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_startc_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_starts\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"category_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"category_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_getc\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"category_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_getc_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_getc_index\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_gets\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"category_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_gets_index\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_hasc\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"category_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_hass\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"category_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"category_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"category_cooldown_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"category_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cdamage_dealt_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cdealt_damage_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cdealt_heal_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cequip_applys_item\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"character_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"character_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_cclear\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_crequest_learn\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spec_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"character_talent_row\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"character_talent_culomn\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_crequest_reset\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_creset\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_getc\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_getc_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_gets\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_hasc\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"character_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_hass\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"character_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"character_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"character_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_sreceive_learn_request\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spec_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"character_talent_row\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"character_talent_culomn\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_sreceive_reset_request\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talent_sreset\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"character_talents_sclear\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cheal_dealt_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"class_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"class_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_cclear\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_crequest_learn\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spec_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"class_talent_row\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"class_talent_culomn\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_crequest_reset\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_creset\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_getc\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_getc_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_gets\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_hasc\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"class_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_hass\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"class_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"class_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"class_talent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_sreceive_learn_request\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spec_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"class_talent_row\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"class_talent_culomn\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_sreceive_reset_request\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talent_sreset\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"class_talents_sclear\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_getc\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_getc_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_getc_index\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_gets\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_gets_index\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_hasc\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_hass\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cooldown_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"copen_window\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"window_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_addc_recipe\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"craft_recipe\" type=\"CraftRecipe\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_addc_recipe_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_adds_recipe\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"craft_recipe\" type=\"CraftRecipe\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_adds_recipe_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_crequest\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_getc_recipe\">\n\t\t\t<return type=\"CraftRecipe\" />\n\t\t\t<argument index=\"0\" name=\"craft_recipe\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_getc_recipe_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_gets_recipe\">\n\t\t\t<return type=\"CraftRecipe\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_gets_recipe_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_gets_recipe_id\">\n\t\t\t<return type=\"CraftRecipe\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_hasc_recipe\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"craft_recipe\" type=\"CraftRecipe\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_hasc_recipe_id\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_hass_recipe\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"craft_recipe\" type=\"CraftRecipe\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_hass_recipe_id\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_removec_recipe\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"craft_recipe\" type=\"CraftRecipe\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_removec_recipe_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_removes_recipe\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"craft_recipe\" type=\"CraftRecipe\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"craft_removes_recipe_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"crafts\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"creceive_stat\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"ccurrent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"crequest_interact\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"data_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"EntityDataContainer\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"data_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"EntityDataContainer\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"data_getc\">\n\t\t\t<return type=\"EntityDataContainer\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"data_getc_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"data_gets\">\n\t\t\t<return type=\"EntityDataContainer\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"data_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"data_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"data_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"diec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"dies\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_applys_item\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_can_equip_item\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_cfail\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_con_fail\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_con_success\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_crequest\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_csuccess\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_deapplyc_item\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_deapplys_item\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_getc_slot\">\n\t\t\t<return type=\"ItemInstance\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_gets_slot\">\n\t\t\t<return type=\"ItemInstance\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_should_deny\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_son_fail\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_son_success\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equips\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"gcd_hasc\" qualifiers=\"const\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"gcd_hass\" qualifiers=\"const\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"gcd_startc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"gcd_starts\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_action_bar_profile\">\n\t\t\t<return type=\"ActionBarProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_body\">\n\t\t\t<return type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_body_2d\">\n\t\t\t<return type=\"Node2D\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_body_3d\">\n\t\t\t<return type=\"Spatial\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_character_skeleton\">\n\t\t\t<return type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_maunal_process\" qualifiers=\"const\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_transform_2d\" qualifiers=\"const\">\n\t\t\t<return type=\"Transform2D\" />\n\t\t\t<argument index=\"0\" name=\"only_stored\" type=\"bool\" default=\"false\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_transform_3d\" qualifiers=\"const\">\n\t\t\t<return type=\"Transform\" />\n\t\t\t<argument index=\"0\" name=\"only_stored\" type=\"bool\" default=\"false\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"getc_health\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"getc_is_controlled\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"getc_relation_to\">\n\t\t\t<return type=\"int\" enum=\"EntityEnums.EntityRelationType\" />\n\t\t\t<argument index=\"0\" name=\"to\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"getc_speed\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"gets_health\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"gets_relation_to\">\n\t\t\t<return type=\"int\" enum=\"EntityEnums.EntityRelationType\" />\n\t\t\t<argument index=\"0\" name=\"to\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"gets_speed\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"instance_body\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"EntityData\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"is_deserialized\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"isc_target_in_interact_range\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"iss_target_in_interact_range\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_addc_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item_data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_cchange_count\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"new_count\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_cdeny_remove\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_cdeny_swap\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_crequest_remove\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_crequest_swap\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_crequest_use\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"item_uses\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"item_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"items_swapc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"items_swaps\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"levelupc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"levelups\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"loot_crequest\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"lootc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"loots\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"moved\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_caura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccast\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccategory_cooldown_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"category_cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccategory_cooldown_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccategory_cooldown_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"category_cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccategory_cooldown_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccooldown_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccooldown_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccooldown_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccooldown_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cdamage\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cdeath\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_centity_resource_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_centity_resource_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cgcd_finished\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cgcd_started\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cheal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_clevel_up\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cmouse_enter\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cmouse_exit\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cstat_changed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ctargeted\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cuntargeted\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cxp_gained\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_item_sadded\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_item_sremoved\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_item_sscount_changed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_items_sswapped\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_saura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scast\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scategory_cooldown_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scategory_cooldown_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"category_cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scategory_cooldown_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scategory_cooldown_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"category_cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scooldown_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scooldown_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scooldown_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scooldown_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sdamage\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sdeath\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sentity_resource_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sentity_resource_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sgcd_finished\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sgcd_started\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sheal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_slevel_up\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_soverburden_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_soverburdened\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sstat_changed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sxp_gained\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_target_item_sadded\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_target_item_sremoved\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_target_item_sscount_changed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"2\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_target_items_sswapped\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"bag\" type=\"Bag\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"on_body_changed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_addc_path\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"NodePath\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_getc\">\n\t\t\t<return type=\"Entity\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_getc_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_gets\">\n\t\t\t<return type=\"Entity\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_removec_index\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_removes_index\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"register_for_physics_process\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"removes_state_ref\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"state_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"palyer_resource\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_addc_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"palyer_resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_clearc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_clears\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_creceive_curr_max\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"current\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"max\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_creceive_current\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"current\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_creceive_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_getc_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_getc_id\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<argument index=\"0\" name=\"type\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_getc_index\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_gets_id\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<argument index=\"0\" name=\"type\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_gets_index\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_sends_curr_max\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"current\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"max\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_sends_current\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"current\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"resource_sends_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sapply_passives_damage_deal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sapply_passives_damage_receive\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sdeal_damage_to\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sdeal_heal_to\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"seen_by_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"seen_by_gets\">\n\t\t\t<return type=\"Entity\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"seen_by_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"seen_by_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"seen_by_removes_index\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sees_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sees_gets\">\n\t\t\t<return type=\"Entity\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sees_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sees_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sees_removes_index\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_body\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"body\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_character_skeleton\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"skeleton\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_maunal_process\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_transform_2d\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"transform\" type=\"Transform2D\" />\n\t\t\t<argument index=\"1\" name=\"only_stored\" type=\"bool\" default=\"false\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_transform_3d\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"transform\" type=\"Transform\" />\n\t\t\t<argument index=\"1\" name=\"only_stored\" type=\"bool\" default=\"false\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"setc_bag_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"setc_target_bag_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"setup\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"EntityCreateInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"setup_actionbars\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sinteract\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_addc_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"skill_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"max_value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_changec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"skill_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_changec_max\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"skill_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_getc\">\n\t\t\t<return type=\"EntitySkill\" />\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_getc_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_gets\">\n\t\t\t<return type=\"EntitySkill\" />\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_hasc\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_hasc_id\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_hass\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_hass_id\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_removec_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"skill_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"skill_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_addc_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_adds_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_casts\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_crequest_cast\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_getc\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"spell\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_getc_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_gets\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"spell\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_gets_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_hasc\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_hasc_id\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_hass\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_hass_id\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_learn_requestc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_learns\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_removec_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"ssend_open_window\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"window_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"ssend_stat\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"ccurrent\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stake_damage\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stake_heal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_get_base\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_get_base_calculated\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_get_bonus\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_get_dirty\" qualifiers=\"const\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_get_percent\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_getc_current\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_gets_current\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"base\" type=\"float\" />\n\t\t\t<argument index=\"2\" name=\"bonus\" type=\"float\" />\n\t\t\t<argument index=\"3\" name=\"percent\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_mod_base\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_mod_bonus\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_mod_percent\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_recalculate\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_set_base\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_set_base_calculated\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_set_bonus\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_set_dirty\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_set_percent\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_setc_current\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_sets_current\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_crequest_change\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"NodePath\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_item_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_item_addc_rpc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"item_data\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_item_cchange_count\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"new_count\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_item_cdeny_remove\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_item_cdeny_swap\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_item_crequest_swap\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_item_removec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_item_removes\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_items_cswap\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_items_sswap\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id_1\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"slot_id_2\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_net_setc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"NodePath\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_net_sets\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"path\" type=\"NodePath\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"target_remove_crequest_item\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"update\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"vendor_item_buy_crequest\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"count\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"vendor_item_sbuy\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"count\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"vendor_item_sell_crequest\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"vendor_item_ssell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"vrpc\" qualifiers=\"vararg\">\n\t\t\t<return type=\"Variant\" />\n\t\t\t<argument index=\"0\" name=\"method\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"xp_addc\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"xp_adds\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"actionbar_locked\" type=\"bool\" setter=\"set_actionbar_locked\" getter=\"get_actionbar_locked\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"ai_state\" type=\"int\" setter=\"sets_ai_state\" getter=\"gets_ai_state\" enum=\"EntityEnums.AIStates\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"body_path\" type=\"NodePath\" setter=\"set_body_path\" getter=\"get_body_path\" default=\"NodePath(&quot;&quot;)\">\n\t\t</member>\n\t\t<member name=\"cbag\" type=\"Bag\" setter=\"setc_bag\" getter=\"getc_bag\">\n\t\t</member>\n\t\t<member name=\"centity_controller\" type=\"int\" setter=\"setc_entity_controller\" getter=\"getc_entity_controller\" enum=\"EntityEnums.EntityController\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"centity_data\" type=\"EntityData\" setter=\"setc_entity_data\" getter=\"getc_entity_data\">\n\t\t</member>\n\t\t<member name=\"centity_flags\" type=\"int\" setter=\"setc_entity_flags\" getter=\"getc_entity_flags\">\n\t\t</member>\n\t\t<member name=\"centity_interaction_type\" type=\"int\" setter=\"setc_entity_interaction_type\" getter=\"getc_entity_interaction_type\" enum=\"EntityEnums.EntityInteractionType\">\n\t\t</member>\n\t\t<member name=\"centity_name\" type=\"String\" setter=\"setc_entity_name\" getter=\"getc_entity_name\">\n\t\t</member>\n\t\t<member name=\"centity_player_type\" type=\"int\" setter=\"setc_entity_player_type\" getter=\"getc_entity_player_type\">\n\t\t</member>\n\t\t<member name=\"centity_type\" type=\"int\" setter=\"setc_entity_type\" getter=\"getc_entity_type\">\n\t\t</member>\n\t\t<member name=\"cfree_character_talent_points\" type=\"int\" setter=\"setc_free_character_talent_points\" getter=\"getc_free_character_talent_points\">\n\t\t</member>\n\t\t<member name=\"cfree_class_talent_points\" type=\"int\" setter=\"setc_free_class_talent_points\" getter=\"getc_free_class_talent_points\">\n\t\t</member>\n\t\t<member name=\"cfree_spell_points\" type=\"int\" setter=\"setc_free_spell_points\" getter=\"getc_free_spell_points\">\n\t\t</member>\n\t\t<member name=\"cgcd\" type=\"float\" setter=\"gcd_setc\" getter=\"gcd_getc\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"cguid\" type=\"int\" setter=\"setc_guid\" getter=\"getc_guid\">\n\t\t</member>\n\t\t<member name=\"character_skeleton_path\" type=\"NodePath\" setter=\"set_character_skeleton_path\" getter=\"get_character_skeleton_path\" default=\"NodePath(&quot;&quot;)\">\n\t\t</member>\n\t\t<member name=\"characterclass_id\" type=\"int\" setter=\"sets_entity_data_id\" getter=\"gets_entity_data_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"cis_pet\" type=\"bool\" setter=\"\" getter=\"getc_is_pet\">\n\t\t</member>\n\t\t<member name=\"clevel\" type=\"int\" setter=\"setc_level\" getter=\"getc_level\">\n\t\t</member>\n\t\t<member name=\"cmodel_index\" type=\"int\" setter=\"setc_model_index\" getter=\"getc_model_index\">\n\t\t</member>\n\t\t<member name=\"cmoney\" type=\"int\" setter=\"setc_money\" getter=\"getc_money\">\n\t\t</member>\n\t\t<member name=\"cseed\" type=\"int\" setter=\"setc_seed\" getter=\"getc_seed\">\n\t\t</member>\n\t\t<member name=\"cspell_cast_info\" type=\"SpellCastInfo\" setter=\"setc_spell_cast_info\" getter=\"spell_getc_cast_info\">\n\t\t</member>\n\t\t<member name=\"cstate\" type=\"int\" setter=\"setc_state\" getter=\"getc_state\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"ctarget\" type=\"Entity\" setter=\"setc_target\" getter=\"getc_target\">\n\t\t</member>\n\t\t<member name=\"ctarget_bag\" type=\"Bag\" setter=\"setc_target_bag\" getter=\"getc_target_bag\">\n\t\t</member>\n\t\t<member name=\"cxp\" type=\"int\" setter=\"setc_xp\" getter=\"getc_xp\">\n\t\t</member>\n\t\t<member name=\"entity_data_id\" type=\"int\" setter=\"setc_entity_data_id\" getter=\"getc_entity_data_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"pet_gets_ai_state\" type=\"int\" setter=\"pet_sets_ai_state\" getter=\"pet_gets_ai_state\" enum=\"EntityEnums.AIStates\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sai\" type=\"EntityAI\" setter=\"sets_ai\" getter=\"gets_ai\">\n\t\t</member>\n\t\t<member name=\"sauras\" type=\"Array\" setter=\"sauras_set\" getter=\"sauras_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"sbag\" type=\"Bag\" setter=\"sets_bag\" getter=\"gets_bag\">\n\t\t</member>\n\t\t<member name=\"scategory_cooldowns\" type=\"Array\" setter=\"scategory_cooldowns_set\" getter=\"scategory_cooldowns_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"scharacter_talents\" type=\"PoolIntArray\" setter=\"scharacter_talents_set\" getter=\"scharacter_talents_get\" default=\"PoolIntArray(  )\">\n\t\t</member>\n\t\t<member name=\"sclass_talents\" type=\"PoolIntArray\" setter=\"sclass_talents_set\" getter=\"sclass_talents_get\" default=\"PoolIntArray(  )\">\n\t\t</member>\n\t\t<member name=\"scooldowns\" type=\"Array\" setter=\"scooldowns_set\" getter=\"scooldowns_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"scraft_recipes\" type=\"Array\" setter=\"scraft_recipes_set\" getter=\"scraft_recipes_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"sdatas\" type=\"Array\" setter=\"sdatas_set\" getter=\"sdatas_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"sentity_controller\" type=\"int\" setter=\"sets_entity_controller\" getter=\"gets_entity_controller\" enum=\"EntityEnums.EntityController\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sentity_data\" type=\"EntityData\" setter=\"sets_entity_data\" getter=\"gets_entity_data\">\n\t\t</member>\n\t\t<member name=\"sentity_flags\" type=\"int\" setter=\"sets_entity_flags\" getter=\"gets_entity_flags\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sentity_interaction_type\" type=\"int\" setter=\"sets_entity_interaction_type\" getter=\"gets_entity_interaction_type\" enum=\"EntityEnums.EntityInteractionType\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sentity_name\" type=\"String\" setter=\"sets_entity_name\" getter=\"gets_entity_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"sentity_player_type\" type=\"int\" setter=\"sets_entity_player_type\" getter=\"gets_entity_player_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sentity_type\" type=\"int\" setter=\"sets_entity_type\" getter=\"gets_entity_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sfree_character_talent_points\" type=\"int\" setter=\"sets_free_character_talent_points\" getter=\"gets_free_character_talent_points\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sfree_class_talent_points\" type=\"int\" setter=\"sets_free_class_talent_points\" getter=\"gets_free_class_talent_points\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sfree_spell_points\" type=\"int\" setter=\"sets_free_spell_points\" getter=\"gets_free_spell_points\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sgcd\" type=\"float\" setter=\"gcd_sets\" getter=\"gcd_gets\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"sguid\" type=\"int\" setter=\"sets_guid\" getter=\"gets_guid\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"simmunity_flags\" type=\"int\" setter=\"sets_immunity_flags\" getter=\"gets_immunity_flags\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sis_pet\" type=\"bool\" setter=\"\" getter=\"gets_is_pet\">\n\t\t</member>\n\t\t<member name=\"slevel\" type=\"int\" setter=\"sets_level\" getter=\"gets_level\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"smodel_index\" type=\"int\" setter=\"sets_model_index\" getter=\"gets_model_index\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"smoney\" type=\"int\" setter=\"sets_money\" getter=\"gets_money\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"soriginal_entity_controller\" type=\"int\" setter=\"sets_original_entity_controller\" getter=\"gets_original_entity_controller\" enum=\"EntityEnums.EntityController\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"spet_formation_index\" type=\"int\" setter=\"pet_sets_formation_index\" getter=\"pet_gets_formation_index\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"spet_owner\" type=\"Entity\" setter=\"pet_sets_owner\" getter=\"pet_gets_owner\">\n\t\t</member>\n\t\t<member name=\"sresources\" type=\"Array\" setter=\"sresources_set\" getter=\"sresources_get\" default=\"[ Object(EntityResourceHealth,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;id&quot;:0,&quot;text_name&quot;:&quot;&quot;,&quot;current_value&quot;:0,&quot;max_value&quot;:0,&quot;stacking_mods&quot;:PoolRealArray(  ),&quot;non_stacking_mods&quot;:PoolRealArray(  ),&quot;script&quot;:null), Object(EntityResourceSpeed,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;id&quot;:0,&quot;text_name&quot;:&quot;&quot;,&quot;current_value&quot;:0,&quot;max_value&quot;:0,&quot;stacking_mods&quot;:PoolRealArray(  ),&quot;non_stacking_mods&quot;:PoolRealArray(  ),&quot;script&quot;:null) ]\">\n\t\t</member>\n\t\t<member name=\"sseed\" type=\"int\" setter=\"sets_seed\" getter=\"gets_seed\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sskills\" type=\"Array\" setter=\"sskills_set\" getter=\"sskills_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"sspell_cast_info\" type=\"SpellCastInfo\" setter=\"sets_spell_cast_info\" getter=\"spell_gets_cast_info\">\n\t\t</member>\n\t\t<member name=\"sspells\" type=\"Array\" setter=\"sspells_set\" getter=\"sspells_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"sstate\" type=\"int\" setter=\"sets_state\" getter=\"gets_state\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"sstates\" type=\"PoolIntArray\" setter=\"states_sets\" getter=\"states_gets\" default=\"PoolIntArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )\">\n\t\t</member>\n\t\t<member name=\"starget\" type=\"Entity\" setter=\"sets_target\" getter=\"gets_target\">\n\t\t</member>\n\t\t<member name=\"starget_bag\" type=\"Bag\" setter=\"sets_target_bag\" getter=\"gets_target_bag\">\n\t\t</member>\n\t\t<member name=\"sxp\" type=\"int\" setter=\"sets_xp\" getter=\"gets_xp\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"body_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cbag_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"bag\" type=\"Bag\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"ccategory_cooldown_added\">\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"ccategory_cooldown_removed\">\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"ccharacter_talent_learned\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"character_talent_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"ccharacter_talent_reset\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cclass_talent_learned\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"class_talent_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cclass_talent_reset\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"ccooldown_added\">\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"ccooldown_removed\">\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"ccraft_recipe_added\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"craft_recipe\" type=\"CraftRecipe\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"ccraft_success\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"centity_data_changed\">\n\t\t\t<argument index=\"0\" name=\"data\" type=\"EntityData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"centity_resource_added\">\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"centity_resource_removed\">\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cfree_spell_points_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"new_value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cgcd_finished\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cgcd_started\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cname_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"con_damage_dealt\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"con_damage_received\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"con_dealt_damage\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"con_dealt_heal\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"con_heal_dealt\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"con_heal_received\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"con_level_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"crafts_recipe_added\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"craft_recipe\" type=\"CraftRecipe\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"crafts_success\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cskill_added\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cskill_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cskill_removed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cspell_added\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cspell_removed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"cstate_changed\">\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"ctarget_bag_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"bag\" type=\"Bag\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"ctarget_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"old_target\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"deserialized\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"diecd\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"diesd\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"equip_con_fail\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"equip_con_success\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"equip_son_fail\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"equip_son_success\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"equipment_changed\">\n\t\t\t<argument index=\"0\" name=\"slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_caura\">\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura_data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_ccast\">\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"spell_cast_info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_cdamage\">\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_cheal\">\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_clevel_up\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_cmouse_entered\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_cmouse_exited\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_ctargeted\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_cuntargeted\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_cxp_gained\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_saura\">\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura_data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_scast\">\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"spell_cast_info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_sdamage\">\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_sheal\">\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_slevel_up\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"notification_sxp_gained\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"onc_entity_controller_changed\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"onc_open_winow_request\">\n\t\t\t<argument index=\"0\" name=\"window_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sbag_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"bag\" type=\"Bag\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"scategory_cooldown_added\">\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"scategory_cooldown_removed\">\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"scharacter_talent_learned\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"character_talent_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"scharacter_talent_reset\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sclass_talent_learned\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"class_talent_id\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sclass_talent_reset\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"scooldown_added\">\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"scooldown_removed\">\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sentity_data_changed\">\n\t\t\t<argument index=\"0\" name=\"data\" type=\"EntityData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sentity_resource_added\">\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sentity_resource_removed\">\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sfree_spell_points_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"new_value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sgcd_finished\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sgcd_started\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sname_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"son_damage_dealt\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"son_damage_received\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"son_dealt_damage\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"son_dealt_heal\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"son_heal_dealt\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"son_heal_received\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"son_level_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sskill_added\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sskill_removed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sspell_added\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sspell_removed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"sstate_changed\">\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"starget_bag_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"bag\" type=\"Bag\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"starget_changed\">\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"old_target\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityAI.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityAI\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tYou can implement AI for [Entities] with this.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_equip_con_fail\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_con_success\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_should_deny\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_son_fail\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_son_success\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_move\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_saura\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scast\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scategory_cooldown_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scategory_cooldown_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scooldown_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scooldown_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sdamage\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sdeath\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sentity_resource_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sentity_resource_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sgcd_finished\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sgcd_started\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"gcd\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sheal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_slevel_up\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sxp_gained\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_on_set_owner\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_pet_move\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_pet_update\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_update\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_con_fail\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_con_success\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_should_deny\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_son_fail\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_son_success\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_editor_description\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"move\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_saura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scast\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scategory_cooldown_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"category_cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scategory_cooldown_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"category_cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scooldown_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scooldown_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"cooldown\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sdamage\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sdeath\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sentity_resource_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sentity_resource_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sgcd_finished\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sgcd_started\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<argument index=\"1\" name=\"gcd\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sheal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_slevel_up\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sxp_gained\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_move\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"pet_update\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_editor_description\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"editor_description\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"update\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"force_state\" type=\"int\" setter=\"set_force_state\" getter=\"get_force_state\" enum=\"EntityEnums.AIStates\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"get_enabled\" type=\"bool\" setter=\"set_enabled\" getter=\"get_enabled\" default=\"true\">\n\t\t</member>\n\t\t<member name=\"owner\" type=\"Entity\" setter=\"set_owner\" getter=\"get_owner\">\n\t\t</member>\n\t\t<member name=\"spec_distribution\" type=\"PoolIntArray\" setter=\"set_spec_distribution\" getter=\"get_spec_distribution\" default=\"PoolIntArray(  )\">\n\t\t</member>\n\t\t<member name=\"spec_variance\" type=\"int\" setter=\"set_spec_variance\" getter=\"get_spec_variance\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"state\" type=\"int\" setter=\"set_state\" getter=\"get_state\" enum=\"EntityEnums.AIStates\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityClassData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityClassData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains all of information for an [Entity]'s class. (Ingame class)\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_get_ai_instance\" qualifiers=\"virtual\">\n\t\t\t<return type=\"EntityAI\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_setup_resources\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_ai\">\n\t\t\t<return type=\"EntityAI\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_ai_instance\">\n\t\t\t<return type=\"EntityAI\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_aura\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_craft_recipe\">\n\t\t\t<return type=\"CraftRecipe\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entity_resource\" qualifiers=\"const\">\n\t\t\t<return type=\"EntityResource\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_ais\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_auras\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_craft_recipes\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_entity_resources\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_specs\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_spells\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_start_spells\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_spec\" qualifiers=\"const\">\n\t\t\t<return type=\"CharacterSpec\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_spell\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_start_spell\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_ai\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"action\" type=\"EntityAI\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_aura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_craft_recipe\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"recipe\" type=\"CraftRecipe\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_entity_resource\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"entity_resource\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_ais\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_auras\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_entity_resources\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_specs\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_spells\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_start_spells\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_spec\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"spec\" type=\"CharacterSpec\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_spell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_start_spell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"ais\" type=\"Array\" setter=\"set_ais\" getter=\"get_ais\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"auras\" type=\"Array\" setter=\"set_auras\" getter=\"get_auras\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"craft_recipes\" type=\"Array\" setter=\"set_craft_recipes\" getter=\"get_craft_recipes\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"entity_resources\" type=\"Array\" setter=\"set_entity_resources\" getter=\"get_entity_resources\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"icon\" type=\"Texture\" setter=\"set_icon\" getter=\"get_icon\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"item_container_data\" type=\"ItemContainerData\" setter=\"set_item_container_data\" getter=\"get_item_container_data\">\n\t\t</member>\n\t\t<member name=\"playstyle_type\" type=\"int\" setter=\"set_playstyle_type\" getter=\"get_playstyle_type\" enum=\"EntityEnums.EntityClassPlaystyleType\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"specs\" type=\"Array\" setter=\"set_specs\" getter=\"get_specs\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"spell_points_per_level\" type=\"int\" setter=\"set_spell_points_per_level\" getter=\"get_spell_points_per_level\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"spell_train_data\" type=\"VendorItemData\" setter=\"set_spell_train_data\" getter=\"get_spell_train_data\">\n\t\t</member>\n\t\t<member name=\"spells\" type=\"Array\" setter=\"set_spells\" getter=\"get_spells\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"start_spells\" type=\"Array\" setter=\"set_start_spells\" getter=\"get_start_spells\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"stat_data\" type=\"StatData\" setter=\"set_stat_data\" getter=\"get_stat_data\">\n\t\t</member>\n\t\t<member name=\"text_description\" type=\"String\" setter=\"set_text_description\" getter=\"get_text_description\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"vendor_item_data\" type=\"VendorItemData\" setter=\"set_vendor_item_data\" getter=\"get_vendor_item_data\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityCreateInfo.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityCreateInfo\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tHelper class used for [Entity] creation, and setup.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_from_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_to_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"class_id\" type=\"int\" setter=\"set_class_id\" getter=\"get_class_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"created_entity\" type=\"Entity\" setter=\"set_created_entity\" getter=\"get_created_entity\">\n\t\t</member>\n\t\t<member name=\"entity_controller\" type=\"int\" setter=\"set_entity_controller\" getter=\"get_entity_controller\" enum=\"EntityEnums.EntityController\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"entity_data\" type=\"EntityData\" setter=\"set_entity_data\" getter=\"get_entity_data\">\n\t\t</member>\n\t\t<member name=\"entity_player_type\" type=\"int\" setter=\"set_entity_player_type\" getter=\"get_entity_player_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"guid\" type=\"int\" setter=\"set_guid\" getter=\"get_guid\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"level\" type=\"int\" setter=\"set_level\" getter=\"get_level\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"network_owner\" type=\"int\" setter=\"set_network_owner\" getter=\"get_network_owner\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"networked\" type=\"bool\" setter=\"set_networked\" getter=\"get_networked\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"node_name\" type=\"String\" setter=\"set_node_name\" getter=\"get_node_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"parent_path\" type=\"NodePath\" setter=\"set_parent_path\" getter=\"get_parent_path\" default=\"NodePath(&quot;&quot;)\">\n\t\t</member>\n\t\t<member name=\"player_name\" type=\"String\" setter=\"set_entity_name\" getter=\"get_entity_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"serialized_data\" type=\"Dictionary\" setter=\"set_serialized_data\" getter=\"get_serialized_data\" default=\"{}\">\n\t\t</member>\n\t\t<member name=\"species_instance\" type=\"SpeciesInstance\" setter=\"set_species_instance\" getter=\"get_species_instance\">\n\t\t</member>\n\t\t<member name=\"transform\" type=\"Transform\" setter=\"set_transform\" getter=\"get_transform\" default=\"Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )\">\n\t\t</member>\n\t\t<member name=\"transform2d\" type=\"Transform2D\" setter=\"set_transform2d\" getter=\"get_transform2d\" default=\"Transform2D( 1, 0, 0, 1, 0, 0 )\">\n\t\t</member>\n\t\t<member name=\"xp\" type=\"int\" setter=\"set_xp\" getter=\"get_xp\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains all data for a given [Entity]. Think of this as all the data for a mob, or a player.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_cans_interact\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_generate_name\" qualifiers=\"virtual\">\n\t\t\t<return type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_get_ai_instance\" qualifiers=\"virtual\">\n\t\t\t<return type=\"EntityAI\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_sinteract\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cans_interact\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"generate_name\">\n\t\t\t<return type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_ai_instance\">\n\t\t\t<return type=\"EntityAI\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"sinteract\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Node\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"ai\" type=\"EntityAI\" setter=\"set_ai\" getter=\"get_ai\">\n\t\t</member>\n\t\t<member name=\"bag_size\" type=\"int\" setter=\"set_bag_size\" getter=\"get_bag_size\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"entity_class_data\" type=\"EntityClassData\" setter=\"set_entity_class_data\" getter=\"get_entity_class_data\">\n\t\t</member>\n\t\t<member name=\"entity_flags\" type=\"int\" setter=\"set_entity_flags\" getter=\"get_entity_flags\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"entity_interaction_type\" type=\"int\" setter=\"set_entity_interaction_type\" getter=\"get_entity_interaction_type\" enum=\"EntityEnums.EntityInteractionType\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"entity_species_data\" type=\"EntitySpeciesData\" setter=\"set_entity_species_data\" getter=\"get_entity_species_data\">\n\t\t</member>\n\t\t<member name=\"equipment_data\" type=\"EquipmentData\" setter=\"set_equipment_data\" getter=\"get_equipment_data\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"immunity_flags\" type=\"int\" setter=\"set_immunity_flags\" getter=\"get_immunity_flags\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"is_playable\" type=\"bool\" setter=\"set_is_playable\" getter=\"get_is_playable\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"loot_db\" type=\"LootDataBase\" setter=\"set_loot_db\" getter=\"get_loot_db\">\n\t\t</member>\n\t\t<member name=\"money\" type=\"int\" setter=\"set_money\" getter=\"get_money\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"species_instance\" type=\"SpeciesInstance\" setter=\"set_species_instance\" getter=\"get_species_instance\">\n\t\t</member>\n\t\t<member name=\"text_description\" type=\"String\" setter=\"set_text_description\" getter=\"get_text_description\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityDataContainer.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityDataContainer\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_from_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_to_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityEnums.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityEnums\" inherits=\"Object\" version=\"3.5\">\n\t<brief_description>\n\t\tContains lots of general-use enums for entities.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<constants>\n\t\t<constant name=\"ENTITY_PLAYER_TYPE_NONE\" value=\"0\" enum=\"EntityPlayerType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_PLAYER_TYPE_PLAYER\" value=\"1\" enum=\"EntityPlayerType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_PLAYER_TYPE_NETWORKED\" value=\"2\" enum=\"EntityPlayerType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_PLAYER_TYPE_AI\" value=\"3\" enum=\"EntityPlayerType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_PLAYER_TYPE_DISPLAY\" value=\"4\" enum=\"EntityPlayerType\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_CONTROLLER_NONE\" value=\"0\" enum=\"EntityController\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_CONTROLLER_PLAYER\" value=\"1\" enum=\"EntityController\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_CONTROLLER_AI\" value=\"2\" enum=\"EntityController\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_FLAGS_NONE\" value=\"0\" enum=\"EntityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_FLAGS_UNTARGETALBE\" value=\"1\" enum=\"EntityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_FLAGS_HIDDEN\" value=\"2\" enum=\"EntityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_FLAGS_INTERACTABLE\" value=\"4\" enum=\"EntityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_FLAGS_HOSTILE\" value=\"8\" enum=\"EntityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_NONE\" value=\"0\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_STUN\" value=\"1\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_ROOT\" value=\"2\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_FROZEN\" value=\"4\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_SILENCED\" value=\"8\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_DISORIENTED\" value=\"16\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_FEARED\" value=\"32\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_BURNING\" value=\"64\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_COLD\" value=\"128\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_CURSED\" value=\"256\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_FLAG_PACIFIED\" value=\"512\" enum=\"EntityStateTypeFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_NONE\" value=\"0\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_STUN\" value=\"1\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_ROOT\" value=\"2\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_FROZEN\" value=\"3\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_SILENCED\" value=\"4\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_DISORIENTED\" value=\"5\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_FEARED\" value=\"6\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_BURNING\" value=\"7\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_COLD\" value=\"8\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_CURSED\" value=\"9\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_PACIFIED\" value=\"10\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_STATE_TYPE_INDEX_MAX\" value=\"11\" enum=\"EntityStateTypeIndexes\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_ROOT\" value=\"0\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_PELVIS\" value=\"1\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_SPINE\" value=\"2\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_SPINE_1\" value=\"3\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_SPINE_2\" value=\"4\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_NECK\" value=\"5\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_HEAD\" value=\"6\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_TORSO\" value=\"7\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_RIGHT_HIP\" value=\"8\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_LEFT_HIP\" value=\"9\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_BACK\" value=\"10\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_LEFT_HAND\" value=\"11\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_RIGHT_HAND\" value=\"12\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_WEAPON_LEFT\" value=\"13\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_WEAPON_RIGHT\" value=\"14\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_WEAPON_LEFT_BACK\" value=\"15\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_WEAPON_RIGHT_BACK\" value=\"16\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_WEAPON_LEFT_SHIELD\" value=\"17\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINT_WEAPON_RIGHT_SHIELD\" value=\"18\" enum=\"CommonCharacterSkeletonPoints\">\n\t\t</constant>\n\t\t<constant name=\"COMMON_SKELETON_POINTS_MAX\" value=\"19\">\n\t\t</constant>\n\t\t<constant name=\"AI_STATE_OFF\" value=\"0\" enum=\"AIStates\">\n\t\t</constant>\n\t\t<constant name=\"AI_STATE_REST\" value=\"1\" enum=\"AIStates\">\n\t\t</constant>\n\t\t<constant name=\"AI_STATE_PATROL\" value=\"2\" enum=\"AIStates\">\n\t\t</constant>\n\t\t<constant name=\"AI_STATE_FOLLOW_PATH\" value=\"3\" enum=\"AIStates\">\n\t\t</constant>\n\t\t<constant name=\"AI_STATE_REGENERATE\" value=\"4\" enum=\"AIStates\">\n\t\t</constant>\n\t\t<constant name=\"AI_STATE_ATTACK\" value=\"5\" enum=\"AIStates\">\n\t\t</constant>\n\t\t<constant name=\"AI_STATE_PET_FOLLOW\" value=\"7\" enum=\"AIStates\">\n\t\t</constant>\n\t\t<constant name=\"AI_STATE_PET_STOP\" value=\"8\" enum=\"AIStates\">\n\t\t</constant>\n\t\t<constant name=\"AI_STATE_PET_ATTACK\" value=\"9\" enum=\"AIStates\">\n\t\t</constant>\n\t\t<constant name=\"AI_STATE_MAX\" value=\"10\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_NONE\" value=\"0\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_STUN\" value=\"1\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_ROOT\" value=\"2\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_FREEZE\" value=\"4\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_SILENCE\" value=\"8\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_DISORIENT\" value=\"16\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_FEAR\" value=\"32\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_BURNING\" value=\"64\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_COLD\" value=\"128\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_PACIFY\" value=\"256\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_MAGIC\" value=\"512\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_POISON\" value=\"1024\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_PHYSICAL\" value=\"2048\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_CURSE\" value=\"4096\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_BLEED\" value=\"8192\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_MELEE\" value=\"16384\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_HOLY\" value=\"32768\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_SHADOW\" value=\"65536\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_NATURE\" value=\"131072\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_FIRE\" value=\"262144\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_FROST\" value=\"524288\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_LIGHTNING\" value=\"1048576\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_CHAOS\" value=\"2097152\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_SLOW\" value=\"4194304\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_CRIT\" value=\"8388608\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_AOE\" value=\"16777216\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_DAMAGE\" value=\"33554432\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_FALL_DAMAGE\" value=\"67108864\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_PROJECTILE\" value=\"134217728\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_DEBUFF\" value=\"268435456\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_IMMUNITY_FLAG_ATTACKS\" value=\"536870912\" enum=\"EntityImmunityFlags\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_RELATION_TYPE_NEUTRAL\" value=\"0\" enum=\"EntityRelationType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_RELATION_TYPE_FRIENDLY\" value=\"1\" enum=\"EntityRelationType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_RELATION_TYPE_HOSTILE\" value=\"2\" enum=\"EntityRelationType\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_INTERACTION_TYPE_NORMAL\" value=\"0\" enum=\"EntityInteractionType\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_INTERACTION_TYPE_SPEAK\" value=\"1\" enum=\"EntityInteractionType\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_INTERACTION_TYPE_LOOT\" value=\"2\" enum=\"EntityInteractionType\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_INTERACTION_TYPE_TRAIN\" value=\"4\" enum=\"EntityInteractionType\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_INTERACTION_TYPE_VENDOR\" value=\"5\" enum=\"EntityInteractionType\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_INTERACTION_TYPE_USE\" value=\"3\" enum=\"EntityInteractionType\">\n\t\t</constant>\n\t\t<constant name=\"ENITIY_INTERACTION_TYPE_NONE\" value=\"6\" enum=\"EntityInteractionType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_CLASS_PLAYSTYLE_TYPE_MELEE\" value=\"0\" enum=\"EntityClassPlaystyleType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_CLASS_PLAYSTYLE_TYPE_SPELL\" value=\"1\" enum=\"EntityClassPlaystyleType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_CLASS_PLAYSTYLE_TYPE_HYBRID\" value=\"2\" enum=\"EntityClassPlaystyleType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_CLASS_PLAYSTYLE_TYPE_NONE\" value=\"3\" enum=\"EntityClassPlaystyleType\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_WINDOW_LOOT\" value=\"0\" enum=\"EntityWindows\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_WINDOW_CONTAINER\" value=\"1\" enum=\"EntityWindows\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_WINDOW_VENDOR\" value=\"2\" enum=\"EntityWindows\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_WINDOW_TRAINER\" value=\"3\" enum=\"EntityWindows\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_RESOURCE_INDEX_HEALTH\" value=\"0\" enum=\"EntityResourceIndices\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_RESOURCE_INDEX_SPEED\" value=\"1\" enum=\"EntityResourceIndices\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN\" value=\"2\" enum=\"EntityResourceIndices\">\n\t\t</constant>\n\t\t<constant name=\"BASE_XP\" value=\"50\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_INTERACT_RANGE\" value=\"4\">\n\t\t</constant>\n\t\t<constant name=\"ENTITY_INTERACT_RANGE_SQUARED\" value=\"16\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityResource.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityResource\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tAn instance of an entity resource. Resource in this context is things like mana.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_from_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_gets_update_string\" qualifiers=\"virtual\">\n\t\t\t<return type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_mods_changed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_non_stacking_mod_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_non_stacking_mod_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cstat_changed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"statid\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"curent\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sstat_changed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"statid\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"curent\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_onc_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_onc_target_changed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"old_target\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_ons_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_ons_target_changed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entity\" type=\"Entity\" />\n\t\t\t<argument index=\"1\" name=\"old_target\" type=\"Entity\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_process_client\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_process_server\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_receivec_update_string\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"str\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_stacking_mod_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_stacking_mod_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_to_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_non_stacking_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_stacking_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_current_negative_non_stacking_mod_value\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_current_positive_non_stacking_mod_value\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_current_stacking_mod_value\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"mods_changed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"process_client\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"process_server\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"refresh_current_non_stacking_mod_values\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"refresh_current_stacking_mod_value\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_non_stacking_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_stacking_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"current_value\" type=\"int\" setter=\"set_current_value\" getter=\"get_current_value\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"dirty\" type=\"bool\" setter=\"set_dirty\" getter=\"get_dirty\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"max_value\" type=\"int\" setter=\"set_max_value\" getter=\"get_max_value\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"non_stacking_mods\" type=\"PoolRealArray\" setter=\"set_non_stacking_mods\" getter=\"get_non_stacking_mods\" default=\"PoolRealArray(  )\">\n\t\t</member>\n\t\t<member name=\"owner\" type=\"Entity\" setter=\"set_owner\" getter=\"get_owner\">\n\t\t</member>\n\t\t<member name=\"should_process\" type=\"bool\" setter=\"set_should_process\" getter=\"get_should_process\">\n\t\t</member>\n\t\t<member name=\"stacking_mods\" type=\"PoolRealArray\" setter=\"set_stacking_mods\" getter=\"get_stacking_mods\" default=\"PoolRealArray(  )\">\n\t\t</member>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_text_name\" getter=\"get_text_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityResourceCostData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityResourceCostData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains a resource cost. Resource in this context is things like mana.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"cost\" type=\"int\" setter=\"set_cost\" getter=\"get_cost\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityResourceCostDataHealth.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityResourceCostDataHealth\" inherits=\"EntityResourceCostData\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityResourceCostDataResource.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityResourceCostDataResource\" inherits=\"EntityResourceCostData\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"entity_resource_data\" type=\"EntityResource\" setter=\"set_entity_resource_data\" getter=\"get_entity_resource_data\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityResourceHealth.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityResourceHealth\" inherits=\"EntityResource\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"refresh\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntityResourceSpeed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntityResourceSpeed\" inherits=\"EntityResource\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"refresh\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntitySkill.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntitySkill\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains runtime skill data for an [Entity].\n\t</brief_description>\n\t<description>\n\t\tSkills can be things like axes. You can change values for these using scripts.\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_from_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_to_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"current\" type=\"int\" setter=\"set_current\" getter=\"get_current\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"disabled\" type=\"bool\" setter=\"set_disabled\" getter=\"get_disabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"max\" type=\"int\" setter=\"set_max\" getter=\"get_max\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"skill\" type=\"EntitySkillData\" setter=\"set_skill\" getter=\"get_skill\">\n\t\t</member>\n\t\t<member name=\"skill_id\" type=\"int\" setter=\"set_skill_id\" getter=\"get_skill_id\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"current_changed\">\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"max_changed\">\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"skill_changed\">\n\t\t\t<argument index=\"0\" name=\"skill\" type=\"EntitySkill\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntitySkillData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntitySkillData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains skill data for an [Entity].\n\t</brief_description>\n\t<description>\n\t\tSkills can be things like axes.\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"default_value\" type=\"int\" setter=\"set_default_value\" getter=\"get_default_value\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"max_value\" type=\"int\" setter=\"set_max_value\" getter=\"get_max_value\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"text_description\" type=\"String\" setter=\"set_text_description\" getter=\"get_text_description\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EntitySpeciesData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EntitySpeciesData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains visual data for a species.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_generate_name\" qualifiers=\"virtual\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"seed\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_aura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_model_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"model_data\" type=\"SpeciesModelData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_spell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"generate_name\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_aura\" qualifiers=\"const\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_aura_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_model_data\" qualifiers=\"const\">\n\t\t\t<return type=\"SpeciesModelData\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_model_data_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_spell\" qualifiers=\"const\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_spell_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_aura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_model_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_spell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_aura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_model_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"SpeciesModelData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_spell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"auras\" type=\"Array\" setter=\"set_auras\" getter=\"get_auras\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"model_datas\" type=\"Array\" setter=\"set_model_datas\" getter=\"get_model_datas\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"spells\" type=\"Array\" setter=\"set_spells\" getter=\"get_spells\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"text_description\" type=\"String\" setter=\"set_text_description\" getter=\"get_text_description\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"type\" type=\"int\" setter=\"set_type\" getter=\"get_type\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/EquipmentData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"EquipmentData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tStores equipment information.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"get_slot\">\n\t\t\t<return type=\"ItemTemplate\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_slot\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"entry\" type=\"ItemTemplate\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/InputProfile.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"InputProfile\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tWill store keybind information. [ProfileManager] related.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"get_owner\">\n\t\t\t<return type=\"ClassProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_defaults\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_to_projectsettings\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"save_from_projectsettings\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"data\" type=\"Array\" setter=\"set_data\" getter=\"get_data\" default=\"[  ]\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"changed\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/InputProfileModifier.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"InputProfileModifier\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tStores data for bindable modifiers. Not yet implemented.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"add_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"entry\" type=\"InputProfileModifierEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_modifier\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"modifier\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"clear_entries\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"clear_modifiers\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entry\">\n\t\t\t<return type=\"InputProfileModifierEntry\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_entry_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_modifier\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_modifier_count\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_modifier\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"InputProfileModifierEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_modifier\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/InputProfileModifierEntry.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"InputProfileModifierEntry\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tOne key entry for a key.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"action\" type=\"String\" setter=\"set_action\" getter=\"get_action\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"translate_to\" type=\"String\" setter=\"set_translate_to\" getter=\"get_translate_to\" default=\"&quot;&quot;\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ItemContainerData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ItemContainerData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"get_container_data\">\n\t\t\t<return type=\"ItemContainerDataEntry\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_container_datas\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_container_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"container_data\" type=\"ItemContainerDataEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_container_datas\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"container_datas\" type=\"Array\" setter=\"set_container_datas\" getter=\"get_container_datas\" default=\"[  ]\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ItemContainerDataEntry.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ItemContainerDataEntry\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"item\" type=\"ItemTemplate\" setter=\"set_item\" getter=\"get_item\">\n\t\t</member>\n\t\t<member name=\"item_count\" type=\"int\" setter=\"set_item_count\" getter=\"get_item_count\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ItemEnums.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ItemEnums\" inherits=\"Object\" version=\"3.5\">\n\t<brief_description>\n\t\tContains lots of general-use enums for items.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<constants>\n\t\t<constant name=\"ITEM_RARITY_NONE\" value=\"0\" enum=\"ItemRarity\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_COMMON\" value=\"1\" enum=\"ItemRarity\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_UNCOMMON\" value=\"2\" enum=\"ItemRarity\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_SUPERIOR\" value=\"3\" enum=\"ItemRarity\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_HEROIC\" value=\"4\" enum=\"ItemRarity\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_MYTHIC\" value=\"5\" enum=\"ItemRarity\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_ARTIFACT\" value=\"6\" enum=\"ItemRarity\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_FLAG_NONE\" value=\"0\" enum=\"ItemRarityFlag\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_FLAG_COMMON\" value=\"1\" enum=\"ItemRarityFlag\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_FLAG_UNCOMMON\" value=\"2\" enum=\"ItemRarityFlag\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_FLAG_SUPERIOR\" value=\"4\" enum=\"ItemRarityFlag\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_FLAG_HEROIC\" value=\"8\" enum=\"ItemRarityFlag\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_FLAG_MYTHIC\" value=\"16\" enum=\"ItemRarityFlag\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_RARITY_FLAG_ARTIFACT\" value=\"32\" enum=\"ItemRarityFlag\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_NONE\" value=\"0\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_EQUIPMENT\" value=\"1\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_POTION\" value=\"2\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_HERB\" value=\"4\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_ORE\" value=\"8\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_GEMSTONE\" value=\"16\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_FOOD\" value=\"32\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_ALCHEMY\" value=\"64\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_ENGINEERING\" value=\"128\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_ENCHANTING\" value=\"256\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_TAILORING\" value=\"512\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_RECIPE\" value=\"1024\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_CURRENCY\" value=\"2048\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_TYPE_BAG\" value=\"4096\" enum=\"ItemType\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_TYPE_NONE\" value=\"0\" enum=\"ItemSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_TYPE_SWORD\" value=\"1\" enum=\"ItemSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_TYPE_AXE\" value=\"2\" enum=\"ItemSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_TYPE_MACE\" value=\"3\" enum=\"ItemSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_TYPE_DAGGER\" value=\"4\" enum=\"ItemSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_TYPE_BOW\" value=\"5\" enum=\"ItemSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_TYPE_CROSSBOW\" value=\"6\" enum=\"ItemSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_TYPE_GUN\" value=\"7\" enum=\"ItemSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_TYPE_WAND\" value=\"8\" enum=\"ItemSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_TYPE_QUEST_ITEM\" value=\"9\" enum=\"ItemSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_SUB_TYPE_NONE\" value=\"0\" enum=\"ItemSubSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_SUB_TYPE_TWO_HAND\" value=\"1\" enum=\"ItemSubSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_SUB_TYPE_ONE_HAND\" value=\"2\" enum=\"ItemSubSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_SUB_TYPE_LEFT_HAND\" value=\"3\" enum=\"ItemSubSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ITEM_SUB_SUB_TYPE_RIGHT_HAND\" value=\"4\" enum=\"ItemSubSubtype\">\n\t\t</constant>\n\t\t<constant name=\"ARMOR_TYPE_NONE\" value=\"0\" enum=\"ArmorType\">\n\t\t</constant>\n\t\t<constant name=\"ARMOR_TYPE_CLOTH\" value=\"1\" enum=\"ArmorType\">\n\t\t</constant>\n\t\t<constant name=\"ARMOR_TYPE_LEATHER\" value=\"2\" enum=\"ArmorType\">\n\t\t</constant>\n\t\t<constant name=\"ARMOR_TYPE_MAIL\" value=\"3\" enum=\"ArmorType\">\n\t\t</constant>\n\t\t<constant name=\"ARMOR_TYPE_PLATE\" value=\"4\" enum=\"ArmorType\">\n\t\t</constant>\n\t\t<constant name=\"ARMOR_TYPE_MAX\" value=\"5\" enum=\"ArmorType\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ItemInstance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ItemInstance\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tRuntime information for an item.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_from_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_get_description\" qualifiers=\"virtual\">\n\t\t\t<return type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_to_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_item_stat_modifier\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"stat_id\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"base_mod\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"bonus_mod\" type=\"int\" />\n\t\t\t<argument index=\"3\" name=\"percent_mod\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"clear_item_stat_modifiers\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_description\">\n\t\t\t<return type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_item_stat_modifier\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_base_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_bonus_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_percent_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_stat_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_base_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_bonus_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_percent_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_stat_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"charges\" type=\"int\" setter=\"set_charges\" getter=\"get_charges\" default=\"-1\">\n\t\t</member>\n\t\t<member name=\"item_template\" type=\"ItemTemplate\" setter=\"set_item_template\" getter=\"get_item_template\">\n\t\t</member>\n\t\t<member name=\"stack_size\" type=\"int\" setter=\"set_stack_size\" getter=\"get_stack_size\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"stat_modifiers\" type=\"Array\" setter=\"stat_modifiers_set\" getter=\"stat_modifiers_get\" default=\"[  ]\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"stack_charges_changed\">\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"stack_size_changed\">\n\t\t\t<argument index=\"0\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ItemTemplate.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ItemTemplate\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains item information.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_create_item_instance\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_get_description\" qualifiers=\"virtual\">\n\t\t\t<return type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"create_item_instance\">\n\t\t\t<return type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_animator_weapon_type\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_aura\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_description\">\n\t\t\t<return type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_grants_spell\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_auras\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_grants_spells\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_required_skills\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_num_teaches_spells\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_required_skill\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_teaches_spell\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_aura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_grants_spell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_auras\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_grants_spells\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_num_teaches_spells\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_required_skill\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_teaches_spell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_max_base_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_max_bonus_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_max_percent_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_min_base_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_min_bonus_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_min_percent_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_scaling_factor\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_get_stat_id\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_max_base_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_max_bonus_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_max_percent_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_min_base_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_min_bonus_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_min_percent_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_scaling_factor\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"stat_modifier_set_stat_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"armor_type\" type=\"int\" setter=\"set_armor_type\" getter=\"get_armor_type\" enum=\"ItemEnums.ArmorType\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"auras\" type=\"Array\" setter=\"set_auras\" getter=\"get_auras\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"bag_size\" type=\"int\" setter=\"set_bag_size\" getter=\"get_bag_size\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"charges\" type=\"int\" setter=\"set_charges\" getter=\"get_charges\" default=\"-1\">\n\t\t</member>\n\t\t<member name=\"consumed\" type=\"bool\" setter=\"set_consumed\" getter=\"get_consumed\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"equip_slot\" type=\"int\" setter=\"set_equip_slot\" getter=\"get_equip_slot\" default=\"14\">\n\t\t</member>\n\t\t<member name=\"grants_spells\" type=\"Array\" setter=\"set_grants_spells\" getter=\"get_grants_spells\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"icon\" type=\"Texture\" setter=\"set_icon\" getter=\"get_icon\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"item_sub_sub_type\" type=\"int\" setter=\"set_item_sub_sub_type\" getter=\"get_item_sub_sub_type\" enum=\"ItemEnums.ItemSubSubtype\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"item_sub_type\" type=\"int\" setter=\"set_item_sub_type\" getter=\"get_item_sub_type\" enum=\"ItemEnums.ItemSubtype\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"item_type\" type=\"int\" setter=\"set_item_type\" getter=\"get_item_type\" enum=\"ItemEnums.ItemType\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"model_visual\" type=\"ModelVisual\" setter=\"set_model_visual\" getter=\"get_model_visual\">\n\t\t</member>\n\t\t<member name=\"price\" type=\"int\" setter=\"set_price\" getter=\"get_price\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"rarity\" type=\"int\" setter=\"set_rarity\" getter=\"get_rarity\" enum=\"ItemEnums.ItemRarity\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"required_skills\" type=\"Array\" setter=\"set_required_skills\" getter=\"get_required_skills\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"scale_x\" type=\"float\" setter=\"set_scale_x\" getter=\"get_scale_x\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"scale_y\" type=\"float\" setter=\"set_scale_y\" getter=\"get_scale_y\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"scale_z\" type=\"float\" setter=\"set_scale_z\" getter=\"get_scale_z\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"stack_size\" type=\"int\" setter=\"set_stack_size\" getter=\"get_stack_size\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"stat_modifier_count\" type=\"int\" setter=\"stat_modifier_set_count\" getter=\"stat_modifier_get_count\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"teaches_spells\" type=\"Array\" setter=\"set_teaches_spells\" getter=\"get_teaches_spells\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"text_translation_key\" type=\"String\" setter=\"set_text_translation_key\" getter=\"get_text_translation_key\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"use_spell\" type=\"Spell\" setter=\"set_use_spell\" getter=\"get_use_spell\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t\t<constant name=\"MAX_ITEM_STAT_MOD\" value=\"6\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/LevelStatData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"LevelStatData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tBase class for storing level stat information for entities.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_get_stat_diff\" qualifiers=\"virtual\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"main_stat\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"old_level\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"new_level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_stat_diff\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"stat\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"old_level\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"new_level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/LootDataBase.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"LootDataBase\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tBase class for storing loot information for entities.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_get_loot\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_item\" qualifiers=\"const\">\n\t\t\t<return type=\"ItemTemplate\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_item_chance\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_loot\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_loot_db\" qualifiers=\"const\">\n\t\t\t<return type=\"LootDataBase\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_loot_db_chance\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_item\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"ItemTemplate\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_item_chance\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_loot_db\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"LootDataBase\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_loot_db_chance\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"items_size\" type=\"int\" setter=\"set_items_size\" getter=\"get_items_size\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"loot_db_size\" type=\"int\" setter=\"set_loot_db_size\" getter=\"get_loot_db_size\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ModelVisual.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ModelVisual\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains an item's visual information.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"add_visual_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"visual_entry\" type=\"ModelVisualEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_visual_entry\" qualifiers=\"const\">\n\t\t\t<return type=\"ModelVisualEntry\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_visual_entry_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_visual_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_visual_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"ModelVisualEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"get_visual_entries\" type=\"Array\" setter=\"set_visual_entries\" getter=\"get_visual_entries\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"layer\" type=\"int\" setter=\"set_layer\" getter=\"get_layer\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ModelVisualEntry.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ModelVisualEntry\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tOne Entry for [ModelVisual].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"get_attachment\">\n\t\t\t<return type=\"PackedScene\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_color\" qualifiers=\"const\">\n\t\t\t<return type=\"Color\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_mesh\">\n\t\t\t<return type=\"MeshDataResource\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_texture\">\n\t\t\t<return type=\"Texture\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_transform\" qualifiers=\"const\">\n\t\t\t<return type=\"Transform\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_attachment\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"PackedScene\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_color\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"Color\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_mesh\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"MeshDataResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_texture\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"Texture\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_transform\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"Transform\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"bone\" type=\"int\" setter=\"set_bone\" getter=\"get_bone\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"entity_type\" type=\"int\" setter=\"set_entity_type\" getter=\"get_entity_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"group\" type=\"int\" setter=\"set_group\" getter=\"get_group\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"override_layer\" type=\"int\" setter=\"set_override_layer\" getter=\"get_override_layer\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"size\" type=\"int\" setter=\"set_size\" getter=\"get_size\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"type\" type=\"int\" setter=\"set_type\" getter=\"get_type\" enum=\"ModelVisualEntry.ModenVisualEntryType\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t\t<constant name=\"MODEL_VISUAL_ENTRY_TYPE_BONE\" value=\"0\" enum=\"ModenVisualEntryType\">\n\t\t</constant>\n\t\t<constant name=\"MODEL_VISUAL_ENTRY_TYPE_ATTACHMENT\" value=\"1\" enum=\"ModenVisualEntryType\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/PlayerProfile.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"PlayerProfile\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tStores the data for a player. Also see [ProfileManager].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"add_class_profile\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"profile\" type=\"ClassProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"clear_class_profiles\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"emit_change\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_class_profile\">\n\t\t\t<return type=\"ClassProfile\" />\n\t\t\t<argument index=\"0\" name=\"class_id\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_class_profile_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_class_profile_index\">\n\t\t\t<return type=\"ClassProfile\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_defaults\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_class_profile\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\" qualifiers=\"const\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"custom_data\" type=\"Dictionary\" setter=\"set_custom_data\" getter=\"get_custom_data\" default=\"{}\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"profile_name\" type=\"String\" setter=\"set_profile_name\" getter=\"get_profile_name\" default=\"&quot;default.profile&quot;\">\n\t\t</member>\n\t\t<member name=\"set_last_used_character\" type=\"int\" setter=\"set_last_used_character\" getter=\"get_last_used_character\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"changed\">\n\t\t\t<argument index=\"0\" name=\"profile\" type=\"PlayerProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/ProfileManager.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"ProfileManager\" inherits=\"Object\" version=\"3.5\">\n\t<brief_description>\n\t\tStores, saves, loads per class profile data.\n\t\tShould be added as an autoload, or at least is should be in the scene before spawning entities.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_load\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_save\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"adds_player_profile\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"profile\" type=\"PlayerProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"clears_player_profiles\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"getc_player_profile\">\n\t\t\t<return type=\"PlayerProfile\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"gets_player_profile_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"gets_player_profile_index\">\n\t\t\t<return type=\"PlayerProfile\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_defaults\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"load_profile\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"on_keybinds_changed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"class_path\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"removes_player_profile\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"save\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"save_profile\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"name\" type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\" qualifiers=\"const\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"automatic_load\" type=\"bool\" setter=\"set_automatic_load\" getter=\"get_automatic_load\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"automatic_save\" type=\"bool\" setter=\"set_automatic_save\" getter=\"get_automatic_save\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"set_save_file\" type=\"String\" setter=\"set_save_file\" getter=\"get_save_file\" default=\"&quot;user://profile.save&quot;\">\n\t\t</member>\n\t</members>\n\t<signals>\n\t\t<signal name=\"changed\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t\t<signal name=\"keybinds_changed\">\n\t\t\t<description>\n\t\t\t</description>\n\t\t</signal>\n\t</signals>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/PropDataEntity.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"PropDataEntity\" inherits=\"PropDataEntry\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"entity_data\" type=\"EntityData\" setter=\"set_entity_data\" getter=\"get_entity_data\">\n\t\t</member>\n\t\t<member name=\"level\" type=\"int\" setter=\"set_level\" getter=\"get_level\" default=\"1\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SimpleLevelStatData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SimpleLevelStatData\" inherits=\"LevelStatData\" version=\"3.5\">\n\t<brief_description>\n\t\tSimple per-level [Stat] information for entities.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"get_stat_per_level\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"arg0\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_stat_per_level\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"arg1\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SkeletonModelEntry.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SkeletonModelEntry\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tRuntime model item entry helper for skeletons. Used by [CharacterSkeleton3D] for example.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"color\" type=\"Color\" setter=\"set_color\" getter=\"get_color\" default=\"Color( 1, 1, 1, 1 )\">\n\t\t</member>\n\t\t<member name=\"count\" type=\"int\" setter=\"set_count\" getter=\"get_count\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"entry\" type=\"ModelVisualEntry\" setter=\"set_entry\" getter=\"get_entry\">\n\t\t</member>\n\t\t<member name=\"priority\" type=\"int\" setter=\"set_priority\" getter=\"get_priority\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SpeciesInstance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SpeciesInstance\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_from_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_to_dict\" qualifiers=\"virtual\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"hair_color_index\" type=\"int\" setter=\"set_hair_color_index\" getter=\"get_hair_color_index\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"hair_style_index\" type=\"int\" setter=\"set_hair_style_index\" getter=\"get_hair_style_index\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"head_index\" type=\"int\" setter=\"set_head_index\" getter=\"get_head_index\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"skin_color_index\" type=\"int\" setter=\"set_skin_color_index\" getter=\"get_skin_color_index\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"species\" type=\"EntitySpeciesData\" setter=\"set_species\" getter=\"get_species\">\n\t\t</member>\n\t\t<member name=\"species_id\" type=\"int\" setter=\"set_species_id\" getter=\"get_species_id\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SpeciesModelData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SpeciesModelData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tStores model information for [EntitySpeciesData].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"add_color_customizable_slot_color\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"color_customizable_slot\" type=\"Color\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_customizable_slot_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"customizable_slot\" type=\"ModelVisualEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"add_visual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"visual\" type=\"ModelVisualEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_color_customizable_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_color_customizable_slot_bone_slot_mask\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_color_customizable_slot_color\" qualifiers=\"const\">\n\t\t\t<return type=\"Color\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_color_customizable_slot_colors\" qualifiers=\"const\">\n\t\t\t<return type=\"PoolColorArray\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_color_customizable_slot_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_color_customizable_slot_texture_layer\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_customizable_slot_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_customizable_slot_entries\" qualifiers=\"const\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_customizable_slot_entry\" qualifiers=\"const\">\n\t\t\t<return type=\"ModelVisualEntry\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_customizable_slot_entry_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_visual\" qualifiers=\"const\">\n\t\t\t<return type=\"ModelVisualEntry\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_visual_count\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_visuals\">\n\t\t\t<return type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_color_customizable_slot_color\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_customizable_slot_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"remove_visual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_color_customizable_slot_bone_slot_mask\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_color_customizable_slot_color\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"data\" type=\"Color\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_color_customizable_slot_colors\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"colors\" type=\"PoolColorArray\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_color_customizable_slot_texture_layer\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_customizable_slot_entries\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"customizable_slots\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_customizable_slot_entry\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"slot_index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"data\" type=\"ModelVisualEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_visual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"ModelVisualEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_visuals\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"visuals\" type=\"Array\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"body\" type=\"PackedScene\" setter=\"set_body\" getter=\"get_body\">\n\t\t</member>\n\t\t<member name=\"bone_structure\" type=\"int\" setter=\"set_bone_structure\" getter=\"get_bone_structure\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"customizable_color_slots_string\" type=\"String\" setter=\"set_customizable_color_slots_string\" getter=\"get_customizable_color_slots_string\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"customizable_slots_string\" type=\"String\" setter=\"set_customizable_slots_string\" getter=\"get_customizable_slots_string\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/Spell.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"Spell\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tBase [Spell] class. Contains data, and callbacks for spell scripts. Inherit from this to create spells with different functionality.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"_aura_calculate_initial_damage\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"AuraApplyInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_calculate_initial_heal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura_data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"AuraApplyInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_get_description\" qualifiers=\"virtual\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"class_level\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"character_level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_removes_dispell\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_removes_expired\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_sadd\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_sapply\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"AuraApplyInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_sapply_passives_damage_deal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_sapply_passives_damage_receive\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_sapply_passives_heal_deal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_sapply_passives_heal_receive\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_sdeapply\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_sremove\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_aura_supdate\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_calculate_initial_damage\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_calculate_initial_heal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_cast_finishs\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_cast_interrupts\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_cast_starts\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_cast_starts_triggered\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_aura_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_aura_refresh\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_aura_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_cast_failed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_cast_finished\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_cast_started\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_cast_state_changed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_damage_dealt\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_dealt_damage\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_dealt_heal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_heal_dealt\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_con_spell_cast_success\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_con_fail\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_con_success\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_should_deny\" qualifiers=\"virtual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_son_fail\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_equip_son_success\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_get_description\" qualifiers=\"virtual\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"class_level\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"character_level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_handle_aura_damage\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_handle_aura_heal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura_data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"spell_heal_info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_handle_effect\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_handle_projectile\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_handle_spell_damage\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_handle_spell_heal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_aura_ccast\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_aura_scast\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_caura\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_ccast\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_ccategory_cooldown_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_ccategory_cooldown_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_ccooldown_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_ccooldown_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cdamage\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cdeath\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_centity_resource_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_centity_resource_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cgcd_finished\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cgcd_started\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"gcd\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cheal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_clevel_up\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_cxp_gained\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_saura\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scast\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scategory_cooldown_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scategory_cooldown_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scooldown_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_scooldown_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"id\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sdamage\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sdeath\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sentity_resource_added\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sentity_resource_removed\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sgcd_finished\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sgcd_started\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"gcd\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sheal\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_slevel_up\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_notification_sxp_gained\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_setup_aura_data\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"AuraApplyInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_cast_damage_received\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_cast_player_moved\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_physics_process\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<argument index=\"1\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_physics_process_aura\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_remove\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_remove_dispell\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_remove_expired\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"_son_spell_hit\" qualifiers=\"virtual\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_calculate_initial_damage\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura_data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"AuraApplyInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_calculate_initial_heal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura_data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"AuraApplyInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_damage_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"min\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"max\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"can_crit\" type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_get_description\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"class_level\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"character_level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_get_name_translated\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_heal_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"min\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"max\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"can_crit\" type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_is_talent\" qualifiers=\"const\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removes_dispell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_removes_expired\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_sadd\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_sapply\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"AuraApplyInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_sapply_passives_damage_deal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_sapply_passives_damage_receive\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_sapply_passives_heal_deal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_sapply_passives_heal_receive\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_sdeapply\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_sremove\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_stat_attribute_get_base_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_stat_attribute_get_bonus_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_stat_attribute_get_percent_mod\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_stat_attribute_get_stat\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_stat_attribute_set_base_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_stat_attribute_set_bonus_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_stat_attribute_set_percent_mod\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_stat_attribute_set_stat\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_supdate\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_trigger_get_notification_data\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_trigger_get_notification_type\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" enum=\"SpellEnums.TriggerNotificationType\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_trigger_get_spell\" qualifiers=\"const\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_trigger_get_trigger_type\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" enum=\"SpellEnums.TriggerType\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_trigger_get_trigger_type_data\" qualifiers=\"const\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_trigger_set_notification_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_trigger_set_notification_type\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" enum=\"SpellEnums.TriggerNotificationType\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_trigger_set_spell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_trigger_set_trigger_type\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" enum=\"SpellEnums.TriggerType\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"aura_trigger_set_trigger_type_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"calculate_initial_damage\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"calculate_initial_heal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_finishs\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_interrupts\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_starts\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"cast_starts_triggered\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_con_fail\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_con_success\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_should_deny\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_son_fail\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"equip_son_success\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"equip_slot\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"3\" name=\"old_item\" type=\"ItemInstance\" />\n\t\t\t<argument index=\"4\" name=\"bag_slot\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_description\">\n\t\t\t<return type=\"String\" />\n\t\t\t<argument index=\"0\" name=\"class_level\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"character_level\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_name_translated\" qualifiers=\"const\">\n\t\t\t<return type=\"String\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"handle_aura_damage\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura_data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"handle_aura_heal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura_data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"handle_cooldown\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"handle_effect\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"handle_gcd\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"handle_projectile\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"handle_spell_damage\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"handle_spell_heal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"is_aura\" qualifiers=\"const\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_aura_ccast\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_aura_scast\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_caura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccast\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccategory_cooldown_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"arg2\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccategory_cooldown_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"arg2\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccooldown_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"arg2\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_ccooldown_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"arg2\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cdamage\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cdeath\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_centity_resource_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_centity_resource_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cgcd_finished\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cgcd_started\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cheal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_clevel_up\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_cxp_gained\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_saura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scast\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scategory_cooldown_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"category_cooldown\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"arg2\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scategory_cooldown_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"category_cooldown\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"arg2\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scooldown_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"cooldown\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"arg2\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_scooldown_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"cooldown\" type=\"int\" />\n\t\t\t<argument index=\"2\" name=\"arg2\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sdamage\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"info\" type=\"SpellDamageInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sdeath\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sentity_resource_added\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sentity_resource_removed\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"EntityResource\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sgcd_finished\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sgcd_started\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"gcd\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sheal\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"what\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<argument index=\"2\" name=\"info\" type=\"SpellHealInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_slevel_up\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"notification_sxp_gained\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"on_learn_cast_spells_num_get\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"on_learn_cast_spells_num_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"setup_aura_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<argument index=\"1\" name=\"info\" type=\"AuraApplyInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"son_cast_damage_received\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"son_cast_player_moved\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"son_physics_process\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<argument index=\"1\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"son_physics_process_aura\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"data\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"son_remove\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"son_remove_dispell\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"son_remove_expired\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"aura\" type=\"AuraData\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"son_spell_hit\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"info\" type=\"SpellCastInfo\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_cast_on_caster_get\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_cast_on_caster_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_cast_on_learn_get\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_cast_on_learn_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_cast_on_target_get\">\n\t\t\t<return type=\"Spell\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spell_cast_on_target_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"spell\" type=\"Spell\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spells_cast_on_caster_num_get\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spells_cast_on_caster_num_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spells_cast_on_target_num_get\" qualifiers=\"const\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"spells_cast_on_target_num_set\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"aoe\" type=\"bool\" setter=\"set_is_aoe\" getter=\"get_is_aoe\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aoe_box_extents\" type=\"Vector3\" setter=\"set_aoe_box_extents\" getter=\"get_aoe_box_extents\" default=\"Vector3( 0, 0, 0 )\">\n\t\t</member>\n\t\t<member name=\"aoe_colliderType\" type=\"int\" setter=\"set_aoe_collider_type\" getter=\"get_aoe_collider_type\" enum=\"SpellEnums.ColliderType\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aoe_radius\" type=\"float\" setter=\"set_aoe_radius\" getter=\"get_aoe_radius\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"aoe_targetType\" type=\"int\" setter=\"set_aoe_target_type\" getter=\"get_aoe_target_type\" enum=\"SpellAOETargetType\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_ability_scale_data_id\" type=\"int\" setter=\"aura_set_ability_scale_data_id\" getter=\"aura_get_ability_scale_data_id\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"aura_absorb_damage_type\" type=\"int\" setter=\"aura_absorb_damage_set_type\" getter=\"aura_absorb_damage_get_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_absorb_enabled\" type=\"bool\" setter=\"aura_absorb_set_enabled\" getter=\"aura_absorb_get_enabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_absorb_max\" type=\"int\" setter=\"aura_absorb_set_max\" getter=\"aura_absorb_get_max\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_absorb_min\" type=\"int\" setter=\"aura_absorb_set_min\" getter=\"aura_absorb_get_min\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_absorb_scaling_curve\" type=\"Curve\" setter=\"aura_absorb_set_scaling_curve\" getter=\"aura_absorb_get_scaling_curve\">\n\t\t</member>\n\t\t<member name=\"aura_damage_can_crit\" type=\"bool\" setter=\"aura_damage_set_can_crit\" getter=\"aura_damage_get_can_crit\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_damage_enabled\" type=\"bool\" setter=\"aura_damage_set_enabled\" getter=\"aura_damage_get_enabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_damage_max\" type=\"int\" setter=\"aura_damage_set_max\" getter=\"aura_damage_get_max\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_damage_min\" type=\"int\" setter=\"aura_damage_set_min\" getter=\"aura_damage_get_min\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_damage_scaling_curve\" type=\"Curve\" setter=\"aura_damage_set_scaling_curve\" getter=\"aura_damage_get_scaling_curve\">\n\t\t</member>\n\t\t<member name=\"aura_damage_type\" type=\"int\" setter=\"aura_damage_set_type\" getter=\"aura_damage_get_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_debuff\" type=\"bool\" setter=\"aura_set_is_debuff\" getter=\"aura_get_is_debuff\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_diminishing_return_category\" type=\"int\" setter=\"aura_diminishing_return_category_set\" getter=\"aura_diminishing_return_category_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_diminishing_return_enabled\" type=\"bool\" setter=\"aura_diminishing_return_enabled_set\" getter=\"aura_diminishing_return_enabled_get\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_dispell_aura_types\" type=\"int\" setter=\"aura_dispell_set_aura_types\" getter=\"aura_dispell_get_aura_types\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_dispell_count_max\" type=\"int\" setter=\"aura_dispell_set_count_max\" getter=\"aura_dispell_get_count_max\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_dispell_count_min\" type=\"int\" setter=\"aura_dispell_set_count_min\" getter=\"aura_dispell_get_count_min\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_dispell_enabled\" type=\"bool\" setter=\"aura_dispell_set_enabled\" getter=\"aura_dispell_get_enabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_group\" type=\"AuraGroup\" setter=\"aura_set_aura_group\" getter=\"aura_get_aura_group\">\n\t\t</member>\n\t\t<member name=\"aura_heal_can_crit\" type=\"bool\" setter=\"aura_heal_set_can_crit\" getter=\"aura_heal_get_can_crit\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_heal_enabled\" type=\"bool\" setter=\"aura_heal_set_enabled\" getter=\"aura_heal_get_enabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_heal_max\" type=\"int\" setter=\"aura_heal_set_max\" getter=\"aura_heal_get_max\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_heal_min\" type=\"int\" setter=\"aura_heal_set_min\" getter=\"aura_heal_get_min\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_heal_scaling_curve\" type=\"Curve\" setter=\"aura_heal_set_scaling_curve\" getter=\"aura_heal_get_scaling_curve\">\n\t\t</member>\n\t\t<member name=\"aura_hide\" type=\"bool\" setter=\"aura_set_hide\" getter=\"aura_get_hide\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_permanent\" type=\"bool\" setter=\"aura_set_permanent\" getter=\"aura_get_permanent\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_resource_cost\" type=\"EntityResourceCostData\" setter=\"aura_set_resource_cost\" getter=\"aura_get_resource_cost\">\n\t\t</member>\n\t\t<member name=\"aura_resource_give\" type=\"EntityResourceCostData\" setter=\"aura_set_resource_give\" getter=\"aura_get_resource_give\">\n\t\t</member>\n\t\t<member name=\"aura_scale_with_level\" type=\"bool\" setter=\"aura_set_scale_with_level\" getter=\"aura_get_scale_with_level\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"aura_stat_attribute_count\" type=\"int\" setter=\"aura_stat_attribute_set_count\" getter=\"aura_stat_attribute_get_count\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_states_add\" type=\"int\" setter=\"aura_set_add_states\" getter=\"aura_get_add_states\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_states_remove_effects\" type=\"int\" setter=\"aura_set_remove_effects_with_states\" getter=\"aura_get_remove_effects_with_states\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_states_supress\" type=\"int\" setter=\"aura_set_supress_states\" getter=\"aura_get_supress_states\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_talent_required_spell\" type=\"Spell\" setter=\"aura_set_talent_required_spell\" getter=\"aura_get_talent_required_spell\">\n\t\t</member>\n\t\t<member name=\"aura_talent_required_talent\" type=\"Spell\" setter=\"aura_set_talent_required_talent\" getter=\"aura_get_talent_required_talent\">\n\t\t</member>\n\t\t<member name=\"aura_teaches_spell\" type=\"Spell\" setter=\"aura_set_teaches_spell\" getter=\"aura_get_teaches_spell\">\n\t\t</member>\n\t\t<member name=\"aura_text_description\" type=\"String\" setter=\"aura_set_text_description\" getter=\"aura_get_text_description\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"aura_text_translation_key\" type=\"String\" setter=\"aura_set_text_translation_key\" getter=\"aura_get_text_translation_key\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"aura_tick\" type=\"float\" setter=\"aura_set_tick\" getter=\"aura_get_tick\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"aura_time\" type=\"float\" setter=\"aura_set_time\" getter=\"aura_get_time\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"aura_trigger_count\" type=\"int\" setter=\"aura_trigger_set_count\" getter=\"aura_trigger_get_count\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_type\" type=\"int\" setter=\"aura_set_aura_type\" getter=\"aura_get_aura_type\" enum=\"SpellEnums.AuraType\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_visual_spell_effects\" type=\"SpellEffectVisual\" setter=\"aura_set_visual_spell_effects\" getter=\"aura_get_visual_spell_effects\">\n\t\t</member>\n\t\t<member name=\"cast_can_move_while_casting\" type=\"bool\" setter=\"set_can_move_while_casting\" getter=\"get_can_move_while_casting\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"cast_cast_time\" type=\"float\" setter=\"cast_time_set\" getter=\"cast_time_get\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"cast_enabled\" type=\"bool\" setter=\"cast_time_set_enabled\" getter=\"cast_time_get_enabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"cooldown_cooldown\" type=\"float\" setter=\"set_cooldown\" getter=\"get_cooldown\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"cooldown_global_cooldown_enabled\" type=\"bool\" setter=\"set_global_cooldown_enabled\" getter=\"get_global_cooldown_enabled\" default=\"true\">\n\t\t</member>\n\t\t<member name=\"cost_item\" type=\"ItemTemplate\" setter=\"set_item_cost\" getter=\"get_item_cost\">\n\t\t</member>\n\t\t<member name=\"cost_required_item\" type=\"ItemTemplate\" setter=\"set_required_item\" getter=\"get_required_item\">\n\t\t</member>\n\t\t<member name=\"damage_enabled\" type=\"bool\" setter=\"damage_set_enabled\" getter=\"damage_get_enabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"damage_max\" type=\"int\" setter=\"damage_set_max\" getter=\"damage_get_max\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"damage_min\" type=\"int\" setter=\"damage_set_min\" getter=\"damage_get_min\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"damage_scale_coeff\" type=\"float\" setter=\"damage_set_scale_coeff\" getter=\"damage_get_scale_coeff\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"damage_scale_stat\" type=\"int\" setter=\"damage_set_scale_stat\" getter=\"damage_get_scale_stat\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"damage_type\" type=\"int\" setter=\"damage_set_type\" getter=\"damage_get_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"dispell_aura_types\" type=\"int\" setter=\"dispell_set_aura_types\" getter=\"dispell_get_aura_types\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"dispell_count_max\" type=\"int\" setter=\"dispell_set_count_max\" getter=\"dispell_get_count_max\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"dispell_count_min\" type=\"int\" setter=\"dispell_set_count_min\" getter=\"dispell_get_count_min\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"dispell_enabled\" type=\"bool\" setter=\"dispell_set_enabled\" getter=\"dispell_get_enabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"heal_enabled\" type=\"bool\" setter=\"heal_set_enabled\" getter=\"heal_get_enabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"heal_max\" type=\"int\" setter=\"heal_set_max\" getter=\"heal_get_max\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"heal_min\" type=\"int\" setter=\"heal_set_min\" getter=\"heal_get_min\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"heal_scale_coeff\" type=\"float\" setter=\"heal_set_scale_coeff\" getter=\"heal_get_scale_coeff\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"heal_scale_stat\" type=\"int\" setter=\"heal_set_scale_stat\" getter=\"heal_get_scale_stat\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"hide_from_actionbar\" type=\"bool\" setter=\"set_hide_from_actionbar\" getter=\"get_hide_from_actionbar\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"icon\" type=\"Texture\" setter=\"set_icon\" getter=\"get_icon\">\n\t\t</member>\n\t\t<member name=\"id\" type=\"int\" setter=\"set_id\" getter=\"get_id\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"interrupt_enabled\" type=\"bool\" setter=\"set_interrupt_enabled\" getter=\"get_interrupt_enabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"interrupt_time\" type=\"float\" setter=\"set_interrupt_time\" getter=\"get_interrupt_time\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"is_local_spell\" type=\"bool\" setter=\"set_is_local_spell\" getter=\"get_is_local_spell\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"level\" type=\"int\" setter=\"set_level\" getter=\"get_level\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"needs_target\" type=\"bool\" setter=\"set_needs_target\" getter=\"get_needs_target\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"projectile_scene\" type=\"PackedScene\" setter=\"projectile_set_scene\" getter=\"projectile_get_scene\">\n\t\t</member>\n\t\t<member name=\"projectile_speed\" type=\"float\" setter=\"projectile_set_speed\" getter=\"projectile_get_speed\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"projectile_time\" type=\"float\" setter=\"projectile_set_time\" getter=\"projectile_get_time\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"projectile_use_speed\" type=\"bool\" setter=\"projectile_set_use_speed\" getter=\"projectile_get_use_speed\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"projectile_use_time\" type=\"bool\" setter=\"projectile_set_use_time\" getter=\"projectile_get_use_time\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"range_enabled\" type=\"bool\" setter=\"range_set_enabled\" getter=\"range_get_enabled\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"range_range\" type=\"float\" setter=\"range_set\" getter=\"range_get\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"rank\" type=\"int\" setter=\"set_rank\" getter=\"get_rank\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"resource_cost\" type=\"EntityResourceCostData\" setter=\"set_resource_cost\" getter=\"get_resource_cost\">\n\t\t</member>\n\t\t<member name=\"resource_give\" type=\"EntityResourceCostData\" setter=\"set_resource_give\" getter=\"get_resource_give\">\n\t\t</member>\n\t\t<member name=\"scale_with_level\" type=\"bool\" setter=\"set_scale_with_level\" getter=\"get_scale_with_level\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"spell_category\" type=\"int\" setter=\"set_spell_category\" getter=\"get_spell_category\" enum=\"SpellEnums.SpellCategory\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"spell_cooldown_mainpulation_data_count\" type=\"int\" setter=\"set_spell_cooldown_mainpulation_data_count\" getter=\"get_spell_cooldown_mainpulation_data_count\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"spell_type\" type=\"int\" setter=\"spell_type_set\" getter=\"spell_type_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"spells_cast_on_caster\" type=\"Array\" setter=\"spells_cast_on_caster_set\" getter=\"spells_cast_on_caster_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"spells_cast_on_learn\" type=\"Array\" setter=\"spells_cast_on_learn_set\" getter=\"spells_cast_on_learn_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"spells_cast_on_target\" type=\"Array\" setter=\"spells_cast_on_target_set\" getter=\"spells_cast_on_target_get\" default=\"[  ]\">\n\t\t</member>\n\t\t<member name=\"target_relation_type\" type=\"int\" setter=\"set_target_relation_type\" getter=\"get_target_relation_type\" enum=\"TargetRelationType\" default=\"2\">\n\t\t</member>\n\t\t<member name=\"target_type\" type=\"int\" setter=\"set_target_type\" getter=\"get_target_type\" enum=\"SpellTargetType\" default=\"1\">\n\t\t</member>\n\t\t<member name=\"teaches_craft_recipe\" type=\"CraftRecipe\" setter=\"set_teaches_craft_recipe\" getter=\"get_teaches_craft_recipe\">\n\t\t</member>\n\t\t<member name=\"text_description\" type=\"String\" setter=\"set_text_description\" getter=\"get_text_description\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"text_translation_key\" type=\"String\" setter=\"set_text_translation_key\" getter=\"get_text_translation_key\" default=\"&quot;&quot;\">\n\t\t</member>\n\t\t<member name=\"training_cost\" type=\"int\" setter=\"set_training_cost\" getter=\"get_training_cost\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"training_required_skill\" type=\"EntitySkillData\" setter=\"set_training_required_skill\" getter=\"get_training_required_skill\">\n\t\t</member>\n\t\t<member name=\"training_required_skill_level\" type=\"int\" setter=\"set_training_required_skill_level\" getter=\"get_training_required_skill_level\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"training_required_spell\" type=\"Spell\" setter=\"set_training_required_spell\" getter=\"get_training_required_spell\">\n\t\t</member>\n\t\t<member name=\"visual_spell_effects\" type=\"SpellEffectVisual\" setter=\"set_visual_spell_effects\" getter=\"get_visual_spell_effects\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t\t<constant name=\"TARGET_SELF\" value=\"1\" enum=\"TargetRelationType\">\n\t\t</constant>\n\t\t<constant name=\"TARGET_ENEMY\" value=\"2\" enum=\"TargetRelationType\">\n\t\t</constant>\n\t\t<constant name=\"TARGET_FRIENDLY\" value=\"4\" enum=\"TargetRelationType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TARGET_TYPE_SELF\" value=\"0\" enum=\"SpellTargetType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TARGET_TYPE_TARGET\" value=\"1\" enum=\"SpellTargetType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TARGET_TYPE_AROUND\" value=\"2\" enum=\"SpellTargetType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TARGET_TYPE_FRONT\" value=\"3\" enum=\"SpellTargetType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TARGET_TYPE_AROUND_TARGET\" value=\"4\" enum=\"SpellTargetType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_AOE_TARGET_TYPE_CASTER\" value=\"0\" enum=\"SpellAOETargetType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_AOE_TARGET_TYPE_TARGET\" value=\"1\" enum=\"SpellAOETargetType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_AOE_TARGET_TYPE_GOUND_TARGET_SELECTION\" value=\"2\" enum=\"SpellAOETargetType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_AOE_TARGET_TYPE_RANDOM\" value=\"3\" enum=\"SpellAOETargetType\">\n\t\t</constant>\n\t\t<constant name=\"MAX_AURA_STATS\" value=\"5\">\n\t\t</constant>\n\t\t<constant name=\"MAX_TRIGGER_DATA\" value=\"5\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SpellCastInfo.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SpellCastInfo\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains spell cast related information, for easy manipulation with auras, spell callbacks, etc.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"from_dict\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"dict\" type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"to_dict\">\n\t\t\t<return type=\"Dictionary\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"update_cast_time\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<argument index=\"0\" name=\"delta\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"cast_time\" type=\"float\" setter=\"cast_time_set\" getter=\"cast_time_get\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"caster\" type=\"Entity\" setter=\"caster_set\" getter=\"caster_get\">\n\t\t</member>\n\t\t<member name=\"current_cast_time\" type=\"float\" setter=\"current_cast_time_set\" getter=\"current_cast_time_get\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"has_cast_time\" type=\"bool\" setter=\"has_cast_time_set\" getter=\"has_cast_time_get\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"is_casting\" type=\"bool\" setter=\"is_casting_set\" getter=\"is_casting_get\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"num_pushbacks\" type=\"int\" setter=\"num_pushbacks_set\" getter=\"num_pushbacks_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"source_item\" type=\"ItemInstance\" setter=\"set_source_item\" getter=\"get_source_item\">\n\t\t</member>\n\t\t<member name=\"source_template\" type=\"ItemTemplate\" setter=\"set_source_template\" getter=\"get_source_template\">\n\t\t</member>\n\t\t<member name=\"spell\" type=\"Spell\" setter=\"set_spell\" getter=\"get_spell\">\n\t\t</member>\n\t\t<member name=\"spell_scale\" type=\"float\" setter=\"spell_scale_set\" getter=\"spell_scale_get\" default=\"0.0\">\n\t\t</member>\n\t\t<member name=\"target\" type=\"Entity\" setter=\"set_target\" getter=\"target_get\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SpellCooldownManipulationData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SpellCooldownManipulationData\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tContains data for easy spell cooldown manipulations. Not yet implemented.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SpellDamageInfo.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SpellDamageInfo\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tContains damage information. It is passed around in callbacks, so things can modify values. (absorbs, immunities etc.)\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"reset\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"amount_absorbed\" type=\"int\" setter=\"amount_absorbed_set\" getter=\"amount_absorbed_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_source\" type=\"Spell\" setter=\"aura_source_set\" getter=\"aura_source_get\">\n\t\t</member>\n\t\t<member name=\"crit\" type=\"bool\" setter=\"crit_set\" getter=\"crit_get\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"damage\" type=\"int\" setter=\"damage_set\" getter=\"damage_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"damage_type_get\" type=\"int\" setter=\"damage_type_set\" getter=\"damage_type_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"dealer\" type=\"Entity\" setter=\"dealer_set\" getter=\"dealer_get\">\n\t\t</member>\n\t\t<member name=\"immune\" type=\"bool\" setter=\"set_immune\" getter=\"get_immune\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"receiver\" type=\"Entity\" setter=\"receiver_set\" getter=\"receiver_get\">\n\t\t</member>\n\t\t<member name=\"source\" type=\"Reference\" setter=\"source_set\" getter=\"source_get\">\n\t\t</member>\n\t\t<member name=\"source_id\" type=\"int\" setter=\"source_set_id\" getter=\"source_get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"source_type\" type=\"int\" setter=\"source_set_type\" getter=\"source_get_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"spell_source\" type=\"Spell\" setter=\"spell_source_set\" getter=\"spell_source_get\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t\t<constant name=\"DAMAGE_SOURCE_UNKNOWN\" value=\"0\">\n\t\t</constant>\n\t\t<constant name=\"DAMAGE_SOURCE_SPELL\" value=\"1\">\n\t\t</constant>\n\t\t<constant name=\"DAMAGE_SOURCE_AURA\" value=\"2\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SpellEffectVisual.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SpellEffectVisual\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tBase class for storing spell visual information, like particle effects.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"text_name\" type=\"String\" setter=\"set_name\" getter=\"get_name\" default=\"&quot;&quot;\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SpellEffectVisualSimple.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SpellEffectVisualSimple\" inherits=\"SpellEffectVisual\" version=\"3.5\">\n\t<brief_description>\n\t\tSimple implementation od [SpellEfectVisual].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"has_aura_effect_visual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"has_spell_cast_effect\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"has_spell_effect_visual\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"has_spell_spell_cast_finish_effect\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"aura_effect_visual\" type=\"PackedScene\" setter=\"set_aura_effect_visual\" getter=\"get_aura_effect_visual\">\n\t\t</member>\n\t\t<member name=\"aura_effect_visual_point\" type=\"int\" setter=\"set_aura_effect_visual_point\" getter=\"get_aura_effect_visual_point\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"effect_spell_cast_effect_id\" type=\"PackedScene\" setter=\"set_spell_cast_effect\" getter=\"get_spell_cast_effect\">\n\t\t</member>\n\t\t<member name=\"effect_spell_cast_finish_effect\" type=\"PackedScene\" setter=\"set_spell_cast_finish_effect\" getter=\"get_spell_cast_finish_effect\">\n\t\t</member>\n\t\t<member name=\"spell_cast_finish_effect_point\" type=\"int\" setter=\"set_spell_cast_finish_effect_point\" getter=\"get_spell_cast_finish_effect_point\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"spell_effect_visual\" type=\"PackedScene\" setter=\"set_spell_effect_visual\" getter=\"get_spell_effect_visual\">\n\t\t</member>\n\t\t<member name=\"spell_effect_visual_point\" type=\"int\" setter=\"set_spell_effect_visual_point\" getter=\"get_spell_effect_visual_point\" enum=\"EntityEnums.CommonCharacterSkeletonPoints\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SpellEnums.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SpellEnums\" inherits=\"Object\" version=\"3.5\">\n\t<brief_description>\n\t\tContains lots of general-use enums for spells.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<constants>\n\t\t<constant name=\"DAMAGE_TYPE_NONE\" value=\"0\" enum=\"DamageType\">\n\t\t</constant>\n\t\t<constant name=\"DAMAGE_TYPE_MELEE\" value=\"1\" enum=\"DamageType\">\n\t\t</constant>\n\t\t<constant name=\"DAMAGE_TYPE_HOLY\" value=\"2\" enum=\"DamageType\">\n\t\t</constant>\n\t\t<constant name=\"DAMAGE_TYPE_SHADOW\" value=\"4\" enum=\"DamageType\">\n\t\t</constant>\n\t\t<constant name=\"DAMAGE_TYPE_NATURE\" value=\"8\" enum=\"DamageType\">\n\t\t</constant>\n\t\t<constant name=\"DAMAGE_TYPE_FIRE\" value=\"16\" enum=\"DamageType\">\n\t\t</constant>\n\t\t<constant name=\"DAMAGE_TYPE_FROST\" value=\"32\" enum=\"DamageType\">\n\t\t</constant>\n\t\t<constant name=\"DAMAGE_TYPE_LIGHTNING\" value=\"64\" enum=\"DamageType\">\n\t\t</constant>\n\t\t<constant name=\"DAMAGE_TYPE_CHAOS\" value=\"128\" enum=\"DamageType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_CATEGORY_NORMAL\" value=\"0\" enum=\"SpellCategory\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_CATEGORY_ALCHEMY\" value=\"1\" enum=\"SpellCategory\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_CATEGORY_COOKING\" value=\"2\" enum=\"SpellCategory\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_CATEGORY_ENGINEERING\" value=\"3\" enum=\"SpellCategory\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_CATEGORY_CRAFTING\" value=\"4\" enum=\"SpellCategory\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_CATEGORY_HIDDEN\" value=\"5\" enum=\"SpellCategory\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_CATEGORY_DEVELOPMENT\" value=\"6\" enum=\"SpellCategory\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TYPE_NONE\" value=\"0\" enum=\"SpellType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TYPE_MELEE\" value=\"1\" enum=\"SpellType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TYPE_HOLY\" value=\"2\" enum=\"SpellType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TYPE_SHADOW\" value=\"4\" enum=\"SpellType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TYPE_NATURE\" value=\"8\" enum=\"SpellType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TYPE_FIRE\" value=\"16\" enum=\"SpellType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TYPE_FROST\" value=\"32\" enum=\"SpellType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TYPE_LIGHTNING\" value=\"64\" enum=\"SpellType\">\n\t\t</constant>\n\t\t<constant name=\"SPELL_TYPE_CHAOS\" value=\"128\" enum=\"SpellType\">\n\t\t</constant>\n\t\t<constant name=\"AURA_TYPE_NONE\" value=\"0\" enum=\"AuraType\">\n\t\t</constant>\n\t\t<constant name=\"AURA_TYPE_MAGIC\" value=\"1\" enum=\"AuraType\">\n\t\t</constant>\n\t\t<constant name=\"AURA_TYPE_POISON\" value=\"2\" enum=\"AuraType\">\n\t\t</constant>\n\t\t<constant name=\"AURA_TYPE_PHYSICAL\" value=\"4\" enum=\"AuraType\">\n\t\t</constant>\n\t\t<constant name=\"AURA_TYPE_CURSE\" value=\"8\" enum=\"AuraType\">\n\t\t</constant>\n\t\t<constant name=\"AURA_TYPE_BLEED\" value=\"16\" enum=\"AuraType\">\n\t\t</constant>\n\t\t<constant name=\"AURA_TYPE_TALENT\" value=\"32\" enum=\"AuraType\">\n\t\t</constant>\n\t\t<constant name=\"AURA_TYPE_SKILL\" value=\"64\" enum=\"AuraType\">\n\t\t</constant>\n\t\t<constant name=\"COLLIDER_TYPE_NONE\" value=\"0\" enum=\"ColliderType\">\n\t\t</constant>\n\t\t<constant name=\"COLLIDER_TYPE_SPHERE\" value=\"1\" enum=\"ColliderType\">\n\t\t</constant>\n\t\t<constant name=\"COLLIDER_TYPE_BOX\" value=\"2\" enum=\"ColliderType\">\n\t\t</constant>\n\t\t<constant name=\"TARGET_TYPE_NONE\" value=\"0\" enum=\"TargetType\">\n\t\t</constant>\n\t\t<constant name=\"TARGET_TYPE_NODE\" value=\"1\" enum=\"TargetType\">\n\t\t</constant>\n\t\t<constant name=\"TARGET_TYPE_BONE_ID\" value=\"2\" enum=\"TargetType\">\n\t\t</constant>\n\t\t<constant name=\"TARGET_TYPE_COORDS\" value=\"3\" enum=\"TargetType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_TYPE_NONE\" value=\"0\" enum=\"TriggerType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_TYPE_PERCENT\" value=\"1\" enum=\"TriggerType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_TYPE_PPM\" value=\"2\" enum=\"TriggerType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_AURA\" value=\"0\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_DAMAGE\" value=\"1\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_HEAL\" value=\"2\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_CAST\" value=\"3\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_DEATH\" value=\"4\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_COOLDOWN_ADDED\" value=\"5\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_COOLDOWN_REMOVED\" value=\"6\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_CATEGORY_COOLDOWN_ADDED\" value=\"7\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_CATEGORY_COOLDOWN_REMOVED\" value=\"8\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_GCD_STARTED\" value=\"9\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_GCD_FINISHED\" value=\"10\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_XP_GAINED\" value=\"11\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_CLASS_LEVELUP\" value=\"12\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_CHARACTER_LEVELUP\" value=\"13\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_ENTITY_RESOURCE_ADDED\" value=\"14\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_ENTITY_RESOURCE_REMOVED\" value=\"15\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_AURA_CUSTOM\" value=\"16\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_DAMAGE_CUSTOM\" value=\"17\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_HEAL_CUSTOM\" value=\"18\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_CAST_CUSTOM\" value=\"19\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"TRIGGER_NOTIFICATION_TYPE_CUSTOM\" value=\"20\" enum=\"TriggerNotificationType\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_AURA_BEFORE_APPLIED\" value=\"0\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_AURA_AFTER_APPLIED\" value=\"1\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_AURA_APPLIED\" value=\"2\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_AURA_ADDED\" value=\"3\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_AURA_REMOVED\" value=\"4\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_AURA_REFRESHED\" value=\"5\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_DAMAGE_BEFORE_HIT\" value=\"0\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_DAMAGE_HIT\" value=\"1\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_DAMAGE_BEFORE_DAMAGE\" value=\"2\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_DAMAGE_RECEIVE\" value=\"3\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_DAMAGE_DEALT_DAMAGE\" value=\"4\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_DAMAGE_DAMAGE_DEALT\" value=\"5\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_HEAL_BEFORE_HIT\" value=\"0\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_HEAL_BEFORE_HEAL\" value=\"1\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_HEAL_RECEIVE\" value=\"2\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_HEAL_DEALT_HEAL\" value=\"3\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_HEAL_HEAL_DEALT\" value=\"4\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_CAST_BEFORE\" value=\"0\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_CAST_BEFORE_CAST_TARGET\" value=\"1\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_CAST_FINISHED_TARGET\" value=\"2\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_CAST_FINISHED\" value=\"3\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_CAST_STARTED\" value=\"4\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_CAST_FAILED\" value=\"5\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_CAST_SUCCESS\" value=\"6\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_CAST_INTERRUPTED\" value=\"7\">\n\t\t</constant>\n\t\t<constant name=\"NOTIFICATION_CAST_DELAYED\" value=\"8\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SpellFollowProjectile3D.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SpellFollowProjectile3D\" inherits=\"Spatial\" version=\"3.5\">\n\t<brief_description>\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/SpellHealInfo.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"SpellHealInfo\" inherits=\"Reference\" version=\"3.5\">\n\t<brief_description>\n\t\tContains heal information. It is passed around in callbacks, so things can modify values. (absorbs, immunities etc.)\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"reset\">\n\t\t\t<return type=\"void\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"amount_absorbed\" type=\"int\" setter=\"amount_absorbed_set\" getter=\"amount_absorbed_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"aura_source\" type=\"Spell\" setter=\"aura_source_set\" getter=\"aura_source_get\">\n\t\t</member>\n\t\t<member name=\"crit\" type=\"bool\" setter=\"crit_set\" getter=\"crit_get\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"dealer\" type=\"Entity\" setter=\"dealer_set\" getter=\"dealer_get\">\n\t\t</member>\n\t\t<member name=\"heal\" type=\"int\" setter=\"heal_set\" getter=\"heal_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"heal_type_get\" type=\"int\" setter=\"heal_type_set\" getter=\"heal_type_get\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"immune\" type=\"bool\" setter=\"set_immune\" getter=\"get_immune\" default=\"false\">\n\t\t</member>\n\t\t<member name=\"receiver\" type=\"Entity\" setter=\"receiver_set\" getter=\"receiver_get\">\n\t\t</member>\n\t\t<member name=\"source\" type=\"Reference\" setter=\"source_set\" getter=\"source_get\">\n\t\t</member>\n\t\t<member name=\"source_id\" type=\"int\" setter=\"source_set_id\" getter=\"source_get_id\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"source_type\" type=\"int\" setter=\"source_set_type\" getter=\"source_get_type\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"spell_source\" type=\"Spell\" setter=\"spell_source_set\" getter=\"spell_source_get\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t\t<constant name=\"HEAL_SOURCE_UNKNOWN\" value=\"0\">\n\t\t</constant>\n\t\t<constant name=\"HEAL_SOURCE_SPELL\" value=\"1\">\n\t\t</constant>\n\t\t<constant name=\"HEAL_SOURCE_AURA\" value=\"2\">\n\t\t</constant>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/StatData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"StatData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains a [Stat]'s data.\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"get_base\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_mod_stat_id\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_mod_stat_multiplier\">\n\t\t\t<return type=\"float\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_target_stat_id\">\n\t\t\t<return type=\"int\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"has_mod_stats\">\n\t\t\t<return type=\"bool\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_base\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"entry\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_mod_stat_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_mod_stat_multiplier\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"float\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_target_stat_id\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"value\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"level_stat_data\" type=\"LevelStatData\" setter=\"set_level_stat_data\" getter=\"get_level_stat_data\">\n\t\t</member>\n\t\t<member name=\"mod_stat_count\" type=\"int\" setter=\"set_mod_stat_count\" getter=\"get_mod_stat_count\" default=\"0\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/VendorItemData.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"VendorItemData\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains vendor item data for an [Entity]/[EntityData].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t\t<method name=\"get_num_vendor_datas\">\n\t\t\t<return type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"get_vendor_data\">\n\t\t\t<return type=\"VendorItemDataEntry\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t\t<method name=\"set_vendor_data\">\n\t\t\t<return type=\"void\" />\n\t\t\t<argument index=\"0\" name=\"index\" type=\"int\" />\n\t\t\t<argument index=\"1\" name=\"vendor_data\" type=\"VendorItemDataEntry\" />\n\t\t\t<description>\n\t\t\t</description>\n\t\t</method>\n\t</methods>\n\t<members>\n\t\t<member name=\"vendor_datas\" type=\"Array\" setter=\"set_vendor_datas\" getter=\"get_vendor_datas\" default=\"[  ]\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "doc_classes/VendorItemDataEntry.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<class name=\"VendorItemDataEntry\" inherits=\"Resource\" version=\"3.5\">\n\t<brief_description>\n\t\tContains one entry for a [VendorItemData].\n\t</brief_description>\n\t<description>\n\t</description>\n\t<tutorials>\n\t</tutorials>\n\t<methods>\n\t</methods>\n\t<members>\n\t\t<member name=\"cost_item\" type=\"ItemTemplate\" setter=\"set_cost_item\" getter=\"get_cost_item\">\n\t\t</member>\n\t\t<member name=\"count\" type=\"int\" setter=\"set_count\" getter=\"get_count\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"item\" type=\"ItemTemplate\" setter=\"set_item\" getter=\"get_item\">\n\t\t</member>\n\t\t<member name=\"price\" type=\"int\" setter=\"set_price\" getter=\"get_price\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"spawn_time\" type=\"int\" setter=\"set_spawn_time\" getter=\"get_spawn_time\" default=\"0\">\n\t\t</member>\n\t\t<member name=\"spell\" type=\"Spell\" setter=\"set_spell\" getter=\"get_spell\">\n\t\t</member>\n\t</members>\n\t<constants>\n\t</constants>\n</class>\n"
  },
  {
    "path": "drag_and_drop/es_drag_and_drop.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"es_drag_and_drop.h\"\n\nconst String ESDragAndDrop::BINDING_STRING_ES_DRAG_AND_DROP_TYPE = \"None,Spell,Item,Inventory Item,Equipped Item\";\n\nNode *ESDragAndDrop::get_origin() const {\n\treturn _origin;\n}\nvoid ESDragAndDrop::set_origin(Node *origin) {\n\t_origin = origin;\n}\n\nESDragAndDrop::ESDragAndDropType ESDragAndDrop::get_type() const {\n\treturn _type;\n}\nvoid ESDragAndDrop::set_type(const ESDragAndDrop::ESDragAndDropType type) {\n\t_type = type;\n}\n\nStringName ESDragAndDrop::get_item_path() const {\n\treturn _item_path;\n}\nvoid ESDragAndDrop::set_item_path(const StringName &item_path) {\n\t_item_path = item_path;\n}\n\nESDragAndDrop::ESDragAndDrop() {\n\t_type = ES_DRAG_AND_DROP_TYPE_NONE;\n\t_origin = NULL;\n}\n\nvoid ESDragAndDrop::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_origin\"), &ESDragAndDrop::get_origin);\n\tClassDB::bind_method(D_METHOD(\"set_origin\", \"id\"), &ESDragAndDrop::set_origin);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"origin\", PROPERTY_HINT_RESOURCE_TYPE, \"Node\"), \"set_origin\", \"get_origin\");\n\n\tClassDB::bind_method(D_METHOD(\"get_type\"), &ESDragAndDrop::get_type);\n\tClassDB::bind_method(D_METHOD(\"set_type\", \"type\"), &ESDragAndDrop::set_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"type\", PROPERTY_HINT_ENUM, BINDING_STRING_ES_DRAG_AND_DROP_TYPE), \"set_type\", \"get_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_item_path\"), &ESDragAndDrop::get_item_path);\n\tClassDB::bind_method(D_METHOD(\"set_item_path\", \"id\"), &ESDragAndDrop::set_item_path);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"item_path\"), \"set_item_path\", \"get_item_path\");\n\n\tBIND_ENUM_CONSTANT(ES_DRAG_AND_DROP_TYPE_NONE);\n\tBIND_ENUM_CONSTANT(ES_DRAG_AND_DROP_TYPE_SPELL);\n\tBIND_ENUM_CONSTANT(ES_DRAG_AND_DROP_TYPE_ITEM);\n\tBIND_ENUM_CONSTANT(ES_DRAG_AND_DROP_TYPE_INVENTORY_ITEM);\n\tBIND_ENUM_CONSTANT(ES_DRAG_AND_DROP_TYPE_EQUIPPED_ITEM);\n}\n"
  },
  {
    "path": "drag_and_drop/es_drag_and_drop.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ES_DRAG_AND_DROP_H\n#define ES_DRAG_AND_DROP_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n#include \"core/string/ustring.h\"\n\n\n#include \"scene/main/node.h\"\n\nclass ESDragAndDrop : public RefCounted {\n\tGDCLASS(ESDragAndDrop, RefCounted);\n\npublic:\n\tstatic const String BINDING_STRING_ES_DRAG_AND_DROP_TYPE;\n\n\tenum ESDragAndDropType {\n\t\tES_DRAG_AND_DROP_TYPE_NONE = 0,\n\t\tES_DRAG_AND_DROP_TYPE_SPELL = 1,\n\t\tES_DRAG_AND_DROP_TYPE_ITEM = 2,\n\t\tES_DRAG_AND_DROP_TYPE_INVENTORY_ITEM = 3,\n\t\tES_DRAG_AND_DROP_TYPE_EQUIPPED_ITEM = 4,\n\t};\n\n\tNode *get_origin() const;\n\tvoid set_origin(Node *owner);\n\n\tESDragAndDropType get_type() const;\n\tvoid set_type(const ESDragAndDropType type);\n\n\tStringName get_item_path() const;\n\tvoid set_item_path(const StringName &item_path);\n\n\tESDragAndDrop();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tNode *_origin;\n\tESDragAndDropType _type;\n\tStringName _item_path;\n};\n\nVARIANT_ENUM_CAST(ESDragAndDrop::ESDragAndDropType);\n\n#endif\n"
  },
  {
    "path": "editor/ess_editor_plugin.cpp",
    "content": "/*\nCopyright (c) 2020-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"ess_editor_plugin.h\"\n\n#include \"core/version.h\"\n\nvoid ESSEditorPlugin::fix_ids(Variant param) {\n}\n\nESSEditorPlugin::ESSEditorPlugin(EditorNode *p_node) {\n\teditor = p_node;\n\n\t//editor->add_tool_menu_item(\"ESS: make ids unique\", this, \"fix_ids\");\n\n}\n\nESSEditorPlugin::~ESSEditorPlugin() {\n}\n\nvoid ESSEditorPlugin::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"fix_ids\"), &ESSEditorPlugin::fix_ids);\n}\n"
  },
  {
    "path": "editor/ess_editor_plugin.h",
    "content": "/*\nCopyright (c) 2020-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ESS_EDITOR_PLUGIN_H\n#define ESS_EDITOR_PLUGIN_H\n\n#include \"editor/editor_node.h\"\n#include \"editor/editor_plugin.h\"\n\n#include \"core/version.h\"\n\nclass ESSEditorPlugin : public EditorPlugin {\n\n\tGDCLASS(ESSEditorPlugin, EditorPlugin);\n\tEditorNode *editor;\n\nprotected:\n\tstatic void _bind_methods();\n\npublic:\n\tvirtual String get_name() const { return \"ESSEditorPlugin\"; }\n\tbool has_main_screen() const { return false; }\n\tvirtual void edit(Object *p_object) {}\n\tvirtual bool handles(Object *p_object) const { return false; }\n\tvirtual void make_visible(bool p_visible) {}\n\tvoid fix_ids(Variant param);\n\n\tESSEditorPlugin(EditorNode *p_node);\n\t~ESSEditorPlugin();\n};\n\n#endif\n"
  },
  {
    "path": "entities/ai/entity_ai.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_ai.h\"\n\n#include \"../entity.h\"\n\n#include \"../../infos/spell_cast_info.h\"\n\n#include \"../../data/items/item_instance.h\"\n#include \"../../entities/auras/aura_data.h\"\n#include \"../../entities/resources/entity_resource.h\"\n#include \"../../pipelines/spell_damage_info.h\"\n#include \"../../pipelines/spell_heal_info.h\"\n\n#include \"../../defines.h\"\n\nbool EntityAI::get_enabled() {\n\treturn _enabled;\n}\nvoid EntityAI::set_enabled(bool value) {\n\t_enabled = value;\n}\n\nvoid EntityAI::set_owner(Entity *entity) {\n\tif (entity == _owner)\n\t\treturn;\n\n\t_owner = entity;\n\n\tcall(\"_on_set_owner\");\n}\n\nvoid EntityAI::set_owner_bind(Node *entity) {\n\tif (!entity) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(entity);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\treturn set_owner(e);\n}\n\nEntity *EntityAI::get_owner() {\n\treturn _owner;\n}\n\nVector<int> EntityAI::get_spec_distribution() {\n\treturn _spec_distribution;\n}\nvoid EntityAI::set_spec_distribution(Vector<int> data) {\n\t_spec_distribution = data;\n}\n\nint EntityAI::get_spec_variance() {\n\treturn _spec_variance;\n}\nvoid EntityAI::set_spec_variance(int value) {\n\t_spec_variance = value;\n}\n\nEntityEnums::AIStates EntityAI::get_state() {\n\treturn _state;\n}\nvoid EntityAI::set_state(EntityEnums::AIStates state) {\n\t_state = state;\n}\n\nEntityEnums::AIStates EntityAI::get_force_state() {\n\treturn _force_state;\n}\nvoid EntityAI::set_force_state(EntityEnums::AIStates state) {\n\t_force_state = state;\n}\n\nvoid EntityAI::set_editor_description(const String &p_editor_description) {\n\tset_meta(\"_editor_description_\", p_editor_description);\n}\nString EntityAI::get_editor_description() const {\n\tif (has_meta(\"_editor_description_\")) {\n\t\treturn get_meta(\"_editor_description_\");\n\t} else {\n\t\treturn \"\";\n\t}\n}\n\nvoid EntityAI::update(float delta) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(_owner));\n\n\tif (has_method(\"_update\"))\n\t\tcall(\"_update\", delta);\n}\nvoid EntityAI::pet_update(float delta) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(_owner));\n\n\tif (has_method(\"_pet_update\"))\n\t\tcall(\"_pet_update\", delta);\n}\n\nvoid EntityAI::move(float delta) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(_owner));\n\n\tif (has_method(\"_move\"))\n\t\tcall(\"_move\", delta);\n}\nvoid EntityAI::pet_move(float delta) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(_owner));\n\n\tif (has_method(\"_pet_move\"))\n\t\tcall(\"_pet_move\", delta);\n}\n\nvoid EntityAI::_on_set_owner() {\n}\n\nvoid EntityAI::start_casting(int spell_id, Entity *caster, float spellScale) {\n\t//if (_entity_class_data.is_valid())\n\t//\t_entity_class_data->start_casting(spell_id, caster, spellScale);\n}\n\nvoid EntityAI::notification_saura(int what, Ref<AuraData> data) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (has_method(\"_notification_saura\"))\n\t\tcall(\"_notification_saura\", what, data);\n}\nvoid EntityAI::notification_sheal(int what, Ref<SpellHealInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_notification_sheal\"))\n\t\tcall(\"_notification_sheal\", what, info);\n}\nvoid EntityAI::notification_scast(int what, Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_notification_scast\"))\n\t\tcall(\"_notification_scast\", what, info);\n}\nvoid EntityAI::notification_sdamage(int what, Ref<SpellDamageInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (has_method(\"_notification_sdamage\"))\n\t\tcall(\"_notification_sdamage\", what, info);\n}\n\nvoid EntityAI::notification_sdeath(Entity *entity) {\n\tif (has_method(\"_notification_sdeath\"))\n\t\tcall(\"_notification_sdeath\", entity);\n}\n\nvoid EntityAI::notification_sdeath_bind(Node *entity) {\n\tERR_FAIL_COND(entity == NULL);\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(e == NULL);\n\n\tnotification_sdeath(e);\n}\n\nvoid EntityAI::notification_scooldown_added(int id, float value) {\n\tif (has_method(\"_notification_scooldown_added\"))\n\t\tcall(\"_notification_scooldown_added\", id, value);\n}\nvoid EntityAI::notification_scooldown_removed(int id, float value) {\n\tif (has_method(\"_notification_scooldown_removed\"))\n\t\tcall(\"_notification_scooldown_removed\", id, value);\n}\n\nvoid EntityAI::notification_scategory_cooldown_added(int id, float value) {\n\tif (has_method(\"_notification_scategory_cooldown_added\"))\n\t\tcall(\"_notification_scategory_cooldown_added\", id, value);\n}\nvoid EntityAI::notification_scategory_cooldown_removed(int id, float value) {\n\tif (has_method(\"_notification_scategory_cooldown_removed\"))\n\t\tcall(\"_notification_scategory_cooldown_removed\", id, value);\n}\n\nvoid EntityAI::notification_sgcd_started(Entity *entity, float gcd) {\n\tif (has_method(\"_notification_sgcd_started\"))\n\t\tcall(\"_notification_sgcd_started\", entity, gcd);\n}\nvoid EntityAI::notification_sgcd_finished(Entity *entity) {\n\tif (has_method(\"_notification_sgcd_finished\"))\n\t\tcall(\"_notification_sgcd_finished\", entity);\n}\nvoid EntityAI::notification_sgcd_started_bind(Node *entity, float gcd) {\n\tERR_FAIL_COND(entity == NULL);\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(e == NULL);\n\n\tnotification_sgcd_started(e, gcd);\n}\nvoid EntityAI::notification_sgcd_finished_bind(Node *entity) {\n\tERR_FAIL_COND(entity == NULL);\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(e == NULL);\n\n\tnotification_sgcd_finished(e);\n}\n\nvoid EntityAI::notification_sxp_gained(Entity *entity, int value) {\n\tif (has_method(\"_notification_sxp_gained\"))\n\t\tcall(\"_notification_sxp_gained\", entity, value);\n}\nvoid EntityAI::notification_sxp_gained_bind(Node *entity, int value) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(e == NULL);\n\n\tnotification_sxp_gained(e, value);\n}\n\nvoid EntityAI::notification_slevel_up(Entity *entity, int value) {\n\tif (has_method(\"_notification_slevel_up\"))\n\t\tcall(\"_notification_slevel_up\", entity);\n}\nvoid EntityAI::notification_slevel_up_bind(Node *entity, int value) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(e == NULL);\n\n\tnotification_slevel_up(e, value);\n}\n\nvoid EntityAI::notification_sentity_resource_added(Ref<EntityResource> resource) {\n\tif (has_method(\"_notification_sentity_resource_added\"))\n\t\tcall(\"_notification_sentity_resource_added\", resource);\n}\n\nvoid EntityAI::notification_sentity_resource_removed(Ref<EntityResource> resource) {\n\tif (has_method(\"_notification_sentity_resource_removed\"))\n\t\tcall(\"_notification_sentity_resource_removed\", resource);\n}\n\n//Equipment\n\nbool EntityAI::equip_should_deny(Entity *entity, int equip_slot, Ref<ItemInstance> item) {\n\tif (has_method(\"_equip_should_deny\"))\n\t\tif (call(\"_equip_should_deny\", entity, equip_slot, item))\n\t\t\treturn true;\n\n\treturn false;\n}\nbool EntityAI::equip_should_deny_bind(Node *entity, int equip_slot, Ref<ItemInstance> item) {\n\tERR_FAIL_COND_V(!INSTANCE_VALIDATE(entity), false);\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND_V(e == NULL, false);\n\n\treturn equip_should_deny(e, equip_slot, item);\n}\n\nvoid EntityAI::equip_son_success(Entity *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tif (has_method(\"_equip_son_success\"))\n\t\tcall(\"_equip_son_success\", entity, equip_slot, item, old_item, bag_slot);\n}\nvoid EntityAI::equip_son_success_bind(Node *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(e == NULL);\n\n\tequip_son_success(e, equip_slot, item, old_item, bag_slot);\n}\n\nvoid EntityAI::equip_son_fail(Entity *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tif (has_method(\"_equip_son_fail\"))\n\t\tcall(\"_equip_son_fail\", entity, equip_slot, item, old_item, bag_slot);\n}\nvoid EntityAI::equip_son_fail_bind(Node *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(e == NULL);\n\n\tequip_son_fail(e, equip_slot, item, old_item, bag_slot);\n}\n\nvoid EntityAI::equip_con_success(Entity *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tif (has_method(\"_equip_con_success\"))\n\t\tcall(\"_equip_con_success\", entity, equip_slot, item, old_item, bag_slot);\n}\nvoid EntityAI::equip_con_success_bind(Node *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(e == NULL);\n\n\tequip_con_success(e, equip_slot, item, old_item, bag_slot);\n}\n\nvoid EntityAI::equip_con_fail(Entity *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tif (has_method(\"_equip_con_fail\"))\n\t\tcall(\"_equip_con_fail\", entity, equip_slot, item, old_item, bag_slot);\n}\nvoid EntityAI::equip_con_fail_bind(Node *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(e == NULL);\n\n\tequip_con_fail(e, equip_slot, item, old_item, bag_slot);\n}\n\nEntityAI::EntityAI() {\n\t_enabled = true;\n\t_owner = NULL;\n\n\t_spec_variance = 0;\n\n\t_state = EntityEnums::AI_STATE_OFF;\n\t_force_state = EntityEnums::AI_STATE_OFF;\n}\n\nEntityAI::~EntityAI() {\n\t_spec_distribution.clear();\n}\n\nvoid EntityAI::_bind_methods() {\n\t//GDVIRTUAL_BIND(\"_on_set_owner\");\n\n\t//GDVIRTUAL_BIND(\"_update\", \"delta\");\n\t//GDVIRTUAL_BIND(\"_pet_update\", \"delta\");\n\n\t//GDVIRTUAL_BIND(\"_move\", \"delta\");\n\t//GDVIRTUAL_BIND(\"_pet_move\", \"delta\");\n\n\tClassDB::bind_method(D_METHOD(\"get_enabled\"), &EntityAI::get_enabled);\n\tClassDB::bind_method(D_METHOD(\"set_enabled\", \"value\"), &EntityAI::set_enabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"get_enabled\"), \"set_enabled\", \"get_enabled\");\n\n\tClassDB::bind_method(D_METHOD(\"get_owner\"), &EntityAI::get_owner);\n\tClassDB::bind_method(D_METHOD(\"set_owner\", \"entity\"), &EntityAI::set_owner_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"owner\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", 0), \"set_owner\", \"get_owner\");\n\n\tClassDB::bind_method(D_METHOD(\"get_spec_distribution\"), &EntityAI::get_spec_distribution);\n\tClassDB::bind_method(D_METHOD(\"set_spec_distribution\", \"value\"), &EntityAI::set_spec_distribution);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"spec_distribution\"), \"set_spec_distribution\", \"get_spec_distribution\");\n\n\tClassDB::bind_method(D_METHOD(\"get_spec_variance\"), &EntityAI::get_spec_variance);\n\tClassDB::bind_method(D_METHOD(\"set_spec_variance\", \"value\"), &EntityAI::set_spec_variance);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"spec_variance\"), \"set_spec_variance\", \"get_spec_variance\");\n\n\tClassDB::bind_method(D_METHOD(\"get_state\"), &EntityAI::get_state);\n\tClassDB::bind_method(D_METHOD(\"set_state\", \"state\"), &EntityAI::set_state);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"state\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_AI_STATES), \"set_state\", \"get_state\");\n\n\tClassDB::bind_method(D_METHOD(\"get_force_state\"), &EntityAI::get_force_state);\n\tClassDB::bind_method(D_METHOD(\"set_force_state\", \"state\"), &EntityAI::set_force_state);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"force_state\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_AI_STATES), \"set_force_state\", \"get_force_state\");\n\n\tClassDB::bind_method(D_METHOD(\"set_editor_description\", \"editor_description\"), &EntityAI::set_editor_description);\n\tClassDB::bind_method(D_METHOD(\"get_editor_description\"), &EntityAI::get_editor_description);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"editor_description\", PROPERTY_HINT_MULTILINE_TEXT, \"\", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNAL), \"set_editor_description\", \"get_editor_description\");\n\n\tClassDB::bind_method(D_METHOD(\"update\", \"delta\"), &EntityAI::update);\n\tClassDB::bind_method(D_METHOD(\"pet_update\", \"delta\"), &EntityAI::pet_update);\n\n\tClassDB::bind_method(D_METHOD(\"move\", \"delta\"), &EntityAI::move);\n\tClassDB::bind_method(D_METHOD(\"pet_move\", \"delta\"), &EntityAI::pet_move);\n\n\tClassDB::bind_method(D_METHOD(\"_on_set_owner\"), &EntityAI::_on_set_owner);\n\n\t//EventHandlers\n\t//GDVIRTUAL_BIND(\"_notification_saura\", \"what\", \"data\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_notification_sheal\", \"what\", \"info\", \"SpellHealInfo\");\n\t//GDVIRTUAL_BIND(\"_notification_scast\", \"what\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_notification_sdamage\", \"what\", \"info\", \"SpellDamageInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"notification_saura\", \"what\", \"data\"), &EntityAI::notification_saura);\n\tClassDB::bind_method(D_METHOD(\"notification_sheal\", \"what\", \"info\"), &EntityAI::notification_sheal);\n\tClassDB::bind_method(D_METHOD(\"notification_scast\", \"what\", \"info\"), &EntityAI::notification_scast);\n\tClassDB::bind_method(D_METHOD(\"notification_sdamage\", \"what\", \"info\"), &EntityAI::notification_sdamage);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sdeath\", \"data\"), &EntityAI::notification_sdeath_bind);\n\n\tClassDB::bind_method(D_METHOD(\"notification_scooldown_added\", \"cooldown\"), &EntityAI::notification_scooldown_added);\n\tClassDB::bind_method(D_METHOD(\"notification_scooldown_removed\", \"cooldown\"), &EntityAI::notification_scooldown_removed);\n\n\tClassDB::bind_method(D_METHOD(\"notification_scategory_cooldown_added\", \"category_cooldown\"), &EntityAI::notification_scategory_cooldown_added);\n\tClassDB::bind_method(D_METHOD(\"notification_scategory_cooldown_removed\", \"category_cooldown\"), &EntityAI::notification_scategory_cooldown_removed);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sgcd_started\", \"entity\", \"gcd\"), &EntityAI::notification_sgcd_started_bind);\n\tClassDB::bind_method(D_METHOD(\"notification_sgcd_finished\", \"entity\"), &EntityAI::notification_sgcd_finished_bind);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sxp_gained\", \"entity\", \"value\"), &EntityAI::notification_sxp_gained_bind);\n\tClassDB::bind_method(D_METHOD(\"notification_slevel_up\", \"entity\", \"value\"), &EntityAI::notification_slevel_up_bind);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sentity_resource_added\", \"resource\"), &EntityAI::notification_sentity_resource_added);\n\tClassDB::bind_method(D_METHOD(\"notification_sentity_resource_removed\", \"resource\"), &EntityAI::notification_sentity_resource_removed);\n\n\t//GDVIRTUAL_BIND(\"_notification_sdeath\", \"data\", \"Entity\");\n\n\t//GDVIRTUAL_BIND(\"_notification_scooldown_added\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_scooldown_removed\", \"id\", \"value\");\n\n\t//GDVIRTUAL_BIND(\"_notification_scategory_cooldown_added\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_scategory_cooldown_removed\", \"id\", \"value\");\n\n\t//GDVIRTUAL_BIND(\"_notification_sgcd_started\", \"entity\", \"Entity\", \"gcd\");\n\t//GDVIRTUAL_BIND(\"_notification_sgcd_finished\", \"entity\", \"Entity\");\n\n\t//GDVIRTUAL_BIND(\"_notification_sxp_gained\", \"entity\", \"Entity\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_slevel_up\", \"entity\", \"Entity\", \"value\");\n\n\t//GDVIRTUAL_BIND(\"_notification_sentity_resource_added\", \"resource\", \"EntityResource\");\n\t//GDVIRTUAL_BIND(\"_notification_sentity_resource_removed\", \"resource\", \"EntityResource\");\n\n\t//Equipment\n\n\t//GDVIRTUAL_BIND(\"_equip_should_deny\", \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", \"equip_slot\", \"item\", \"ItemInstance\");\n\n\t//GDVIRTUAL_BIND(\"_equip_son_success\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"equip_slot\", \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\t//GDVIRTUAL_BIND(\"_equip_son_fail\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"equip_slot\", \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\t//GDVIRTUAL_BIND(\"_equip_con_success\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"equip_slot\", \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\t//GDVIRTUAL_BIND(\"_equip_con_fail\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"equip_slot\", \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\n\tClassDB::bind_method(D_METHOD(\"equip_should_deny\", \"entity\", \"equip_slot\", \"item\"), &EntityAI::equip_should_deny_bind);\n\n\tClassDB::bind_method(D_METHOD(\"equip_son_success\", \"entity\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &EntityAI::equip_son_success_bind);\n\tClassDB::bind_method(D_METHOD(\"equip_son_fail\", \"entity\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &EntityAI::equip_son_fail_bind);\n\tClassDB::bind_method(D_METHOD(\"equip_con_success\", \"entity\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &EntityAI::equip_con_success_bind);\n\tClassDB::bind_method(D_METHOD(\"equip_con_fail\", \"entity\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &EntityAI::equip_con_fail_bind);\n}\n"
  },
  {
    "path": "entities/ai/entity_ai.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_AI_H\n#define ENTITY_AI_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"scene/main/node.h\"\n\n#include \"../../entity_enums.h\"\n\nclass AuraData;\nclass SpellHealInfo;\nclass SpellDamageInfo;\nclass SpellCastInfo;\nclass ItemInstance;\nclass EntityResource;\nclass Entity;\n\nclass EntityAI : public Resource {\n\tGDCLASS(EntityAI, Resource);\n\npublic:\n\tbool get_enabled();\n\tvoid set_enabled(bool value);\n\n\tvoid set_owner(Entity *entity);\n\tvoid set_owner_bind(Node *entity);\n\tEntity *get_owner();\n\n\tVector<int> get_spec_distribution();\n\tvoid set_spec_distribution(Vector<int> data);\n\n\tint get_spec_variance();\n\tvoid set_spec_variance(int value);\n\n\tEntityEnums::AIStates get_state();\n\tvoid set_state(EntityEnums::AIStates state);\n\n\tEntityEnums::AIStates get_force_state();\n\tvoid set_force_state(EntityEnums::AIStates state);\n\n\tvoid set_editor_description(const String &p_editor_description);\n\tString get_editor_description() const;\n\n\tvoid update(float delta);\n\tvoid pet_update(float delta);\n\n\tvoid move(float delta);\n\tvoid pet_move(float delta);\n\n\tvoid _on_set_owner();\n\n\t////    Spell System    ////\n\n\tvoid start_casting(int spell_id, Entity *caster, float spellScale);\n\n\tvoid notification_saura(int what, Ref<AuraData> data);\n\tvoid notification_sheal(int what, Ref<SpellHealInfo> info);\n\tvoid notification_scast(int what, Ref<SpellCastInfo> info);\n\tvoid notification_sdamage(int what, Ref<SpellDamageInfo> info);\n\n\tvoid notification_sdeath(Entity *entity);\n\tvoid notification_sdeath_bind(Node *entity);\n\n\tvoid notification_scooldown_added(int id, float value);\n\tvoid notification_scooldown_removed(int id, float value);\n\n\tvoid notification_scategory_cooldown_added(int id, float value);\n\tvoid notification_scategory_cooldown_removed(int id, float value);\n\n\tvoid notification_sgcd_started(Entity *entity, float gcd);\n\tvoid notification_sgcd_finished(Entity *entity);\n\tvoid notification_sgcd_started_bind(Node *entity, float gcd);\n\tvoid notification_sgcd_finished_bind(Node *entity);\n\n\tvoid notification_sxp_gained(Entity *entity, int value);\n\tvoid notification_sxp_gained_bind(Node *entity, int value);\n\tvoid notification_slevel_up(Entity *entity, int value);\n\tvoid notification_slevel_up_bind(Node *entity, int value);\n\n\tvoid notification_sentity_resource_added(Ref<EntityResource> resource);\n\tvoid notification_sentity_resource_removed(Ref<EntityResource> resource);\n\n\t//Equipment\n\n\tbool equip_should_deny(Entity *entity, int equip_slot, Ref<ItemInstance> item);\n\tbool equip_should_deny_bind(Node *entity, int equip_slot, Ref<ItemInstance> item);\n\n\tvoid equip_son_success(Entity *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\tvoid equip_son_success_bind(Node *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\tvoid equip_son_fail(Entity *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\tvoid equip_son_fail_bind(Node *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\n\tvoid equip_con_success(Entity *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\tvoid equip_con_success_bind(Node *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\tvoid equip_con_fail(Entity *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\tvoid equip_con_fail_bind(Node *entity, int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\n\tEntityAI();\n\t~EntityAI();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tbool _enabled;\n\tEntity *_owner;\n\n\tVector<int> _spec_distribution;\n\tint _spec_variance;\n\n\tEntityEnums::AIStates _state;\n\tEntityEnums::AIStates _force_state;\n};\n\n#endif\n"
  },
  {
    "path": "entities/auras/aura_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"aura_data.h\"\n\n#include \"core/version.h\"\n\n#include \"../../data/spells/spell.h\"\n#include \"../../database/ess_resource_db.h\"\n#include \"../../singletons/ess.h\"\n#include \"../entity.h\"\n\n#include \"../../defines.h\"\n\nfloat AuraData::damage_get_count() {\n\treturn _damage_already_taken;\n}\n\nvoid AuraData::damage_set_count(int damageTaken) {\n\t_damage_already_taken = damageTaken;\n}\n\nint AuraData::get_aura_id() {\n\treturn _aura_id;\n}\n\nvoid AuraData::set_aura_id(int value) {\n\t_aura_id = value;\n}\n\nbool AuraData::get_is_timed() {\n\treturn _is_timed;\n}\nvoid AuraData::set_is_timed(bool value) {\n\t_is_timed = value;\n}\n\nfloat AuraData::get_remaining_time() {\n\treturn _remaining_time;\n}\n\nvoid AuraData::set_remaining_time(float value) {\n\t_remaining_time = value;\n}\n\nbool AuraData::update(float delta) {\n\tif (_tick > 0.01) {\n\t\t_time_since_last_tick += delta;\n\n\t\twhile (_time_since_last_tick >= _tick) {\n\t\t\t_time_since_last_tick -= _tick;\n\t\t\t++_unhandled_ticks;\n\t\t}\n\t}\n\n\tif (_is_timed) {\n\t\t_remaining_time -= delta;\n\n\t\tif (_remaining_time <= 0) {\n\t\t\t_remaining_time = 0;\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\nEntity *AuraData::get_owner() {\n\treturn _owner;\n}\nvoid AuraData::set_owner(Entity *value) {\n\t_owner = value;\n}\nvoid AuraData::set_owner_bind(Node *value) {\n\tif (!value) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(value);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_owner = e;\n}\n\nEntity *AuraData::caster_get() {\n\treturn _caster;\n}\n\nvoid AuraData::caster_set(Entity *value) {\n\t_caster = value;\n\n\tif (_caster == _owner) {\n\t\t_caster_path = NodePath(\".\");\n\t\treturn;\n\t}\n\n\tif (!value) {\n\t\t_caster_path = NodePath();\n\t\treturn;\n\t}\n\n\tif (_caster->is_inside_tree()) {\n\t\t_caster_path = _caster->get_path();\n\t}\n}\n\nvoid AuraData::caster_set_bind(Node *value) {\n\tif (!value) {\n\t\tcaster_set(NULL);\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(value);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\tcaster_set(e);\n}\n\nNodePath AuraData::caster_get_path() {\n\treturn _caster_path;\n}\nvoid AuraData::caster_set_path(NodePath value) {\n\t_caster_path = value;\n}\n\nfloat AuraData::spell_scale_get() {\n\treturn _spell_scale;\n}\n\nvoid AuraData::spell_scale_set(float value) {\n\t_spell_scale = value;\n}\n\nRef<Spell> AuraData::get_aura() {\n\t//if (_aura == NULL) {\n\t//TODO fix!\n\t//_aura = Auras::getInstance()->GetData(get_aura_id());\n\t//}\n\n\treturn _aura;\n}\n\nvoid AuraData::set_aura(Ref<Spell> aura) {\n\t_aura = aura;\n\n\tif (aura.is_valid())\n\t\t_aura_path = aura->get_path();\n\telse\n\t\t_aura_path = \"\";\n}\n\nint AuraData::damage_get() {\n\treturn _damage;\n}\n\nvoid AuraData::damage_set(int value) {\n\t_damage = value;\n}\n\nfloat AuraData::get_tick() {\n\treturn _tick;\n}\n\nvoid AuraData::set_tick(float value) {\n\t_tick = value;\n}\n\nfloat AuraData::get_time_since_last_tick() {\n\treturn _time_since_last_tick;\n}\n\nvoid AuraData::set_time_since_last_tick(float value) {\n\t_time_since_last_tick = value;\n}\n\nint AuraData::get_unhandled_ticks() {\n\treturn _unhandled_ticks;\n}\n\nvoid AuraData::set_unhandled_ticks(int value) {\n\t_unhandled_ticks = value;\n}\n\nint AuraData::damage_get_taken() {\n\treturn _damage_already_taken;\n}\n\nvoid AuraData::damage_set_taken(int value) {\n\t_damage_already_taken = value;\n}\n\nvoid AuraData::refresh(float remaining_time) {\n\t_remaining_time = remaining_time;\n\t_damage_already_taken = 0;\n\t_time_since_last_tick = (float)0;\n\n\t//_diminishing_level_count += 1;\n}\n\n/*\nvoid AuraData::refresh(float remaining_time) {\n\t_diminishing_level_count += 1;\n}\n\n\nvoid AuraData::refresh(float remaining_time) {\n\t_damage_already_taken = 0;\n}\n\nvoid AuraData::refresh(float remaining_time) {\n\t_remaining_time = _remaining_time;\n\t_time_since_last_tick = (float)0;\n}\n\n\nvoid AuraData::refresh(float remaining_time) {\n\t_time_since_last_tick = (float)0;\n}*/\n\nint AuraData::heal_get() {\n\treturn _heal;\n}\n\nvoid AuraData::heal_set(int value) {\n\t_heal = value;\n}\n\nint AuraData::get_remaining_absorb() {\n\treturn _remaining_absorb;\n}\n\nvoid AuraData::set_remaining_absorb(int value) {\n\t_remaining_absorb = value;\n}\n\nfloat AuraData::get_slow() {\n\treturn _slow;\n}\n\nvoid AuraData::set_slow(float value) {\n\t_slow = value;\n}\n\nvoid AuraData::resolve_references(Node *owner) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(owner));\n\n\tERR_FAIL_COND(!owner->is_inside_tree());\n\n\t_owner = Object::cast_to<Entity>(owner);\n\n\tif (owner->is_inside_tree()) {\n\t\t_caster = Object::cast_to<Entity>(owner->get_node_or_null(_caster_path));\n\t}\n}\nDictionary AuraData::to_dict() {\n\treturn call(\"_to_dict\");\n}\nvoid AuraData::from_dict(const Dictionary &dict) {\n\tcall(\"_from_dict\", dict);\n}\nDictionary AuraData::_to_dict() {\n\tDictionary dict;\n\n\tdict[\"aura_id\"] = _aura_id;\n\tdict[\"aura_path\"] = _aura_path;\n\tdict[\"remaining_time\"] = _remaining_time;\n\tdict[\"caster_path\"] = _caster_path;\n\n\tdict[\"spell_scale\"] = _spell_scale;\n\tdict[\"aura_group\"] = _aura_group;\n\tdict[\"aura_id\"] = _aura->get_id();\n\n\tdict[\"is_timed\"] = _is_timed;\n\tdict[\"damage\"] = _damage;\n\tdict[\"heal\"] = _heal;\n\tdict[\"slow\"] = _slow;\n\tdict[\"remaining_absorb\"] = _remaining_absorb;\n\tdict[\"tick\"] = _tick;\n\tdict[\"time_since_last_tick\"] = _time_since_last_tick;\n\tdict[\"damage_already_taken\"] = _damage_already_taken;\n\tdict[\"unhandled_ticks\"] = _unhandled_ticks;\n\n\treturn dict;\n}\nvoid AuraData::_from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\tERR_FAIL_COND(!ESS::get_singleton()->get_resource_db().is_valid());\n\n\t_aura_id = dict.get(\"aura_id\", 0);\n\t_aura_path = dict.get(\"aura_path\", \"\");\n\t_remaining_time = dict.get(\"remaining_time\", 0);\n\t_caster_path = dict.get(\"caster_path\", NodePath());\n\n\t_spell_scale = dict.get(\"spell_scale\", 0);\n\n\t_aura_group = dict.get(\"aura_group\", 0);\n\t//int aura_id = dict.get(\"aura_id\", 0);\n\n\t_aura = ESS::get_singleton()->get_resource_db()->get_spell_path(_aura_path);\n\n\t_is_timed = dict.get(\"is_timed\", true);\n\t_damage = dict.get(\"damage\", 0);\n\t_heal = dict.get(\"heal\", 0);\n\t_slow = dict.get(\"slow\", 0);\n\t_remaining_absorb = dict.get(\"remaining_absorb\", 0);\n\n\t_tick = dict.get(\"tick\", 0);\n\t_time_since_last_tick = dict.get(\"time_since_last_tick\", 0);\n\t_damage_already_taken = dict.get(\"damage_already_taken\", 0);\n\t_unhandled_ticks = dict.get(\"unhandled_ticks\", 0);\n}\n\nArray AuraData::to_send_array() {\n\treturn call(\"_to_send_array\");\n}\nvoid AuraData::from_send_array(const Array &arr) {\n\tcall(\"_from_send_array\", arr);\n}\nArray AuraData::_to_send_array() {\n\tArray arr;\n\n\tarr.append(_aura_id);\n\tarr.append(_remaining_time);\n\n\treturn arr;\n}\nvoid AuraData::_from_send_array(const Array &arr) {\n\tERR_FAIL_COND(arr.size() < 2);\n\n\t_aura_id = arr.get(0);\n\t_remaining_time = arr.get(1);\n}\n\nAuraData::AuraData() {\n\t_owner = NULL;\n\t_aura_id = 0;\n\t_remaining_time = 0;\n\t_caster = NULL;\n\t_spell_scale = 0;\n\t_aura_group = 0;\n\n\t_is_timed = false;\n\t_damage = 0;\n\t_heal = 0;\n\t_slow = 0;\n\t_remaining_absorb = 0;\n\t_tick = 0;\n\t_time_since_last_tick = 0;\n\t_damage_already_taken = 0;\n\t_unhandled_ticks = 0;\n}\n\nvoid AuraData::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_aura_id\"), &AuraData::get_aura_id);\n\tClassDB::bind_method(D_METHOD(\"set_aura_id\", \"value\"), &AuraData::set_aura_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"aura_id\"), \"set_aura_id\", \"get_aura_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_is_timed\"), &AuraData::get_is_timed);\n\tClassDB::bind_method(D_METHOD(\"set_is_timed\", \"value\"), &AuraData::set_is_timed);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"is_timed\"), \"set_is_timed\", \"get_is_timed\");\n\n\tClassDB::bind_method(D_METHOD(\"get_remaining_time\"), &AuraData::get_remaining_time);\n\tClassDB::bind_method(D_METHOD(\"set_remaining_time\", \"value\"), &AuraData::set_remaining_time);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"remaining_time\"), \"set_remaining_time\", \"get_remaining_time\");\n\n\tClassDB::bind_method(D_METHOD(\"get_owner\"), &AuraData::get_owner);\n\tClassDB::bind_method(D_METHOD(\"set_owner\", \"value\"), &AuraData::set_owner_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"owner\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", 0), \"set_owner\", \"get_owner\");\n\n\tClassDB::bind_method(D_METHOD(\"caster_get\"), &AuraData::caster_get);\n\tClassDB::bind_method(D_METHOD(\"caster_set\", \"value\"), &AuraData::caster_set_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"caster\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", 0), \"caster_set\", \"caster_get\");\n\n\tClassDB::bind_method(D_METHOD(\"caster_get_path\"), &AuraData::caster_get_path);\n\tClassDB::bind_method(D_METHOD(\"caster_set_path\", \"value\"), &AuraData::caster_set_path);\n\tADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, \"caster_path\"), \"caster_set_path\", \"caster_get_path\");\n\n\tClassDB::bind_method(D_METHOD(\"get_aura\"), &AuraData::get_aura);\n\tClassDB::bind_method(D_METHOD(\"set_aura\", \"value\"), &AuraData::set_aura);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura\", PROPERTY_HINT_RESOURCE_TYPE, \"Aura\"), \"set_aura\", \"get_aura\");\n\n\tClassDB::bind_method(D_METHOD(\"refresh\", \"remaining\"), &AuraData::refresh);\n\n\tClassDB::bind_method(D_METHOD(\"damage_get\"), &AuraData::damage_get);\n\tClassDB::bind_method(D_METHOD(\"damage_set\", \"value\"), &AuraData::damage_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"damage\"), \"damage_set\", \"damage_get\");\n\n\tClassDB::bind_method(D_METHOD(\"damage_get_count\"), &AuraData::damage_get_count);\n\tClassDB::bind_method(D_METHOD(\"damage_set_count\", \"value\"), &AuraData::damage_set_count);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"damage_count\"), \"damage_set_count\", \"damage_get_count\");\n\n\tClassDB::bind_method(D_METHOD(\"get_tick\"), &AuraData::get_tick);\n\tClassDB::bind_method(D_METHOD(\"set_tick\", \"value\"), &AuraData::set_tick);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"tick\"), \"set_tick\", \"get_tick\");\n\n\tClassDB::bind_method(D_METHOD(\"get_time_since_last_tick\"), &AuraData::get_time_since_last_tick);\n\tClassDB::bind_method(D_METHOD(\"set_time_since_last_tick\", \"value\"), &AuraData::set_time_since_last_tick);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"time_since_last_tick\"), \"set_time_since_last_tick\", \"get_time_since_last_tick\");\n\n\tClassDB::bind_method(D_METHOD(\"get_unhandled_ticks\"), &AuraData::get_unhandled_ticks);\n\tClassDB::bind_method(D_METHOD(\"set_unhandled_ticks\", \"value\"), &AuraData::set_unhandled_ticks);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"unhandled_ticks\"), \"set_unhandled_ticks\", \"get_unhandled_ticks\");\n\n\tClassDB::bind_method(D_METHOD(\"damage_get_taken\"), &AuraData::damage_get_taken);\n\tClassDB::bind_method(D_METHOD(\"damage_set_taken\", \"value\"), &AuraData::damage_set_taken);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"damage_taken\"), \"damage_set_taken\", \"damage_get_taken\");\n\n\tClassDB::bind_method(D_METHOD(\"heal_get\"), &AuraData::heal_get);\n\tClassDB::bind_method(D_METHOD(\"heal_set\", \"value\"), &AuraData::heal_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"heal\"), \"heal_set\", \"heal_get\");\n\n\tClassDB::bind_method(D_METHOD(\"get_remaining_absorb\"), &AuraData::get_remaining_absorb);\n\tClassDB::bind_method(D_METHOD(\"set_remaining_absorb\", \"value\"), &AuraData::set_remaining_absorb);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"remaining_absorb\"), \"heal_set\", \"get_remaining_absorb\");\n\n\tClassDB::bind_method(D_METHOD(\"get_slow\"), &AuraData::get_slow);\n\tClassDB::bind_method(D_METHOD(\"set_slow\", \"value\"), &AuraData::set_slow);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"slow\"), \"set_slow\", \"get_slow\");\n\n\t//Serialization\n\t//GDVIRTUAL_BIND(\"_from_dict\", \"dict\");\n\t//GDVIRTUAL_BIND(\"_to_dict\");\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &AuraData::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &AuraData::to_dict);\n\tClassDB::bind_method(D_METHOD(\"_from_dict\", \"dict\"), &AuraData::_from_dict);\n\tClassDB::bind_method(D_METHOD(\"_to_dict\"), &AuraData::_to_dict);\n\n\t//Networking\n\t//GDVIRTUAL_BIND(\"_to_send_array\");\n\t//GDVIRTUAL_BIND(\"_from_send_array\", \"arr\");\n\n\tClassDB::bind_method(D_METHOD(\"to_send_array\"), &AuraData::to_send_array);\n\tClassDB::bind_method(D_METHOD(\"from_send_array\", \"arr\"), &AuraData::from_send_array);\n\n\tClassDB::bind_method(D_METHOD(\"_to_send_array\"), &AuraData::_to_send_array);\n\tClassDB::bind_method(D_METHOD(\"_from_send_array\", \"arr\"), &AuraData::_from_send_array);\n}\n"
  },
  {
    "path": "entities/auras/aura_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef AURA_DATA_H\n#define AURA_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/variant/array.h\"\n#include \"core/variant/dictionary.h\"\n\n\n#include \"../../spell_enums.h\"\n\nclass Spell;\nclass Entity;\n\nclass AuraData : public Resource {\n\tGDCLASS(AuraData, Resource);\n\npublic:\n\tint get_aura_id();\n\tvoid set_aura_id(int value);\n\n\tbool get_is_timed();\n\tvoid set_is_timed(bool value);\n\n\tfloat get_remaining_time();\n\tvoid set_remaining_time(float value);\n\tbool update(float delta);\n\n\tEntity *get_owner();\n\tvoid set_owner(Entity *value);\n\tvoid set_owner_bind(Node *value);\n\n\tEntity *caster_get();\n\tvoid caster_set(Entity *value);\n\tvoid caster_set_bind(Node *value);\n\n\tNodePath caster_get_path();\n\tvoid caster_set_path(NodePath value);\n\n\tfloat spell_scale_get();\n\tvoid spell_scale_set(float value);\n\n\tRef<Spell> get_aura();\n\tvoid set_aura(Ref<Spell> aura);\n\n\tvoid refresh(float remaining);\n\n\tint damage_get();\n\tvoid damage_set(int value);\n\n\tfloat damage_get_count();\n\tvoid damage_set_count(int damageTaken);\n\n\tfloat get_tick();\n\tvoid set_tick(float value);\n\n\tfloat get_time_since_last_tick();\n\tvoid set_time_since_last_tick(float value);\n\n\tint get_unhandled_ticks();\n\tvoid set_unhandled_ticks(int value);\n\n\tint damage_get_taken();\n\tvoid damage_set_taken(int value);\n\n\tint heal_get();\n\tvoid heal_set(int value);\n\n\tint get_remaining_absorb();\n\tvoid set_remaining_absorb(int remaining_timeAbsorb);\n\n\tfloat get_slow();\n\tvoid set_slow(float value);\n\n\tvoid resolve_references(Node *owner);\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\tDictionary _to_dict();\n\tvoid _from_dict(const Dictionary &dict);\n\n\tArray to_send_array();\n\tvoid from_send_array(const Array &arr);\n\tArray _to_send_array();\n\tvoid _from_send_array(const Array &arr);\n\n\tAuraData();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tEntity *_owner;\n\tint _aura_id;\n\tStringName _aura_path;\n\tfloat _remaining_time;\n\tEntity *_caster;\n\tNodePath _caster_path;\n\tfloat _spell_scale;\n\tint _aura_group;\n\tRef<Spell> _aura;\n\n\tbool _is_timed;\n\tint _damage;\n\tint _heal;\n\tfloat _slow;\n\tint _remaining_absorb;\n\tfloat _tick;\n\tfloat _time_since_last_tick;\n\tint _damage_already_taken;\n\tint _unhandled_ticks;\n};\n\n#endif\n"
  },
  {
    "path": "entities/data/character_spec.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"character_spec.h\"\n\n#include \"../../data/spells/spell.h\"\n\n#include \"../../defines.h\"\n\nint CharacterSpec::get_id() const {\n\treturn _id;\n}\nvoid CharacterSpec::set_id(const int value) {\n\t_id = value;\n}\n\nint CharacterSpec::get_num_rows() const {\n\treturn _rows.size();\n}\nvoid CharacterSpec::set_num_rows(const int value) {\n\t_rows.resize(value);\n}\n\nint CharacterSpec::get_num_columns(const int row) const {\n\tERR_FAIL_INDEX_V(row, _rows.size(), 0);\n\n\treturn _rows[row].size();\n}\nvoid CharacterSpec::set_num_columns(const int row, const int value) {\n\tERR_FAIL_INDEX(row, _rows.size());\n\n\t_rows.write[row].resize(value);\n}\n\nint CharacterSpec::get_num_ranks(const int row, const int column) const {\n\tERR_FAIL_INDEX_V(row, _rows.size(), 0);\n\tERR_FAIL_INDEX_V(column, _rows[row].size(), 0);\n\n\treturn _rows[row][column].size();\n}\nvoid CharacterSpec::set_num_ranks(const int row, const int column, const int value) {\n\tERR_FAIL_INDEX(row, _rows.size());\n\n\t_rows.write[row].write[column].resize(value);\n}\n\nVector<Variant> CharacterSpec::get_talents() {\n\tVector<Variant> r;\n\tfor (int i = 0; i < _rows.size(); i++) {\n\t\tVector<Variant> col;\n\n\t\tfor (int j = 0; j < _rows[i].size(); j++) {\n\t\t\tVector<Variant> entries;\n\n\t\t\tfor (int k = 0; k < _rows[j].size(); k++) {\n#if GODOT4\n\t\t\t\tentries.push_back(_rows[i][j][k]);\n#else\n\t\t\t\tentries.push_back(_rows[i][j][k].get_ref_ptr());\n#endif\n\t\t\t}\n\n\t\t\tcol.push_back(entries);\n\t\t}\n\n\t\tr.push_back(col);\n\t}\n\n\treturn r;\n}\n\nRef<Spell> CharacterSpec::get_talent(const int row, const int column, const int rank) {\n\tERR_FAIL_INDEX_V(row, _rows.size(), Ref<Spell>());\n\tERR_FAIL_INDEX_V(column, _rows[row].size(), Ref<Spell>());\n\tERR_FAIL_INDEX_V(rank, _rows[row][column].size(), Ref<Spell>());\n\n\treturn _rows[row][column][rank];\n}\nvoid CharacterSpec::set_talent(const int row, const int column, const int rank, const Ref<Spell> &talent) {\n\tERR_FAIL_INDEX(row, _rows.size());\n\tERR_FAIL_INDEX(column, _rows[row].size());\n\tERR_FAIL_INDEX(rank, _rows[row][column].size());\n\n\t_rows.write[row].write[column].write[rank] = talent;\n}\n\nbool CharacterSpec::has_talent_with_id(const int id) {\n\tfor (int i = 0; i < _rows.size(); ++i) {\n\t\tfor (int j = 0; j < _rows[i].size(); ++j) {\n\t\t\tfor (int k = 0; k < _rows[i][j].size(); ++k) {\n\t\t\t\tconst Ref<Spell> a = _rows[i][j][k];\n\n\t\t\t\tif (a.is_valid() && a->get_id() == id)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\nRef<Spell> CharacterSpec::get_talent_with_id(const int id) {\n\tfor (int i = 0; i < _rows.size(); ++i) {\n\t\tfor (int j = 0; j < _rows[i].size(); ++j) {\n\t\t\tfor (int k = 0; k < _rows[i][j].size(); ++k) {\n\t\t\t\tconst Ref<Spell> a = _rows[i][j][k];\n\n\t\t\t\tif (a.is_valid() && a->get_id() == id)\n\t\t\t\t\treturn a;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn Ref<Spell>();\n}\n\nCharacterSpec::CharacterSpec() {\n\t_id = 0;\n}\n\nCharacterSpec::~CharacterSpec() {\n\tfor (int i = 0; i < _rows.size(); ++i) {\n\t\tfor (int j = 0; j < _rows[i].size(); ++j) {\n\t\t\tfor (int k = 0; k < _rows[i][j].size(); ++k) {\n\t\t\t\t_rows.write[i].write[j].write[k].unref();\n\t\t\t}\n\t\t}\n\t}\n\n\t_rows.clear();\n}\n\nbool CharacterSpec::_set(const StringName &p_name, const Variant &p_value) {\n\tString name = p_name;\n\n\tif (name.begins_with(\"row_\")) {\n\t\tString nprop = name.get_slicec('/', 0); //row_[]\n\t\tint row_id = nprop.get_slicec('_', 1).to_int();\n\n\t\tif (row_id >= _rows.size()) {\n\t\t\t_rows.resize(row_id + 1);\n\t\t}\n\n\t\tString cprop = name.get_slicec('/', 1); //column_[] or size\n\n\t\tif (cprop == \"size\") {\n\t\t\t_rows.write[row_id].resize(p_value);\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\tint col_id = cprop.get_slicec('_', 1).to_int();\n\n\t\t\tif (col_id >= _rows[row_id].size()) {\n\t\t\t\t_rows.write[row_id].resize(col_id + 1);\n\t\t\t}\n\n\t\t\tString eprop = name.get_slicec('/', 2); //entry_[] or size\n\n\t\t\tif (eprop == \"size\") {\n\t\t\t\t_rows.write[row_id].write[col_id].resize(p_value);\n\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tint entry_id = eprop.get_slicec('_', 1).to_int();\n\n\t\t\t\tif (entry_id >= _rows[row_id][col_id].size()) {\n\t\t\t\t\t_rows.write[row_id].write[col_id].resize(col_id + 1);\n\t\t\t\t}\n\n\t\t\t\t_rows.write[row_id].write[col_id].write[entry_id] = p_value;\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\nbool CharacterSpec::_get(const StringName &p_name, Variant &r_ret) const {\n\tString name = p_name;\n\n\tif (name.begins_with(\"row_\")) {\n\t\tString nprop = name.get_slicec('/', 0); //row_[]\n\t\tint row_id = nprop.get_slicec('_', 1).to_int();\n\n\t\tif (row_id >= _rows.size()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tString cprop = name.get_slicec('/', 1); //column_[] or size\n\n\t\tif (cprop == \"size\") {\n\t\t\tr_ret = _rows[row_id].size();\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\tint col_id = cprop.get_slicec('_', 1).to_int();\n\n\t\t\tif (col_id >= _rows[row_id].size()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tString eprop = name.get_slicec('/', 2); //entry_[] or size\n\n\t\t\tif (eprop == \"size\") {\n\t\t\t\tr_ret = _rows[row_id][col_id].size();\n\n\t\t\t\treturn true;\n\t\t\t} else {\n\n\t\t\t\tint entry_id = eprop.get_slicec('_', 1).to_int();\n\n\t\t\t\tif (entry_id >= _rows[row_id][col_id].size()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tr_ret = _rows[row_id][col_id][entry_id];\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n\n\treturn false;\n}\n\nvoid CharacterSpec::_get_property_list(List<PropertyInfo> *p_list) const {\n\tfor (int i = 0; i < _rows.size(); ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::INT, \"row_\" + itos(i) + \"/size\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED));\n\n\t\tfor (int j = 0; j < _rows[i].size(); ++j) {\n\t\t\tp_list->push_back(PropertyInfo(Variant::INT, \"row_\" + itos(i) + \"/column_\" + itos(j) + \"/size\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED));\n\n\t\t\tfor (int k = 0; k < _rows[i][j].size(); ++k) {\n\t\t\t\tp_list->push_back(PropertyInfo(Variant::OBJECT, \"row_\" + itos(i) + \"/column_\" + itos(j) + \"/entry_\" + itos(k), PROPERTY_HINT_RESOURCE_TYPE, \"Spell\", PROPERTY_USAGE_DEFAULT));\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid CharacterSpec::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &CharacterSpec::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &CharacterSpec::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_name\", \"get_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_num_rows\"), &CharacterSpec::get_num_rows);\n\tClassDB::bind_method(D_METHOD(\"set_num_rows\", \"value\"), &CharacterSpec::set_num_rows);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"num_rows\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_num_rows\", \"get_num_rows\");\n\n\tClassDB::bind_method(D_METHOD(\"get_num_columns\", \"row\"), &CharacterSpec::get_num_columns);\n\tClassDB::bind_method(D_METHOD(\"set_num_columns\", \"row\", \"value\"), &CharacterSpec::set_num_columns);\n\n\tClassDB::bind_method(D_METHOD(\"get_num_ranks\", \"row\", \"culomn\"), &CharacterSpec::get_num_ranks);\n\tClassDB::bind_method(D_METHOD(\"set_num_ranks\", \"row\", \"culomn\", \"value\"), &CharacterSpec::set_num_ranks);\n\n\tClassDB::bind_method(D_METHOD(\"get_talents\"), &CharacterSpec::get_talents);\n\n\tClassDB::bind_method(D_METHOD(\"get_talent\", \"row\", \"culomn\", \"rank\"), &CharacterSpec::get_talent);\n\tClassDB::bind_method(D_METHOD(\"set_talent\", \"row\", \"culomn\", \"rank\"), &CharacterSpec::set_talent);\n\n\tClassDB::bind_method(D_METHOD(\"has_talent_with_id\", \"id\"), &CharacterSpec::has_talent_with_id);\n\tClassDB::bind_method(D_METHOD(\"get_talent_with_id\", \"id\"), &CharacterSpec::get_talent_with_id);\n}\n"
  },
  {
    "path": "entities/data/character_spec.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef CHARACTER_SPEC_H\n#define CHARACTER_SPEC_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n#include \"core/string/ustring.h\"\n\n\nclass Spell;\n\nclass CharacterSpec : public Resource {\n\tGDCLASS(CharacterSpec, Resource);\n\npublic:\n\tint get_id() const;\n\tvoid set_id(const int value);\n\n\tint get_num_rows() const;\n\tvoid set_num_rows(const int value);\n\n\tint get_num_columns(const int row) const;\n\tvoid set_num_columns(const int row, const int value);\n\n\tint get_num_ranks(const int row, const int column) const;\n\tvoid set_num_ranks(const int row, const int column, const int value);\n\n\tVector<Variant> get_talents();\n\n\tRef<Spell> get_talent(const int row, const int column, const int rank);\n\tvoid set_talent(const int row, const int column, const int rank, const Ref<Spell> &talent);\n\n\tbool has_talent_with_id(const int id);\n\tRef<Spell> get_talent_with_id(const int id);\n\n\tCharacterSpec();\n\t~CharacterSpec();\n\nprotected:\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tstatic void _bind_methods();\n\nprivate:\n\tint _id;\n\tVector<Vector<Vector<Ref<Spell> > > > _rows;\n};\n\n#endif\n"
  },
  {
    "path": "entities/data/entity_class_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_class_data.h\"\n\n#include \"../../data/items/craft_recipe.h\"\n#include \"../../data/items/item_instance.h\"\n#include \"../../data/spells/spell.h\"\n#include \"../../entities/stats/stat_data.h\"\n#include \"../../infos/spell_cast_info.h\"\n#include \"../ai/entity_ai.h\"\n#include \"../entity.h\"\n#include \"character_spec.h\"\n#include \"item_container_data.h\"\n#include \"vendor_item_data.h\"\n\n#include \"../../defines.h\"\n\nint EntityClassData::get_id() {\n\treturn _id;\n}\nvoid EntityClassData::set_id(int value) {\n\t_id = value;\n}\n\nString EntityClassData::get_text_description() {\n\treturn _text_description;\n}\nvoid EntityClassData::set_text_description(String value) {\n\t_text_description = value;\n}\n\nRef<Texture> EntityClassData::get_icon() {\n\treturn _icon;\n}\nvoid EntityClassData::set_icon(Ref<Texture> value) {\n\t_icon = Ref<Texture>(value);\n}\n\nint EntityClassData::get_spell_points_per_level() {\n\treturn _spell_points_per_level;\n}\nvoid EntityClassData::set_spell_points_per_level(int value) {\n\t_spell_points_per_level = value;\n}\n\nEntityEnums::EntityClassPlaystyleType EntityClassData::get_playstyle_type() {\n\treturn _playstyle_type;\n}\nvoid EntityClassData::set_playstyle_type(EntityEnums::EntityClassPlaystyleType playstyle_type) {\n\t_playstyle_type = playstyle_type;\n}\n\nRef<StatData> EntityClassData::get_stat_data() {\n\treturn _stat_data;\n}\n\nvoid EntityClassData::set_stat_data(Ref<StatData> value) {\n\t_stat_data = value;\n}\n\n////    Entity Resources    ////\n\nint EntityClassData::get_num_entity_resources() {\n\treturn _entity_resources.size();\n}\nvoid EntityClassData::set_num_entity_resources(int value) {\n\t_entity_resources.resize(value);\n}\n\nRef<EntityResource> EntityClassData::get_entity_resource(int index) const {\n\tERR_FAIL_INDEX_V(index, _entity_resources.size(), Ref<EntityResource>());\n\n\treturn _entity_resources[index];\n}\nvoid EntityClassData::set_entity_resource(int index, Ref<EntityResource> entity_resource) {\n\tERR_FAIL_INDEX(index, _entity_resources.size());\n\n\t_entity_resources.set(index, Ref<EntityResource>(entity_resource));\n}\n\nVector<Variant> EntityClassData::get_entity_resources() {\n\tVARIANT_ARRAY_GET(_entity_resources);\n}\nvoid EntityClassData::set_entity_resources(const Vector<Variant> &entity_resources) {\n\t_entity_resources.clear();\n\tfor (int i = 0; i < entity_resources.size(); i++) {\n\t\tRef<EntityResource> entity_resource = Ref<EntityResource>(entity_resources[i]);\n\n\t\t_entity_resources.push_back(entity_resource);\n\t}\n}\n\n////    SPECS    ////\n\nint EntityClassData::get_num_specs() {\n\treturn _specs.size();\n}\nvoid EntityClassData::set_num_specs(int value) {\n\t_specs.resize(value);\n}\n\nRef<CharacterSpec> EntityClassData::get_spec(int index) const {\n\tERR_FAIL_INDEX_V(index, _specs.size(), Ref<CharacterSpec>());\n\n\treturn _specs[index];\n}\nvoid EntityClassData::set_spec(int index, Ref<CharacterSpec> spec) {\n\tERR_FAIL_INDEX(index, _specs.size());\n\n\t_specs.set(index, Ref<CharacterSpec>(spec));\n}\n\nVector<Variant> EntityClassData::get_specs() {\n\tVARIANT_ARRAY_GET(_specs);\n}\nvoid EntityClassData::set_specs(const Vector<Variant> &specs) {\n\t_specs.clear();\n\tfor (int i = 0; i < specs.size(); i++) {\n\t\tRef<CharacterSpec> spec = Ref<CharacterSpec>(specs[i]);\n\n\t\t_specs.push_back(spec);\n\t}\n}\n\n////    SPELLS    ////\n\nint EntityClassData::get_num_spells() {\n\treturn _spells.size();\n}\nvoid EntityClassData::set_num_spells(int value) {\n\t_spells.resize(value);\n}\n\nRef<Spell> EntityClassData::get_spell(int index) {\n\tERR_FAIL_INDEX_V(index, _spells.size(), Ref<Spell>());\n\n\treturn _spells[index];\n}\nvoid EntityClassData::set_spell(int index, Ref<Spell> spell) {\n\tERR_FAIL_INDEX(index, _spells.size());\n\n\t_spells.set(index, Ref<Spell>(spell));\n}\n\nVector<Variant> EntityClassData::get_spells() {\n\tVARIANT_ARRAY_GET(_spells);\n}\nvoid EntityClassData::set_spells(const Vector<Variant> &spells) {\n\t_spells.clear();\n\tfor (int i = 0; i < spells.size(); i++) {\n\t\tRef<Spell> spell = Ref<Spell>(spells[i]);\n\n\t\t_spells.push_back(spell);\n\t}\n}\n\n////    Start Spells    ////\n\nint EntityClassData::get_num_start_spells() {\n\treturn _start_spells.size();\n}\nvoid EntityClassData::set_num_start_spells(int value) {\n\t_start_spells.resize(value);\n}\n\nRef<Spell> EntityClassData::get_start_spell(int index) {\n\tERR_FAIL_INDEX_V(index, _start_spells.size(), Ref<Spell>());\n\n\treturn _start_spells[index];\n}\nvoid EntityClassData::set_start_spell(int index, Ref<Spell> spell) {\n\tERR_FAIL_INDEX(index, _start_spells.size());\n\n\t_start_spells.set(index, Ref<Spell>(spell));\n}\n\nVector<Variant> EntityClassData::get_start_spells() {\n\tVARIANT_ARRAY_GET(_start_spells);\n}\nvoid EntityClassData::set_start_spells(const Vector<Variant> &spells) {\n\t_start_spells.clear();\n\tfor (int i = 0; i < spells.size(); i++) {\n\t\tRef<Spell> spell = Ref<Spell>(spells[i]);\n\n\t\t_start_spells.push_back(spell);\n\t}\n}\n\n////    AURAS    ////\n\nint EntityClassData::get_num_auras() {\n\treturn _auras.size();\n}\nvoid EntityClassData::set_num_auras(int value) {\n\t_auras.resize(value);\n}\n\nRef<Spell> EntityClassData::get_aura(int index) {\n\tERR_FAIL_INDEX_V(index, _auras.size(), Ref<Spell>());\n\n\treturn _auras[index];\n}\nvoid EntityClassData::set_aura(int index, Ref<Spell> aura) {\n\tERR_FAIL_INDEX(index, _auras.size());\n\n\t_auras.set(index, aura);\n}\n\nVector<Variant> EntityClassData::get_auras() {\n\tVARIANT_ARRAY_GET(_auras);\n}\nvoid EntityClassData::set_auras(const Vector<Variant> &auras) {\n\t_auras.clear();\n\tfor (int i = 0; i < auras.size(); i++) {\n\t\tRef<Spell> aura = Ref<Spell>(auras[i]);\n\n\t\t_auras.push_back(aura);\n\t}\n}\n\nRef<VendorItemData> EntityClassData::get_vendor_item_data() const {\n\treturn _vendor_item_data;\n}\nvoid EntityClassData::set_vendor_item_data(const Ref<VendorItemData> &data) {\n\t_vendor_item_data = data;\n}\n\nRef<VendorItemData> EntityClassData::get_spell_train_data() const {\n\treturn _spell_train_data;\n}\nvoid EntityClassData::set_spell_train_data(const Ref<VendorItemData> &data) {\n\t_spell_train_data = data;\n}\n\nRef<ItemContainerData> EntityClassData::get_item_container_data() const {\n\treturn _item_container_data;\n}\nvoid EntityClassData::set_item_container_data(const Ref<ItemContainerData> &data) {\n\t_item_container_data = data;\n}\n\n//Craft Recipes\nint EntityClassData::get_num_craft_recipes() const {\n\treturn _craft_recipes.size();\n}\n\nRef<CraftRecipe> EntityClassData::get_craft_recipe(int index) {\n\tERR_FAIL_INDEX_V(index, _craft_recipes.size(), Ref<CraftRecipe>());\n\n\treturn _craft_recipes[index];\n}\nvoid EntityClassData::set_craft_recipe(int index, const Ref<CraftRecipe> &craft_data) {\n\tERR_FAIL_INDEX(index, _craft_recipes.size());\n\n\t_craft_recipes.set(index, craft_data);\n}\n\nVector<Variant> EntityClassData::get_craft_recipes() const {\n\tVARIANT_ARRAY_GET(_craft_recipes);\n}\nvoid EntityClassData::set_craft_recipes(const Vector<Variant> &craft_datas) {\n\t_craft_recipes.clear();\n\tfor (int i = 0; i < craft_datas.size(); i++) {\n\t\tRef<CraftRecipe> craft_data = Ref<CraftRecipe>(craft_datas[i]);\n\n\t\t_craft_recipes.push_back(craft_data);\n\t}\n}\n\n////    AI ACTIONS    ////\n\nint EntityClassData::get_num_ais() {\n\treturn _ais.size();\n}\nvoid EntityClassData::set_num_ais(int value) {\n\t_ais.resize(value);\n}\n\nRef<EntityAI> EntityClassData::get_ai(int index) {\n\tERR_FAIL_INDEX_V(index, _ais.size(), Ref<EntityAI>());\n\n\treturn _ais[index];\n}\nvoid EntityClassData::set_ai(int index, Ref<EntityAI> ai) {\n\tERR_FAIL_INDEX(index, _ais.size());\n\n\t_ais.set(index, ai);\n}\n\nVector<Variant> EntityClassData::get_ais() {\n\tVARIANT_ARRAY_GET(_ais);\n}\nvoid EntityClassData::set_ais(const Vector<Variant> &ais) {\n\t_ais.clear();\n\tfor (int i = 0; i < ais.size(); i++) {\n\t\tRef<EntityAI> ai = Ref<EntityAI>(ais[i]);\n\n\t\t_ais.push_back(ai);\n\t}\n}\n\nRef<EntityAI> EntityClassData::get_ai_instance() {\n\treturn call(\"_get_ai_instance\");\n}\nRef<EntityAI> EntityClassData::_get_ai_instance() {\n\tif (_ais.size() > 0) {\n\t\tRef<EntityAI> ai = _ais.get(Math::rand() % _ais.size());\n\n\t\tif (ai.is_valid()) {\n\t\t\treturn ai->duplicate();\n\t\t}\n\t}\n\n\tRef<EntityAI> ai;\n\tai.instantiate();\n\treturn ai;\n}\n\n////    SETUP    ////\n\nvoid EntityClassData::setup_resources(Entity *entity) {\n\tcall(\"_setup_resources\", entity);\n}\n\nvoid EntityClassData::_setup_resources(Node *entity) {\n\tEntity *ent = Object::cast_to<Entity>(entity);\n\n\tfor (int i = 0; i < _entity_resources.size(); ++i) {\n\t\tRef<EntityResource> res = _entity_resources.get(i);\n\n\t\tif (res.is_valid()) {\n\t\t\tRef<EntityResource> r = res->duplicate();\n\n\t\t\tent->resource_adds(r);\n\t\t}\n\t}\n}\n\nEntityClassData::EntityClassData() {\n\t_id = 0;\n\t_spell_points_per_level = 1;\n\t_playstyle_type = EntityEnums::ENTITY_CLASS_PLAYSTYLE_TYPE_MELEE;\n}\n\nEntityClassData::~EntityClassData() {\n\t_stat_data.unref();\n\n\t_spells.clear();\n\t_specs.clear();\n\t_auras.clear();\n\n\t_vendor_item_data.unref();\n\t_spell_train_data.unref();\n\t_item_container_data.unref();\n\t_craft_recipes.clear();\n\n\t_ais.clear();\n}\n\nvoid EntityClassData::_bind_methods() {\n\t//GDVIRTUAL_BIND(\"_setup_resources\", \"entity\", \"Entity\");\n\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &EntityClassData::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &EntityClassData::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_name\", \"get_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_text_description\"), &EntityClassData::get_text_description);\n\tClassDB::bind_method(D_METHOD(\"set_text_description\", \"value\"), &EntityClassData::set_text_description);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_description\"), \"set_text_description\", \"get_text_description\");\n\n\tClassDB::bind_method(D_METHOD(\"get_icon\"), &EntityClassData::get_icon);\n\tClassDB::bind_method(D_METHOD(\"set_icon\", \"value\"), &EntityClassData::set_icon);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"icon\", PROPERTY_HINT_RESOURCE_TYPE, \"Texture\"), \"set_icon\", \"get_icon\");\n\n\tClassDB::bind_method(D_METHOD(\"get_spell_points_per_level\"), &EntityClassData::get_spell_points_per_level);\n\tClassDB::bind_method(D_METHOD(\"set_spell_points_per_level\", \"value\"), &EntityClassData::set_spell_points_per_level);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"spell_points_per_level\"), \"set_spell_points_per_level\", \"get_spell_points_per_level\");\n\n\tClassDB::bind_method(D_METHOD(\"get_playstyle_type\"), &EntityClassData::get_playstyle_type);\n\tClassDB::bind_method(D_METHOD(\"set_playstyle_type\", \"value\"), &EntityClassData::set_playstyle_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"playstyle_type\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_PLAYSTYLE_TYPE), \"set_playstyle_type\", \"get_playstyle_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_stat_data\"), &EntityClassData::get_stat_data);\n\tClassDB::bind_method(D_METHOD(\"set_stat_data\", \"value\"), &EntityClassData::set_stat_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"stat_data\", PROPERTY_HINT_RESOURCE_TYPE, \"StatData\"), \"set_stat_data\", \"get_stat_data\");\n\n\t////    Entity Resources    ////\n\tClassDB::bind_method(D_METHOD(\"get_num_entity_resources\"), &EntityClassData::get_num_entity_resources);\n\tClassDB::bind_method(D_METHOD(\"set_num_entity_resources\", \"value\"), &EntityClassData::set_num_entity_resources);\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_resource\", \"index\"), &EntityClassData::get_entity_resource);\n\tClassDB::bind_method(D_METHOD(\"set_entity_resource\", \"index\", \"entity_resource\"), &EntityClassData::set_entity_resource);\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_resources\"), &EntityClassData::get_entity_resources);\n\tClassDB::bind_method(D_METHOD(\"set_entity_resources\", \"entity_resources\"), &EntityClassData::set_entity_resources);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"entity_resources\", PROPERTY_HINT_NONE, \"17/17:EntityResource\", PROPERTY_USAGE_DEFAULT, \"EntityResource\"), \"set_entity_resources\", \"get_entity_resources\");\n\n\tClassDB::bind_method(D_METHOD(\"_setup_resources\", \"entity\"), &EntityClassData::_setup_resources);\n\n\t////    Specs    ////\n\tClassDB::bind_method(D_METHOD(\"get_num_specs\"), &EntityClassData::get_num_specs);\n\tClassDB::bind_method(D_METHOD(\"set_num_specs\", \"value\"), &EntityClassData::set_num_specs);\n\n\tClassDB::bind_method(D_METHOD(\"get_spec\", \"index\"), &EntityClassData::get_spec);\n\tClassDB::bind_method(D_METHOD(\"set_spec\", \"index\", \"spec\"), &EntityClassData::set_spec);\n\n\tClassDB::bind_method(D_METHOD(\"get_specs\"), &EntityClassData::get_specs);\n\tClassDB::bind_method(D_METHOD(\"set_specs\", \"specs\"), &EntityClassData::set_specs);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"specs\", PROPERTY_HINT_NONE, \"17/17:CharacterSpec\", PROPERTY_USAGE_DEFAULT, \"CharacterSpec\"), \"set_specs\", \"get_specs\");\n\n\t////    Spell    ////\n\tClassDB::bind_method(D_METHOD(\"get_num_spells\"), &EntityClassData::get_num_spells);\n\tClassDB::bind_method(D_METHOD(\"set_num_spells\", \"value\"), &EntityClassData::set_num_spells);\n\n\tClassDB::bind_method(D_METHOD(\"get_spell\", \"index\"), &EntityClassData::get_spell);\n\tClassDB::bind_method(D_METHOD(\"set_spell\", \"index\", \"spell\"), &EntityClassData::set_spell);\n\n\tClassDB::bind_method(D_METHOD(\"get_spells\"), &EntityClassData::get_spells);\n\tClassDB::bind_method(D_METHOD(\"set_spells\", \"spells\"), &EntityClassData::set_spells);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"spells\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"set_spells\", \"get_spells\");\n\n\t////    Start Spells    ////\n\tClassDB::bind_method(D_METHOD(\"get_num_start_spells\"), &EntityClassData::get_num_start_spells);\n\tClassDB::bind_method(D_METHOD(\"set_num_start_spells\", \"value\"), &EntityClassData::set_num_start_spells);\n\n\tClassDB::bind_method(D_METHOD(\"get_start_spell\", \"index\"), &EntityClassData::get_start_spell);\n\tClassDB::bind_method(D_METHOD(\"set_start_spell\", \"index\", \"spell\"), &EntityClassData::set_start_spell);\n\n\tClassDB::bind_method(D_METHOD(\"get_start_spells\"), &EntityClassData::get_start_spells);\n\tClassDB::bind_method(D_METHOD(\"set_start_spells\", \"spells\"), &EntityClassData::set_start_spells);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"start_spells\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"set_start_spells\", \"get_start_spells\");\n\n\t////    AURAS    ////\n\tClassDB::bind_method(D_METHOD(\"get_num_auras\"), &EntityClassData::get_num_auras);\n\tClassDB::bind_method(D_METHOD(\"set_num_auras\", \"value\"), &EntityClassData::set_num_auras);\n\n\tClassDB::bind_method(D_METHOD(\"get_aura\", \"index\"), &EntityClassData::get_aura);\n\tClassDB::bind_method(D_METHOD(\"set_aura\", \"index\", \"aura\"), &EntityClassData::set_aura);\n\n\tClassDB::bind_method(D_METHOD(\"get_auras\"), &EntityClassData::get_auras);\n\tClassDB::bind_method(D_METHOD(\"set_auras\", \"auras\"), &EntityClassData::set_auras);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"auras\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_DEFAULT, \"Spell\"), \"set_auras\", \"get_auras\");\n\n\t//Vendor\n\tClassDB::bind_method(D_METHOD(\"get_vendor_item_data\"), &EntityClassData::get_vendor_item_data);\n\tClassDB::bind_method(D_METHOD(\"set_vendor_item_data\", \"value\"), &EntityClassData::set_vendor_item_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"vendor_item_data\", PROPERTY_HINT_RESOURCE_TYPE, \"VendorItemData\"), \"set_vendor_item_data\", \"get_vendor_item_data\");\n\n\tClassDB::bind_method(D_METHOD(\"get_spell_train_data\"), &EntityClassData::get_spell_train_data);\n\tClassDB::bind_method(D_METHOD(\"set_spell_train_data\", \"value\"), &EntityClassData::set_spell_train_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"spell_train_data\", PROPERTY_HINT_RESOURCE_TYPE, \"VendorItemData\"), \"set_spell_train_data\", \"get_spell_train_data\");\n\n\t//ItemContainerData\n\tClassDB::bind_method(D_METHOD(\"get_item_container_data\"), &EntityClassData::get_item_container_data);\n\tClassDB::bind_method(D_METHOD(\"set_item_container_data\", \"value\"), &EntityClassData::set_item_container_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"item_container_data\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemContainerData\"), \"set_item_container_data\", \"get_item_container_data\");\n\n\t//Crafting\n\tClassDB::bind_method(D_METHOD(\"get_num_craft_recipes\"), &EntityClassData::get_num_craft_recipes);\n\n\tClassDB::bind_method(D_METHOD(\"get_craft_recipe\", \"index\"), &EntityClassData::get_craft_recipe);\n\tClassDB::bind_method(D_METHOD(\"set_craft_recipe\", \"index\", \"recipe\"), &EntityClassData::set_craft_recipe);\n\n\tClassDB::bind_method(D_METHOD(\"get_craft_recipes\"), &EntityClassData::get_craft_recipes);\n\tClassDB::bind_method(D_METHOD(\"set_craft_recipes\", \"recipe\"), &EntityClassData::set_craft_recipes);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"craft_recipes\", PROPERTY_HINT_NONE, \"17/17:CraftRecipe\", PROPERTY_USAGE_DEFAULT, \"CraftRecipe\"), \"set_craft_recipes\", \"get_craft_recipes\");\n\n\t////    AI ACTIONS    ////\n\tClassDB::bind_method(D_METHOD(\"get_num_ais\"), &EntityClassData::get_num_ais);\n\tClassDB::bind_method(D_METHOD(\"set_num_ais\", \"value\"), &EntityClassData::set_num_ais);\n\n\tClassDB::bind_method(D_METHOD(\"get_ai\", \"index\"), &EntityClassData::get_ai);\n\tClassDB::bind_method(D_METHOD(\"set_ai\", \"index\", \"action\"), &EntityClassData::set_ai);\n\n\tClassDB::bind_method(D_METHOD(\"get_ais\"), &EntityClassData::get_ais);\n\tClassDB::bind_method(D_METHOD(\"set_ais\", \"auras\"), &EntityClassData::set_ais);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"ais\", PROPERTY_HINT_NONE, \"17/17:EntityAI\", PROPERTY_USAGE_DEFAULT, \"EntityAI\"), \"set_ais\", \"get_ais\");\n\n\t//GDVIRTUAL_BIND(\"_get_ai_instance\");\n\n\tClassDB::bind_method(D_METHOD(\"get_ai_instance\"), &EntityClassData::get_ai_instance);\n\tClassDB::bind_method(D_METHOD(\"_get_ai_instance\"), &EntityClassData::_get_ai_instance);\n}\n"
  },
  {
    "path": "entities/data/entity_class_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_CLASS_DATA_H\n#define ENTITY_CLASS_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n#include \"core/string/ustring.h\"\n\n\n#include \"core/math/math_funcs.h\"\n#include \"scene/resources/texture.h\"\n\n#include \"../../entities/stats/stat_data.h\"\n#include \"../../entity_enums.h\"\n\n#include \"../../entities/auras/aura_data.h\"\n#include \"../../pipelines/spell_damage_info.h\"\n#include \"../../pipelines/spell_heal_info.h\"\n\n#include \"../../item_enums.h\"\n\n#include \"../resources/entity_resource.h\"\n\nclass Spell;\nclass Entity;\nclass ItemInstance;\nclass CharacterSpec;\nclass Entity;\nclass SpellCastInfo;\nclass EntityAI;\nclass VendorItemData;\nclass ItemContainerData;\nclass CraftRecipe;\nclass StatData;\n\nclass EntityClassData : public Resource {\n\tGDCLASS(EntityClassData, Resource);\n\npublic:\n\tint get_id();\n\tvoid set_id(int value);\n\n\tString get_text_description();\n\tvoid set_text_description(String value);\n\n\tRef<Texture> get_icon();\n\tvoid set_icon(Ref<Texture> value);\n\n\tint get_spell_points_per_level();\n\tvoid set_spell_points_per_level(int value);\n\n\tEntityEnums::EntityClassPlaystyleType get_playstyle_type();\n\tvoid set_playstyle_type(EntityEnums::EntityClassPlaystyleType playstyle_type);\n\n\tRef<StatData> get_stat_data();\n\tvoid set_stat_data(Ref<StatData> value);\n\n\t//Entity Resources\n\tint get_num_entity_resources();\n\tvoid set_num_entity_resources(int value);\n\n\tRef<EntityResource> get_entity_resource(int index) const;\n\tvoid set_entity_resource(int index, Ref<EntityResource> entity_resources);\n\n\tVector<Variant> get_entity_resources();\n\tvoid set_entity_resources(const Vector<Variant> &entity_resourcess);\n\n\t//Specs\n\tint get_num_specs();\n\tvoid set_num_specs(int value);\n\n\tRef<CharacterSpec> get_spec(int index) const;\n\tvoid set_spec(int index, Ref<CharacterSpec> spec);\n\n\tVector<Variant> get_specs();\n\tvoid set_specs(const Vector<Variant> &specs);\n\n\t//Spells\n\tint get_num_spells();\n\tvoid set_num_spells(int value);\n\n\tRef<Spell> get_spell(int index);\n\tvoid set_spell(int index, Ref<Spell> spell);\n\n\tVector<Variant> get_spells();\n\tvoid set_spells(const Vector<Variant> &spells);\n\n\t//Start Spells\n\tint get_num_start_spells();\n\tvoid set_num_start_spells(int value);\n\n\tRef<Spell> get_start_spell(int index);\n\tvoid set_start_spell(int index, Ref<Spell> spell);\n\n\tVector<Variant> get_start_spells();\n\tvoid set_start_spells(const Vector<Variant> &spells);\n\n\t//Auras\n\tint get_num_auras();\n\tvoid set_num_auras(int value);\n\n\tRef<Spell> get_aura(int index);\n\tvoid set_aura(int index, Ref<Spell> aura);\n\n\tVector<Variant> get_auras();\n\tvoid set_auras(const Vector<Variant> &auras);\n\n\t//Data\n\tRef<VendorItemData> get_vendor_item_data() const;\n\tvoid set_vendor_item_data(const Ref<VendorItemData> &data);\n\n\tRef<VendorItemData> get_spell_train_data() const;\n\tvoid set_spell_train_data(const Ref<VendorItemData> &data);\n\n\tRef<ItemContainerData> get_item_container_data() const;\n\tvoid set_item_container_data(const Ref<ItemContainerData> &data);\n\n\t//Craft Recipes\n\tint get_num_craft_recipes() const;\n\n\tRef<CraftRecipe> get_craft_recipe(int index);\n\tvoid set_craft_recipe(int index, const Ref<CraftRecipe> &recipe);\n\n\tVector<Variant> get_craft_recipes() const;\n\tvoid set_craft_recipes(const Vector<Variant> &recipe);\n\n\t//AI\n\tint get_num_ais();\n\tvoid set_num_ais(int value);\n\n\tRef<EntityAI> get_ai(int index);\n\tvoid set_ai(int index, Ref<EntityAI> aura);\n\n\tVector<Variant> get_ais();\n\tvoid set_ais(const Vector<Variant> &ais);\n\n\tRef<EntityAI> get_ai_instance();\n\tRef<EntityAI> _get_ai_instance();\n\n\t//Setup\n\tvoid setup_resources(Entity *entity);\n\tvoid _setup_resources(Node *entity);\n\n\tEntityClassData();\n\t~EntityClassData();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _id;\n\n\tString _text_description;\n\n\tRef<Texture> _icon;\n\n\tint _spell_points_per_level;\n\n\tEntityEnums::EntityClassPlaystyleType _playstyle_type;\n\n\tRef<StatData> _stat_data;\n\n\tVector<Ref<EntityResource> > _entity_resources;\n\tVector<Ref<CharacterSpec> > _specs;\n\tVector<Ref<Spell> > _spells;\n\tVector<Ref<Spell> > _start_spells;\n\tVector<Ref<Spell> > _auras;\n\n\tRef<VendorItemData> _vendor_item_data;\n\tRef<VendorItemData> _spell_train_data;\n\tRef<ItemContainerData> _item_container_data;\n\tVector<Ref<CraftRecipe> > _craft_recipes;\n\n\tVector<Ref<EntityAI> > _ais;\n};\n\n#endif\n"
  },
  {
    "path": "entities/data/entity_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_data.h\"\n\n#include \"../../data/spells/spell.h\"\n#include \"../../infos/spell_cast_info.h\"\n#include \"../entity.h\"\n#include \"character_spec.h\"\n\n#include \"../../data/species/entity_species_data.h\"\n#include \"../../data/species/species_instance.h\"\n\n#include \"../../singletons/ess.h\"\n\n#include \"../../defines.h\"\n\nint EntityData::get_id() const {\n\treturn _id;\n}\nvoid EntityData::set_id(int value) {\n\t_id = value;\n}\n\nString EntityData::get_text_description() const {\n\treturn _text_description;\n}\nvoid EntityData::set_text_description(String value) {\n\t_text_description = value;\n}\n\nEntityEnums::EntityInteractionType EntityData::get_entity_interaction_type() const {\n\treturn _interaction_type;\n}\n\nvoid EntityData::set_entity_interaction_type(EntityEnums::EntityInteractionType value) {\n\t_interaction_type = value;\n}\n\nbool EntityData::get_is_playable() const {\n\treturn _is_playable;\n}\nvoid EntityData::set_is_playable(const bool value) {\n\t_is_playable = value;\n}\n\nint EntityData::get_immunity_flags() const {\n\treturn _immunity_flags;\n}\nvoid EntityData::set_immunity_flags(const int value) {\n\t_immunity_flags = value;\n}\n\nint EntityData::get_entity_flags() const {\n\treturn _entity_flags;\n}\nvoid EntityData::set_entity_flags(const int value) {\n\t_entity_flags = value;\n}\n\nint EntityData::get_money() const {\n\treturn _money;\n}\nvoid EntityData::set_money(const int value) {\n\t_money = value;\n}\n\nint EntityData::get_bag_size() const {\n\treturn _bag_size;\n}\nvoid EntityData::set_bag_size(const int value) {\n\t_bag_size = value;\n}\n\nRef<EntitySpeciesData> EntityData::get_entity_species_data() const {\n\treturn _entity_species_data;\n}\nvoid EntityData::set_entity_species_data(const Ref<EntitySpeciesData> &value) {\n\t_entity_species_data = value;\n}\n\nRef<EntityClassData> EntityData::get_entity_class_data() const {\n\treturn _entity_class_data;\n}\nvoid EntityData::set_entity_class_data(const Ref<EntityClassData> &data) {\n\t_entity_class_data = data;\n}\n\nRef<EquipmentData> EntityData::get_equipment_data() const {\n\treturn _equipment_data;\n}\nvoid EntityData::set_equipment_data(const Ref<EquipmentData> &data) {\n\t_equipment_data = data;\n}\n\nRef<SpeciesInstance> EntityData::get_species_instance() const {\n\treturn _species_instance;\n}\nvoid EntityData::set_species_instance(const Ref<SpeciesInstance> &value) {\n\t_species_instance = value;\n}\n\nRef<EntityAI> EntityData::get_ai() const {\n\treturn _ai;\n}\nvoid EntityData::set_ai(const Ref<EntityAI> &ai) {\n\t_ai = ai;\n}\nRef<EntityAI> EntityData::get_ai_instance() {\n\treturn call(\"_get_ai_instance\");\n}\nRef<EntityAI> EntityData::_get_ai_instance() {\n\tif (_ai.is_valid()) {\n\t\treturn _ai->duplicate();\n\t}\n\n\tRef<EntityClassData> ecd = get_entity_class_data();\n\n\tif (ecd.is_valid()) {\n\t\treturn ecd->get_ai_instance();\n\t}\n\n\tRef<EntityAI> ai;\n\tai.instantiate();\n\treturn ai;\n}\n\nRef<LootDataBase> EntityData::get_loot_db() const {\n\treturn _lootdb;\n}\nvoid EntityData::set_loot_db(const Ref<LootDataBase> &lootdb) {\n\t_lootdb = lootdb;\n}\n\n//void EntityData::_setup_resources(Entity *entity) {\n//}\n\n/*\nVector<int> EntityData::get_mob_party_ids() {\n\treturn _mob_party_ids;\n}\n\nvoid EntityData::set_mob_party_ids(Vector<int> ids) {\n\t//specs;\n}\n\nVector<int> EntityData::get_mob_dislike_ids() {\n\treturn _mob_dislike_ids;\n}\n\nvoid EntityData::set_mob_dislike_ids(Vector<int> ids) {\n\t//specs;\n}\n*/\n/*\nint EntityData::get_inspector_max_spells() {\n\treturn _inspector_max_spells;\n}\n\nvoid EntityData::set_inspector_max_spells(int value) {\n\t_inspector_max_spells = value;\n}*/\n\nString EntityData::generate_name() {\n\tif (has_method(\"_generate_name\")) {\n\t\treturn call(\"_generate_name\");\n\t}\n\n\treturn get_name();\n}\n\n////    SETUP    ////\n\nvoid EntityData::setup_resources(Entity *entity) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tif (_entity_class_data.is_valid())\n\t\t_entity_class_data->setup_resources(entity);\n\n\tif (has_method(\"_setup_resources\"))\n\t\tcall(\"_setup_resources\", entity);\n}\n\nbool EntityData::cans_interact(Entity *entity) {\n\tERR_FAIL_COND_V(!INSTANCE_VALIDATE(entity), false);\n\n\tif (has_method(\"_cans_interact\"))\n\t\treturn call(\"_cans_interact\", entity);\n\n\treturn false;\n}\n\nbool EntityData::cans_interact_bind(Node *entity) {\n\tERR_FAIL_COND_V(!INSTANCE_VALIDATE(entity), false);\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND_V(e == NULL, false);\n\n\treturn cans_interact(e);\n}\n\nvoid EntityData::sinteract(Entity *entity) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tif (has_method(\"_sinteract\"))\n\t\tcall(\"_sinteract\", entity);\n}\n\nvoid EntityData::sinteract_bind(Node *entity) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(e == NULL);\n\n\tsinteract(e);\n}\n\nEntityData::EntityData() {\n\t_id = 0;\n\t_money = 0;\n\t_bag_size = 0;\n\t_is_playable = false;\n\n\t_interaction_type = EntityEnums::ENITIY_INTERACTION_TYPE_NORMAL;\n\t_immunity_flags = 0;\n\t_entity_flags = 0;\n}\nEntityData::~EntityData() {\n\t_entity_class_data.unref();\n\t_entity_species_data.unref();\n\t_equipment_data.unref();\n\t_species_instance.unref();\n\n\t_ai.unref();\n\n\t_lootdb.unref();\n}\n\nvoid EntityData::_validate_property(PropertyInfo &property) const {\n\tif (property.name == \"entity_type\") {\n\t\tproperty.hint_string = ESS::get_singleton()->entity_types_get();\n\t}\n}\n\nvoid EntityData::_bind_methods() {\n\t//Interactions\n\t//GDVIRTUAL_BIND(\"_cans_interact\", \"entity\", \"Entity\");\n\t//GDVIRTUAL_BIND(\"_sinteract\", \"entity\", \"Entity\");\n\n\tClassDB::bind_method(D_METHOD(\"cans_interact\", \"entity\"), &EntityData::cans_interact_bind);\n\tClassDB::bind_method(D_METHOD(\"sinteract\", \"entity\"), &EntityData::sinteract_bind);\n\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &EntityData::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &EntityData::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_interaction_type\"), &EntityData::get_entity_interaction_type);\n\tClassDB::bind_method(D_METHOD(\"set_entity_interaction_type\", \"value\"), &EntityData::set_entity_interaction_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"entity_interaction_type\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_INTERACTION_TYPE), \"set_entity_interaction_type\", \"get_entity_interaction_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_is_playable\"), &EntityData::get_is_playable);\n\tClassDB::bind_method(D_METHOD(\"set_is_playable\", \"value\"), &EntityData::set_is_playable);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"is_playable\"), \"set_is_playable\", \"get_is_playable\");\n\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_name\", \"get_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_text_description\"), &EntityData::get_text_description);\n\tClassDB::bind_method(D_METHOD(\"set_text_description\", \"value\"), &EntityData::set_text_description);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_description\"), \"set_text_description\", \"get_text_description\");\n\n\tClassDB::bind_method(D_METHOD(\"get_money\"), &EntityData::get_money);\n\tClassDB::bind_method(D_METHOD(\"set_money\", \"value\"), &EntityData::set_money);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"money\"), \"set_money\", \"get_money\");\n\n\tClassDB::bind_method(D_METHOD(\"get_bag_size\"), &EntityData::get_bag_size);\n\tClassDB::bind_method(D_METHOD(\"set_bag_size\", \"value\"), &EntityData::set_bag_size);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"bag_size\"), \"set_bag_size\", \"get_bag_size\");\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_species_data\"), &EntityData::get_entity_species_data);\n\tClassDB::bind_method(D_METHOD(\"set_entity_species_data\", \"value\"), &EntityData::set_entity_species_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"entity_species_data\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySpeciesData\"), \"set_entity_species_data\", \"get_entity_species_data\");\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_class_data\"), &EntityData::get_entity_class_data);\n\tClassDB::bind_method(D_METHOD(\"set_entity_class_data\", \"value\"), &EntityData::set_entity_class_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"entity_class_data\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityClassData\"), \"set_entity_class_data\", \"get_entity_class_data\");\n\n\tClassDB::bind_method(D_METHOD(\"get_equipment_data\"), &EntityData::get_equipment_data);\n\tClassDB::bind_method(D_METHOD(\"set_equipment_data\", \"value\"), &EntityData::set_equipment_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"equipment_data\", PROPERTY_HINT_RESOURCE_TYPE, \"EquipmentData\"), \"set_equipment_data\", \"get_equipment_data\");\n\n\tClassDB::bind_method(D_METHOD(\"get_species_instance\"), &EntityData::get_species_instance);\n\tClassDB::bind_method(D_METHOD(\"set_species_instance\", \"value\"), &EntityData::set_species_instance);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"species_instance\", PROPERTY_HINT_RESOURCE_TYPE, \"SpeciesInstance\"), \"set_species_instance\", \"get_species_instance\");\n\n\t//AI\n\t//GDVIRTUAL_BIND(\"_get_ai_instance\");\n\n\tClassDB::bind_method(D_METHOD(\"get_ai\"), &EntityData::get_ai);\n\tClassDB::bind_method(D_METHOD(\"set_ai\", \"value\"), &EntityData::set_ai);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"ai\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityAI\"), \"set_ai\", \"get_ai\");\n\n\tClassDB::bind_method(D_METHOD(\"get_ai_instance\"), &EntityData::get_ai_instance);\n\tClassDB::bind_method(D_METHOD(\"_get_ai_instance\"), &EntityData::_get_ai_instance);\n\n\t// Loot DB\n\tClassDB::bind_method(D_METHOD(\"get_loot_db\"), &EntityData::get_loot_db);\n\tClassDB::bind_method(D_METHOD(\"set_loot_db\", \"value\"), &EntityData::set_loot_db);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"loot_db\", PROPERTY_HINT_RESOURCE_TYPE, \"LootDataBase\"), \"set_loot_db\", \"get_loot_db\");\n\n\tClassDB::bind_method(D_METHOD(\"generate_name\"), &EntityData::generate_name);\n\t//GDVIRTUAL_BIND(\"_generate_name\");\n\n\tADD_GROUP(\"Immunities\", \"immunity\");\n\tClassDB::bind_method(D_METHOD(\"get_immunity_flags\"), &EntityData::get_immunity_flags);\n\tClassDB::bind_method(D_METHOD(\"set_immunity_flags\", \"value\"), &EntityData::set_immunity_flags);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"immunity_flags\", PROPERTY_HINT_FLAGS, EntityEnums::BINDING_STRING_ENTITY_IMMUNITY_FLAGS), \"set_immunity_flags\", \"get_immunity_flags\");\n\n\tADD_GROUP(\"Entity Flags\", \"entity_flags\");\n\tClassDB::bind_method(D_METHOD(\"get_entity_flags\"), &EntityData::get_entity_flags);\n\tClassDB::bind_method(D_METHOD(\"set_entity_flags\", \"value\"), &EntityData::set_entity_flags);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"entity_flags\", PROPERTY_HINT_FLAGS, EntityEnums::BINDING_STRING_ENTITY_FLAGS), \"set_entity_flags\", \"get_entity_flags\");\n}\n"
  },
  {
    "path": "entities/data/entity_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_DATA_H\n#define ENTITY_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n#include \"core/string/ustring.h\"\n\n\n#include \"scene/resources/texture.h\"\n\n#include \"../../entity_enums.h\"\n\n#include \"../../entities/auras/aura_data.h\"\n#include \"../../pipelines/spell_damage_info.h\"\n#include \"../../pipelines/spell_heal_info.h\"\n\n#include \"../../data/loot/loot_data_base.h\"\n\n#include \"entity_class_data.h\"\n\n#include \"../../data/items/equipment_data.h\"\n\n#include \"../ai/entity_ai.h\"\n\nclass Spell;\nclass Entity;\nclass CharacterSpec;\nclass Entity;\nclass SpellCastInfo;\nclass AIAction;\nclass CraftRecipe;\nclass EntitySpeciesData;\nclass SpeciesInstance;\n\nclass EntityData : public Resource {\n\tGDCLASS(EntityData, Resource);\n\npublic:\n\tint get_id() const;\n\tvoid set_id(const int value);\n\n\tString get_text_description() const;\n\tvoid set_text_description(const String value);\n\n\tEntityEnums::EntityInteractionType get_entity_interaction_type() const;\n\tvoid set_entity_interaction_type(const EntityEnums::EntityInteractionType value);\n\n\tbool get_is_playable() const;\n\tvoid set_is_playable(const bool value);\n\n\tint get_immunity_flags() const;\n\tvoid set_immunity_flags(const int value);\n\n\tint get_entity_flags() const;\n\tvoid set_entity_flags(const int value);\n\n\tint get_money() const;\n\tvoid set_money(const int value);\n\n\tint get_bag_size() const;\n\tvoid set_bag_size(const int value);\n\n\tRef<EntitySpeciesData> get_entity_species_data() const;\n\tvoid set_entity_species_data(const Ref<EntitySpeciesData> &value);\n\n\tRef<EntityClassData> get_entity_class_data() const;\n\tvoid set_entity_class_data(const Ref<EntityClassData> &data);\n\n\tRef<EquipmentData> get_equipment_data() const;\n\tvoid set_equipment_data(const Ref<EquipmentData> &data);\n\n\tRef<SpeciesInstance> get_species_instance() const;\n\tvoid set_species_instance(const Ref<SpeciesInstance> &value);\n\n\tRef<EntityAI> get_ai() const;\n\tvoid set_ai(const Ref<EntityAI> &ai);\n\tRef<EntityAI> get_ai_instance();\n\tRef<EntityAI> _get_ai_instance();\n\n\tRef<LootDataBase> get_loot_db() const;\n\tvoid set_loot_db(const Ref<LootDataBase> &data);\n\n\tString generate_name();\n\n\t//Setup\n\tvoid setup_resources(Entity *entity);\n\n\t////    Interactions    ////\n\tbool cans_interact(Entity *entity);\n\tbool cans_interact_bind(Node *entity);\n\n\tvoid sinteract(Entity *entity);\n\tvoid sinteract_bind(Node *entity);\n\n\tEntityData();\n\t~EntityData();\n\nprotected:\n\tvoid _validate_property(PropertyInfo &property) const;\n\tstatic void _bind_methods();\n\nprivate:\n\tint _id;\n\n\tEntityEnums::EntityInteractionType _interaction_type;\n\n\tbool _is_playable;\n\n\tint _immunity_flags;\n\tint _entity_flags;\n\n\tString _text_description;\n\n\tint _money;\n\tint _bag_size;\n\n\tRef<EntityClassData> _entity_class_data;\n\tRef<EntitySpeciesData> _entity_species_data;\n\tRef<EquipmentData> _equipment_data;\n\tRef<SpeciesInstance> _species_instance;\n\n\tRef<EntityAI> _ai;\n\n\tRef<LootDataBase> _lootdb;\n};\n\n#endif\n"
  },
  {
    "path": "entities/data/entity_data_container.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_data_container.h\"\n\n#include \"core/version.h\"\n\nDictionary EntityDataContainer::to_dict() {\n\treturn call(\"_to_dict\");\n}\nvoid EntityDataContainer::from_dict(const Dictionary &dict) {\n\tcall(\"_from_dict\", dict);\n}\n\nDictionary EntityDataContainer::_to_dict() {\n\tDictionary dict;\n\n\tdict[\"class_name\"] = get_class_static();\n\n\treturn dict;\n}\nvoid EntityDataContainer::_from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n}\n\nEntityDataContainer::EntityDataContainer() {\n}\nEntityDataContainer::~EntityDataContainer() {\n}\n\nvoid EntityDataContainer::_bind_methods() {\n\t//Serialization\n\t//GDVIRTUAL_BIND(\"from_dict\", \"dict\");\n\t//GDVIRTUAL_BIND(\"to_dict\", \"dict\");\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &EntityDataContainer::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &EntityDataContainer::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_from_dict\", \"dict\"), &EntityDataContainer::_from_dict);\n\tClassDB::bind_method(D_METHOD(\"_to_dict\"), &EntityDataContainer::_to_dict);\n}\n"
  },
  {
    "path": "entities/data/entity_data_container.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_DATA_CONTAINER_H\n#define ENTITY_DATA_CONTAINER_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/variant/dictionary.h\"\n\n\nclass EntityDataContainer : public Resource {\n\tGDCLASS(EntityDataContainer, Resource);\n\npublic:\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tDictionary _to_dict();\n\tvoid _from_dict(const Dictionary &dict);\n\n\tEntityDataContainer();\n\t~EntityDataContainer();\n\nprotected:\n\tstatic void _bind_methods();\n};\n\n#endif\n"
  },
  {
    "path": "entities/data/item_container_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"item_container_data.h\"\n\n#include \"../../defines.h\"\n\nint ItemContainerData::get_num_container_datas() {\n\treturn _container_datas.size();\n}\nvoid ItemContainerData::set_num_container_datas(int value) {\n\t_container_datas.resize(value);\n}\n\nRef<ItemContainerDataEntry> ItemContainerData::get_container_data(int index) {\n\tERR_FAIL_INDEX_V(index, _container_datas.size(), Ref<ItemContainerDataEntry>());\n\n\treturn _container_datas[index];\n}\nvoid ItemContainerData::set_container_data(int index, Ref<ItemContainerDataEntry> container_data) {\n\tERR_FAIL_INDEX(index, _container_datas.size());\n\n\t_container_datas.set(index, container_data);\n}\n\nVector<Variant> ItemContainerData::get_container_datas() {\n\tVARIANT_ARRAY_GET(_container_datas);\n}\nvoid ItemContainerData::set_container_datas(const Vector<Variant> &container_datas) {\n\t_container_datas.clear();\n\tfor (int i = 0; i < container_datas.size(); i++) {\n\t\tRef<ItemContainerDataEntry> container_data = Ref<ItemContainerDataEntry>(container_datas[i]);\n\n\t\t_container_datas.push_back(container_data);\n\t}\n}\n\nItemContainerData::ItemContainerData() {\n}\n\nItemContainerData::~ItemContainerData() {\n\t_container_datas.clear();\n}\n\nvoid ItemContainerData::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_num_container_datas\"), &ItemContainerData::get_num_container_datas);\n\tClassDB::bind_method(D_METHOD(\"set_num_container_datas\", \"value\"), &ItemContainerData::set_num_container_datas);\n\n\tClassDB::bind_method(D_METHOD(\"get_container_data\", \"index\"), &ItemContainerData::get_container_data);\n\tClassDB::bind_method(D_METHOD(\"set_container_data\", \"index\", \"container_data\"), &ItemContainerData::set_container_data);\n\n\tClassDB::bind_method(D_METHOD(\"get_container_datas\"), &ItemContainerData::get_container_datas);\n\tClassDB::bind_method(D_METHOD(\"set_container_datas\", \"container_datas\"), &ItemContainerData::set_container_datas);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"container_datas\", PROPERTY_HINT_NONE, \"17/17:ItemContainerDataEntry\", PROPERTY_USAGE_DEFAULT, \"ItemContainerDataEntry\"), \"set_container_datas\", \"get_container_datas\");\n}\n"
  },
  {
    "path": "entities/data/item_container_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ITEM_CONTAINER_DATA_H\n#define ITEM_CONTAINER_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"item_container_data_entry.h\"\n\nclass ItemContainerData : public Resource {\n\tGDCLASS(ItemContainerData, Resource);\n\npublic:\n\tint get_num_container_datas();\n\tvoid set_num_container_datas(int value);\n\n\tRef<ItemContainerDataEntry> get_container_data(int index);\n\tvoid set_container_data(int index, Ref<ItemContainerDataEntry> aura);\n\n\tVector<Variant> get_container_datas();\n\tvoid set_container_datas(const Vector<Variant> &ai_actions);\n\n\tItemContainerData();\n\t~ItemContainerData();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tVector<Ref<ItemContainerDataEntry> > _container_datas;\n};\n\n#endif\n"
  },
  {
    "path": "entities/data/item_container_data_entry.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"item_container_data_entry.h\"\n\n#include \"../../data/items/item_template.h\"\n\nRef<ItemTemplate> ItemContainerDataEntry::get_item() {\n\treturn _item;\n}\nvoid ItemContainerDataEntry::set_item(Ref<ItemTemplate> item) {\n\t_item = item;\n}\n\nint ItemContainerDataEntry::get_item_count() const {\n\treturn _item_count;\n}\nvoid ItemContainerDataEntry::set_item_count(int value) {\n\t_item_count = value;\n}\n\nItemContainerDataEntry::ItemContainerDataEntry() {\n\t_item_count = 0;\n}\nItemContainerDataEntry::~ItemContainerDataEntry() {\n}\n\nvoid ItemContainerDataEntry::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_item\"), &ItemContainerDataEntry::get_item);\n\tClassDB::bind_method(D_METHOD(\"set_item\", \"item\"), &ItemContainerDataEntry::set_item);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemTemplate\"), \"set_item\", \"get_item\");\n\n\tClassDB::bind_method(D_METHOD(\"get_item_count\"), &ItemContainerDataEntry::get_item_count);\n\tClassDB::bind_method(D_METHOD(\"set_item_count\", \"value\"), &ItemContainerDataEntry::set_item_count);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"item_count\"), \"set_item_count\", \"get_item_count\");\n}\n"
  },
  {
    "path": "entities/data/item_container_data_entry.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef CONTAINER_ITEM_DATA_H\n#define CONTAINER_ITEM_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\nclass ItemTemplate;\n\nclass ItemContainerDataEntry : public Resource {\n\tGDCLASS(ItemContainerDataEntry, Resource);\n\npublic:\n\tRef<ItemTemplate> get_item();\n\tvoid set_item(Ref<ItemTemplate> item);\n\n\tint get_item_count() const;\n\tvoid set_item_count(int value);\n\n\tItemContainerDataEntry();\n\t~ItemContainerDataEntry();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tRef<ItemTemplate> _item;\n\tint _item_count;\n};\n\n#endif\n"
  },
  {
    "path": "entities/data/vendor_item_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"vendor_item_data.h\"\n\n#include \"../../defines.h\"\n\nint VendorItemData::get_num_vendor_datas() {\n\treturn _vendor_datas.size();\n}\n\nRef<VendorItemDataEntry> VendorItemData::get_vendor_data(int index) {\n\tERR_FAIL_INDEX_V(index, _vendor_datas.size(), Ref<VendorItemDataEntry>());\n\n\treturn _vendor_datas[index];\n}\nvoid VendorItemData::set_vendor_data(int index, Ref<VendorItemDataEntry> vendor_data) {\n\tERR_FAIL_INDEX(index, _vendor_datas.size());\n\n\t_vendor_datas.set(index, vendor_data);\n}\n\nVector<Variant> VendorItemData::get_vendor_datas() {\n\tVARIANT_ARRAY_GET(_vendor_datas);\n}\nvoid VendorItemData::set_vendor_datas(const Vector<Variant> &vendor_datas) {\n\t_vendor_datas.clear();\n\tfor (int i = 0; i < vendor_datas.size(); i++) {\n\t\tRef<VendorItemDataEntry> vendor_data = Ref<VendorItemDataEntry>(vendor_datas[i]);\n\n\t\t_vendor_datas.push_back(vendor_data);\n\t}\n}\n\nVendorItemData::VendorItemData() {\n}\nVendorItemData::~VendorItemData() {\n\t_vendor_datas.clear();\n}\n\nvoid VendorItemData::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_num_vendor_datas\"), &VendorItemData::get_num_vendor_datas);\n\tClassDB::bind_method(D_METHOD(\"get_vendor_data\", \"index\"), &VendorItemData::get_vendor_data);\n\tClassDB::bind_method(D_METHOD(\"set_vendor_data\", \"index\", \"vendor_data\"), &VendorItemData::set_vendor_data);\n\n\tClassDB::bind_method(D_METHOD(\"get_vendor_datas\"), &VendorItemData::get_vendor_datas);\n\tClassDB::bind_method(D_METHOD(\"set_vendor_datas\", \"vendor_datas\"), &VendorItemData::set_vendor_datas);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"vendor_datas\", PROPERTY_HINT_NONE, \"17/17:VendorItemDataEntry\", PROPERTY_USAGE_DEFAULT, \"VendorItemDataEntry\"), \"set_vendor_datas\", \"get_vendor_datas\");\n}\n"
  },
  {
    "path": "entities/data/vendor_item_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef VENDOR_ITEM_DATA_H\n#define VENDOR_ITEM_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"vendor_item_data_entry.h\"\n\nclass VendorItemData : public Resource {\n\tGDCLASS(VendorItemData, Resource);\n\npublic:\n\t//Vendor data\n\tint get_num_vendor_datas();\n\n\tRef<VendorItemDataEntry> get_vendor_data(int index);\n\tvoid set_vendor_data(int index, Ref<VendorItemDataEntry> data);\n\n\tVector<Variant> get_vendor_datas();\n\tvoid set_vendor_datas(const Vector<Variant> &data);\n\n\tVendorItemData();\n\t~VendorItemData();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tVector<Ref<VendorItemDataEntry> > _vendor_datas;\n};\n\n#endif\n"
  },
  {
    "path": "entities/data/vendor_item_data_entry.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"vendor_item_data.h\"\n\n#include \"../../data/items/item_template.h\"\n#include \"../../data/spells/spell.h\"\n\nRef<ItemTemplate> VendorItemDataEntry::get_item() {\n\treturn _item;\n}\nvoid VendorItemDataEntry::set_item(const Ref<ItemTemplate> &item) {\n\t_item = item;\n}\n\nRef<Spell> VendorItemDataEntry::get_spell() {\n\treturn _spell;\n}\nvoid VendorItemDataEntry::set_spell(const Ref<Spell> &spell) {\n\t_spell = spell;\n}\n\nRef<ItemTemplate> VendorItemDataEntry::get_cost_item() {\n\treturn _cost_item;\n}\nvoid VendorItemDataEntry::set_cost_item(const Ref<ItemTemplate> &item) {\n\t_cost_item = item;\n}\n\nint VendorItemDataEntry::get_price() const {\n\treturn _price;\n}\nvoid VendorItemDataEntry::set_price(const int value) {\n\t_price = value;\n}\n\nint VendorItemDataEntry::get_count() const {\n\treturn _count;\n}\nvoid VendorItemDataEntry::set_count(const int value) {\n\t_count = value;\n}\n\nint VendorItemDataEntry::get_spawn_time() const {\n\treturn _spawn_time;\n}\nvoid VendorItemDataEntry::set_spawn_time(const int value) {\n\t_spawn_time = value;\n}\n\nVendorItemDataEntry::VendorItemDataEntry() {\n\t_price = 0;\n\t_count = 0;\n\t_spawn_time = 0;\n}\nVendorItemDataEntry::~VendorItemDataEntry() {\n\t_item.unref();\n\t_spell.unref();\n\t_cost_item.unref();\n}\n\nvoid VendorItemDataEntry::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_item\"), &VendorItemDataEntry::get_item);\n\tClassDB::bind_method(D_METHOD(\"set_item\", \"item\"), &VendorItemDataEntry::set_item);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemTemplate\"), \"set_item\", \"get_item\");\n\n\tClassDB::bind_method(D_METHOD(\"get_spell\"), &VendorItemDataEntry::get_spell);\n\tClassDB::bind_method(D_METHOD(\"set_spell\", \"item\"), &VendorItemDataEntry::set_spell);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"set_spell\", \"get_spell\");\n\n\tClassDB::bind_method(D_METHOD(\"get_cost_item\"), &VendorItemDataEntry::get_cost_item);\n\tClassDB::bind_method(D_METHOD(\"set_cost_item\", \"item\"), &VendorItemDataEntry::set_cost_item);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"cost_item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemTemplate\"), \"set_cost_item\", \"get_cost_item\");\n\n\tClassDB::bind_method(D_METHOD(\"get_price\"), &VendorItemDataEntry::get_price);\n\tClassDB::bind_method(D_METHOD(\"set_price\", \"value\"), &VendorItemDataEntry::set_price);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"price\"), \"set_price\", \"get_price\");\n\n\tClassDB::bind_method(D_METHOD(\"get_count\"), &VendorItemDataEntry::get_count);\n\tClassDB::bind_method(D_METHOD(\"set_count\", \"value\"), &VendorItemDataEntry::set_count);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"count\"), \"set_count\", \"get_count\");\n\n\tClassDB::bind_method(D_METHOD(\"get_spawn_time\"), &VendorItemDataEntry::get_spawn_time);\n\tClassDB::bind_method(D_METHOD(\"set_spawn_time\", \"value\"), &VendorItemDataEntry::set_spawn_time);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"spawn_time\"), \"set_spawn_time\", \"get_spawn_time\");\n}\n"
  },
  {
    "path": "entities/data/vendor_item_data_entry.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef VENDOR_ITEM_DATA_ENTRY_H\n#define VENDOR_ITEM_DATA_ENTRY_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\nclass ItemTemplate;\nclass Spell;\n\nclass VendorItemDataEntry : public Resource {\n\tGDCLASS(VendorItemDataEntry, Resource);\n\npublic:\n\tRef<ItemTemplate> get_item();\n\tvoid set_item(const Ref<ItemTemplate> &item);\n\n\tRef<Spell> get_spell();\n\tvoid set_spell(const Ref<Spell> &spell);\n\n\tRef<ItemTemplate> get_cost_item();\n\tvoid set_cost_item(const Ref<ItemTemplate> &item);\n\n\tint get_price() const;\n\tvoid set_price(const int value);\n\n\tint get_count() const;\n\tvoid set_count(const int value);\n\n\tint get_spawn_time() const;\n\tvoid set_spawn_time(const int time);\n\n\tVendorItemDataEntry();\n\t~VendorItemDataEntry();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tRef<ItemTemplate> _item;\n\tRef<Spell> _spell;\n\tRef<ItemTemplate> _cost_item;\n\n\tint _price;\n\tint _count;\n\tint _spawn_time;\n};\n\n#endif\n"
  },
  {
    "path": "entities/entity.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity.h\"\n\n#include \"../database/ess_resource_db.h\"\n#include \"../singletons/ess.h\"\n#include \"../singletons/profile_manager.h\"\n\n#include \"../data/species/entity_species_data.h\"\n#include \"../data/spells/spell.h\"\n#include \"../entities/auras/aura_data.h\"\n#include \"../infos/spell_cast_info.h\"\n#include \"../inventory/bag.h\"\n#include \"../pipelines/spell_damage_info.h\"\n#include \"../pipelines/spell_heal_info.h\"\n#include \"../profiles/class_profile.h\"\n#include \"./data/character_spec.h\"\n#include \"./data/entity_data.h\"\n#include \"./data/vendor_item_data.h\"\n#include \"./data/vendor_item_data_entry.h\"\n#include \"./resources/entity_resource_health.h\"\n#include \"./resources/entity_resource_speed.h\"\n#include \"./skills/entity_skill.h\"\n#include \"scene/2d/node_2d.h\"\n\n#include \"core/object/script_language.h\"\n\n#include \"core/version.h\"\n\n#include \"../defines.h\"\n\n#define PROPERTY_DEBUG false\n\n#if PROPERTY_DEBUG\n#define PROPERTY_USAGE_ENTITY_HIDDEN PROPERTY_USAGE_DEFAULT\n#else\n#define PROPERTY_USAGE_ENTITY_HIDDEN PROPERTY_USAGE_STORAGE\n#endif\n\n#define NOTIFICATION_IMPLS(func, signal, ...)                                          \\\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) \\\n\t\t_s_ai->func(this, __VA_ARGS__);                                                \\\n                                                                                       \\\n\tif (has_method(\"_\" #func))                                                         \\\n\t\tcall(\"_\" #func, __VA_ARGS__);                                                  \\\n                                                                                       \\\n\tfor (int i = 0; i < _s_auras.size(); ++i) {                                        \\\n\t\tRef<AuraData> ad = _s_auras.get(i);                                            \\\n\t\tad->get_aura()->func(ad, __VA_ARGS__);                                         \\\n\t}                                                                                  \\\n                                                                                       \\\n\temit_signal(signal, this, __VA_ARGS__);\n\n#define NOTIFICATION_IMPLSS(func, signal)                                              \\\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) \\\n\t\t_s_ai->func(this);                                                             \\\n                                                                                       \\\n\tif (has_method(\"_\" #func))                                                         \\\n\t\tcall(\"_\" #func);                                                               \\\n                                                                                       \\\n\tfor (int i = 0; i < _s_auras.size(); ++i) {                                        \\\n\t\tRef<AuraData> ad = _s_auras.get(i);                                            \\\n\t\tad->get_aura()->func(ad);                                                      \\\n\t}                                                                                  \\\n                                                                                       \\\n\temit_signal(signal, this);\n\n#define NOTIFICATION_IMPLC(func, signal, ...)   \\\n\tif (has_method(\"_\" #func))                  \\\n\t\tcall(\"_\" #func, __VA_ARGS__);           \\\n                                                \\\n\tfor (int i = 0; i < _c_auras.size(); ++i) { \\\n\t\tRef<AuraData> ad = _c_auras.get(i);     \\\n\t\tad->get_aura()->func(ad, __VA_ARGS__);  \\\n\t}                                           \\\n                                                \\\n\temit_signal(signal, this, __VA_ARGS__);\n\n#define NOTIFICATION_IMPLCS(func, signal)       \\\n\tif (has_method(\"_\" #func))                  \\\n\t\tcall(\"_\" #func);                        \\\n                                                \\\n\tfor (int i = 0; i < _c_auras.size(); ++i) { \\\n\t\tRef<AuraData> ad = _c_auras.get(i);     \\\n\t\tad->get_aura()->func(ad);               \\\n\t}                                           \\\n                                                \\\n\temit_signal(signal, this);\n\n#define NOTIFICATION_RES_IMPLS(func, signal, ...)                                      \\\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) \\\n\t\t_s_ai->func(__VA_ARGS__);                                                      \\\n                                                                                       \\\n\tif (has_method(\"_\" #func))                                                         \\\n\t\tcall(\"_\" #func, __VA_ARGS__);                                                  \\\n                                                                                       \\\n\tfor (int i = 0; i < _s_auras.size(); ++i) {                                        \\\n\t\tRef<AuraData> ad = _s_auras.get(i);                                            \\\n\t\tad->get_aura()->func(ad, __VA_ARGS__);                                         \\\n\t}                                                                                  \\\n                                                                                       \\\n\temit_signal(signal, __VA_ARGS__);\n\n#define NOTIFICATION_RES_IMPLC(func, signal, ...) \\\n\tif (has_method(\"_\" #func))                    \\\n\t\tcall(\"_\" #func, __VA_ARGS__);             \\\n                                                  \\\n\tfor (int i = 0; i < _c_auras.size(); ++i) {   \\\n\t\tRef<AuraData> ad = _c_auras.get(i);       \\\n\t\tad->get_aura()->func(ad, __VA_ARGS__);    \\\n\t}                                             \\\n                                                  \\\n\temit_signal(signal, __VA_ARGS__);\n\n#define NOTIFICATION_AURA_IMPLS(func, signal, what, ...)                               \\\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) \\\n\t\t_s_ai->func(what, __VA_ARGS__);                                                \\\n                                                                                       \\\n\tif (has_method(\"_\" #func))                                                         \\\n\t\tcall(\"_\" #func, what, __VA_ARGS__);                                            \\\n                                                                                       \\\n\tfor (int i = 0; i < _s_auras.size(); ++i) {                                        \\\n\t\tRef<AuraData> ad = _s_auras.get(i);                                            \\\n\t\tad->get_aura()->func(what, ad, __VA_ARGS__);                                   \\\n\t}                                                                                  \\\n                                                                                       \\\n\temit_signal(signal, what, __VA_ARGS__);\n\n#define NOTIFICATION_AURA_DIFF_IMPLS(func, aura_func, signal, what, ...)               \\\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) \\\n\t\t_s_ai->func(what, __VA_ARGS__);                                                \\\n                                                                                       \\\n\tif (has_method(\"_\" #func))                                                         \\\n\t\tcall(\"_\" #func, what, __VA_ARGS__);                                            \\\n                                                                                       \\\n\tfor (int i = 0; i < _s_auras.size(); ++i) {                                        \\\n\t\tRef<AuraData> ad = _s_auras.get(i);                                            \\\n\t\tad->get_aura()->aura_func(what, ad, __VA_ARGS__);                              \\\n\t}                                                                                  \\\n                                                                                       \\\n\temit_signal(signal, what, __VA_ARGS__);\n\n#define NOTIFICATION_AURA_IMPLC(func, signal, what, ...) \\\n\tif (has_method(\"_\" #func))                           \\\n\t\tcall(\"_\" #func, what, __VA_ARGS__);              \\\n                                                         \\\n\tfor (int i = 0; i < _c_auras.size(); ++i) {          \\\n\t\tRef<AuraData> ad = _c_auras.get(i);              \\\n\t\tad->get_aura()->func(what, ad, __VA_ARGS__);     \\\n\t}                                                    \\\n                                                         \\\n\temit_signal(signal, what, __VA_ARGS__);\n\nNodePath Entity::get_body_path() {\n\treturn _body_path;\n}\nvoid Entity::set_body_path(NodePath value) {\n\t_body_path = value;\n\n\tset_body(get_node_or_null(_body_path));\n\n\tif (INSTANCE_VALIDATE(_body))\n\t\t_body->set_owner(this);\n}\nNode *Entity::get_body() {\n\treturn _body;\n}\nSpatial *Entity::get_body_3d() {\n\treturn _body_3d;\n}\nNode2D *Entity::get_body_2d() {\n\treturn _body_2d;\n}\nvoid Entity::set_body(Node *body) {\n\t_body = body;\n\t_body_2d = Object::cast_to<Node2D>(body);\n\t_body_3d = Object::cast_to<Spatial>(body);\n}\n\nvoid Entity::instance_body(const Ref<EntityData> &data, const int model_index) {\n\tif (is_queued_for_deletion())\n\t\treturn;\n\n\tif (get_body() == NULL && data.is_valid() && data->get_entity_species_data().is_valid() &&\n\t\t\tdata->get_entity_species_data()->get_model_data_count() > model_index &&\n\t\t\tdata->get_entity_species_data()->get_model_data(model_index).is_valid() &&\n\t\t\tdata->get_entity_species_data()->get_model_data(model_index)->get_body().is_valid()) {\n\t\tNode *node = data->get_entity_species_data()->get_model_data(model_index)->get_body()->instantiate();\n\n\t\tadd_child(node);\n\t\tset_body(node);\n\n\t\ton_body_changed();\n\t}\n}\n\nvoid Entity::on_body_changed() {\n\tif (has_method(\"_body_changed\"))\n\t\tcall(\"_body_changed\");\n\n\temit_signal(\"body_changed\", this);\n}\n\nNodePath Entity::get_character_skeleton_path() {\n\treturn _character_skeleton_path;\n}\nvoid Entity::set_character_skeleton_path(NodePath value) {\n\t_character_skeleton_path = value;\n\n\tset_character_skeleton(get_node_or_null(_character_skeleton_path));\n}\nNode *Entity::get_character_skeleton() {\n\treturn _character_skeleton;\n}\nvoid Entity::set_character_skeleton(Node *skeleton) {\n\t_character_skeleton = skeleton;\n\n\tif (INSTANCE_VALIDATE(_character_skeleton) && _character_skeleton->has_method(\"add_model_visual\")) {\n\t\tfor (int i = 0; i < _c_equipment.size(); ++i) {\n\t\t\tRef<ItemInstance> ii = _c_equipment[i];\n\n\t\t\tif (ii.is_valid())\n\t\t\t\t_character_skeleton->call(\"add_model_visual\", ii->get_item_template()->get_model_visual());\n\t\t}\n\t}\n}\n\n//GUID\nint Entity::gets_guid() {\n\treturn _s_guid;\n}\nvoid Entity::sets_guid(int value) {\n\t_s_guid = value;\n\n\tVRPC(setc_guid, value);\n}\n\nint Entity::getc_guid() {\n\treturn _c_guid;\n}\nvoid Entity::setc_guid(int value) {\n\t_c_guid = value;\n\n\t//set_name(String::num(_c_guid));\n}\n\n//Transforms\nTransform3D Entity::get_transform_3d(bool only_stored) const {\n\tif (!only_stored && _body_3d) {\n\t\tERR_FAIL_COND_V(!INSTANCE_VALIDATE(_body_3d), _transform);\n\n\t\treturn _body_3d->get_transform();\n\t}\n\n\treturn _transform;\n}\nvoid Entity::set_transform_3d(const Transform3D &transform, bool only_stored) {\n\tif (!only_stored && _body_3d) {\n\t\tERR_FAIL_COND(!INSTANCE_VALIDATE(_body_3d));\n\n\t\treturn _body_3d->set_transform(transform);\n\t}\n\n\t_transform = transform;\n}\n\nTransform2D Entity::get_transform_2d(bool only_stored) const {\n\tif (!only_stored && _body_2d) {\n\t\tERR_FAIL_COND_V(!INSTANCE_VALIDATE(_body_2d), _transform_2d);\n\n\t\treturn _body_2d->get_transform();\n\t}\n\n\treturn _transform_2d;\n}\nvoid Entity::set_transform_2d(const Transform2D &transform, bool only_stored) {\n\tif (!only_stored && _body_2d) {\n\t\tERR_FAIL_COND(!INSTANCE_VALIDATE(_body_2d));\n\n\t\treturn _body_2d->set_transform(_transform_2d);\n\t}\n\n\t_transform_2d = transform;\n}\n\n//EntityPlayerType\nint Entity::gets_entity_player_type() {\n\treturn _s_entity_player_type;\n}\nvoid Entity::sets_entity_player_type(int value) {\n\t_s_entity_player_type = value;\n\n\tVRPC(setc_entity_player_type, value);\n}\n\nint Entity::getc_entity_player_type() {\n\treturn _c_entity_player_type;\n}\nvoid Entity::setc_entity_player_type(int value) {\n\t_c_entity_player_type = value;\n}\n\n//EntityType\nint Entity::gets_entity_type() {\n\treturn _s_entity_type;\n}\nvoid Entity::sets_entity_type(int value) {\n\t_s_entity_type = value;\n\n\tVRPC(setc_entity_type, value);\n}\n\nint Entity::getc_entity_type() {\n\treturn _c_entity_type;\n}\nvoid Entity::setc_entity_type(int value) {\n\t_c_entity_type = value;\n}\n\n//Relations\nEntityEnums::EntityRelationType Entity::gets_relation_to_bind(Node *to) {\n\tEntity *e = Object::cast_to<Entity>(to);\n\n\tERR_FAIL_COND_V(!INSTANCE_VALIDATE(e), EntityEnums::ENTITY_RELATION_TYPE_NEUTRAL);\n\n\treturn gets_relation_to(e);\n}\nEntityEnums::EntityRelationType Entity::gets_relation_to(Entity *to) {\n\tERR_FAIL_COND_V(!INSTANCE_VALIDATE(to), EntityEnums::ENTITY_RELATION_TYPE_NEUTRAL);\n\n\treturn static_cast<EntityEnums::EntityRelationType>(static_cast<int>(call(\"_gets_relation_to\", to)));\n}\n\nEntityEnums::EntityRelationType Entity::_gets_relation_to(Node *to) {\n\tif (to == this)\n\t\treturn EntityEnums::ENTITY_RELATION_TYPE_FRIENDLY;\n\n\treturn EntityEnums::ENTITY_RELATION_TYPE_HOSTILE;\n}\n\nEntityEnums::EntityRelationType Entity::getc_relation_to_bind(Node *to) {\n\tEntity *e = Object::cast_to<Entity>(to);\n\n\tERR_FAIL_COND_V(!INSTANCE_VALIDATE(e), EntityEnums::ENTITY_RELATION_TYPE_NEUTRAL);\n\n\treturn getc_relation_to(e);\n}\nEntityEnums::EntityRelationType Entity::getc_relation_to(Entity *to) {\n\tERR_FAIL_COND_V(!INSTANCE_VALIDATE(to), EntityEnums::ENTITY_RELATION_TYPE_NEUTRAL);\n\n\treturn static_cast<EntityEnums::EntityRelationType>(static_cast<int>(call(\"_getc_relation_to\", to)));\n}\n\nEntityEnums::EntityRelationType Entity::_getc_relation_to(Node *to) {\n\tif (to == this)\n\t\treturn EntityEnums::ENTITY_RELATION_TYPE_FRIENDLY;\n\n\treturn EntityEnums::ENTITY_RELATION_TYPE_HOSTILE;\n}\n\n//EntityInteractionType\nEntityEnums::EntityInteractionType Entity::gets_entity_interaction_type() {\n\treturn _s_interaction_type;\n}\nvoid Entity::sets_entity_interaction_type(EntityEnums::EntityInteractionType value) {\n\t_s_interaction_type = value;\n\n\tVRPC(setc_entity_interaction_type, value);\n}\n\nEntityEnums::EntityInteractionType Entity::getc_entity_interaction_type() {\n\treturn _c_interaction_type;\n}\nvoid Entity::setc_entity_interaction_type(EntityEnums::EntityInteractionType value) {\n\t_c_interaction_type = value;\n}\n\nint Entity::gets_immunity_flags() {\n\treturn _s_immunity_flags;\n}\nvoid Entity::sets_immunity_flags(int value) {\n\t_s_immunity_flags = value;\n}\n\nint Entity::gets_entity_flags() {\n\treturn _s_entity_flags;\n}\nvoid Entity::sets_entity_flags(int value) {\n\t_s_entity_flags = value;\n\n\tVRPC(setc_entity_flags, value);\n}\n\nint Entity::getc_entity_flags() {\n\treturn _c_entity_flags;\n}\nvoid Entity::setc_entity_flags(int value) {\n\t_c_entity_flags = value;\n}\n\nString Entity::gets_entity_name() {\n\treturn _s_entity_name;\n}\nvoid Entity::sets_entity_name(String value) {\n\t_s_entity_name = value;\n\n\temit_signal(\"sname_changed\", this);\n\n\tVRPC(setc_entity_name, value);\n}\n\nString Entity::getc_entity_name() {\n\treturn _c_entity_name;\n}\nvoid Entity::setc_entity_name(String value) {\n\t_c_entity_name = value;\n\n\temit_signal(\"cname_changed\", this);\n}\n\nint Entity::gets_model_index() {\n\treturn _s_model_index;\n}\nvoid Entity::sets_model_index(int value) {\n\t_s_model_index = value;\n\n\tVRPC(setc_model_index, value);\n}\n\nint Entity::getc_model_index() {\n\treturn _c_model_index;\n}\nvoid Entity::setc_model_index(int value) {\n\t_c_model_index = value;\n\n\tif (INSTANCE_VALIDATE(_character_skeleton)) {\n\t\tif (_character_skeleton->has_method(\"set_model_index\"))\n\t\t\t_character_skeleton->call(\"set_model_index\", _c_model_index);\n\t}\n}\n\nint Entity::gets_level() {\n\treturn _s_level;\n}\nvoid Entity::sets_level(int value) {\n\t_s_level = value;\n\n\temit_signal(\"son_level_changed\", this, value);\n\n\tVRPC(setc_level, value);\n}\nint Entity::getc_level() {\n\treturn _c_level;\n}\nvoid Entity::setc_level(int value) {\n\t_c_level = value;\n\n\temit_signal(\"con_level_changed\", this, value);\n}\n\nint Entity::gets_xp() {\n\treturn _s_xp;\n}\nvoid Entity::sets_xp(int value) {\n\t_s_xp = value;\n\n\tORPC(setc_xp, value);\n}\nint Entity::getc_xp() {\n\treturn _c_xp;\n}\nvoid Entity::setc_xp(int value) {\n\t_c_xp = value;\n}\n\nint Entity::gets_money() {\n\treturn _s_money;\n}\nvoid Entity::sets_money(int value) {\n\t_s_money = value;\n\n\tORPC(setc_money, value);\n}\n\nint Entity::getc_money() {\n\treturn _c_money;\n}\nvoid Entity::setc_money(int value) {\n\t_c_money = value;\n}\n\nint Entity::gets_entity_data_id() {\n\treturn _s_class_id;\n}\n\nvoid Entity::sets_entity_data_id(int value) {\n\t_s_class_id = value;\n}\n\nint Entity::getc_entity_data_id() {\n\treturn _c_class_id;\n}\n\nvoid Entity::setc_entity_data_id(int value) {\n\t_c_class_id = value;\n\n\tif (_c_class_id == 0) {\n\t\tsetc_entity_data(Ref<EntityData>());\n\t\treturn;\n\t}\n\n\tif (ESS::get_singleton() != NULL) {\n\t\tsetc_entity_data(ESS::get_singleton()->get_resource_db()->get_entity_data(_c_class_id));\n\t}\n}\n\nStringName Entity::gets_entity_data_path() {\n\treturn _s_entity_data_path;\n}\nvoid Entity::sets_entity_data_path(const StringName &value) {\n\t_s_entity_data_path = value;\n}\n\nRef<EntityData> Entity::gets_entity_data() {\n\treturn _s_entity_data;\n}\n\nvoid Entity::sets_entity_data(Ref<EntityData> value) {\n\tif (is_queued_for_deletion()) {\n\t\treturn;\n\t}\n\n\t_s_class_id = 0;\n\n\tif (value.is_valid()) {\n\t\t_s_class_id = value->get_id();\n\t}\n\n\t_s_entity_data = value;\n\n\t//setup();\n\n\tinstance_body(value, _s_model_index);\n\n\temit_signal(\"sentity_data_changed\", value);\n\n\tVRPC(setc_entity_data_id, _s_class_id);\n}\n\nRef<EntityData> Entity::getc_entity_data() {\n\treturn _c_entity_data;\n}\n\nvoid Entity::setc_entity_data(Ref<EntityData> value) {\n\t_c_entity_data = value;\n\n\tinstance_body(value, _c_model_index);\n\n\temit_signal(\"centity_data_changed\", value);\n}\n\nEntityEnums::AIStates Entity::gets_ai_state() const {\n\treturn _sai_state;\n}\nvoid Entity::sets_ai_state(EntityEnums::AIStates state) {\n\t_sai_state = state;\n}\n\nEntityEnums::AIStates Entity::gets_ai_state_stored() const {\n\treturn _sai_state_stored;\n}\nvoid Entity::sets_ai_state_stored(EntityEnums::AIStates state) {\n\t_sai_state_stored = state;\n}\n\nint Entity::gets_seed() {\n\treturn _s_seed;\n}\nvoid Entity::sets_seed(int value) {\n\t_s_seed = value;\n\n\tORPC(setc_seed, value);\n}\n\nint Entity::getc_seed() {\n\treturn _c_seed;\n}\nvoid Entity::setc_seed(int value) {\n\t_c_seed = value;\n}\n\nvoid Entity::_initialize() {\n\t_s_resources.resize(EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN);\n\t_c_resources.resize(EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN);\n\n\t_s_resources.set(EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH, Ref<EntityResourceHealth>(memnew(EntityResourceHealth)));\n\t_s_resources.set(EntityEnums::ENTITY_RESOURCE_INDEX_SPEED, Ref<EntityResourceSpeed>(memnew(EntityResourceSpeed)));\n\n\t_c_resources.set(EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH, Ref<EntityResourceHealth>(memnew(EntityResourceHealth)));\n\t_c_resources.set(EntityEnums::ENTITY_RESOURCE_INDEX_SPEED, Ref<EntityResourceSpeed>(memnew(EntityResourceSpeed)));\n\n\tfor (int i = 0; i < EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN; ++i) {\n\t\t_s_resources.get(i)->set_owner(this);\n\t\t_c_resources.get(i)->set_owner(this);\n\t}\n}\n\nvoid Entity::setup(Ref<EntityCreateInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tsets_guid(info->get_guid());\n\n\tsets_entity_player_type(info->get_entity_player_type());\n\n\tif (info->get_network_owner() != 0) {\n\t\tset_multiplayer_authority(info->get_network_owner());\n\t}\n\n\tsets_original_entity_controller(info->get_entity_controller());\n\tsets_entity_controller(info->get_entity_controller());\n\n\t_s_level = info->get_level();\n\n\t_s_xp = info->get_xp();\n\n\tif (info->get_entity_name() != \"\") {\n\t\tsets_entity_name(info->get_entity_name());\n\t}\n\n\tif (!info->get_serialized_data().is_empty()) {\n\t\tfrom_dict(info->get_serialized_data());\n\t} else {\n\t\tsets_entity_data(info->get_entity_data());\n\t}\n\n\tif (has_method(\"_setup\")) {\n#if GODOT4\n\t\tcall(\"_setup\");\n#else\n\t\tcall_multilevel(\"_setup\");\n#endif\n\t}\n}\n\nvoid Entity::_setup() {\n\tif (!_s_entity_data.is_valid())\n\t\treturn;\n\n\tif (_deserialized) {\n\t\tRef<EntityClassData> cc = gets_entity_data()->get_entity_class_data();\n\t\tERR_FAIL_COND(!cc.is_valid());\n\n\t\t//Ref<StatData> stat_data = _s_entity_data->get_stat_data();\n\n\t\tsets_ai(_s_entity_data->get_ai_instance());\n\n\t\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\t\tif (!ad->get_aura()->aura_get_hide())\n\t\t\t\tVRPCOBJ(aura_addc_rpc, JSON::stringify(ad->to_dict()), aura_addc, ad);\n\t\t}\n\n\t\tif (gets_entity_player_type() == EntityEnums::ENTITY_PLAYER_TYPE_PLAYER || gets_entity_player_type() == EntityEnums::ENTITY_PLAYER_TYPE_DISPLAY) {\n\t\t\t/*\n\t\t\tif (ESS::get_singleton()->get_use_global_class_level()) {\n\t\t\t\tRef<ClassProfile> cp = ProfileManager::get_singleton()->getc_player_profile()->get_class_profile(gets_entity_data()->get_path());\n\n\t\t\t\tif (cp.is_valid()) {\n\t\t\t\t\tint leveldiff = cp->get_level() - _s_level;\n\n\t\t\t\t\tsets_class_level(cp->get_level());\n\n\t\t\t\t\tif (leveldiff > 0) {\n\t\t\t\t\t\tlevelup_sclass(leveldiff);\n\t\t\t\t\t}\n\n\t\t\t\t\tsets_class_xp(cp->get_xp());\n\t\t\t\t}\n\t\t\t}\n*/\n\t\t\tsetup_actionbars();\n\t\t}\n\n\t\tif (gets_entity_player_type() == EntityEnums::ENTITY_PLAYER_TYPE_AI) {\n\t\t\tsets_entity_name(_s_entity_data->get_name());\n\t\t}\n\n\t\treturn;\n\t}\n\n\tERR_FAIL_COND(!gets_entity_data().is_valid());\n\n\tRef<EntityClassData> cc = gets_entity_data()->get_entity_class_data();\n\n\tERR_FAIL_COND(!cc.is_valid());\n\n\tRef<StatData> stat_data = cc->get_stat_data();\n\n\tERR_FAIL_COND(!stat_data.is_valid());\n\n\tfor (int i = 0; i < ESS::get_singleton()->stat_get_count(); ++i) {\n\t\tstat_set_base(i, stat_data->get_base(i));\n\t}\n\n\tfor (int i = 0; i < ESS::get_singleton()->stat_get_count(); ++i) {\n\t\tstat_setc_current(i, stat_gets_current(i));\n\t\tstat_set_dirty(i, false);\n\t}\n\n\tfor (int i = 0; i < cc->get_num_auras(); ++i) {\n\t\tRef<Spell> a = cc->get_aura(i);\n\n\t\tif (a.is_valid()) {\n\t\t\ta->aura_sapply_simple(this, this, 1.0);\n\t\t}\n\t}\n\n\t_s_entity_data->setup_resources(this);\n\n\tsets_entity_data_id(_s_entity_data->get_id());\n\n\tRef<EntitySpeciesData> spd = _s_entity_data->get_entity_species_data();\n\n\tif (spd.is_valid()) {\n\t\tsets_entity_type(spd->get_type());\n\t} else {\n\t\tsets_entity_type(0);\n\t}\n\n\tsets_entity_interaction_type(_s_entity_data->get_entity_interaction_type());\n\tsets_immunity_flags(_s_entity_data->get_immunity_flags());\n\tsets_entity_flags(_s_entity_data->get_entity_flags());\n\n\t//if (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_NONE) {\n\t//\tsets_original_entity_controller(_s_entity_data->get_entity_controller());\n\t//\tsets_entity_controller(_s_entity_data->get_entity_controller());\n\t//}\n\n\t//sets_entity_name(_s_entity_data->get_entity_name());\n\tsets_money(_s_entity_data->get_money());\n\n\tRef<EntityClassData> cd = _s_entity_data->get_entity_class_data();\n\n\tif (cd.is_valid()) {\n\t\tfor (int i = 0; i < cd->get_num_start_spells(); ++i) {\n\t\t\tspell_adds(cd->get_start_spell(i));\n\t\t}\n\t}\n\n\tfor (int i = 0; i < cc->get_num_craft_recipes(); ++i) {\n\t\tcraft_adds_recipe(cc->get_craft_recipe(i));\n\t}\n\n\tif (_s_entity_data->get_equipment_data().is_valid()) {\n\t\tRef<EquipmentData> eqd = _s_entity_data->get_equipment_data();\n\n\t\tfor (int i = 0; i < ESS::get_singleton()->equip_slot_get_count(); ++i) {\n\t\t\tRef<ItemInstance> ii = eqd->get_item(i);\n\n\t\t\tif (ii.is_valid())\n\t\t\t\t_s_equipment.write[i] = ii;\n\t\t}\n\t}\n\n\tsets_ai(_s_entity_data->get_ai_instance());\n\n\tif (!Engine::get_singleton()->is_editor_hint())\n\t\tset_process(_s_entity_data.is_valid());\n\n\tif (gets_entity_player_type() == EntityEnums::ENTITY_PLAYER_TYPE_PLAYER || gets_entity_player_type() == EntityEnums::ENTITY_PLAYER_TYPE_DISPLAY) {\n\t\tsetup_actionbars();\n\t}\n\n\tif (gets_entity_player_type() == EntityEnums::ENTITY_PLAYER_TYPE_AI) {\n\t\tsets_entity_name(_s_entity_data->get_name());\n\t}\n\n\tint chl = _s_level;\n\tint chxp = _s_xp;\n\n\t_s_level = 1;\n\n\tlevelups(chl - 1);\n\tsets_xp(chxp);\n\n\tif (ESS::get_singleton()->get_allow_class_spell_learning()) {\n\t\tRef<ClassProfile> class_profile = ProfileManager::get_singleton()->getc_player_profile()->get_class_profile(_s_entity_data->get_path());\n\n\t\tif (class_profile.is_valid() && class_profile->has_custom_data(\"spells\")) {\n\t\t\tVector<String> spells = class_profile->get_custom_data(\"spells\");\n\n\t\t\tfor (int i = 0; i < spells.size(); ++i) {\n\t\t\t\tspell_adds_id(ESS::get_singleton()->get_resource_db()->spell_path_to_id(spells.get(i)));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (ESS::get_singleton()->get_allow_class_recipe_learning()) {\n\t\tRef<ClassProfile> class_profile = ProfileManager::get_singleton()->getc_player_profile()->get_class_profile(_s_entity_data->get_path());\n\n\t\tif (class_profile.is_valid() && class_profile->has_custom_data(\"recipes\")) {\n\t\t\tVector<String> recipes = class_profile->get_custom_data(\"recipes\");\n\n\t\t\tfor (int i = 0; i < recipes.size(); ++i) {\n\t\t\t\tcraft_adds_recipe_id(ESS::get_singleton()->get_resource_db()->craft_recipe_path_to_id(recipes.get(i)));\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid Entity::setup_actionbars() {\n\tif (!gets_entity_data().is_valid())\n\t\treturn;\n\n\tif (is_deserialized()) {\n\t\treturn;\n\t}\n\n\tget_action_bar_profile();\n\t/*\n\tProfileManager *pm = ProfileManager::get_singleton();\n\n\tif (pm != NULL) {\n\t\tRef<ClassProfile> cp = get_class_profile();\n\n\t\tif (cp.is_valid()) {\n\t\t\tset_actionbar_locked(cp->get_actionbar_locked());\n\t\t\t_action_bar_profile = cp->get_default_action_bar_profile();\n\n\t\t\tget_action_bar_profile()->clear_action_bars();\n\n\t\t\tRef<ActionBarProfile> abp = cp->get_action_bar_profile();\n\n\t\t\tget_action_bar_profile()->from_actionbar_profile(abp);\n\t\t}\n\t}*/\n\n\tif (!gets_bag().is_valid()) {\n\t\tRef<Bag> bag;\n\t\tbag.instantiate();\n\n\t\tbag->set_size(gets_entity_data()->get_bag_size());\n\n\t\tsets_bag(bag);\n\t}\n}\n\n// AI\n\nbool Entity::gets_is_pet() {\n\treturn _s_pet_owner;\n}\n\nbool Entity::getc_is_pet() {\n\treturn _c_pet_owner;\n}\n\nEntity *Entity::pet_gets_owner() {\n\treturn _s_pet_owner;\n}\nvoid Entity::pet_sets_owner(Entity *entity) {\n\t_s_pet_owner = entity;\n}\nvoid Entity::pet_sets_owner_bind(Node *entity) {\n\tif (!entity) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(entity);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\treturn pet_sets_owner(e);\n}\n\nint Entity::pet_gets_formation_index() {\n\treturn _s_pet_formation_index;\n}\nvoid Entity::pet_sets_formation_index(int value) {\n\t_s_pet_formation_index = value;\n}\n\nEntityEnums::AIStates Entity::pet_gets_ai_state() {\n\treturn _s_pet_ai_state;\n}\nvoid Entity::pet_sets_ai_state(EntityEnums::AIStates value) {\n\t_s_pet_ai_state = value;\n}\n\nEntityEnums::EntityController Entity::gets_original_entity_controller() {\n\treturn _s_entity_controller;\n}\nvoid Entity::sets_original_entity_controller(EntityEnums::EntityController value) {\n\t_s_entity_controller = value;\n}\n\nEntityEnums::EntityController Entity::gets_entity_controller() {\n\treturn _s_entity_controller;\n}\nvoid Entity::sets_entity_controller(EntityEnums::EntityController value) {\n\t_s_entity_controller = value;\n\n\tORPC(setc_entity_controller, value);\n}\n\nEntityEnums::EntityController Entity::getc_entity_controller() {\n\treturn _s_entity_controller;\n}\nvoid Entity::setc_entity_controller(EntityEnums::EntityController value) {\n\tif (_c_entity_controller == value) {\n\t\treturn;\n\t}\n\n\t_c_entity_controller = value;\n\n\temit_signal(\"onc_entity_controller_changed\");\n}\n\nbool Entity::getc_is_controlled() {\n\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer();\n\tif (_multiplayer_api.is_valid()) {\n\t\treturn (_c_entity_controller == EntityEnums::ENITIY_CONTROLLER_PLAYER) && (get_multiplayer_authority() == _multiplayer_api->get_unique_id());\n\t} else {\n\t\treturn _c_entity_controller == EntityEnums::ENITIY_CONTROLLER_PLAYER;\n\t}\n}\n\nRef<EntityAI> Entity::gets_ai() {\n\treturn _s_ai;\n}\nvoid Entity::sets_ai(Ref<EntityAI> value) {\n\tif (_s_ai.is_valid()) {\n\t\t_s_ai->set_owner(NULL);\n\t\t_s_ai.unref();\n\t}\n\n\t_s_ai = value;\n\t_s_ai->set_owner(this);\n}\n\n////    Pets    ////\n\nvoid Entity::pet_adds(Entity *entity) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\t//the owner always want to see his pet, and you pet will always want to see the owner\n\tsees_adds(entity);\n\tentity->sees_adds(this);\n\n\tentity->pet_sets_owner(this);\n\n\t_s_pets.push_back(entity);\n\n\tentity->sets_ai_state_stored(entity->gets_ai_state());\n\tentity->sets_ai_state(_s_pet_ai_state);\n\tentity->sets_entity_controller(EntityEnums::ENITIY_CONTROLLER_AI);\n\n\tentity->pet_sets_formation_index(_s_pets.size());\n\n\t//full callback stack spet_added\n}\nvoid Entity::pet_adds_bind(Node *entity) {\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(!e);\n\n\tpet_adds(e);\n}\nEntity *Entity::pet_gets(int index) {\n\tERR_FAIL_INDEX_V(index, _s_pets.size(), NULL);\n\n\treturn _s_pets.get(index);\n}\nvoid Entity::pet_removes_index(int index) {\n\tERR_FAIL_INDEX(index, _s_pets.size());\n\n\tEntity *entity = _s_pets.get(index);\n\n\t_s_pets.remove_at(index);\n\n\tsees_removes(entity);\n\n\tfor (int i = 0; i < _s_pets.size(); ++i) {\n\t\tEntity *pet = _s_pets.get(index);\n\n\t\tERR_CONTINUE(!INSTANCE_VALIDATE(pet));\n\n\t\t_s_pets.get(i)->pet_sets_formation_index(i);\n\t}\n\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tentity->pet_sets_owner(NULL);\n\n\tentity->sets_ai_state(entity->gets_ai_state_stored());\n\tentity->sets_entity_controller(entity->gets_original_entity_controller());\n\n\t//full callback stack spet_added\n}\nvoid Entity::pet_removes(Entity *entity) {\n\tfor (int i = 0; i < _s_pets.size(); ++i) {\n\t\tif (_s_pets.get(i) == entity) {\n\t\t\tpet_removes_index(i);\n\t\t\treturn;\n\t\t}\n\t}\n}\nvoid Entity::pet_removes_bind(Node *entity) {\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(!e);\n\n\tpet_removes(e);\n}\nint Entity::pet_gets_count() {\n\treturn _s_pets.size();\n}\n\nvoid Entity::pet_addc_path(NodePath path) {\n\tNode *n = get_node_or_null(path);\n\n\tEntity *entity = Object::cast_to<Entity>(n);\n\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tpet_addc(entity);\n}\n\nvoid Entity::pet_addc(Entity *entity) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\t_c_pets.push_back(entity);\n\n\t//full callback stack spet_added\n}\nvoid Entity::pet_addc_bind(Node *entity) {\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(!e);\n\n\tpet_addc(e);\n}\nEntity *Entity::pet_getc(int index) {\n\tERR_FAIL_INDEX_V(index, _c_pets.size(), NULL);\n\n\treturn _c_pets.get(index);\n}\nvoid Entity::pet_removec_index(int index) {\n\tERR_FAIL_INDEX(index, _c_pets.size());\n\n\t//Entity *entity = _c_pets.get(index);\n\n\t_c_pets.remove_at(index);\n\n\t//#if VERSION_MAJOR < 4\n\t//ERR_FAIL_COND(!ObjectDB::instance_validate(entity));\n\t//#else\n\t//ERR_FAIL_COND(entity == NULL);\n\t//#endif\n\n\t//full callback stack spet_added\n}\nvoid Entity::pet_removec(Entity *entity) {\n\tfor (int i = 0; i < _c_pets.size(); ++i) {\n\t\tif (_c_pets.get(i) == entity) {\n\t\t\tpet_removec_index(i);\n\t\t\treturn;\n\t\t}\n\t}\n}\nvoid Entity::pet_removec_bind(Node *entity) {\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(!e);\n\n\tpet_removec(e);\n}\nint Entity::pet_getc_count() {\n\treturn _s_pets.size();\n}\n\n////    Profiles    ////\n\nRef<ClassProfile> Entity::get_class_profile() {\n\treturn ProfileManager::get_singleton()->getc_player_profile()->get_class_profile(_s_entity_data->get_path());\n}\n\n////    Serialization    ////\n\nbool Entity::is_deserialized() {\n\treturn _deserialized;\n}\n\nDictionary Entity::to_dict() {\n\treturn call(\"_to_dict\");\n}\nvoid Entity::from_dict(const Dictionary &dict) {\n\t_deserialized = true;\n\n\tcall(\"_from_dict\", dict);\n\n\temit_signal(\"deserialized\", this);\n}\n\nDictionary Entity::_to_dict() {\n\tDictionary dict;\n\n\t////    Transforms    ////\n\n\t//Not needed (at least atm)\n\n\t////    PlayerData    ////\n\n\tdict[\"guid\"] = _s_guid;\n\t//dict[\"entity_data_id\"] = _s_class_id;\n\n\tif (_s_entity_data.is_valid())\n\t\tdict[\"entity_data_path\"] = _s_entity_data->get_path();\n\telse\n\t\tdict[\"entity_data_path\"] = _s_entity_data_path;\n\n\t//int _s_entity_player_type;\n\n\tdict[\"type\"] = _s_type;\n\tdict[\"model_index\"] = _s_model_index;\n\tdict[\"level\"] = _s_level;\n\n\tdict[\"xp\"] = gets_xp();\n\n\tdict[\"money\"] = _s_money;\n\n\t//dict[\"send_flag\"] = _s_send_flag;\n\tdict[\"entity_name\"] = _s_entity_name;\n\n\tdict[\"interaction_type\"] = static_cast<int>(_s_interaction_type);\n\n\t//int _s_is_dead;\n\n\tdict[\"seed\"] = _s_seed;\n\n\tdict[\"entity_type\"] = _s_entity_type;\n\tdict[\"immunity_flags\"] = _s_immunity_flags;\n\tdict[\"entity_flags\"] = _s_entity_flags;\n\t//dict[\"entity_controller\"] = _s_entity_controller;\n\t//dict[\"entity_controller\"] = _s_original_entity_controller;\n\n\t////     Stats    ////\n\n\tDictionary sd;\n\n\tfor (int i = 0; i < ESS::get_singleton()->stat_get_count(); ++i) {\n\t\tDictionary sdict;\n\n\t\tsdict[\"base\"] = stat_get_base(i);\n\t\tsdict[\"base_calculated\"] = stat_get_base_calculated(i);\n\t\tsdict[\"bonus\"] = stat_get_bonus(i);\n\t\tsdict[\"percent\"] = stat_get_percent(i);\n\t\tsdict[\"current\"] = stat_gets_current(i);\n\n\t\tsd[i] = sdict;\n\t}\n\n\tdict[\"stats\"] = sd;\n\n\t////    Equipment    ////\n\n\tDictionary equipment;\n\n\tfor (int i = 0; i < ESS::get_singleton()->equip_slot_get_count(); ++i) {\n\t\tRef<ItemInstance> ii = _s_equipment[i];\n\n\t\tif (ii.is_valid())\n\t\t\tequipment[i] = ii->to_dict();\n\t}\n\n\tdict[\"equipment\"] = equipment;\n\n\t////    Resources    ////\n\n\tDictionary rd;\n\n\tfor (int i = 0; i < _s_resources.size(); ++i) {\n\t\tRef<EntityResource> r = _s_resources.get(i);\n\n\t\tERR_CONTINUE(!r.is_valid());\n\n\t\trd[String::num(i)] = r->to_dict();\n\t}\n\n\tdict[\"resources\"] = rd;\n\n\t////    GCD    ////\n\n\tdict[\"gcd\"] = _s_gcd;\n\n\t////    States    ////\n\n\tDictionary stated;\n\n\tfor (int i = 0; i < EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX; ++i) {\n\t\tstated[i] = _s_states[i];\n\t}\n\n\tdict[\"states\"] = stated;\n\n\tdict[\"state\"] = _s_state;\n\n\t////    SpellCastData    ////\n\n\t//Not needed\n\t//Ref<SpellCastInfo> _s_spell_cast_info;\n\t//Ref<SpellCastInfo> _c_spell_cast_info;\n\n\t//// AuraComponent    ////\n\n\tDictionary auras;\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tauras[i] = _s_auras.get(i)->to_dict();\n\t}\n\n\tdict[\"auras\"] = auras;\n\n\t////    Cooldowns    ////\n\n\tDictionary cds;\n\n\tfor (int i = 0; i < _s_cooldowns.size(); ++i) {\n\t\tDictionary cdict;\n\n\t\tcdict[\"path\"] = ESS::get_singleton()->get_resource_db()->spell_id_to_path(_s_cooldowns[i].id);\n\t\tcdict[\"remaining\"] = _s_cooldowns[i].cooldown;\n\n\t\tcds[i] = cdict;\n\t}\n\n\tdict[\"cooldowns\"] = cds;\n\n\tDictionary ccds;\n\n\tfor (int i = 0; i < _s_category_cooldowns.size(); ++i) {\n\t\tDictionary ccdict;\n\n\t\tccdict[\"path\"] = ESS::get_singleton()->get_resource_db()->spell_id_to_path(_s_category_cooldowns[i].id);\n\t\tccdict[\"remaining\"] = _s_category_cooldowns[i].cooldown;\n\n\t\tccds[i] = ccdict;\n\t}\n\n\tdict[\"category_cooldowns\"] = ccds;\n\n\tdict[\"active_category_cooldowns\"] = _s_active_category_cooldowns;\n\n\t////    Talents    ////\n\n\tdict[\"free_class_talent_points\"] = _s_free_class_talent_points;\n\tdict[\"class_talents\"] = _s_class_talents;\n\n\tdict[\"free_character_talent_points\"] = _s_free_character_talent_points;\n\tdict[\"character_talents\"] = _s_character_talents;\n\n\t////    Data    ////\n\n\tArray entity_datas;\n\n\tfor (int i = 0; i < _s_data.size(); ++i) {\n\t\tentity_datas.append(_s_data.get(i)->to_dict());\n\t}\n\n\tdict[\"entity_datas\"] = entity_datas;\n\n\t////    Crafting    ////\n\n\tDictionary known_recipes;\n\n\tfor (int i = 0; i < _s_craft_recipes.size(); ++i) {\n\t\tknown_recipes[i] = _s_craft_recipes.get(i)->get_path();\n\t}\n\n\tdict[\"known_recipes\"] = known_recipes;\n\n\t////    Known Spells    ////\n\n\tif (ESS::get_singleton()->get_use_spell_points())\n\t\tdict[\"free_spell_points\"] = _s_free_spell_points;\n\n\tDictionary known_spells;\n\n\tfor (int i = 0; i < _s_spells.size(); ++i) {\n\t\tknown_spells[i] = _s_spells.get(i)->get_path();\n\t}\n\n\tdict[\"known_spells\"] = known_spells;\n\n\t////    Skills    ////\n\n\tDictionary skills;\n\n\tfor (int i = 0; i < _s_skills.size(); ++i) {\n\t\tskills[i] = _s_skills.get(i)->to_dict();\n\t}\n\n\tdict[\"skills\"] = skills;\n\n\t////    Bags    ////\n\n\tif (_s_bag.is_valid())\n\t\tdict[\"bag\"] = _s_bag->to_dict();\n\n\t////     Actionbars    ////\n\n\tdict[\"actionbar_locked\"] = _actionbar_locked;\n\n\tif (_action_bar_profile.is_valid())\n\t\tdict[\"actionbar_profile\"] = _action_bar_profile->to_dict();\n\n\t// AI\n\n\t//not needed\n\n\t//Pets\n\n\t//Not yet properly implemented\n\n\t// Callbacks\n\n\t//Probably not needed\n\t//Vector<Ref<SpellCastInfo> > _physics_process_scis;\n\n\treturn dict;\n}\nvoid Entity::_from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\t////    Transforms    ////\n\n\t//Not needed for now\n\n\t////    PlayerData    ////\n\n\tsets_guid(dict.get(\"guid\", 0));\n\tsets_entity_type(dict.get(\"type\", 0));\n\n\t//entity_data_path at end\n\n\tsets_model_index(static_cast<int>(static_cast<int>(dict.get(\"model_index\", 0))));\n\n\t/*\n\tif (ESS::get_singleton()->get_use_global_class_level()) {\n\t\t_s_level = (dict.get(\"class_level\", 0));\n\t\t_s_xp = (dict.get(\"class_xp\", 0));\n\t} else {\n\t\tsets_class_level(dict.get(\"class_level\", 0));\n\t\tsets_xp(dict.get(\"xp\", 0));\n\t}\n*/\n\n\tsets_level(dict.get(\"level\", 0));\n\tsets_xp(dict.get(\"xp\", 0));\n\n\tsets_money(dict.get(\"money\", 0));\n\n\tsets_entity_name(dict.get(\"entity_name\", \"\"));\n\n\tsets_entity_interaction_type(static_cast<EntityEnums::EntityInteractionType>(static_cast<int>(dict.get(\"interaction_type\", 0))));\n\n\t//int _s_is_dead;\n\n\tsets_seed(dict.get(\"seed\", _s_seed));\n\n\t//EntityPlayerType not needed\n\tsets_immunity_flags(dict.get(\"immunity_flags\", 0));\n\tsets_entity_flags(dict.get(\"entity_flags\", 0));\n\n\t//EntityEnums::EntityController contr = static_cast<EntityEnums::EntityController>(static_cast<int>(dict.get(\"entity_controller\", 0)));\n\n\t//sets_original_entity_controller(contr);\n\t//sets_entity_controller(contr);\n\n\t////     Stats    ////\n\n\tDictionary stats = dict.get(\"stats\", Dictionary());\n\n\tfor (int i = 0; i < ESS::get_singleton()->stat_get_count(); ++i) {\n\t\tDictionary sd = stats.get(String::num(i), Dictionary());\n\n\t\tstat_set_base(i, sd.get(\"base\", 0));\n\t\tstat_set_base_calculated(i, sd.get(\"base_calculated\", 0));\n\t\tstat_set_bonus(i, sd.get(\"bonus\", 0));\n\t\tstat_set_percent(i, sd.get(\"percent\", 1));\n\n\t\tfloat curr = sd.get(\"current\", 0);\n\t\tstat_sets_current(i, curr);\n\t\tstat_setc_current(i, curr);\n\n\t\tstat_set_dirty(i, true);\n\t}\n\n\t////    Equipment    ////\n\n\tDictionary equipment = dict.get(\"equipment\", Dictionary());\n\n\tfor (int i = 0; i < ESS::get_singleton()->equip_slot_get_count(); ++i) {\n\t\tif (equipment.has(String::num(i))) {\n\t\t\tRef<ItemInstance> ii = _s_equipment[i];\n\n\t\t\tif (!ii.is_valid()) {\n\t\t\t\tii.instantiate();\n\t\t\t}\n\n\t\t\tii->from_dict(equipment[String::num(i)]);\n\n\t\t\t_s_equipment.write[i] = ii;\n\t\t\t_c_equipment.write[i] = ii;\n\t\t}\n\t}\n\n\t////    Resources    ////\n\n\t_s_resources.resize(EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN);\n\t_c_resources.resize(EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN);\n\n\tDictionary rd = dict.get(\"resources\", Dictionary());\n\n\tDictionary hpdict = rd.get(String::num(EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH), Dictionary());\n\t_s_resources.get(EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH)->from_dict(hpdict);\n\t_c_resources.get(EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH)->from_dict(hpdict);\n\n\tDictionary speeddict = rd.get(String::num(EntityEnums::ENTITY_RESOURCE_INDEX_SPEED), Dictionary());\n\t_s_resources.get(EntityEnums::ENTITY_RESOURCE_INDEX_SPEED)->from_dict(speeddict);\n\t_c_resources.get(EntityEnums::ENTITY_RESOURCE_INDEX_SPEED)->from_dict(speeddict);\n\n\tfor (int i = EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN; i < rd.size(); ++i) {\n\t\tDictionary ird = rd.get(String::num(i), Dictionary());\n\n\t\tStringName data_path = ird.get(\"data_path\", \"\");\n\n\t\tRef<EntityResource> resd = ESS::get_singleton()->get_resource_db()->get_entity_resource_path(data_path);\n\n\t\tERR_CONTINUE(!resd.is_valid());\n\n\t\tRef<EntityResource> res = resd->duplicate();\n\n\t\tERR_CONTINUE(!res.is_valid());\n\n\t\tres->from_dict(ird);\n\n\t\tresource_adds(res);\n\t}\n\n\t////    GCD    ////\n\n\t_s_gcd = dict.get(\"gcd\", 0);\n\t_c_gcd = _s_gcd;\n\n\t////    States    ////\n\n\tDictionary statesd = dict.get(\"states\", Dictionary());\n\n\tfor (int i = 0; i < EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX; ++i) {\n\t\t_s_states[i] = statesd.get(String::num(i), 0);\n\t}\n\n\t_s_state = dict.get(\"state\", Dictionary());\n\t_c_state = _s_state;\n\n\t////    SpellCastData    ////\n\n\t//Not needed\n\n\t////    Auras    ////\n\n\t_s_auras.clear();\n\t_c_auras.clear();\n\n\tDictionary auras = dict.get(\"auras\", Dictionary());\n\n\tfor (int i = 0; i < auras.size(); ++i) {\n\t\tRef<AuraData> r;\n\t\tr.instantiate();\n\n\t\tr->from_dict(auras.get(String::num(i), Dictionary()));\n\t\tr->set_owner(this);\n\t\tr->resolve_references(this);\n\n\t\t_s_auras.push_back(r);\n\t\t//_c_auras.push_back(r);\n\t}\n\n\t////    Cooldowns    ////\n\n\t_s_cooldowns.clear();\n\t_c_cooldowns.clear();\n\n\tDictionary cds = dict.get(\"cooldowns\", Dictionary());\n\n\tfor (int i = 0; i < cds.size(); ++i) {\n\t\tDictionary cddict = cds.get(String::num(i), Dictionary());\n\n\t\tCooldown cd;\n\n\t\tcd.path = dict.get(\"path\", \"\");\n\t\tcd.id = ESS::get_singleton()->get_resource_db()->spell_path_to_id(cd.path);\n\t\tcd.cooldown = dict.get(\"remaining\", 0);\n\n\t\t_s_cooldowns.push_back(cd);\n\t\t_c_cooldowns.push_back(cd);\n\t}\n\n\tDictionary ccds = dict.get(\"category_cooldowns\", Dictionary());\n\n\tfor (int i = 0; i < ccds.size(); ++i) {\n\t\tDictionary ccdict = ccds.get(String::num(i), Dictionary());\n\n\t\tCooldown ccd;\n\n\t\tccd.path = dict.get(\"path\", \"\");\n\t\tccd.id = ESS::get_singleton()->get_resource_db()->spell_path_to_id(ccd.path);\n\t\tccd.cooldown = dict.get(\"remaining\", 0);\n\n\t\t_s_category_cooldowns.push_back(ccd);\n\t\t_c_category_cooldowns.push_back(ccd);\n\t}\n\n\t_s_active_category_cooldowns = dict.get(\"active_category_cooldowns\", 0);\n\t_c_active_category_cooldowns = _s_active_category_cooldowns;\n\n\t////    Class Talents    ////\n\n\t_s_free_class_talent_points = dict.get(\"free_class_talent_points\", 0);\n\t_c_free_class_talent_points = _s_free_class_talent_points;\n\n\tVector<int> class_talents = dict.get(\"class_talents\", Vector<int>());\n\n\tfor (int i = 0; i < class_talents.size(); ++i) {\n\t\tclass_talent_adds(class_talents[i]);\n\t}\n\n\t////    Character Talents    ////\n\n\t_s_free_character_talent_points = dict.get(\"free_character_talent_points\", 0);\n\t_c_free_character_talent_points = _s_free_character_talent_points;\n\n\tVector<int> character_talents = dict.get(\"character_talents\", Vector<int>());\n\n\tfor (int i = 0; i < character_talents.size(); ++i) {\n\t\tcharacter_talent_adds(character_talents[i]);\n\t}\n\n\t////    Data    ////\n\n\tArray entity_datas = dict.get(\"entity_datas\", Array());\n\n\tfor (int i = 0; i < entity_datas.size(); ++i) {\n\t\tDictionary entry = entity_datas.get(i);\n\n\t\tString class_name = dict.get(\"class_name\", EntityDataContainer::get_class_static());\n\n\t\tif (ClassDB::can_instantiate(class_name) && ClassDB::is_parent_class(class_name, EntityDataContainer::get_class_static())) {\n\t\t\tRef<EntityDataContainer> data = Ref<EntityDataContainer>(ClassDB::instantiate(class_name));\n\n\t\t\tif (data.is_valid()) {\n\t\t\t\tdata->from_dict(entry);\n\n\t\t\t\t_s_data.push_back(data);\n\t\t\t\t_c_data.push_back(data);\n\t\t\t}\n\t\t}\n\t}\n\n\t////    Crafting    ////\n\n\t_s_craft_recipes.clear();\n\t_c_craft_recipes.clear();\n\n\tDictionary known_recipes = dict.get(\"known_recipes\", Dictionary());\n\n\tfor (int i = 0; i < known_recipes.size(); ++i) {\n\t\tStringName crn = known_recipes.get(String::num(i), \"\");\n\n\t\tif (ESS::get_singleton() != NULL) {\n\t\t\tRef<CraftRecipe> cr = ESS::get_singleton()->get_resource_db()->get_craft_recipe_path(crn);\n\n\t\t\tif (cr.is_valid()) {\n\t\t\t\tcraft_adds_recipe(cr);\n\t\t\t}\n\t\t}\n\t}\n\n\t////    Known Spells    ////\n\n\tif (ESS::get_singleton()->get_use_spell_points())\n\t\tsets_free_spell_points(dict.get(\"free_spell_points\", 0));\n\n\tDictionary known_spells = dict.get(\"known_spells\", Dictionary());\n\n\tfor (int i = 0; i < known_spells.size(); ++i) {\n\t\tStringName spell_path = known_spells.get(String::num(i), \"\");\n\n\t\tif (ESS::get_singleton() != NULL) {\n\t\t\tRef<Spell> sp = ESS::get_singleton()->get_resource_db()->get_spell_path(spell_path);\n\n\t\t\tif (sp.is_valid()) {\n\t\t\t\t_s_spells.push_back(sp);\n\t\t\t\t_c_spells.push_back(sp);\n\t\t\t}\n\t\t}\n\t}\n\n\t////    Skills    ////\n\n\tDictionary skills = dict.get(\"skills\", Dictionary());\n\n\tfor (int i = 0; i < skills.size(); ++i) {\n\t\tRef<EntitySkill> r;\n\t\tr.instantiate();\n\n\t\tr->from_dict(skills.get(String::num(i), Dictionary()));\n\n\t\t_s_skills.push_back(r);\n\t\t_c_skills.push_back(r);\n\t}\n\n\t////    Bags    ////\n\n\tDictionary bagd = dict.get(\"bag\", Dictionary());\n\n\tif (!bagd.is_empty()) {\n\t\tif (!_s_bag.is_valid()) {\n\t\t\tRef<Bag> bag;\n\t\t\tbag.instantiate();\n\n\t\t\tbag->from_dict(bagd);\n\n\t\t\tsets_bag(bag);\n\t\t} else {\n\t\t\t_s_bag->from_dict(bagd);\n\t\t}\n\t}\n\n\t////     Actionbars    ////\n\n\t_actionbar_locked = dict.get(\"actionbar_locked\", false);\n\n\tif (dict.has(\"actionbar_profile\")) {\n\t\tif (!_action_bar_profile.is_valid())\n\t\t\t_action_bar_profile.instantiate();\n\n\t\t_action_bar_profile->from_dict(dict.get(\"actionbar_profile\", Dictionary()));\n\t}\n\n\tStringName edp = dict.get(\"entity_data_path\", \"\");\n\n\tif (ESS::get_singleton() != NULL) {\n\t\tsets_entity_data(ESS::get_singleton()->get_resource_db()->get_entity_data_path(edp));\n\t}\n\n\tsets_entity_data_path(edp);\n\n\t// AI\n\n\t//Not needed right now\n\n\t//Pets\n\n\t//NYI\n\n\t// Networking\n\n\t//Not Needed\n\n\t// Callbacks\n\n\t//Not Needed\n}\n\n//////     Stat System      //////\n\nbool Entity::gets_is_dead() {\n\treturn _s_is_dead;\n}\n\nbool Entity::getc_is_dead() {\n\treturn _c_is_dead;\n}\n\nbool Entity::gcd_hasc() const {\n\treturn _c_gcd >= 0.000000001;\n}\n\nbool Entity::gcd_hass() const {\n\treturn _s_gcd >= 0.000000001;\n}\n\nfloat Entity::gcd_getc() const {\n\treturn _c_gcd;\n}\n\nvoid Entity::gcd_setc(const float value) {\n\t_c_gcd = value;\n}\n\nfloat Entity::gcd_gets() const {\n\treturn _s_gcd;\n}\n\nvoid Entity::gcd_sets(const float value) {\n\t_s_gcd = value;\n}\n\nvoid Entity::gcd_starts(float value) {\n\t_s_gcd = value;\n\n\tnotification_sgcd_started();\n\n\tORPC(gcd_startc, value);\n}\n\nvoid Entity::gcd_startc(float value) {\n\t_c_gcd = value;\n\n\tnotification_cgcd_started();\n}\n\n////    States    ////\n\nint Entity::gets_state() {\n\treturn _s_state;\n}\nvoid Entity::sets_state(int state) {\n\t_s_state = state;\n\n\temit_signal(\"sstate_changed\", state);\n\n\tVRPC(setc_state, state);\n}\n\nint Entity::getc_state() {\n\treturn _c_state;\n}\nvoid Entity::setc_state(int state) {\n\t_c_state = state;\n\n\temit_signal(\"cstate_changed\", state);\n}\n\nvoid Entity::adds_state_ref(int state_index) {\n\tERR_FAIL_INDEX(state_index, EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX);\n\n\tif (_s_states[state_index]++ == 0) {\n\t\tsets_state(gets_state() | EntityEnums::get_state_flag_for_index(state_index));\n\t}\n}\n\nvoid Entity::removes_state_ref(int state_index) {\n\tERR_FAIL_INDEX(state_index, EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX);\n\n\tif (--_s_states[state_index] == 0) {\n\t\tsets_state(gets_state() ^ EntityEnums::get_state_flag_for_index(state_index));\n\t}\n}\n\nPoolIntArray Entity::states_gets() const {\n\tPoolIntArray arr;\n\tarr.resize(EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX);\n\n#if !GODOT4\n\tPoolIntArray::Write w = arr.write();\n#endif\n\n\tfor (int i = 0; i < EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX; ++i) {\n#if !GODOT4\n\t\tw[i] = _s_states[i];\n#else\n\t\tarr.write[i] = _s_states[i];\n#endif\n\t}\n\n\treturn arr;\n}\nvoid Entity::states_sets(const PoolIntArray &data) {\n\tERR_FAIL_COND(data.size() <= EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX);\n\n\tfor (int i = 0; i < EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX; ++i) {\n\t\t_s_states[i] = data[i];\n\t}\n}\n\n////    Crafting System    ////\n\nvoid Entity::craft_crequest(int id) {\n\tcrafts(id);\n}\nvoid Entity::crafts(int id) {\n\tif (has_method(\"_crafts\")) {\n\t\tcall(\"_crafts\", id);\n\t}\n}\n\nbool Entity::craft_hass_recipe(Ref<CraftRecipe> craft_recipe) {\n\tfor (int i = 0; i < _s_craft_recipes.size(); ++i) {\n\t\tif (_s_craft_recipes.get(i) == craft_recipe) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nbool Entity::craft_hass_recipe_id(int id) {\n\tfor (int i = 0; i < _s_craft_recipes.size(); ++i) {\n\t\tRef<CraftRecipe> cr = _s_craft_recipes.get(i);\n\n\t\tERR_CONTINUE(!cr.is_valid());\n\n\t\tif (cr->get_id() == id) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nvoid Entity::craft_adds_recipe(Ref<CraftRecipe> craft_recipe) {\n\tERR_FAIL_COND(!craft_recipe.is_valid());\n\n\tif (craft_hass_recipe(craft_recipe))\n\t\treturn;\n\n\t_s_craft_recipes.push_back(craft_recipe);\n\n\temit_signal(\"crafts_recipe_added\", this, craft_recipe);\n\n\tORPC(craft_addc_recipe_id, craft_recipe->get_id());\n}\nvoid Entity::craft_adds_recipe_id(int id) {\n\tERR_FAIL_COND(!ESS::get_singleton());\n\n\tif (craft_hass_recipe_id(id))\n\t\treturn;\n\n\tRef<CraftRecipe> craft_recipe = ESS::get_singleton()->get_resource_db()->get_craft_recipe(id);\n\n\tERR_FAIL_COND(!craft_recipe.is_valid());\n\n\t_s_craft_recipes.push_back(craft_recipe);\n\n\tif (ESS::get_singleton()->get_allow_class_recipe_learning() && (_s_entity_player_type == EntityEnums::ENTITY_PLAYER_TYPE_PLAYER || gets_entity_player_type() == EntityEnums::ENTITY_PLAYER_TYPE_DISPLAY)) {\n\t\tRef<ClassProfile> class_profile = ProfileManager::get_singleton()->getc_player_profile()->get_class_profile(_s_entity_data->get_path());\n\n\t\tif (class_profile->has_custom_data(\"recipes\")) {\n\t\t\tVector<String> recipes = class_profile->get_custom_data(\"recipes\");\n\n\t\t\tbool found = false;\n\n\t\t\tfor (int i = 0; i < recipes.size(); ++i) {\n\t\t\t\tif (recipes[i] == craft_recipe->get_path()) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!found) {\n\t\t\t\trecipes.push_back(craft_recipe->get_path());\n\t\t\t\tclass_profile->set_custom_data(\"recipes\", recipes);\n\t\t\t}\n\t\t} else {\n\t\t\tVector<String> recipes;\n\t\t\trecipes.push_back(craft_recipe->get_path());\n\t\t\tclass_profile->set_custom_data(\"recipes\", recipes);\n\t\t}\n\t}\n\n\temit_signal(\"crafts_recipe_added\", this, craft_recipe);\n\n\tORPC(craft_addc_recipe_id, id);\n}\nvoid Entity::craft_removes_recipe(Ref<CraftRecipe> craft_recipe) {\n\tfor (int i = 0; i < _s_craft_recipes.size(); ++i) {\n\t\tif (_s_craft_recipes.get(i) == craft_recipe) {\n\t\t\t_s_craft_recipes.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\temit_signal(\"crafts_recipe_removed\", this, craft_recipe);\n\n\tORPC(craft_removec_recipe, craft_recipe);\n}\nvoid Entity::craft_removes_recipe_id(int id) {\n\tRef<CraftRecipe> craft_recipe;\n\n\tfor (int i = 0; i < _s_craft_recipes.size(); ++i) {\n\t\tcraft_recipe = _s_craft_recipes.get(i);\n\n\t\tif (craft_recipe->get_id() == id) {\n\t\t\t_s_craft_recipes.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\temit_signal(\"crafts_recipe_removed\", this, craft_recipe);\n\n\tORPC(craft_removec_recipe_id, id);\n}\nRef<CraftRecipe> Entity::craft_gets_recipe(int index) {\n\tERR_FAIL_INDEX_V(index, _s_craft_recipes.size(), Ref<CraftRecipe>());\n\n\treturn _s_craft_recipes.get(index);\n}\nRef<CraftRecipe> Entity::craft_gets_recipe_id(int id) {\n\tfor (int i = 0; i < _s_craft_recipes.size(); ++i) {\n\t\tRef<CraftRecipe> craft_recipe = _s_craft_recipes.get(i);\n\n\t\tif (craft_recipe->get_id() == id) {\n\t\t\treturn craft_recipe;\n\t\t}\n\t}\n\n\treturn Ref<CraftRecipe>();\n}\nint Entity::craft_gets_recipe_count() {\n\treturn _s_craft_recipes.size();\n}\n\nbool Entity::craft_hasc_recipe(Ref<CraftRecipe> craft_recipe) {\n\tfor (int i = 0; i < _c_craft_recipes.size(); ++i) {\n\t\tif (_c_craft_recipes.get(i) == craft_recipe) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nbool Entity::craft_hasc_recipe_id(int id) {\n\tfor (int i = 0; i < _c_craft_recipes.size(); ++i) {\n\t\tRef<CraftRecipe> cr = _c_craft_recipes.get(i);\n\n\t\tERR_CONTINUE(!cr.is_valid());\n\n\t\tif (cr->get_id() == id) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nvoid Entity::craft_addc_recipe(Ref<CraftRecipe> craft_recipe) {\n\tif (craft_hasc_recipe(craft_recipe))\n\t\treturn;\n\n\t_c_craft_recipes.push_back(craft_recipe);\n\n\temit_signal(\"ccraft_recipe_added\", this, craft_recipe);\n}\nvoid Entity::craft_addc_recipe_id(int id) {\n\tERR_FAIL_COND(!ESS::get_singleton());\n\n\tif (craft_hasc_recipe_id(id))\n\t\treturn;\n\n\tRef<CraftRecipe> craft_recipe = ESS::get_singleton()->get_resource_db()->get_craft_recipe(id);\n\n\tERR_FAIL_COND(!craft_recipe.is_valid());\n\n\t_c_craft_recipes.push_back(craft_recipe);\n\n\temit_signal(\"ccraft_recipe_added\", this, craft_recipe);\n}\nvoid Entity::craft_removec_recipe(Ref<CraftRecipe> craft_recipe) {\n\tfor (int i = 0; i < _c_craft_recipes.size(); ++i) {\n\t\tif (_c_craft_recipes.get(i) == craft_recipe) {\n\t\t\t_c_craft_recipes.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\temit_signal(\"ccraft_recipe_removed\", this, craft_recipe);\n}\nvoid Entity::craft_removec_recipe_id(int id) {\n\tRef<CraftRecipe> craft_recipe;\n\n\tfor (int i = 0; i < _c_craft_recipes.size(); ++i) {\n\t\tcraft_recipe = _c_craft_recipes.get(i);\n\n\t\tif (craft_recipe->get_id() == id) {\n\t\t\t_c_craft_recipes.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\temit_signal(\"ccraft_recipe_removed\", this, craft_recipe);\n}\nRef<CraftRecipe> Entity::craft_getc_recipe(int index) {\n\tERR_FAIL_INDEX_V(index, _c_craft_recipes.size(), Ref<CraftRecipe>());\n\n\treturn _c_craft_recipes.get(index);\n}\nint Entity::craft_getc_recipe_count() {\n\treturn _c_craft_recipes.size();\n}\n\nVector<Variant> Entity::scraft_recipes_get() {\n\tVARIANT_ARRAY_GET(_s_craft_recipes);\n}\nvoid Entity::scraft_recipes_set(const Vector<Variant> &resources) {\n\tVARIANT_ARRAY_SET(resources, _s_craft_recipes, CraftRecipe);\n}\n\n////    Stat System    ////\n\nEntityStat Entity::get_stat(const int stat_id) const {\n\tERR_FAIL_INDEX_V(stat_id, ESS::get_singleton()->stat_get_count(), EntityStat());\n\n\treturn _stats[stat_id];\n}\n\nvoid Entity::set_stat(const int stat_id, const EntityStat &entry) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.set(stat_id, entry);\n}\n\nbool Entity::stat_get_dirty(const int stat_id) const {\n\tERR_FAIL_INDEX_V(stat_id, ESS::get_singleton()->stat_get_count(), false);\n\n\treturn _stats[stat_id].dirty;\n}\nvoid Entity::stat_set_dirty(const int stat_id, const bool value) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].dirty = value;\n}\n\nfloat Entity::stat_get_base(const int stat_id) const {\n\tERR_FAIL_INDEX_V(stat_id, ESS::get_singleton()->stat_get_count(), 0);\n\n\treturn _stats[stat_id].base;\n}\nvoid Entity::stat_set_base(const int stat_id, const float value) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].base = value;\n\n\tstat_recalculate(stat_id);\n}\nvoid Entity::stat_mod_base(const int stat_id, const float value) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].base += value;\n\n\tstat_recalculate(stat_id);\n}\n\nfloat Entity::stat_get_base_calculated(const int stat_id) const {\n\tERR_FAIL_INDEX_V(stat_id, ESS::get_singleton()->stat_get_count(), 0);\n\n\treturn _stats[stat_id].base_calculated;\n}\nvoid Entity::stat_set_base_calculated(const int stat_id, const float value) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].base_calculated = value;\n\n\tstat_recalculate(stat_id);\n}\n\nfloat Entity::stat_get_bonus(const int stat_id) const {\n\tERR_FAIL_INDEX_V(stat_id, ESS::get_singleton()->stat_get_count(), 0);\n\n\treturn _stats[stat_id].bonus;\n}\nvoid Entity::stat_set_bonus(const int stat_id, const float value) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].bonus = value;\n\n\tstat_recalculate(stat_id);\n}\nvoid Entity::stat_mod_bonus(const int stat_id, const float value) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].bonus += value;\n\n\tstat_recalculate(stat_id);\n}\n\nfloat Entity::stat_get_percent(const int stat_id) const {\n\tERR_FAIL_INDEX_V(stat_id, ESS::get_singleton()->stat_get_count(), 0);\n\n\treturn _stats[stat_id].percent;\n}\nvoid Entity::stat_set_percent(const int stat_id, const float value) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].percent = value;\n\n\tstat_recalculate(stat_id);\n}\nvoid Entity::stat_mod_percent(const int stat_id, const float value) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].percent += value;\n\n\tstat_recalculate(stat_id);\n}\n\nvoid Entity::stat_mod(const int stat_id, const float base, const float bonus, const float percent) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].base += base;\n\t_stats.write[stat_id].bonus += bonus;\n\t_stats.write[stat_id].percent += percent;\n\n\tstat_recalculate(stat_id);\n}\n\nfloat Entity::stat_gets_current(const int stat_id) const {\n\tERR_FAIL_INDEX_V(stat_id, ESS::get_singleton()->stat_get_count(), 0);\n\n\treturn _stats[stat_id].scurrent;\n}\nvoid Entity::stat_sets_current(const int stat_id, const float value) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].scurrent = value;\n}\n\nfloat Entity::stat_getc_current(const int stat_id) const {\n\tERR_FAIL_INDEX_V(stat_id, ESS::get_singleton()->stat_get_count(), 0);\n\n\treturn _stats[stat_id].ccurrent;\n}\nvoid Entity::stat_setc_current(const int stat_id, const float value) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\t_stats.write[stat_id].ccurrent = value;\n\n\tnotification_cstat_changed(stat_id, value);\n}\n\nvoid Entity::stat_recalculate(const int stat_id) {\n\tERR_FAIL_INDEX(stat_id, ESS::get_singleton()->stat_get_count());\n\n\tstat_sets_current(stat_id, (stat_get_base(stat_id) + stat_get_base_calculated(stat_id) + stat_get_bonus(stat_id)) * (stat_get_percent(stat_id) / 100.0));\n\n\tstat_set_dirty(stat_id, true);\n\n\tnotification_sstat_changed(stat_id, stat_gets_current(stat_id));\n}\n\nvoid Entity::dies() {\n\t//serverside\n\n\tnotification_sdeath();\n\n\t//send an event to client\n\tVRPC(diec);\n\n\t//signal\n\temit_signal(\"diesd\", this);\n}\n\nvoid Entity::diec() {\n\tnotification_cdeath();\n}\n\nvoid Entity::notification_sstat_changed(const int statid, const float current) {\n\tfor (int i = 0; i < _s_resources.size(); ++i) {\n\t\t_s_resources.get(i)->notification_sstat_changed(statid, current);\n\t}\n}\nvoid Entity::notification_cstat_changed(const int statid, const float current) {\n\tfor (int i = 0; i < _c_resources.size(); ++i) {\n\t\t_c_resources.get(i)->notification_cstat_changed(statid, current);\n\t}\n}\n\nvoid Entity::ssend_stat(int id, int ccurrent) {\n\tERR_FAIL_INDEX(id, ESS::get_singleton()->stat_get_count());\n\n\t//Only the owner needs access to stats\n\tORPC(creceive_stat, id, ccurrent);\n}\n\nvoid Entity::creceive_stat(int id, int ccurrent) {\n\tERR_FAIL_INDEX(id, ESS::get_singleton()->stat_get_count());\n\n\tstat_setc_current(id, ccurrent);\n}\n\n////    Equip Slots    ////\n\nbool Entity::equip_should_deny(int equip_slot, Ref<ItemInstance> item) {\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) {\n\t\tif (_s_ai->equip_should_deny(this, equip_slot, item))\n\t\t\treturn true;\n\t}\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tif (ad->get_aura()->equip_should_deny(ad, equip_slot, item))\n\t\t\treturn true;\n\t}\n\n\tif (has_method(\"_equip_should_deny\"))\n\t\tif (call(\"_equip_should_deny\", equip_slot, item))\n\t\t\treturn true;\n\n\treturn false;\n}\n\nvoid Entity::equip_son_success(int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) {\n\t\t_s_ai->equip_son_success(this, equip_slot, item, old_item, bag_slot);\n\t}\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->equip_son_success(ad, equip_slot, item, old_item, bag_slot);\n\t}\n\n\tif (has_method(\"_equip_son_success\"))\n\t\tcall(\"_equip_son_success\", equip_slot, item, old_item, bag_slot);\n\n\temit_signal(\"equip_son_success\", this, equip_slot, item, old_item, bag_slot);\n}\n\nvoid Entity::equip_son_fail(int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) {\n\t\t_s_ai->equip_son_fail(this, equip_slot, item, old_item, bag_slot);\n\t}\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->equip_son_fail(ad, equip_slot, item, old_item, bag_slot);\n\t}\n\n\tif (has_method(\"_equip_son_fail\"))\n\t\tcall(\"_equip_son_fail\", equip_slot, item, old_item, bag_slot);\n\n\temit_signal(\"equip_son_fail\", this, equip_slot, item, old_item, bag_slot);\n}\n\nvoid Entity::equip_con_success(int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) {\n\t\t_s_ai->equip_con_success(this, equip_slot, item, old_item, bag_slot);\n\t}\n\n\tfor (int i = 0; i < _c_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _c_auras.get(i);\n\n\t\tad->get_aura()->equip_con_success(ad, equip_slot, item, old_item, bag_slot);\n\t}\n\n\tif (has_method(\"_equip_con_success\"))\n\t\tcall(\"_equip_con_success\", equip_slot, item, old_item, bag_slot);\n\n\temit_signal(\"equip_con_success\", this, equip_slot, item, old_item, bag_slot);\n}\n\nvoid Entity::equip_con_fail(int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot) {\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) {\n\t\t_s_ai->equip_con_fail(this, equip_slot, item, old_item, bag_slot);\n\t}\n\n\tfor (int i = 0; i < _c_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _c_auras.get(i);\n\n\t\tad->get_aura()->equip_con_fail(ad, equip_slot, item, old_item, bag_slot);\n\t}\n\n\tif (has_method(\"_equip_con_fail\"))\n\t\tcall(\"_equip_con_fail\", equip_slot, item, old_item, bag_slot);\n\n\temit_signal(\"equip_con_fail\", this, equip_slot, item, old_item, bag_slot);\n}\n\nvoid Entity::equip_crequest(int equip_slot, int bag_slot) {\n\tRPCS(equips, equip_slot, bag_slot)\n}\nvoid Entity::equips(int equip_slot, int bag_slot) {\n\tcall(\"_equips\", equip_slot, bag_slot);\n}\nvoid Entity::_equips(int equip_slot, int bag_slot) {\n\tERR_FAIL_INDEX(equip_slot, ESS::get_singleton()->equip_slot_get_count());\n\tERR_FAIL_COND(!_s_bag.is_valid());\n\n\tRef<ItemInstance> bag_item = _s_bag->get_item(bag_slot);\n\tRef<ItemInstance> equipped_item = equip_gets_slot(equip_slot);\n\n\tif (!equip_can_equip_item(equip_slot, bag_item)) {\n\t\tORPC(equip_cfail, equip_slot, bag_slot);\n\t\treturn;\n\t}\n\n\tif (equip_should_deny(equip_slot, bag_item)) {\n\t\tORPC(equip_cfail, equip_slot, bag_slot);\n\t\treturn;\n\t}\n\n\t//check armor type\n\t//check required skills\n\n\tif (equipped_item.is_valid())\n\t\tequip_deapplys_item(equipped_item);\n\n\tif (bag_item.is_valid())\n\t\tequip_applys_item(bag_item);\n\n\tequip_sets_slot(equip_slot, bag_item);\n\t_s_bag->add_item_at(bag_slot, equipped_item, false);\n\n\tORPC(equip_csuccess, equip_slot, bag_slot);\n}\nvoid Entity::equip_csuccess(int equip_slot, int bag_slot) {\n\tERR_FAIL_INDEX(equip_slot, ESS::get_singleton()->equip_slot_get_count());\n\tERR_FAIL_COND(!_c_bag.is_valid());\n\n\tRef<ItemInstance> old_bag_item = _c_bag->get_item(bag_slot);\n\tRef<ItemInstance> old_equipped_item = equip_getc_slot(equip_slot);\n\n\t_c_bag->add_item_at(bag_slot, old_equipped_item);\n\tequip_setc_slot(equip_slot, old_bag_item);\n\n\tif (old_equipped_item.is_valid())\n\t\tequip_deapplyc_item(old_equipped_item);\n\n\tif (old_bag_item.is_valid())\n\t\tequip_applyc_item(old_bag_item);\n\n\tequip_con_success(equip_slot, old_bag_item, old_equipped_item, bag_slot);\n}\nvoid Entity::equip_cfail(int equip_slot, int bag_slot) {\n\tERR_FAIL_INDEX(equip_slot, ESS::get_singleton()->equip_slot_get_count());\n\tERR_FAIL_COND(!_c_bag.is_valid());\n\n\tRef<ItemInstance> bag_item = _c_bag->get_item(bag_slot);\n\tRef<ItemInstance> equipped_item = equip_getc_slot(equip_slot);\n\n\tequip_con_fail(equip_slot, equipped_item, bag_item, bag_slot);\n}\n\nRef<ItemInstance> Entity::equip_gets_slot(int index) {\n\tERR_FAIL_INDEX_V(index, ESS::get_singleton()->equip_slot_get_count(), Ref<ItemInstance>());\n\n\treturn _s_equipment[index];\n}\nvoid Entity::equip_sets_slot(int index, Ref<ItemInstance> item) {\n\tERR_FAIL_INDEX(index, ESS::get_singleton()->equip_slot_get_count());\n\n\t_s_equipment.write[index] = item;\n}\n\nRef<ItemInstance> Entity::equip_getc_slot(int index) {\n\tERR_FAIL_INDEX_V(index, ESS::get_singleton()->equip_slot_get_count(), Ref<ItemInstance>());\n\n\treturn _c_equipment[index];\n}\nvoid Entity::equip_setc_slot(int index, Ref<ItemInstance> item) {\n\tERR_FAIL_INDEX(index, ESS::get_singleton()->equip_slot_get_count());\n\n\t_c_equipment.write[index] = item;\n}\n\nbool Entity::equip_can_equip_item(int equip_slot, Ref<ItemInstance> item) {\n\treturn call(\"_equip_can_equip_item\", equip_slot, item);\n}\nbool Entity::_equip_can_equip_item(int equip_slot, Ref<ItemInstance> item) {\n\t//deequip\n\tif (!item.is_valid())\n\t\treturn true;\n\n\tRef<ItemTemplate> it = item->get_item_template();\n\n\tERR_FAIL_COND_V(!it.is_valid(), false);\n\n\treturn it->get_equip_slot() == equip_slot;\n}\n\nvoid Entity::equip_applys_item(Ref<ItemInstance> item) {\n\tcall(\"_equip_applys_item\", item);\n}\nvoid Entity::equip_deapplys_item(Ref<ItemInstance> item) {\n\tcall(\"_equip_deapplys_item\", item);\n}\n\nvoid Entity::_equip_applys_item(Ref<ItemInstance> item) {\n\tERR_FAIL_COND(!item.is_valid());\n\n\tRef<ItemTemplate> it = item->get_item_template();\n\n\tERR_FAIL_COND(!it.is_valid());\n\n\tfor (int i = 0; i < item->stat_modifier_get_count(); ++i) {\n\t\tint sid = item->stat_modifier_get_stat_id(i);\n\n\t\tstat_mod_base(sid, item->stat_modifier_get_base_mod(i));\n\t\tstat_mod_bonus(sid, item->stat_modifier_get_bonus_mod(i));\n\t\tstat_mod_percent(sid, item->stat_modifier_get_percent_mod(i));\n\t}\n}\nvoid Entity::_equip_deapplys_item(Ref<ItemInstance> item) {\n\tERR_FAIL_COND(!item.is_valid());\n\n\tRef<ItemTemplate> it = item->get_item_template();\n\n\tERR_FAIL_COND(!it.is_valid());\n\n\tfor (int i = 0; i < item->stat_modifier_get_count(); ++i) {\n\t\tint sid = item->stat_modifier_get_stat_id(i);\n\n\t\tstat_mod_base(sid, -item->stat_modifier_get_base_mod(i));\n\t\tstat_mod_bonus(sid, -item->stat_modifier_get_bonus_mod(i));\n\t\tstat_mod_percent(sid, -item->stat_modifier_get_percent_mod(i));\n\t}\n}\n\nvoid Entity::equip_applyc_item(Ref<ItemInstance> item) {\n\tcall(\"_equip_applyc_item\", item);\n}\nvoid Entity::equip_deapplyc_item(Ref<ItemInstance> item) {\n\tcall(\"_equip_deapplyc_item\", item);\n}\n\nvoid Entity::_equip_applyc_item(Ref<ItemInstance> item) {\n\tERR_FAIL_COND(!item.is_valid());\n\n\tRef<ItemTemplate> it = item->get_item_template();\n\n\tERR_FAIL_COND(!it.is_valid());\n\n\tif (it->get_model_visual().is_valid() && INSTANCE_VALIDATE(_character_skeleton)) {\n\t\tif (_character_skeleton->has_method(\"add_model_visual\"))\n\t\t\t_character_skeleton->call(\"add_model_visual\", it->get_model_visual());\n\t}\n}\nvoid Entity::_equip_deapplyc_item(Ref<ItemInstance> item) {\n\tERR_FAIL_COND(!item.is_valid());\n\n\tRef<ItemTemplate> it = item->get_item_template();\n\n\tERR_FAIL_COND(!it.is_valid());\n\n\tif (it->get_model_visual().is_valid() && INSTANCE_VALIDATE(_character_skeleton)) {\n\t\tif (_character_skeleton->has_method(\"remove_model_visual\"))\n\t\t\t_character_skeleton->call(\"remove_model_visual\", it->get_model_visual());\n\t}\n}\n\n////    Resources    ////\n\nRef<EntityResource> Entity::resource_gets_index(int index) {\n\tERR_FAIL_INDEX_V(index, _s_resources.size(), Ref<EntityResource>());\n\n\treturn _s_resources.get(index);\n}\nRef<EntityResource> Entity::resource_gets_id(int id) {\n\tfor (int i = EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN; i < _s_resources.size(); ++i) {\n\t\tRef<EntityResource> r = _s_resources.get(i);\n\n\t\tif (r->get_id() == id) {\n\t\t\treturn r;\n\t\t}\n\t}\n\n\treturn Ref<EntityResource>();\n}\nvoid Entity::resource_adds(Ref<EntityResource> resource) {\n\tERR_FAIL_COND(!resource.is_valid());\n\n\t_s_resources.push_back(resource);\n\n\tresource->ons_added(this);\n\n\tnotification_sentity_resource_added(resource);\n\n\tVRPCOBJP(resource_addc_rpc, _s_resources.size() - 1, JSON::stringify(resource->to_dict()), resource_addc, _s_resources.size() - 1, resource);\n}\nint Entity::resource_gets_count() {\n\treturn _s_resources.size();\n}\nvoid Entity::resource_removes(int index) {\n\tERR_FAIL_INDEX(index, _s_resources.size());\n\n\tRef<EntityResource> res = _s_resources.get(index);\n\t_s_resources.remove_at(index);\n\n\tnotification_sentity_resource_removed(res);\n\n\tVRPC(resource_removec, index);\n}\nvoid Entity::resource_clears() {\n\t_s_resources.resize(EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN);\n\n\tVRPC(resource_clearc);\n}\n\nvoid Entity::resource_addc_rpc(int index, String data) {\n\t//Ref<EntityResource> res;\n\n\tDictionary dict = data_as_dict(data);\n\t/*\n\tString clsname = dict.get(\"id\", \"EntityResource\");\n\n\tres = Ref<EntityResource>(Object::cast_to<EntityResource>(ClassDB::instance(clsname)));\n\n\tERR_FAIL_COND(!res.is_valid());\n\t//res.instantiate();\n\n\tString script_path = dict.get(\"script\", \"\");\n\n\tRef<Script> s;\n\tif (script_path != \"\") {\n\t\tif (ResourceLoader::exists(script_path)) {\n\t\t\ts = ResourceLoader::load(script_path);\n\n\t\t\tif (s.is_valid()) {\n\t\t\t\tres->set_script(s.get_ref_ptr());\n\t\t\t} else {\n\t\t\t\tERR_PRINT(\"Error, script is not valid! \" + script_path);\n\t\t\t}\n\t\t}\n\t}\n\n\tDictionary d = dict.get(\"data\", Dictionary());\n\tres->from_dict(d);\n\tres->resolve_references();\n*/\n\n\tint data_id = dict.get(\"data_id\", 0);\n\n\tRef<EntityResource> resd = ESS::get_singleton()->get_resource_db()->get_entity_resource(data_id);\n\n\tERR_FAIL_COND(!resd.is_valid());\n\n\tRef<EntityResource> res = resd->duplicate();\n\n\tERR_FAIL_COND(!res.is_valid());\n\n\tres->from_dict(dict);\n\n\tresource_addc(index, res);\n}\n\nRef<EntityResource> Entity::resource_getc_index(int index) {\n\tERR_FAIL_INDEX_V(index, _c_resources.size(), Ref<EntityResource>());\n\n\treturn _c_resources.get(index);\n}\nRef<EntityResource> Entity::resource_getc_id(int id) {\n\tfor (int i = EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN; i < _c_resources.size(); ++i) {\n\t\tRef<EntityResource> r = _c_resources.get(i);\n\n\t\tif (r->get_id() == id) {\n\t\t\treturn r;\n\t\t}\n\t}\n\n\treturn Ref<EntityResource>(NULL);\n}\nvoid Entity::resource_addc(int index, Ref<EntityResource> resource) {\n\tERR_FAIL_COND(!resource.is_valid());\n\n\tif (_c_resources.size() <= index) {\n\t\t_c_resources.resize(index + 1);\n\t}\n\n\t_c_resources.set(index, resource);\n\n\tresource->onc_added(this);\n\n\tnotification_centity_resource_added(resource);\n}\nint Entity::resource_getc_count() {\n\treturn _c_resources.size();\n}\nvoid Entity::resource_removec(int index) {\n\tERR_FAIL_INDEX(index, _c_resources.size());\n\n\tRef<EntityResource> res = _c_resources.get(index);\n\t_c_resources.remove_at(index);\n\n\tnotification_centity_resource_removed(res);\n}\nvoid Entity::resource_clearc() {\n\t_c_resources.resize(EntityEnums::ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN);\n}\n\nvoid Entity::resource_sends_current(int index, int current) {\n\tVRPC(resource_creceive_current, index, current);\n}\nvoid Entity::resource_sends_curr_max(int index, int current, int max) {\n\tVRPC(resource_creceive_curr_max, index, current, max);\n}\nvoid Entity::resource_sends_data(int index, String data) {\n\tVRPC(resource_creceive_data, index, data);\n}\n\nvoid Entity::resource_creceive_current(int index, int current) {\n\tERR_FAIL_INDEX(index, _c_resources.size());\n\n\tRef<EntityResource> res = _c_resources.get(index);\n\n\tERR_FAIL_COND(!res.is_valid());\n\n\tres->receivec_update(current);\n}\nvoid Entity::resource_creceive_curr_max(int index, int current, int max) {\n\tERR_FAIL_INDEX(index, _c_resources.size());\n\n\tRef<EntityResource> res = _c_resources.get(index);\n\n\tERR_FAIL_COND(!res.is_valid());\n\n\tres->receivec_update_full(current, max);\n}\nvoid Entity::resource_creceive_data(int index, String data) {\n\tERR_FAIL_INDEX(index, _c_resources.size());\n\n\tRef<EntityResource> res = _c_resources.get(index);\n\n\tERR_FAIL_COND(!res.is_valid());\n\n\tres->receivec_update_string(data);\n}\n\nRef<EntityResource> Entity::gets_health() {\n\treturn _s_resources.get(EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH);\n}\nRef<EntityResource> Entity::gets_speed() {\n\treturn _s_resources.get(EntityEnums::ENTITY_RESOURCE_INDEX_SPEED);\n}\nRef<EntityResource> Entity::getc_health() {\n\treturn _c_resources.get(EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH);\n}\nRef<EntityResource> Entity::getc_speed() {\n\treturn _c_resources.get(EntityEnums::ENTITY_RESOURCE_INDEX_SPEED);\n}\n\nVector<Variant> Entity::sresources_get() {\n\tVARIANT_ARRAY_GET(_s_resources);\n}\nvoid Entity::sresources_set(const Vector<Variant> &resources) {\n\tVARIANT_ARRAY_SET(resources, _s_resources, EntityResource);\n\n\tfor (int i = 0; i < _s_resources.size(); ++i) {\n\t\tRef<EntityResource> res = _s_resources[i];\n\n\t\tERR_CONTINUE(!res.is_valid());\n\n\t\tres->set_owner(this);\n\t}\n}\n\nvoid Entity::stake_damage(Ref<SpellDamageInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\t//serverside\n\n\tif (gets_is_dead()) {\n\t\treturn;\n\t}\n\n\tnotification_sdamage(SpellEnums::NOTIFICATION_DAMAGE_BEFORE_HIT, info);\n\n\tif (info->get_immune()) {\n\t\tVRPCOBJ12(cdamage_dealt_rpc, JSON::stringify(info->to_dict()), notification_cdamage, SpellEnums::NOTIFICATION_DAMAGE_DAMAGE_DEALT, info);\n\n\t\treturn;\n\t}\n\n\t//send it through the passive damage reductions pipeline\n\tsapply_passives_damage_receive(info);\n\n\t//send it through the onbeforehit handler\n\tnotification_sdamage(SpellEnums::NOTIFICATION_DAMAGE_BEFORE_DAMAGE, info);\n\n\t//send it throug the onhit pipeliine\n\tnotification_sdamage(SpellEnums::NOTIFICATION_DAMAGE_HIT, info);\n\n\tnotification_sdamage(SpellEnums::NOTIFICATION_DAMAGE_RECEIVE, info);\n\n\tRef<EntityResource> hp = resource_gets_index(EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH);\n\tERR_FAIL_COND(!hp.is_valid());\n\n\tint h = hp->get_current_value() - info->damage_get();\n\n\tif (h < 0) {\n\t\th = 0;\n\t}\n\n\thp->set_current_value(h);\n\n\tnotification_sdamage(SpellEnums::NOTIFICATION_DAMAGE_DAMAGE_DEALT, info);\n\n\t//signal\n\temit_signal(\"son_damage_received\", this, info);\n\n\t//send an event to client\n\tVRPCOBJ12(cdamage_dealt_rpc, JSON::stringify(info->to_dict()), notification_cdamage, SpellEnums::NOTIFICATION_DAMAGE_DAMAGE_DEALT, info);\n\n\tif (hp->get_current_value() <= 0) {\n\t\tdies();\n\t}\n}\n\nvoid Entity::sdeal_damage_to(Ref<SpellDamageInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\t//serverside\n\n\tif (gets_is_dead()) {\n\t\treturn;\n\t}\n\n\tsapply_passives_damage_deal(info);\n\tinfo->receiver_get()->stake_damage(info);\n\tnotification_sdamage(SpellEnums::NOTIFICATION_DAMAGE_DEALT_DAMAGE, info);\n\n\t//send an event to client\n\tVRPCOBJ12(cdealt_damage_rpc, JSON::stringify(info->to_dict()), notification_cdamage, SpellEnums::NOTIFICATION_DAMAGE_DEALT_DAMAGE, info);\n\n\t//signal\n\temit_signal(\"son_dealt_damage\", this, info);\n}\n\nvoid Entity::stake_heal(Ref<SpellHealInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\t//serverside\n\n\tif (gets_is_dead()) {\n\t\treturn;\n\t}\n\n\tnotification_sheal(SpellEnums::NOTIFICATION_HEAL_BEFORE_HIT, info);\n\n\tif (info->get_immune()) {\n\t\tVRPCOBJ12(cheal_dealt_rpc, JSON::stringify(info->to_dict()), notification_cheal, SpellEnums::NOTIFICATION_HEAL_HEAL_DEALT, info);\n\t\treturn;\n\t}\n\n\t//send it through the passive damage reductions pipeline\n\tsapply_passives_heal_receive(info);\n\n\t//send it through the onbeforehit handler\n\tnotification_sheal(SpellEnums::NOTIFICATION_HEAL_BEFORE_HEAL, info);\n\n\tnotification_sheal(SpellEnums::NOTIFICATION_HEAL_RECEIVE, info);\n\n\tRef<EntityResource> hp = resource_gets_index(EntityEnums::ENTITY_RESOURCE_INDEX_HEALTH);\n\tERR_FAIL_COND(!hp.is_valid());\n\n\tint h = hp->get_current_value() + info->heal_get();\n\n\tif (h > hp->get_max_value()) {\n\t\th = hp->get_max_value();\n\t}\n\thp->set_current_value(h);\n\n\t//send an event to client\n\tVRPCOBJ12(cheal_dealt_rpc, JSON::stringify(info->to_dict()), notification_cheal, SpellEnums::NOTIFICATION_HEAL_HEAL_DEALT, info);\n\n\t//signal\n\temit_signal(\"son_heal_received\", this, info);\n}\n\nvoid Entity::sdeal_heal_to(Ref<SpellHealInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\tERR_FAIL_COND(info->receiver_get() == NULL);\n\n\t//serverside\n\n\tif (gets_is_dead()) {\n\t\treturn;\n\t}\n\n\tsapply_passives_heal_deal(info);\n\tinfo->receiver_get()->stake_heal(info);\n\tnotification_sheal(SpellEnums::NOTIFICATION_HEAL_HEAL_DEALT, info);\n\n\tVRPCOBJ12(cdealt_heal_rpc, JSON::stringify(info->to_dict()), notification_cheal, SpellEnums::NOTIFICATION_HEAL_DEALT_HEAL, info);\n\n\temit_signal(\"son_heal_dealt\", this, info);\n}\n\n//Damage, Heal RPCs\nvoid Entity::cdamage_dealt_rpc(String data) {\n\tRef<SpellDamageInfo> info;\n\tinfo.instantiate();\n\tinfo->from_dict(data_as_dict(data));\n\tinfo->resolve_references(this);\n\n\tnotification_cdamage(SpellEnums::NOTIFICATION_DAMAGE_DAMAGE_DEALT, info);\n}\nvoid Entity::cdealt_damage_rpc(String data) {\n\tRef<SpellDamageInfo> info;\n\tinfo.instantiate();\n\tinfo->from_dict(data_as_dict(data));\n\tinfo->resolve_references(this);\n\n\tnotification_cdamage(SpellEnums::NOTIFICATION_DAMAGE_DEALT_DAMAGE, info);\n}\nvoid Entity::cheal_dealt_rpc(String data) {\n\tRef<SpellHealInfo> info;\n\tinfo.instantiate();\n\tinfo->from_dict(data_as_dict(data));\n\tinfo->resolve_references(this);\n\n\tnotification_cheal(SpellEnums::NOTIFICATION_HEAL_HEAL_DEALT, info);\n}\nvoid Entity::cdealt_heal_rpc(String data) {\n\tRef<SpellHealInfo> info;\n\tinfo.instantiate();\n\tinfo->from_dict(data_as_dict(data));\n\tinfo->resolve_references(this);\n\n\tnotification_cheal(SpellEnums::NOTIFICATION_HEAL_DEALT_HEAL, info);\n}\n\n//Interactions\nbool Entity::cans_interact() {\n\tif (!_s_entity_data.is_valid()) {\n\t\tif (has_method(\"_cans_interact\")) {\n\t\t\treturn call(\"_cans_interact\");\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn _s_entity_data->cans_interact(this);\n}\n\nvoid Entity::sinteract() {\n\tif (!cans_interact()) {\n\t\treturn;\n\t}\n\n\tif (!_s_entity_data.is_valid()) {\n\t\tif (has_method(\"_sinteract\")) {\n\t\t\tcall(\"_sinteract\");\n\t\t}\n\t}\n\n\t_s_entity_data->sinteract(this);\n}\n\nbool Entity::canc_interact() {\n\tif (has_method(\"_canc_interact\")) {\n\t\treturn call(\"_canc_interact\");\n\t}\n\n\tif (!INSTANCE_VALIDATE(_c_target)) {\n\t\treturn false;\n\t}\n\n\tEntityEnums::EntityInteractionType it = _c_target->getc_entity_interaction_type();\n\n\tif (it == EntityEnums::ENITIY_INTERACTION_TYPE_NONE || it == EntityEnums::ENITIY_INTERACTION_TYPE_NORMAL) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nvoid Entity::crequest_interact() {\n\tsinteract();\n}\n\nvoid Entity::ssend_open_window(int window_id) {\n\tORPC(copen_window, window_id);\n}\nvoid Entity::copen_window(int window_id) {\n\temit_signal(\"onc_open_winow_request\", window_id);\n}\n\nbool Entity::iss_target_in_interact_range() {\n\treturn call(\"_iss_target_in_interact_range\");\n}\nbool Entity::isc_target_in_interact_range() {\n\treturn call(\"_isc_target_in_interact_range\");\n}\nbool Entity::_iss_target_in_interact_range() {\n\tEntity *t = gets_target();\n\n\tif (!INSTANCE_VALIDATE(t)) {\n\t\treturn false;\n\t}\n\n\tNode2D *b2d = get_body_2d();\n\n\tif (b2d) {\n\t\tNode2D *tb = t->get_body_2d();\n\n\t\tif (!tb) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (b2d->get_transform().get_origin() - tb->get_transform().get_origin()).length_squared() <= EntityEnums::ENTITY_INTERACT_RANGE_SQUARED;\n\t}\n\n\tSpatial *b3d = get_body_3d();\n\n\tif (b3d) {\n\t\tSpatial *tb = t->get_body_3d();\n\n\t\tif (!tb) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (b3d->get_transform().get_origin() - tb->get_transform().get_origin()).length_squared() <= EntityEnums::ENTITY_INTERACT_RANGE_SQUARED;\n\t}\n\n\treturn false;\n}\nbool Entity::_isc_target_in_interact_range() {\n\tEntity *t = getc_target();\n\n\tif (!INSTANCE_VALIDATE(t)) {\n\t\treturn false;\n\t}\n\n\tNode2D *b2d = get_body_2d();\n\n\tif (b2d) {\n\t\tNode2D *tb = t->get_body_2d();\n\n\t\tif (!tb) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (b2d->get_transform().get_origin() - tb->get_transform().get_origin()).length_squared() <= EntityEnums::ENTITY_INTERACT_RANGE_SQUARED;\n\t}\n\n\tSpatial *b3d = get_body_3d();\n\n\tif (b3d) {\n\t\tSpatial *tb = t->get_body_3d();\n\n\t\tif (!tb) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (b3d->get_transform().get_origin() - tb->get_transform().get_origin()).length_squared() <= EntityEnums::ENTITY_INTERACT_RANGE_SQUARED;\n\t}\n\n\treturn false;\n}\n\n//XP Operations\nvoid Entity::xp_adds(int value) {\n\t_s_xp += value;\n\n\tnotification_sxp_gained(value);\n\n\tORPC(xp_addc, value);\n}\nvoid Entity::xp_addc(int value) {\n\t_c_xp += value;\n\n\tnotification_cxp_gained(value);\n}\n\nvoid Entity::levelups(int value) {\n\tif (value <= 0)\n\t\treturn;\n\n\tif (_s_level == ESS::get_singleton()->get_max_character_level())\n\t\treturn;\n\n\t_s_level += value;\n\n\tnotification_slevel_up(value);\n\n\tVRPC(levelupc, value);\n}\nvoid Entity::levelupc(int value) {\n\t_c_level += value;\n\n\tnotification_clevel_up(value);\n}\n\n////    Spell System    ////\n\nvoid Entity::spell_casts(int spell_id) {\n\tif (_s_spells.size() == 0) {\n\t\treturn;\n\t}\n\n\tfor (int i = 0; i < _s_spells.size(); i++) {\n\t\tRef<Spell> s = _s_spells[i];\n\n\t\tERR_CONTINUE(!s.is_valid());\n\n\t\tif (s->get_id() == spell_id) {\n\t\t\ts->cast_starts_simple(this, 1);\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nvoid Entity::spell_crequest_cast(int spell_id) {\n\tRPCS(spell_casts, spell_id);\n}\n\nvoid Entity::item_uses(int item_id) {\n\tcall(\"_item_uses\", item_id);\n}\nvoid Entity::item_crequest_use(int item_id) {\n\tRPCS(item_uses, item_id);\n}\nvoid Entity::_item_uses(int item_id) {\n\tRef<ItemTemplate> it = ESS::get_singleton()->get_resource_db()->get_item_template(item_id);\n\n\tERR_FAIL_COND(!it.is_valid());\n\n\tRef<Spell> sp = it->get_use_spell();\n\n\tERR_FAIL_COND(!sp.is_valid());\n\n\tItemEnums::ItemType type = it->get_item_type();\n\n\tif (type == ItemEnums::ITEM_TYPE_EQUIPMENT) {\n\t\tRef<ItemInstance> ii = equip_gets_slot(it->get_equip_slot());\n\n\t\tif (!ii.is_valid())\n\t\t\treturn;\n\n\t\tif (ii->get_item_template() != it)\n\t\t\treturn;\n\n\t\tRef<SpellCastInfo> info;\n\t\tinfo.instantiate();\n\n\t\tinfo->caster_set(this);\n\t\tinfo->target_set(gets_target());\n\t\tinfo->has_cast_time_set(sp->cast_time_get_enabled());\n\t\tinfo->cast_time_set(sp->cast_time_get());\n\t\tinfo->spell_scale_set(1);\n\t\tinfo->set_spell(sp);\n\t\tinfo->set_source_item(ii);\n\t\tinfo->set_source_template(it);\n\n\t\tcast_starts(info);\n\n\t\tsp->cast_starts(info);\n\t} else {\n\t\tif (!gets_bag()->has_item(it, 1))\n\t\t\treturn;\n\n\t\tRef<SpellCastInfo> info;\n\t\tinfo.instantiate();\n\n\t\tinfo->caster_set(this);\n\t\tinfo->target_set(gets_target());\n\t\tinfo->has_cast_time_set(sp->cast_time_get_enabled());\n\t\tinfo->cast_time_set(sp->cast_time_get());\n\t\tinfo->spell_scale_set(1);\n\t\tinfo->set_spell(sp);\n\t\tinfo->set_source_template(it);\n\n\t\tcast_starts(info);\n\n\t\tsp->cast_starts(info);\n\t}\n}\n\nvoid Entity::update_auras(float delta) {\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->aura_supdate(ad, delta);\n\t}\n}\n\nvoid Entity::sapply_passives_damage_receive(Ref<SpellDamageInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->aura_sapply_passives_damage_receive(info);\n\t}\n}\n\nvoid Entity::sapply_passives_damage_deal(Ref<SpellDamageInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->aura_sapply_passives_damage_deal(info);\n\t}\n}\n\nvoid Entity::sapply_passives_heal_receive(Ref<SpellHealInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->aura_sapply_passives_heal_receive(info);\n\t}\n}\n\nvoid Entity::sapply_passives_heal_deal(Ref<SpellHealInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->aura_sapply_passives_heal_deal(info);\n\t}\n}\n\nvoid Entity::notification_saura(int what, Ref<AuraData> data) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) {\n\t\t_s_ai->notification_saura(what, data);\n\t}\n\n\tif (has_method(\"_notification_saura\"))\n\t\tcall(\"_notification_saura\", what, data);\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->notification_saura(what, data);\n\t}\n\n\temit_signal(\"notification_saura\", what, data);\n}\nvoid Entity::notification_sheal(int what, Ref<SpellHealInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) {\n\t\t_s_ai->notification_sheal(what, info);\n\t}\n\n\tif (has_method(\"_notification_sheal\"))\n\t\tcall(\"_notification_sheal\", what, info);\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->notification_sheal(what, ad, info);\n\t}\n}\nvoid Entity::notification_scast(int what, Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tNOTIFICATION_AURA_DIFF_IMPLS(notification_scast, notification_aura_scast, \"notification_scast\", what, info);\n}\nvoid Entity::notification_sdamage(int what, Ref<SpellDamageInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) {\n\t\t_s_ai->notification_sdamage(what, info);\n\t}\n\n\tif (has_method(\"_notification_sdamage\"))\n\t\tcall(\"_notification_sdamage\", what, info);\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->notification_sdamage(what, ad, info);\n\t}\n}\n\nvoid Entity::notification_sdeath() {\n\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid()) {\n\t\t_s_ai->notification_sdeath(this);\n\t}\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->notification_sdeath(ad);\n\t}\n\n\tif (has_method(\"_notification_sdeath\"))\n\t\tcall(\"_notification_sdeath\");\n}\n\nvoid Entity::notification_scooldown_added(int id, float value) {\n\tNOTIFICATION_RES_IMPLS(notification_scooldown_added, \"scooldown_added\", id, value);\n}\nvoid Entity::notification_scooldown_removed(int id, float value) {\n\tNOTIFICATION_RES_IMPLS(notification_scooldown_removed, \"scooldown_removed\", id, value);\n}\n\nvoid Entity::notification_scategory_cooldown_added(int id, float value) {\n\tNOTIFICATION_RES_IMPLS(notification_scategory_cooldown_added, \"scategory_cooldown_added\", id, value);\n}\nvoid Entity::notification_scategory_cooldown_removed(int id, float value) {\n\tNOTIFICATION_RES_IMPLS(notification_scategory_cooldown_removed, \"scategory_cooldown_removed\", id, value);\n}\n\nvoid Entity::notification_sgcd_started() {\n\tNOTIFICATION_IMPLS(notification_sgcd_started, \"sgcd_started\", _s_gcd);\n}\nvoid Entity::notification_sgcd_finished() {\n\tNOTIFICATION_IMPLSS(notification_sgcd_finished, \"sgcd_finished\");\n}\nvoid Entity::notification_cgcd_started() {\n\tNOTIFICATION_IMPLC(notification_cgcd_started, \"cgcd_started\", _c_gcd);\n}\nvoid Entity::notification_cgcd_finished() {\n\tNOTIFICATION_IMPLCS(notification_cgcd_finished, \"cgcd_finished\");\n}\n\nvoid Entity::son_physics_process(float delta) {\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->son_physics_process_aura(ad);\n\t}\n\n\tif (_physics_process_scis.size() > 0) {\n\t\tfor (int i = 0; i < _physics_process_scis.size(); ++i) {\n\t\t\tRef<SpellCastInfo> sci = _physics_process_scis.get(i);\n\n\t\t\tERR_CONTINUE(!sci.is_valid());\n\n\t\t\tsci->physics_process(delta);\n\t\t}\n\n\t\t_physics_process_scis.clear();\n\t}\n}\n\nvoid Entity::notification_sxp_gained(int value) {\n\tNOTIFICATION_IMPLS(notification_sxp_gained, \"notification_sxp_gained\", value);\n}\n\nvoid Entity::notification_slevel_up(int value) {\n\tNOTIFICATION_IMPLS(notification_slevel_up, \"notification_slevel_up\", value);\n}\n\nvoid Entity::notification_sentity_resource_added(Ref<EntityResource> resource) {\n\tNOTIFICATION_RES_IMPLS(notification_sentity_resource_added, \"sentity_resource_added\", resource);\n}\n\nvoid Entity::notification_sentity_resource_removed(Ref<EntityResource> resource) {\n\tNOTIFICATION_RES_IMPLS(notification_sentity_resource_removed, \"sentity_resource_removed\", resource);\n}\n\nvoid Entity::aura_adds(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tnotification_saura(SpellEnums::NOTIFICATION_AURA_BEFORE_APPLIED, aura);\n\n\taura->set_owner(this);\n\n\t_s_auras.push_back(aura);\n\n\tnotification_saura(SpellEnums::NOTIFICATION_AURA_AFTER_APPLIED, aura);\n\n\tnotification_saura(SpellEnums::NOTIFICATION_AURA_ADDED, aura);\n\n\tif (!aura->get_aura()->aura_get_hide())\n\t\tVRPCOBJ(aura_addc_rpc, JSON::stringify(aura->to_dict()), aura_addc, aura);\n}\n\nvoid Entity::aura_removes(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tint aid = aura->get_aura_id();\n\tEntity *caster = aura->caster_get();\n\n\tRef<AuraData> a;\n\tbool removed = false;\n\tfor (int i = 0; i < _s_auras.size(); i++) {\n\t\ta = _s_auras.get(i);\n\n\t\tif (a->get_aura_id() == aid && a->caster_get() == caster) {\n\t\t\t_s_auras.remove_at(i);\n\t\t\tremoved = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (removed) {\n\t\tnotification_saura(SpellEnums::NOTIFICATION_AURA_REMOVED, a);\n\n\t\tif (!aura->get_aura()->aura_get_hide())\n\t\t\tVRPCOBJ(aura_removec_rpc, JSON::stringify(aura->to_dict()), aura_removec, aura);\n\t}\n}\n\nvoid Entity::aura_removes_exact(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tfor (int i = 0; i < _s_auras.size(); i++) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tif (ad == aura) {\n\t\t\tad->get_aura()->son_remove(ad);\n\n\t\t\t_s_auras.remove_at(i);\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tnotification_saura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);\n\n\tif (!aura->get_aura()->aura_get_hide())\n\t\tVRPCOBJ(aura_removec_rpc, JSON::stringify(aura->to_dict()), aura_removec, aura);\n}\n\nvoid Entity::aura_removes_expired(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tfor (int i = 0; i < _s_auras.size(); i++) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tif (ad == aura) {\n\t\t\tad->get_aura()->son_remove(ad);\n\n\t\t\t_s_auras.remove_at(i);\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tnotification_saura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);\n\n\tif (!aura->get_aura()->aura_get_hide())\n\t\tVRPCOBJ(aura_removec_rpc, JSON::stringify(aura->to_dict()), aura_removec, aura);\n}\n\nvoid Entity::aura_removes_dispelled(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tfor (int i = 0; i < _s_auras.size(); i++) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tif (ad == aura) {\n\t\t\tad->get_aura()->son_remove(ad);\n\n\t\t\t_s_auras.remove_at(i);\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tnotification_saura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);\n\n\tif (!aura->get_aura()->aura_get_hide())\n\t\tVRPCOBJ(aura_removec_rpc, JSON::stringify(aura->to_dict()), aura_removec, aura);\n}\n\nvoid Entity::aura_refresheds(Ref<AuraData> aura) {\n\t//ERR_EXPLAIN(\"NYI\");\n\tERR_FAIL();\n\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tnotification_saura(SpellEnums::NOTIFICATION_AURA_REFRESHED, aura);\n\n\tif (!aura->get_aura()->aura_get_hide())\n\t\tVRPCOBJ(aura_refreshedc_rpc, JSON::stringify(aura->to_dict()), aura_refreshedc, aura);\n}\n\nvoid Entity::aura_addc_rpc(String data) {\n\tRef<AuraData> aura;\n\taura.instantiate();\n\taura->from_dict(data_as_dict(data));\n\taura->set_owner(this);\n\taura->resolve_references(this);\n\n\taura_addc(aura);\n}\n\nvoid Entity::aura_removec_rpc(String data) {\n\tRef<AuraData> aura;\n\taura.instantiate();\n\taura->from_dict(data_as_dict(data));\n\taura->set_owner(this);\n\taura->resolve_references(this);\n\n\taura_removec(aura);\n}\n\nvoid Entity::aura_removec_exact_rpc(String data) {\n\tRef<AuraData> aura;\n\taura.instantiate();\n\taura->from_dict(data_as_dict(data));\n\taura->set_owner(this);\n\taura->resolve_references(this);\n\n\taura_removec_exact(aura);\n}\n\nvoid Entity::aura_removec_expired_rpc(String data) {\n\tRef<AuraData> aura;\n\taura.instantiate();\n\taura->from_dict(data_as_dict(data));\n\taura->set_owner(this);\n\taura->resolve_references(this);\n\n\taura_removec_expired(aura);\n}\n\nvoid Entity::aura_removec_dispelled_rpc(String data) {\n\tRef<AuraData> aura;\n\taura.instantiate();\n\taura->from_dict(data_as_dict(data));\n\taura->set_owner(this);\n\taura->resolve_references(this);\n\n\taura_removec_dispelled(aura);\n}\n\nvoid Entity::aura_refreshedc_rpc(String data) {\n\tRef<AuraData> aura;\n\taura.instantiate();\n\taura->from_dict(data_as_dict(data));\n\taura->set_owner(this);\n\taura->resolve_references(this);\n\n\taura_refreshedc(aura);\n}\n\nvoid Entity::aura_addc(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\t_c_auras.push_back(aura);\n\n\tnotification_caura(SpellEnums::NOTIFICATION_AURA_ADDED, aura);\n}\n\nvoid Entity::aura_removec(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tint aid = aura->get_aura_id();\n\tEntity *caster = aura->caster_get();\n\n\tRef<AuraData> a;\n\tbool removed = false;\n\tfor (int i = 0; i < _c_auras.size(); i++) {\n\t\ta = _c_auras.get(i);\n\n\t\tif (a->get_aura_id() == aid && a->caster_get() == caster) {\n\t\t\t_c_auras.remove_at(i);\n\t\t\tremoved = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (removed) {\n\t\tnotification_caura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);\n\t}\n}\n\nvoid Entity::aura_removec_exact(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tfor (int i = 0; i < _c_auras.size(); i++) {\n\t\tif (_c_auras.get(i) == aura) {\n\t\t\t_c_auras.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tnotification_caura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);\n}\n\nvoid Entity::aura_removec_dispelled(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tfor (int i = 0; i < _c_auras.size(); i++) {\n\t\tif (_c_auras.get(i) == aura) {\n\t\t\t_c_auras.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tnotification_caura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);\n}\n\nvoid Entity::aura_refreshedc(Ref<AuraData> aura) {\n\t//ERR_EXPLAIN(\"NYI\");\n\tERR_FAIL();\n\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tnotification_caura(SpellEnums::NOTIFICATION_AURA_REFRESHED, aura);\n}\n\nvoid Entity::aura_removec_expired(Ref<AuraData> aura) {\n\tERR_FAIL_COND(!aura.is_valid());\n\n\tfor (int i = 0; i < _c_auras.size(); i++) {\n\t\tif (_c_auras.get(i) == aura) {\n\t\t\t_c_auras.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tnotification_caura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);\n}\n\nint Entity::aura_gets_count() {\n\treturn _s_auras.size();\n}\n\nRef<AuraData> Entity::aura_gets(int index) {\n\tERR_FAIL_INDEX_V(index, _s_auras.size(), Ref<AuraData>(NULL));\n\n\treturn Ref<AuraData>(_s_auras.get(index));\n}\n\nRef<AuraData> Entity::aura_gets_by(Entity *caster, int aura_id) {\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tif (ad->get_aura_id() == aura_id && ad->caster_get() == caster) {\n\t\t\treturn ad;\n\t\t}\n\t}\n\n\treturn Ref<AuraData>(NULL);\n}\nRef<AuraData> Entity::aura_gets_by_bind(Node *caster, int aura_id) {\n\tif (!caster) {\n\t\treturn Ref<AuraData>();\n\t}\n\n\tEntity *e = cast_to<Entity>(caster);\n\n\tif (!e) {\n\t\treturn Ref<AuraData>();\n\t}\n\n\treturn aura_gets_by(e, aura_id);\n}\n\nRef<AuraData> Entity::aura_gets_with_group_by(Entity *caster, Ref<AuraGroup> aura_group) {\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tif (ad->get_aura()->aura_get_aura_group() == aura_group && ad->caster_get() == caster) {\n\t\t\treturn ad;\n\t\t}\n\t}\n\n\treturn Ref<AuraData>();\n}\nRef<AuraData> Entity::aura_gets_with_group_by_bind(Node *caster, Ref<AuraGroup> aura_group) {\n\tif (!INSTANCE_VALIDATE(caster)) {\n\t\treturn Ref<AuraData>();\n\t}\n\n\tEntity *e = cast_to<Entity>(caster);\n\n\tif (!e) {\n\t\treturn Ref<AuraData>();\n\t}\n\n\treturn aura_gets_with_group_by(e, aura_group);\n}\n\nint Entity::aura_getc_count() {\n\treturn _s_auras.size();\n}\n\nRef<AuraData> Entity::aura_getc(int index) {\n\tERR_FAIL_INDEX_V(index, _c_auras.size(), Ref<AuraData>(NULL));\n\n\treturn Ref<AuraData>(_c_auras.get(index));\n}\n\nVector<Variant> Entity::sauras_get() {\n\tVARIANT_ARRAY_GET(_s_auras);\n}\nvoid Entity::sauras_set(const Vector<Variant> &data) {\n\tVARIANT_ARRAY_SET(data, _s_auras, AuraData);\n}\n\nvoid Entity::moved() {\n\tif (has_method(\"_moved\"))\n\t\tcall(\"_moved\");\n}\n\nvoid Entity::notification_cmouse_enter() {\n\tif (has_method(\"_notification_cmouse_enter\"))\n\t\tcall(\"_notification_cmouse_enter\");\n\n\temit_signal(\"notification_cmouse_entered\");\n}\nvoid Entity::notification_cmouse_exit() {\n\tif (has_method(\"_notification_cmouse_exit\"))\n\t\tcall(\"_notification_cmouse_exit\");\n\n\temit_signal(\"notification_cmouse_exited\");\n}\n\nvoid Entity::notification_ctargeted() {\n\tif (has_method(\"_notification_ctargeted\"))\n\t\tcall(\"_notification_ctargeted\");\n\n\temit_signal(\"notification_ctargeted\");\n}\nvoid Entity::notification_cuntargeted() {\n\tif (has_method(\"_notification_cuntargeted\"))\n\t\tcall(\"_notification_cuntargeted\");\n\n\temit_signal(\"notification_cuntargeted\");\n}\n\nvoid Entity::notification_caura(int what, Ref<AuraData> data) {\n\tERR_FAIL_COND(!data.is_valid());\n\n\t//NOTIFICATION_RES_IMPLC(notification_caura, \"notification_caura\", what, data);\n\n\tfor (int i = 0; i < _c_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _c_auras.get(i);\n\n\t\tad->get_aura()->notification_caura(what, data);\n\t}\n\n\tif (has_method(\"_notification_caura\"))\n\t\tcall(\"_notification_caura\", what, data);\n\n\temit_signal(\"notification_caura\", what, data);\n}\nvoid Entity::notification_cheal(int what, Ref<SpellHealInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tfor (int i = 0; i < _c_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _c_auras.get(i);\n\n\t\tad->get_aura()->notification_cheal(what, ad, info);\n\t}\n\n\tif (has_method(\"_notification_cheal\"))\n\t\tcall(\"_notification_cheal\", info);\n\n\t//the current c health should probably be set here.\n\temit_signal(\"notification_cheal\", this, what, info);\n}\nvoid Entity::notification_ccast(int what, Ref<SpellCastInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tinfo->get_spell()->notification_ccast(what, info);\n\n\tfor (int i = 0; i < _c_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _c_auras.get(i);\n\n\t\tad->get_aura()->notification_aura_ccast(what, ad, info);\n\t}\n\n\tif (has_method(\"_notification_ccast\"))\n\t\tcall(\"_notification_ccast\", what, info);\n\n\temit_signal(\"notification_ccast\", what, info);\n}\nvoid Entity::notification_cdamage(int what, Ref<SpellDamageInfo> info) {\n\tERR_FAIL_COND(!info.is_valid());\n\n\tfor (int i = 0; i < _c_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _c_auras.get(i);\n\n\t\tad->get_aura()->notification_cdamage(what, ad, info);\n\t}\n\n\tif (has_method(\"_notification_cdamage\"))\n\t\tcall(\"_notification_cdamage\", what, info);\n\n\t//the current c health should probably be set here.\n\temit_signal(\"notification_cdamage\", this, what, info);\n}\n\nvoid Entity::notification_cdeath() {\n\tNOTIFICATION_IMPLCS(notification_cdeath, \"diecd\")\n}\n\nvoid Entity::notification_ccooldown_added(int id, float value) {\n\tNOTIFICATION_RES_IMPLC(notification_ccooldown_added, \"ccooldown_added\", id, value)\n}\nvoid Entity::notification_ccooldown_removed(int id, float value) {\n\tNOTIFICATION_RES_IMPLC(notification_ccooldown_removed, \"ccooldown_removed\", id, value)\n}\nvoid Entity::notification_ccategory_cooldown_added(int id, float value) {\n\tNOTIFICATION_RES_IMPLC(notification_ccategory_cooldown_added, \"ccategory_cooldown_added\", id, value)\n}\nvoid Entity::notification_ccategory_cooldown_removed(int id, float value) {\n\tNOTIFICATION_RES_IMPLC(notification_ccategory_cooldown_removed, \"ccategory_cooldown_removed\", id, value)\n}\n\nvoid Entity::notification_cxp_gained(int value) {\n\tNOTIFICATION_IMPLC(notification_cxp_gained, \"notification_cxp_gained\", value)\n}\n\nvoid Entity::notification_clevel_up(int value) {\n\tNOTIFICATION_IMPLC(notification_clevel_up, \"notification_clevel_up\", value)\n}\n\nvoid Entity::notification_centity_resource_added(Ref<EntityResource> resource) {\n\tNOTIFICATION_RES_IMPLC(notification_centity_resource_added, \"centity_resource_added\", resource)\n}\n\nvoid Entity::notification_centity_resource_removed(Ref<EntityResource> resource) {\n\tNOTIFICATION_RES_IMPLC(notification_centity_resource_removed, \"centity_resource_removed\", resource)\n}\n\n////    Casting System    ////\n\nvoid Entity::cast_starts(Ref<SpellCastInfo> info) {\n\t_s_spell_cast_info = Ref<SpellCastInfo>(info);\n\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tad->get_aura()->notification_aura_scast(SpellEnums::NOTIFICATION_CAST_STARTED, ad, info);\n\t}\n\n\t_s_spell_cast_info->is_casting_set(true);\n\n\tnotification_scast(SpellEnums::NOTIFICATION_CAST_STARTED, info);\n\n\tVRPCOBJ(cast_startc_rpc, JSON::stringify(info->to_dict()), cast_startc, info);\n}\n\nvoid Entity::cast_fails() {\n\tnotification_scast(SpellEnums::NOTIFICATION_CAST_FAILED, _s_spell_cast_info);\n\n\t_s_spell_cast_info.unref();\n\n\tVRPC(cast_failc);\n}\n\nvoid Entity::cast_delays() {\n\temit_signal(\"notification_scast\", SpellEnums::NOTIFICATION_CAST_DELAYED, _s_spell_cast_info);\n\n\tVRPC(cast_delayc);\n}\n\nvoid Entity::cast_finishs() {\n\t_s_spell_cast_info->get_spell()->cast_finishs(_s_spell_cast_info);\n\n\tnotification_scast(SpellEnums::NOTIFICATION_CAST_FINISHED, _s_spell_cast_info);\n\n\t_s_spell_cast_info.unref();\n\n\tVRPC(cast_finishc);\n}\n\nvoid Entity::cast_interrupts() {\n\tnotification_scast(SpellEnums::NOTIFICATION_CAST_INTERRUPTED, _s_spell_cast_info);\n\n\t_s_spell_cast_info.unref();\n\n\tVRPC(cast_interruptc);\n}\n\nvoid Entity::cast_startc_rpc(String data) {\n\tRef<SpellCastInfo> info;\n\tinfo.instantiate();\n\tinfo->from_dict(data_as_dict(data));\n\tinfo->resolve_references(this);\n\n\tcast_startc(info);\n}\n\nvoid Entity::cast_startc(Ref<SpellCastInfo> info) {\n\t_c_spell_cast_info = Ref<SpellCastInfo>(info);\n\n\tnotification_ccast(SpellEnums::NOTIFICATION_CAST_STARTED, _c_spell_cast_info);\n}\n\nvoid Entity::cast_failc() {\n\tnotification_ccast(SpellEnums::NOTIFICATION_CAST_FAILED, _c_spell_cast_info);\n\n\t_c_spell_cast_info.unref();\n}\n\nvoid Entity::cast_delayc() {\n\t//c_on_cast_\n\n\tnotification_scast(SpellEnums::NOTIFICATION_CAST_DELAYED, _c_spell_cast_info);\n}\n\nvoid Entity::cast_finishc() {\n\tnotification_ccast(SpellEnums::NOTIFICATION_CAST_FINISHED, _c_spell_cast_info);\n\n\t_c_spell_cast_info.unref();\n}\n\nvoid Entity::cast_interruptc() {\n\tnotification_ccast(SpellEnums::NOTIFICATION_CAST_INTERRUPTED, _c_spell_cast_info);\n\n\t_c_spell_cast_info.unref();\n}\n\nvoid Entity::cast_spell_successs(Ref<SpellCastInfo> info) {\n\tnotification_scast(SpellEnums::NOTIFICATION_CAST_SUCCESS, info);\n\n\tVRPCOBJ(cast_spell_successc_rpc, JSON::stringify(info->to_dict()), cast_spell_successc, info);\n}\n\nvoid Entity::cast_spell_successc_rpc(String data) {\n\tRef<SpellCastInfo> info;\n\tinfo.instantiate();\n\tinfo->from_dict(data_as_dict(data));\n\tinfo->resolve_references(this);\n\n\tcast_spell_successc(info);\n}\n\nvoid Entity::cast_spell_successc(Ref<SpellCastInfo> info) {\n\tnotification_ccast(SpellEnums::NOTIFICATION_CAST_SUCCESS, info);\n}\n\n////    Cooldowns    ////\n\nbool Entity::cooldown_hass(int spell_id) {\n\tfor (int i = 0; i < _s_cooldowns.size(); ++i) {\n\t\tif (_s_cooldowns[i].id == spell_id) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nvoid Entity::cooldown_adds(int spell_id, float value) {\n\tfor (int i = 0; i < _s_cooldowns.size(); ++i) {\n\t\tif (_s_cooldowns[i].id == spell_id) {\n\t\t\t_s_cooldowns.write[i].cooldown = value;\n\n\t\t\tnotification_scooldown_added(spell_id, value);\n\n\t\t\tORPC(cooldown_addc, spell_id, value);\n\n\t\t\treturn;\n\t\t}\n\t}\n\n\tCooldown cd;\n\tcd.id = spell_id;\n\tcd.cooldown = value;\n\n\t_s_cooldowns.push_back(cd);\n\n\tnotification_scooldown_added(spell_id, value);\n\n\tORPC(cooldown_addc, spell_id, value);\n}\nvoid Entity::cooldown_removes(int spell_id) {\n\tfor (int i = 0; i < _s_cooldowns.size(); ++i) {\n\t\tif (_s_cooldowns[i].id == spell_id) {\n\t\t\tfloat cd = _s_cooldowns[i].cooldown;\n\n\t\t\t_s_cooldowns.remove_at(i);\n\n\t\t\tnotification_scooldown_removed(spell_id, cd);\n\n\t\t\tORPC(cooldown_removec, spell_id);\n\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nfloat Entity::cooldown_gets(int spell_id) {\n\tfor (int i = 0; i < _s_cooldowns.size(); ++i) {\n\t\tif (_s_cooldowns[i].id == spell_id) {\n\t\t\treturn _s_cooldowns[i].cooldown;\n\t\t}\n\t}\n\n\treturn 0;\n}\nfloat Entity::cooldown_gets_index(int index) {\n\tERR_FAIL_INDEX_V(index, _s_cooldowns.size(), 0);\n\n\treturn _s_cooldowns[index].cooldown;\n}\nint Entity::cooldown_gets_count() {\n\treturn _s_cooldowns.size();\n}\n\nbool Entity::cooldown_hasc(int spell_id) {\n\tfor (int i = 0; i < _c_cooldowns.size(); ++i) {\n\t\tif (_c_cooldowns[i].id == spell_id) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nvoid Entity::cooldown_addc(int spell_id, float value) {\n\tfor (int i = 0; i < _c_cooldowns.size(); ++i) {\n\t\tif (_c_cooldowns[i].id == spell_id) {\n\t\t\t_c_cooldowns.write[i].cooldown = value;\n\n\t\t\tnotification_ccooldown_added(spell_id, value);\n\n\t\t\treturn;\n\t\t}\n\t}\n\n\tCooldown cd;\n\tcd.id = spell_id;\n\tcd.cooldown = value;\n\n\t_c_cooldowns.push_back(cd);\n\n\tnotification_ccooldown_added(spell_id, value);\n}\nvoid Entity::cooldown_removec(int spell_id) {\n\tfor (int i = 0; i < _c_cooldowns.size(); ++i) {\n\t\tif (_c_cooldowns[i].id == spell_id) {\n\t\t\tfloat cd = _c_cooldowns[i].cooldown;\n\n\t\t\t_c_cooldowns.remove_at(i);\n\n\t\t\tnotification_ccooldown_removed(spell_id, cd);\n\n\t\t\treturn;\n\t\t}\n\t}\n}\nfloat Entity::cooldown_getc(int spell_id) {\n\tfor (int i = 0; i < _c_cooldowns.size(); ++i) {\n\t\tif (_c_cooldowns[i].id == spell_id) {\n\t\t\treturn _c_cooldowns[i].cooldown;\n\t\t}\n\t}\n\n\treturn 0;\n}\nfloat Entity::cooldown_getc_index(int index) {\n\tERR_FAIL_INDEX_V(index, _c_cooldowns.size(), 0);\n\n\treturn _c_cooldowns[index].cooldown;\n}\nint Entity::cooldown_getc_count() {\n\treturn _c_cooldowns.size();\n}\n\nVector<Variant> Entity::scooldowns_get() {\n\tVector<Variant> arr;\n\tarr.resize(_s_cooldowns.size() * 3);\n\n\tfor (int i = 0; i < _s_cooldowns.size(); ++i) {\n\t\tint indx = i * 3;\n\n\t\tarr.write[indx] = _s_cooldowns[i].id;\n\t\tarr.write[indx + 1] = _s_cooldowns[i].cooldown;\n\t\tarr.write[indx + 2] = _s_cooldowns[i].path;\n\t}\n\n\treturn arr;\n}\nvoid Entity::scooldowns_set(const Vector<Variant> &data) {\n\tERR_FAIL_COND(data.size() % 3 != 0);\n\n\t_s_cooldowns.resize(data.size() / 3);\n\n\tfor (int i = 0; i < _s_cooldowns.size(); ++i) {\n\t\tint indx = i * 3;\n\n\t\t_s_cooldowns.write[i].id = data[indx];\n\t\t_s_cooldowns.write[i].cooldown = data[indx + 1];\n\t\t_s_cooldowns.write[i].path = data[indx + 2];\n\t}\n}\n\n//Category Cooldowns\n\nbool Entity::category_cooldown_hass(int category_id) {\n\treturn (category_id & _s_active_category_cooldowns) > 0;\n}\nvoid Entity::category_cooldown_adds(int category_id, float value) {\n\tif ((category_id & _s_active_category_cooldowns)) {\n\t\tfor (int i = 0; i < _s_category_cooldowns.size(); ++i) {\n\t\t\tif (_s_category_cooldowns[i].id == category_id) {\n\t\t\t\t_s_category_cooldowns.write[i].cooldown = value;\n\n\t\t\t\tnotification_scategory_cooldown_added(category_id, value);\n\n\t\t\t\tORPC(category_cooldown_addc, category_id, value);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tCooldown cd;\n\tcd.id = category_id;\n\tcd.cooldown = value;\n\n\t_s_active_category_cooldowns |= category_id;\n\t_s_category_cooldowns.push_back(cd);\n\n\tnotification_scategory_cooldown_added(category_id, value);\n\n\tORPC(category_cooldown_addc, category_id, value);\n}\nvoid Entity::category_cooldown_removes(int category_id) {\n\tCooldown cc;\n\tbool found = false;\n\n\tfor (int i = 0; i < _s_category_cooldowns.size(); ++i) {\n\t\tif (_s_category_cooldowns[i].id == category_id) {\n\t\t\tcc = _s_category_cooldowns.get(i);\n\t\t\t_s_category_cooldowns.remove_at(i);\n\t\t\tfound = true;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!found)\n\t\treturn;\n\n\t_s_active_category_cooldowns ^= category_id;\n\n\tnotification_scategory_cooldown_removed(cc.id, cc.cooldown);\n\n\tORPC(category_cooldown_removec, category_id);\n}\nfloat Entity::category_cooldown_gets(int category_id) {\n\tERR_FAIL_COND_V(!(category_id & _s_active_category_cooldowns), 0);\n\n\tfor (int i = 0; i < _s_category_cooldowns.size(); ++i) {\n\t\tif (_s_category_cooldowns[i].id == category_id) {\n\t\t\treturn _s_category_cooldowns[i].cooldown;\n\t\t}\n\t}\n\n\treturn 0;\n}\nfloat Entity::category_cooldown_gets_index(int index) {\n\tERR_FAIL_INDEX_V(index, _s_category_cooldowns.size(), 0);\n\n\treturn _s_category_cooldowns.get(index).cooldown;\n}\nint Entity::category_cooldown_gets_count() {\n\treturn _s_category_cooldowns.size();\n}\n\nbool Entity::category_cooldown_hasc(int category_id) {\n\treturn (category_id & _c_active_category_cooldowns) > 0;\n}\nvoid Entity::category_cooldown_addc(int category_id, float value) {\n\tif ((category_id & _c_active_category_cooldowns)) {\n\t\tfor (int i = 0; i < _c_category_cooldowns.size(); ++i) {\n\t\t\tif (_c_category_cooldowns[i].id == category_id) {\n\t\t\t\t_c_category_cooldowns.write[i].cooldown = value;\n\n\t\t\t\tnotification_ccategory_cooldown_added(category_id, value);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tCooldown cd;\n\tcd.id = category_id;\n\tcd.cooldown = value;\n\n\t_c_category_cooldowns.push_back(cd);\n\t_c_active_category_cooldowns |= category_id;\n\n\tnotification_ccategory_cooldown_added(category_id, value);\n}\nvoid Entity::category_cooldown_removec(int category_id) {\n\tCooldown cc;\n\tbool found = false;\n\n\tfor (int i = 0; i < _c_category_cooldowns.size(); ++i) {\n\t\tif (_c_category_cooldowns[i].id == category_id) {\n\t\t\tcc = _c_category_cooldowns.get(i);\n\t\t\t_c_category_cooldowns.remove_at(i);\n\t\t\tfound = true;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!found)\n\t\treturn;\n\n\t_c_active_category_cooldowns ^= category_id;\n\n\tnotification_ccategory_cooldown_removed(cc.id, cc.cooldown);\n}\nfloat Entity::category_cooldown_getc(int category_id) {\n\tERR_FAIL_COND_V(!(category_id & _c_active_category_cooldowns), 0);\n\n\tfor (int i = 0; i < _c_category_cooldowns.size(); ++i) {\n\t\tif (_c_category_cooldowns[i].id == category_id) {\n\t\t\treturn _c_category_cooldowns[i].cooldown;\n\t\t}\n\t}\n\n\treturn 0;\n}\nfloat Entity::category_cooldown_getc_index(int index) {\n\tERR_FAIL_INDEX_V(index, _c_category_cooldowns.size(), 0);\n\n\treturn _c_category_cooldowns[index].cooldown;\n}\nint Entity::category_cooldown_getc_count() {\n\treturn _c_category_cooldowns.size();\n}\n\nVector<Variant> Entity::scategory_cooldowns_get() {\n\tVector<Variant> arr;\n\tarr.resize(_s_category_cooldowns.size() * 3);\n\n\tfor (int i = 0; i < _s_category_cooldowns.size(); ++i) {\n\t\tint indx = i * 3;\n\n\t\tarr.write[indx] = _s_category_cooldowns[i].id;\n\t\tarr.write[indx + 1] = _s_category_cooldowns[i].cooldown;\n\t\tarr.write[indx + 2] = _s_category_cooldowns[i].path;\n\t}\n\n\treturn arr;\n}\nvoid Entity::scategory_cooldowns_set(const Vector<Variant> &data) {\n\tERR_FAIL_COND(data.size() % 3 != 0);\n\n\t_s_category_cooldowns.resize(data.size() / 3);\n\n\tfor (int i = 0; i < _s_category_cooldowns.size(); ++i) {\n\t\tint indx = i * 3;\n\n\t\t_s_category_cooldowns.write[i].id = data[indx];\n\t\t_s_category_cooldowns.write[i].cooldown = data[indx + 1];\n\t\t_s_category_cooldowns.write[i].path = data[indx + 2];\n\t}\n}\n\n//Known Spells\n\nint Entity::gets_free_spell_points() {\n\treturn _s_free_spell_points;\n}\nvoid Entity::sets_free_spell_points(int value) {\n\t_s_free_spell_points = value;\n\n\temit_signal(\"sfree_spell_points_changed\", this, value);\n\n\tORPC(setc_free_spell_points, value);\n}\n\nint Entity::getc_free_spell_points() {\n\treturn _c_free_spell_points;\n}\nvoid Entity::setc_free_spell_points(int value) {\n\t_c_free_spell_points = value;\n\n\temit_signal(\"cfree_spell_points_changed\", this, value);\n}\n\nvoid Entity::spell_learn_requestc(int id) {\n\tspell_learns(id);\n}\nvoid Entity::spell_learns(int id) {\n\t//if (has_method(\"_spell_learns\")) {\n\tcall(\"_spell_learns\", id);\n\t//\treturn;\n\t//\t}\n}\n\nbool Entity::spell_hass(Ref<Spell> spell) {\n\tfor (int i = 0; i < _s_spells.size(); ++i) {\n\t\tif (_s_spells.get(i) == spell) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nbool Entity::spell_hass_id(int id) {\n\tfor (int i = 0; i < _s_spells.size(); ++i) {\n\t\tRef<Spell> spell = _s_spells.get(i);\n\n\t\tif (!spell.is_valid())\n\t\t\tcontinue;\n\n\t\tif (spell->get_id() == id) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nvoid Entity::spell_adds(Ref<Spell> spell) {\n\tif (spell_hass(spell))\n\t\treturn;\n\n\t//int id = spell->get_id();\n\n\t_s_spells.push_back(spell);\n\n\tif (ESS::get_singleton()->get_allow_class_spell_learning() && (_s_entity_player_type == EntityEnums::ENTITY_PLAYER_TYPE_PLAYER || gets_entity_player_type() == EntityEnums::ENTITY_PLAYER_TYPE_DISPLAY)) {\n\t\tRef<ClassProfile> class_profile = ProfileManager::get_singleton()->getc_player_profile()->get_class_profile(_s_entity_data->get_path());\n\n\t\tif (class_profile->has_custom_data(\"spells\")) {\n\t\t\tVector<String> spells = class_profile->get_custom_data(\"spells\");\n\n\t\t\tbool found = false;\n\n\t\t\tfor (int i = 0; i < spells.size(); ++i) {\n\t\t\t\tif (spells[i] == spell->get_path()) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!found) {\n\t\t\t\tspells.push_back(spell->get_path());\n\t\t\t\tclass_profile->set_custom_data(\"spells\", spells);\n\t\t\t}\n\n\t\t} else {\n\t\t\tVector<String> spells;\n\t\t\tspells.push_back(spell->get_path());\n\t\t\tclass_profile->set_custom_data(\"spells\", spells);\n\t\t}\n\t}\n\n\temit_signal(\"sspell_added\", this, spell);\n\n\tORPCOBJ(spell_addc_rpc, spell->get_id(), spell_addc, spell);\n}\nvoid Entity::spell_adds_id(int id) {\n\tRef<Spell> spell = ESS::get_singleton()->get_resource_db()->get_spell(id);\n\n\tERR_FAIL_COND(!spell.is_valid());\n\n\tspell_adds(spell);\n}\nvoid Entity::spell_removes(Ref<Spell> spell) {\n\tfor (int i = 0; i < _s_spells.size(); ++i) {\n\t\tif (_s_spells.get(i) == spell) {\n\t\t\t_s_spells.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\temit_signal(\"sspell_removed\", this, spell);\n\n\tORPCOBJ(spell_removec_rpc, spell->get_id(), spell_removec, spell);\n}\nRef<Spell> Entity::spell_gets(int index) {\n\tERR_FAIL_INDEX_V(index, _s_spells.size(), Ref<Spell>());\n\n\treturn _s_spells.get(index);\n}\nint Entity::spell_gets_count() {\n\treturn _s_spells.size();\n}\n\nbool Entity::spell_hasc(Ref<Spell> spell) {\n\tfor (int i = 0; i < _c_spells.size(); ++i) {\n\t\tif (_c_spells.get(i) == spell) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nbool Entity::spell_hasc_id(int id) {\n\tfor (int i = 0; i < _c_spells.size(); ++i) {\n\t\tRef<Spell> spell = _c_spells.get(i);\n\n\t\tif (!spell.is_valid())\n\t\t\tcontinue;\n\n\t\tif (spell->get_id() == id) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nvoid Entity::spell_addc(Ref<Spell> spell) {\n\tif (spell_hasc(spell))\n\t\treturn;\n\n\t_c_spells.push_back(spell);\n\n\temit_signal(\"cspell_added\", this, spell);\n}\nvoid Entity::spell_removec(Ref<Spell> spell) {\n\tfor (int i = 0; i < _c_spells.size(); ++i) {\n\t\tif (_c_spells.get(i) == spell) {\n\t\t\t_c_spells.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\temit_signal(\"cspell_removed\", this, spell);\n}\nRef<Spell> Entity::spell_getc(int index) {\n\tERR_FAIL_INDEX_V(index, _c_spells.size(), Ref<Spell>());\n\n\treturn _c_spells.get(index);\n}\nint Entity::spell_getc_count() {\n\treturn _c_spells.size();\n}\n\nvoid Entity::spell_addc_rpc(int id) {\n\tERR_FAIL_COND(ESS::get_singleton() == NULL);\n\n\tspell_addc(ESS::get_singleton()->get_resource_db()->get_spell(id));\n}\nvoid Entity::spell_removec_rpc(int id) {\n\tERR_FAIL_COND(ESS::get_singleton() == NULL);\n\n\tspell_removec(ESS::get_singleton()->get_resource_db()->get_spell(id));\n}\n\nVector<Variant> Entity::sspells_get() {\n\tVARIANT_ARRAY_GET(_s_spells);\n}\nvoid Entity::sspells_set(const Vector<Variant> &data) {\n\tVARIANT_ARRAY_SET(data, _s_spells, Spell);\n}\n\n//Skills\nbool Entity::skill_hass_id(int id) {\n\tfor (int i = 0; i < _s_skills.size(); ++i) {\n\t\tRef<EntitySkill> skill = _s_skills.get(i);\n\n\t\tERR_CONTINUE(!skill.is_valid());\n\n\t\tif (skill->get_skill_id() == id) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nbool Entity::skill_hass(Ref<EntitySkill> skill) {\n\tfor (int i = 0; i < _s_skills.size(); ++i) {\n\t\tif (_s_skills.get(i) == skill) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nvoid Entity::skill_adds(Ref<EntitySkill> skill) {\n\tif (skill_hass(skill))\n\t\treturn;\n\n\tskill->CONNECT(\"current_changed\", this, Entity, skill_scurrent_changed);\n\tskill->CONNECT(\"max_changed\", this, Entity, skill_smax_changed);\n\n\t_s_skills.push_back(skill);\n\n\temit_signal(\"sskill_added\", this, skill);\n\n\tORPC(skill_addc_id, skill->get_skill_id(), skill->get_current(), skill->get_max());\n}\nvoid Entity::skill_removes(Ref<EntitySkill> skill) {\n\tfor (int i = 0; i < _s_skills.size(); ++i) {\n\t\tif (_s_skills.get(i) == skill) {\n\t\t\t_s_skills.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\temit_signal(\"sskill_removed\", this, skill);\n\n\tORPC(skill_removec_id, skill->get_skill_id());\n}\nRef<EntitySkill> Entity::skill_gets(int index) {\n\tERR_FAIL_INDEX_V(index, _s_skills.size(), Ref<EntitySkill>());\n\n\treturn _s_skills.get(index);\n}\nint Entity::skill_gets_count() {\n\treturn _s_skills.size();\n}\n\nbool Entity::skill_hasc_id(int id) {\n\tfor (int i = 0; i < _c_skills.size(); ++i) {\n\t\tRef<EntitySkill> skill = _c_skills.get(i);\n\n\t\tERR_CONTINUE(!skill.is_valid());\n\n\t\tif (skill->get_skill_id() == id) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nbool Entity::skill_hasc(Ref<EntitySkill> skill) {\n\tfor (int i = 0; i < _c_skills.size(); ++i) {\n\t\tif (_c_skills.get(i) == skill) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nvoid Entity::skill_addc(Ref<EntitySkill> skill) {\n\tif (skill_hasc(skill))\n\t\treturn;\n\n\t_c_skills.push_back(skill);\n\n\temit_signal(\"cskill_added\", this, skill);\n}\nvoid Entity::skill_removec(Ref<EntitySkill> skill) {\n\tfor (int i = 0; i < _c_skills.size(); ++i) {\n\t\tif (_c_skills.get(i) == skill) {\n\t\t\t_c_skills.remove_at(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\temit_signal(\"cskill_removed\", this, skill);\n}\nRef<EntitySkill> Entity::skill_getc(int index) {\n\tERR_FAIL_INDEX_V(index, _c_skills.size(), Ref<EntitySkill>());\n\n\treturn _c_skills.get(index);\n}\nint Entity::skill_getc_count() {\n\treturn _c_skills.size();\n}\n\nvoid Entity::skill_scurrent_changed(Ref<EntitySkill> skill) {\n\t//todo events\n\n\tORPC(skill_changec, skill->get_skill_id(), skill->get_current());\n}\nvoid Entity::skill_smax_changed(Ref<EntitySkill> skill) {\n\t//todo events\n\n\tORPC(skill_changec_max, skill->get_skill_id(), skill->get_max());\n}\n\nvoid Entity::skill_addc_id(int skill_id, int value, int max_value) {\n\tERR_FAIL_COND(skill_hasc_id(skill_id));\n\n\tRef<EntitySkill> skill;\n\tskill.instantiate();\n\n\tskill->set_skill_id(skill_id);\n\tskill->set_current(value);\n\tskill->set_max(max_value);\n\n\tskill_addc(skill);\n}\nvoid Entity::skill_removec_id(int skill_id) {\n\tfor (int i = 0; i < _c_skills.size(); ++i) {\n\t\tRef<EntitySkill> skill = _c_skills.get(i);\n\n\t\tERR_CONTINUE(!skill.is_valid());\n\n\t\tif (skill->get_skill_id() == skill_id) {\n\t\t\t_c_skills.remove_at(i);\n\n\t\t\temit_signal(\"cskill_removed\", this, skill);\n\n\t\t\treturn;\n\t\t}\n\t}\n}\nvoid Entity::skill_changec(int skill_id, int value) {\n\tfor (int i = 0; i < _c_skills.size(); ++i) {\n\t\tRef<EntitySkill> skill = _c_skills.get(i);\n\n\t\tERR_CONTINUE(!skill.is_valid());\n\n\t\tif (skill->get_skill_id() == skill_id) {\n\t\t\tskill->set_current(value);\n\n\t\t\temit_signal(\"cskill_changed\", this, skill);\n\n\t\t\treturn;\n\t\t}\n\t}\n}\nvoid Entity::skill_changec_max(int skill_id, int value) {\n\tfor (int i = 0; i < _c_skills.size(); ++i) {\n\t\tRef<EntitySkill> skill = _c_skills.get(i);\n\n\t\tERR_CONTINUE(!skill.is_valid());\n\n\t\tif (skill->get_skill_id() == skill_id) {\n\t\t\tskill->set_max(value);\n\n\t\t\temit_signal(\"cskill_changed\", this, skill);\n\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nVector<Variant> Entity::sskills_get() {\n\tVARIANT_ARRAY_GET(_s_skills);\n}\nvoid Entity::sskills_set(const Vector<Variant> &data) {\n\tVARIANT_ARRAY_SET(data, _s_skills, EntitySkill);\n}\n\n////    Casting System    ////\n\nbool Entity::cast_is_castings() {\n\treturn _s_spell_cast_info.is_valid();\n}\nbool Entity::cast_is_castingc() {\n\treturn _c_spell_cast_info.is_valid();\n}\n\nRef<SpellCastInfo> Entity::spell_gets_cast_info() {\n\treturn Ref<SpellCastInfo>(_s_spell_cast_info);\n}\n\nvoid Entity::sets_spell_cast_info(Ref<SpellCastInfo> info) {\n\t_s_spell_cast_info = Ref<SpellCastInfo>(info);\n}\n\nRef<SpellCastInfo> Entity::spell_getc_cast_info() {\n\treturn Ref<SpellCastInfo>(_c_spell_cast_info);\n}\n\nvoid Entity::setc_spell_cast_info(Ref<SpellCastInfo> info) {\n\t_c_spell_cast_info = Ref<SpellCastInfo>(info);\n}\n\nvoid Entity::aura_removess_with_group(Ref<AuraGroup> aura_group) {\n\tfor (int i = 0; i < _s_auras.size(); ++i) {\n\t\tRef<AuraData> ad = _s_auras.get(i);\n\n\t\tif (ad->get_aura()->aura_get_aura_group() == aura_group) {\n\t\t\taura_removec(ad);\n\n\t\t\t_s_auras.remove_at(i);\n\n\t\t\temit_signal(\"saura_removed\", ad);\n\n\t\t\taura_removec(ad);\n\n\t\t\ti--;\n\t\t}\n\t}\n}\n\nvoid Entity::target_crequest_change(NodePath path) {\n\tRPCS(target_net_sets, path);\n}\n\nvoid Entity::target_net_sets(NodePath path) {\n\tRef<MultiplayerAPI> multiplayer_api = get_multiplayer();\n\tif (!multiplayer_api.is_valid() && !multiplayer_api->is_server()) {\n\t\treturn;\n\t}\n\n\tNode *p_target = get_node_or_null(path);\n\n\tsets_target(p_target);\n\n\tif (p_target == NULL) {\n\t\tVRPC(target_net_setc, NodePath());\n\t} else {\n\t\tif (gets_target() == NULL) {\n\t\t\tVRPC(target_net_setc, NodePath());\n\t\t} else {\n\t\t\tVRPC(target_net_setc, gets_target()->get_path());\n\t\t}\n\t}\n}\nvoid Entity::target_net_setc(NodePath path) {\n\tNode *p_target = get_node_or_null(path);\n\n\tsetc_target(p_target);\n}\n\nEntity *Entity::gets_target() {\n\treturn _s_target;\n}\n\nvoid Entity::sets_target(Node *p_target) {\n\tEntity *original_target = _s_target;\n\n\tif (!INSTANCE_VALIDATE(original_target)) {\n\t\toriginal_target = NULL;\n\t\t_s_target = NULL;\n\t}\n\n\tif (p_target == NULL) {\n\t\t_s_target = NULL;\n\n\t\tif (has_method(\"_son_target_changed\")) {\n\t\t\tcall(\"_son_target_changed\", this, original_target);\n\t\t}\n\n\t\tfor (int i = 0; i < _s_resources.size(); ++i) {\n\t\t\t_s_resources.get(i)->ons_target_changed(this, original_target);\n\t\t}\n\n\t\temit_signal(\"starget_changed\", this, original_target);\n\t\tsetc_target(p_target);\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(p_target);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_s_target = e;\n\n\tif (has_method(\"_son_target_changed\")) {\n\t\tcall(\"_son_target_changed\", this, original_target);\n\t}\n\n\tfor (int i = 0; i < _s_resources.size(); ++i) {\n\t\t_s_resources.get(i)->ons_target_changed(this, original_target);\n\t}\n\n\temit_signal(\"starget_changed\", this, original_target);\n\n\tRef<MultiplayerAPI> multiplayer_api = get_multiplayer();\n\tif (multiplayer_api.is_valid()) {\n\t\tsetc_target(p_target);\n\t}\n}\n\nEntity *Entity::getc_target() {\n\treturn _c_target;\n}\nvoid Entity::setc_target(Node *p_target) {\n\tEntity *original_target = _c_target;\n\n\tif (!INSTANCE_VALIDATE(original_target)) {\n\t\toriginal_target = NULL;\n\t\t_c_target = NULL;\n\t}\n\n\tif (p_target == NULL) {\n\t\t_c_target = NULL;\n\n\t\tif (has_method(\"_con_target_changed\")) {\n\t\t\tcall(\"_con_target_changed\", this, original_target);\n\t\t}\n\n\t\tfor (int i = 0; i < _c_resources.size(); ++i) {\n\t\t\t_c_resources.get(i)->onc_target_changed(this, original_target);\n\t\t}\n\n\t\temit_signal(\"ctarget_changed\", this, original_target);\n\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(p_target);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_c_target = e;\n\n\tif (has_method(\"_con_target_changed\")) {\n\t\tcall(\"_con_target_changed\", this, original_target);\n\t}\n\n\tfor (int i = 0; i < _c_resources.size(); ++i) {\n\t\t_c_resources.get(i)->onc_target_changed(this, original_target);\n\t}\n\n\temit_signal(\"ctarget_changed\", this, original_target);\n}\n\n////    Class Talents    ////\n\nint Entity::gets_free_class_talent_points() {\n\treturn _s_free_class_talent_points;\n}\nvoid Entity::sets_free_class_talent_points(int value) {\n\t_s_free_class_talent_points = value;\n\n\tORPC(setc_free_class_talent_points, value);\n}\n\nint Entity::getc_free_class_talent_points() {\n\treturn _c_free_class_talent_points;\n}\nvoid Entity::setc_free_class_talent_points(int value) {\n\t_c_free_class_talent_points = value;\n}\n\nvoid Entity::class_talent_crequest_learn(int spec_index, int class_talent_row, int class_talent_culomn) {\n\tclass_talent_sreceive_learn_request(spec_index, class_talent_row, class_talent_culomn);\n}\n\nvoid Entity::class_talent_sreceive_learn_request(int spec_index, int class_talent_row, int class_talent_culomn) {\n\tcall(\"_class_talent_sreceive_learn_request\", spec_index, class_talent_row, class_talent_culomn);\n}\n\nvoid Entity::_class_talent_sreceive_learn_request(int spec_index, int class_talent_row, int class_talent_culomn) {\n\tif (gets_free_class_talent_points() <= 0)\n\t\treturn;\n\n\tERR_FAIL_COND(!_s_entity_data.is_valid());\n\n\tRef<EntityClassData> class_data = _s_entity_data->get_entity_class_data();\n\n\tERR_FAIL_COND(!class_data.is_valid());\n\n\tRef<CharacterSpec> spec = class_data->get_spec(spec_index);\n\n\tERR_FAIL_COND(!spec.is_valid());\n\n\tfor (int i = 0; i < spec->get_num_ranks(class_talent_row, class_talent_culomn); ++i) {\n\t\tRef<Spell> class_talent = spec->get_talent(class_talent_row, class_talent_culomn, i);\n\n\t\tif (!class_talent.is_valid())\n\t\t\treturn;\n\n\t\tint class_talent_id = class_talent->get_id();\n\n\t\tif (class_talent_hass(class_talent_id))\n\t\t\tcontinue;\n\n\t\tif (class_talent->aura_get_talent_required_talent().is_valid()) {\n\t\t\tif (!class_talent_hass(class_talent->aura_get_talent_required_talent()->get_id())) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (class_talent->aura_get_talent_required_spell().is_valid()) {\n\t\t\tif (!spell_hass(class_talent->aura_get_talent_required_spell())) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (i > 0) {\n\t\t\tRef<Spell> pt = spec->get_talent(class_talent_row, class_talent_culomn, i - 1);\n\n\t\t\tfor (int j = 0; j < aura_gets_count(); ++j) {\n\t\t\t\tRef<AuraData> ad = aura_gets(j);\n\n\t\t\t\tif (ad->get_aura_id() == pt->get_id()) {\n\t\t\t\t\taura_removes(ad);\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tRef<AuraApplyInfo> info;\n\t\tinfo.instantiate();\n\n\t\tinfo->caster_set(this);\n\t\tinfo->target_set(this);\n\t\tinfo->spell_scale_set(1);\n\t\tinfo->set_aura(class_talent);\n\n\t\tclass_talent->aura_sapply(info);\n\n\t\tclass_talent_adds(class_talent_id);\n\n\t\tsets_free_class_talent_points(gets_free_class_talent_points() - 1);\n\n\t\treturn;\n\t}\n}\n\nvoid Entity::class_talent_crequest_reset() {\n\tclass_talent_sreceive_reset_request();\n}\nvoid Entity::class_talent_sreceive_reset_request() {\n\tcall(\"_class_talent_sreceive_reset_request\");\n}\nvoid Entity::_class_talent_sreceive_reset_request() {\n\tclass_talent_sreset();\n}\n\nvoid Entity::class_talent_sreset() {\n\t_s_class_talents.clear();\n\n\tif (has_method(\"_son_class_talent_reset\"))\n\t\tcall(\"_son_class_talent_reset\", this);\n\n\temit_signal(\"sclass_talent_reset\", this);\n\n\tORPC(class_talent_creset);\n}\nvoid Entity::class_talent_creset() {\n\t_c_class_talents.clear();\n\n\tif (has_method(\"_con_class_talent_reset\"))\n\t\tcall(\"_con_class_talent_reset\", this);\n\n\temit_signal(\"cclass_talent_reset\", this);\n}\n\nvoid Entity::class_talent_adds(int class_talent) {\n\tif (class_talent_hass(class_talent))\n\t\treturn;\n\n\t_s_class_talents.push_back(class_talent);\n\n\tif (has_method(\"_son_class_talent_learned\"))\n\t\tcall(\"_son_class_talent_learned\", class_talent);\n\n\temit_signal(\"sclass_talent_learned\", this, class_talent);\n\n\tORPC(class_talent_addc, class_talent);\n}\nvoid Entity::class_talent_removes(int class_talent) {\n\tfor (int i = 0; i < _s_class_talents.size(); ++i) {\n\t\tif (_s_class_talents[i] == class_talent) {\n\t\t\t_s_class_talents.remove_at(i);\n\n\t\t\tfor (int j = 0; j < aura_gets_count(); ++j) {\n\t\t\t\tRef<AuraData> ad = aura_gets(j);\n\n\t\t\t\tif (ad->get_aura_id() == class_talent) {\n\t\t\t\t\taura_removes(ad);\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tORPC(class_talent_removec, class_talent);\n}\nbool Entity::class_talent_hass(int class_talent) {\n\tfor (int i = 0; i < _s_class_talents.size(); ++i) {\n\t\tif (_s_class_talents[i] == class_talent) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nint Entity::class_talent_gets(int index) {\n\tERR_FAIL_INDEX_V(index, _s_class_talents.size(), 0);\n\n\treturn _s_class_talents.get(index);\n}\nint Entity::class_talent_gets_count() {\n\treturn _s_class_talents.size();\n}\nvoid Entity::class_talents_sclear() {\n\t_s_class_talents.clear();\n\n\tORPC(class_talent_cclear);\n}\n\nvoid Entity::class_talent_addc(int class_talent) {\n\tif (class_talent_hasc(class_talent))\n\t\treturn;\n\n\t_c_class_talents.push_back(class_talent);\n\n\tif (has_method(\"_con_class_talent_learned\"))\n\t\tcall(\"_con_class_talent_learned\", class_talent);\n\n\temit_signal(\"cclass_talent_learned\", this, class_talent);\n}\nvoid Entity::class_talent_removec(int class_talent) {\n\tfor (int i = 0; i < _c_class_talents.size(); ++i) {\n\t\tif (_c_class_talents[i] == class_talent) {\n\t\t\t_c_class_talents.remove_at(i);\n\t\t\treturn;\n\t\t}\n\t}\n}\nbool Entity::class_talent_hasc(int class_talent) {\n\tfor (int i = 0; i < _c_class_talents.size(); ++i) {\n\t\tif (_c_class_talents[i] == class_talent) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nint Entity::class_talent_getc(int index) {\n\tERR_FAIL_INDEX_V(index, _c_class_talents.size(), 0);\n\n\treturn _c_class_talents.get(index);\n}\nint Entity::class_talent_getc_count() {\n\treturn _c_class_talents.size();\n}\nvoid Entity::class_talent_cclear() {\n\t_c_class_talents.clear();\n}\n\nPoolIntArray Entity::sclass_talents_get() {\n\tPoolIntArray arr;\n\tarr.resize(_s_class_talents.size());\n\n#if !GODOT4\n\tPoolIntArray::Write w = arr.write();\n#endif\n\n\tfor (int i = 0; i < _s_class_talents.size(); ++i) {\n#if !GODOT4\n\t\tw[i] = _s_class_talents[i];\n#else\n\t\tarr.write[i] = _s_class_talents[i];\n#endif\n\t}\n\n\treturn arr;\n}\nvoid Entity::sclass_talents_set(const PoolIntArray &data) {\n\t_s_class_talents.resize(data.size());\n\n\tfor (int i = 0; i < _s_class_talents.size(); ++i) {\n\t\t_s_class_talents.write[i] = data[i];\n\t}\n}\n\n////    Character Talents    ////\n\nint Entity::gets_free_character_talent_points() {\n\treturn _s_free_character_talent_points;\n}\nvoid Entity::sets_free_character_talent_points(int value) {\n\t_s_free_character_talent_points = value;\n\n\tORPC(setc_free_character_talent_points, value);\n}\n\nint Entity::getc_free_character_talent_points() {\n\treturn _c_free_character_talent_points;\n}\nvoid Entity::setc_free_character_talent_points(int value) {\n\t_c_free_character_talent_points = value;\n}\n\nvoid Entity::character_talent_crequest_learn(int spec_index, int character_talent_row, int character_talent_culomn) {\n\tcharacter_talent_sreceive_learn_request(spec_index, character_talent_row, character_talent_culomn);\n}\n\nvoid Entity::character_talent_sreceive_learn_request(int spec_index, int character_talent_row, int character_talent_culomn) {\n\tcall(\"_character_talent_sreceive_learn_request\", spec_index, character_talent_row, character_talent_culomn);\n}\n\nvoid Entity::_character_talent_sreceive_learn_request(int spec_index, int character_talent_row, int character_talent_culomn) {\n\tif (gets_free_character_talent_points() <= 0)\n\t\treturn;\n\n\tERR_FAIL_COND(!_s_entity_data.is_valid());\n\n\tRef<EntityClassData> class_data = _s_entity_data->get_entity_class_data();\n\n\tERR_FAIL_COND(!class_data.is_valid());\n\n\tRef<CharacterSpec> spec = class_data->get_spec(spec_index);\n\n\tERR_FAIL_COND(!spec.is_valid());\n\n\tfor (int i = 0; i < spec->get_num_ranks(character_talent_row, character_talent_culomn); ++i) {\n\t\tRef<Spell> character_talent = spec->get_talent(character_talent_row, character_talent_culomn, i);\n\n\t\tif (!character_talent.is_valid())\n\t\t\treturn;\n\n\t\tint character_talent_id = character_talent->get_id();\n\n\t\tif (character_talent_hass(character_talent_id))\n\t\t\tcontinue;\n\n\t\tif (character_talent->aura_get_talent_required_talent().is_valid()) {\n\t\t\tif (!character_talent_hass(character_talent->aura_get_talent_required_talent()->get_id())) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (character_talent->aura_get_talent_required_spell().is_valid()) {\n\t\t\tif (!spell_hass(character_talent->aura_get_talent_required_spell())) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (i > 0) {\n\t\t\tRef<Spell> pt = spec->get_talent(character_talent_row, character_talent_culomn, i - 1);\n\n\t\t\tfor (int j = 0; j < aura_gets_count(); ++j) {\n\t\t\t\tRef<AuraData> ad = aura_gets(j);\n\n\t\t\t\tif (ad->get_aura_id() == pt->get_id()) {\n\t\t\t\t\taura_removes(ad);\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tRef<AuraApplyInfo> info;\n\t\tinfo.instantiate();\n\n\t\tinfo->caster_set(this);\n\t\tinfo->target_set(this);\n\t\tinfo->spell_scale_set(1);\n\t\tinfo->set_aura(character_talent);\n\n\t\tcharacter_talent->aura_sapply(info);\n\n\t\tcharacter_talent_adds(character_talent_id);\n\n\t\tsets_free_character_talent_points(gets_free_character_talent_points() - 1);\n\n\t\treturn;\n\t}\n}\n\nvoid Entity::character_talent_crequest_reset() {\n\tcharacter_talent_sreceive_reset_request();\n}\nvoid Entity::character_talent_sreceive_reset_request() {\n\tcall(\"_character_talent_sreceive_reset_request\");\n}\nvoid Entity::_character_talent_sreceive_reset_request() {\n\tcharacter_talent_sreset();\n}\n\nvoid Entity::character_talent_sreset() {\n\t_s_character_talents.clear();\n\n\tif (has_method(\"_son_character_talent_reset\"))\n\t\tcall(\"_son_character_talent_reset\", this);\n\n\temit_signal(\"scharacter_talent_reset\", this);\n\n\tORPC(character_talent_creset);\n}\nvoid Entity::character_talent_creset() {\n\t_c_character_talents.clear();\n\n\tif (has_method(\"_con_character_talent_reset\"))\n\t\tcall(\"_con_character_talent_reset\", this);\n\n\temit_signal(\"ccharacter_talent_reset\", this);\n}\n\nvoid Entity::character_talent_adds(int character_talent) {\n\tif (character_talent_hass(character_talent))\n\t\treturn;\n\n\t_s_character_talents.push_back(character_talent);\n\n\tif (has_method(\"_son_character_talent_learned\"))\n\t\tcall(\"_son_character_talent_learned\", character_talent);\n\n\temit_signal(\"scharacter_talent_learned\", this, character_talent);\n\n\tORPC(character_talent_addc, character_talent);\n}\nvoid Entity::character_talent_removes(int character_talent) {\n\tfor (int i = 0; i < _s_character_talents.size(); ++i) {\n\t\tif (_s_character_talents[i] == character_talent) {\n\t\t\t_s_character_talents.remove_at(i);\n\n\t\t\tfor (int j = 0; j < aura_gets_count(); ++j) {\n\t\t\t\tRef<AuraData> ad = aura_gets(j);\n\n\t\t\t\tif (ad->get_aura_id() == character_talent) {\n\t\t\t\t\taura_removes(ad);\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tORPC(character_talent_removec, character_talent);\n}\nbool Entity::character_talent_hass(int character_talent) {\n\tfor (int i = 0; i < _s_character_talents.size(); ++i) {\n\t\tif (_s_character_talents[i] == character_talent) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nint Entity::character_talent_gets(int index) {\n\tERR_FAIL_INDEX_V(index, _s_character_talents.size(), 0);\n\n\treturn _s_character_talents.get(index);\n}\nint Entity::character_talent_gets_count() {\n\treturn _s_character_talents.size();\n}\nvoid Entity::character_talents_sclear() {\n\t_s_character_talents.clear();\n\n\tORPC(character_talent_cclear);\n}\n\nvoid Entity::character_talent_addc(int character_talent) {\n\tif (character_talent_hasc(character_talent))\n\t\treturn;\n\n\t_c_character_talents.push_back(character_talent);\n\n\tif (has_method(\"_con_character_talent_learned\"))\n\t\tcall(\"_con_character_talent_learned\", character_talent);\n\n\temit_signal(\"ccharacter_talent_learned\", this, character_talent);\n}\nvoid Entity::character_talent_removec(int character_talent) {\n\tfor (int i = 0; i < _c_character_talents.size(); ++i) {\n\t\tif (_c_character_talents[i] == character_talent) {\n\t\t\t_c_character_talents.remove_at(i);\n\t\t\treturn;\n\t\t}\n\t}\n}\nbool Entity::character_talent_hasc(int character_talent) {\n\tfor (int i = 0; i < _c_character_talents.size(); ++i) {\n\t\tif (_c_character_talents[i] == character_talent) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\nint Entity::character_talent_getc(int index) {\n\tERR_FAIL_INDEX_V(index, _c_character_talents.size(), 0);\n\n\treturn _c_character_talents.get(index);\n}\nint Entity::character_talent_getc_count() {\n\treturn _c_character_talents.size();\n}\nvoid Entity::character_talent_cclear() {\n\t_c_character_talents.clear();\n}\n\nPoolIntArray Entity::scharacter_talents_get() {\n\tPoolIntArray arr;\n\tarr.resize(_s_character_talents.size());\n\n#if !GODOT4\n\tPoolIntArray::Write w = arr.write();\n#endif\n\n\tfor (int i = 0; i < _s_character_talents.size(); ++i) {\n#if !GODOT4\n\t\tw[i] = _s_character_talents[i];\n#else\n\t\tarr.write[i] = _s_character_talents[i];\n#endif\n\t}\n\n\treturn arr;\n}\nvoid Entity::scharacter_talents_set(const PoolIntArray &data) {\n\t_s_character_talents.resize(data.size());\n\n\tfor (int i = 0; i < _s_character_talents.size(); ++i) {\n\t\t_s_character_talents.write[i] = data[i];\n\t}\n}\n\n////    Bag    ////\n\nRef<Bag> Entity::gets_bag() const {\n\treturn _s_bag;\n}\nvoid Entity::sets_bag(const Ref<Bag> bag) {\n\tif (_s_bag.is_valid()) {\n\t\t_s_bag->DISCONNECT(\"item_added\", this, Entity, notification_item_sadded);\n\t\t_s_bag->DISCONNECT(\"item_removed\", this, Entity, notification_item_sremoved);\n\t\t_s_bag->DISCONNECT(\"item_swapped\", this, Entity, notification_items_sswapped);\n\t\t_s_bag->DISCONNECT(\"item_count_changed\", this, Entity, notification_item_sscount_changed);\n\t\t_s_bag->DISCONNECT(\"overburdened\", this, Entity, notification_soverburdened);\n\t\t_s_bag->DISCONNECT(\"overburden_removed\", this, Entity, notification_soverburden_removed);\n\t}\n\n\t_s_bag = bag;\n\n\tif (_s_bag.is_valid()) {\n\t\t_s_bag->CONNECT(\"item_added\", this, Entity, notification_item_sadded);\n\t\t_s_bag->CONNECT(\"item_removed\", this, Entity, notification_item_sremoved);\n\t\t_s_bag->CONNECT(\"item_swapped\", this, Entity, notification_items_sswapped);\n\t\t_s_bag->CONNECT(\"item_count_changed\", this, Entity, notification_item_sscount_changed);\n\t\t_s_bag->CONNECT(\"overburdened\", this, Entity, notification_soverburdened);\n\t\t_s_bag->CONNECT(\"overburden_removed\", this, Entity, notification_soverburden_removed);\n\t}\n\n\temit_signal(\"sbag_changed\", this, _s_bag);\n\n\tif (_s_bag.is_valid()) {\n\t\tORPC(setc_bag_rpc, JSON::stringify(_s_bag->to_dict()));\n\t} else {\n\t\tORPC(setc_bag_rpc, \"\");\n\t}\n}\n\nRef<Bag> Entity::getc_bag() const {\n\treturn _c_bag;\n}\nvoid Entity::setc_bag(const Ref<Bag> bag) {\n\t_c_bag = bag;\n\n\temit_signal(\"cbag_changed\", this, _c_bag);\n}\n\nRef<Bag> Entity::gets_target_bag() const {\n\treturn _s_target_bag;\n}\nvoid Entity::sets_target_bag(const Ref<Bag> bag) {\n\tif (_s_target_bag.is_valid()) {\n\t\t_s_target_bag->DISCONNECT(\"item_added\", this, Entity, notification_target_item_sadded);\n\t\t_s_target_bag->DISCONNECT(\"item_removed\", this, Entity, notification_target_item_sremoved);\n\t\t_s_target_bag->DISCONNECT(\"item_swapped\", this, Entity, notification_target_items_sswapped);\n\t\t_s_target_bag->DISCONNECT(\"item_count_changed\", this, Entity, notification_target_item_sscount_changed);\n\t}\n\n\t_s_target_bag = bag;\n\n\tif (_s_target_bag.is_valid()) {\n\t\t_s_target_bag->CONNECT(\"item_added\", this, Entity, notification_target_item_sadded);\n\t\t_s_target_bag->CONNECT(\"item_removed\", this, Entity, notification_target_item_sremoved);\n\t\t_s_target_bag->CONNECT(\"item_swapped\", this, Entity, notification_target_items_sswapped);\n\t\t_s_target_bag->CONNECT(\"item_count_changed\", this, Entity, notification_target_item_sscount_changed);\n\t}\n\n\temit_signal(\"starget_bag_changed\", this, _s_target_bag);\n\n\tif (_s_target_bag.is_valid()) {\n\t\tORPC(setc_target_bag_rpc, JSON::stringify(_s_target_bag->to_dict()));\n\t} else {\n\t\tORPC(setc_target_bag_rpc, \"\");\n\t}\n}\n\nRef<Bag> Entity::getc_target_bag() const {\n\treturn _c_target_bag;\n}\nvoid Entity::setc_target_bag(const Ref<Bag> bag) {\n\t_c_target_bag = bag;\n\n\temit_signal(\"ctarget_bag_changed\", this, _s_target_bag);\n}\n\nvoid Entity::setc_bag_rpc(String data) {\n\tRef<Bag> bag;\n\tbag.instantiate();\n\tbag->from_dict(data_as_dict(data));\n\n\tsetc_bag(bag);\n}\nvoid Entity::setc_target_bag_rpc(String data) {\n\tRef<Bag> bag;\n\tbag.instantiate();\n\tbag->from_dict(data_as_dict(data));\n\n\tsetc_target_bag(bag);\n}\n\nvoid Entity::loot_crequest(int index) {\n\tRPCS(loots, index);\n}\nvoid Entity::loots(int index) {\n\tERR_FAIL_COND(!_s_bag.is_valid());\n\tERR_FAIL_COND(!_s_target_bag.is_valid());\n\n\tRef<ItemInstance> ii = _s_target_bag->get_item(index);\n\n\tif (_s_bag->can_add_item(ii)) {\n\t\t_s_target_bag->remove_item(index);\n\t\t_s_bag->add_item(ii);\n\t}\n}\nvoid Entity::lootc(int index) {\n\tERR_FAIL_COND(!_c_target_bag.is_valid());\n\n\t_c_target_bag->remove_item(index);\n}\n\nvoid Entity::notification_item_sadded(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id) {\n\tORPCOBJP(item_addc_rpc, slot_id, JSON::stringify(item->to_dict()), item_addc, slot_id, item);\n}\nvoid Entity::item_addc_rpc(int slot_id, String item_data) {\n\tRef<ItemInstance> ii;\n\tii.instantiate();\n\tii->from_dict(data_as_dict(item_data));\n\n\titem_addc(slot_id, ii);\n}\nvoid Entity::item_addc(int slot_id, Ref<ItemInstance> item) {\n\tERR_FAIL_COND(!_c_bag.is_valid());\n\n\t_c_bag->add_item_at(slot_id, item);\n}\nvoid Entity::notification_item_sremoved(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id) {\n\tORPC(item_removec, slot_id);\n}\nvoid Entity::item_removes(const int slot_id) {\n\tERR_FAIL_COND(!_s_bag.is_valid());\n\n\t_s_bag->remove_item(slot_id);\n}\nvoid Entity::item_removec(const int slot_id) {\n\tERR_FAIL_COND(!_c_bag.is_valid());\n\n\t_c_bag->remove_item(slot_id);\n}\nvoid Entity::item_cdeny_remove(const int slot_id) {\n}\nvoid Entity::item_crequest_remove(const int slot_id) {\n\tRPCS(item_removes, slot_id);\n}\n\nvoid Entity::notification_items_sswapped(Ref<Bag> bag, int slot_id_1, int slot_id_2) {\n\tORPC(items_swapc, slot_id_1, slot_id_2);\n}\nvoid Entity::items_swaps(int slot_id_1, int slot_id_2) {\n\tERR_FAIL_COND(!_s_bag.is_valid());\n\n\t_s_bag->swap_items(slot_id_1, slot_id_2);\n}\nvoid Entity::items_swapc(int slot_id_1, int slot_id_2) {\n\tERR_FAIL_COND(!_c_bag.is_valid());\n\n\t_c_bag->swap_items(slot_id_1, slot_id_2);\n}\nvoid Entity::item_cdeny_swap(int slot_id_1, int slot_id_2) {\n}\nvoid Entity::item_crequest_swap(int slot_id_1, int slot_id_2) {\n\tRPCS(items_swaps, slot_id_1, slot_id_2);\n}\n\nvoid Entity::notification_item_sscount_changed(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id) {\n\tERR_FAIL_COND(!item.is_valid());\n\n\tORPC(item_cchange_count, slot_id, item->get_stack_size());\n}\nvoid Entity::item_cchange_count(int slot_id, int new_count) {\n\tERR_FAIL_COND(!_c_bag.is_valid());\n\n\t_c_bag->set_item_count(slot_id, new_count);\n}\n\nvoid Entity::notification_soverburdened(Ref<Bag> bag) {\n}\nvoid Entity::notification_soverburden_removed(Ref<Bag> bag) {\n}\n\n//Target Bag\n\nvoid Entity::notification_target_item_sadded(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id) {\n\tORPCOBJP(target_item_addc_rpc, slot_id, JSON::stringify(item->to_dict()), target_item_addc, slot_id, item);\n}\nvoid Entity::target_item_addc_rpc(int slot_id, String item_data) {\n\tRef<ItemInstance> ii;\n\tii.instantiate();\n\tii->from_dict(data_as_dict(item_data));\n\n\ttarget_item_addc(slot_id, ii);\n}\nvoid Entity::target_item_addc(int slot_id, Ref<ItemInstance> item) {\n\tERR_FAIL_COND(!_c_target_bag.is_valid());\n\n\t_c_target_bag->add_item_at(slot_id, item);\n}\n\nvoid Entity::notification_target_item_sremoved(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id) {\n\tORPC(target_item_removec, slot_id);\n}\nvoid Entity::target_item_removes(const int slot_id) {\n\tERR_FAIL_COND(!_s_target_bag.is_valid());\n\n\t_s_target_bag->remove_item(slot_id);\n}\nvoid Entity::target_item_removec(const int slot_id) {\n\tERR_FAIL_COND(!_c_target_bag.is_valid());\n\n\t_c_target_bag->remove_item(slot_id);\n}\nvoid Entity::target_item_cdeny_remove(const int slot_id) {\n}\nvoid Entity::target_remove_crequest_item(const int slot_id) {\n\tRPCS(target_item_removes, slot_id);\n}\n\nvoid Entity::notification_target_items_sswapped(Ref<Bag> bag, int slot_id_1, int slot_id_2) {\n\tORPC(target_items_cswap, slot_id_1, slot_id_2);\n}\nvoid Entity::target_items_sswap(int slot_id_1, int slot_id_2) {\n\tERR_FAIL_COND(!_s_target_bag.is_valid());\n\n\t_s_target_bag->swap_items(slot_id_1, slot_id_2);\n}\nvoid Entity::target_items_cswap(int slot_id_1, int slot_id_2) {\n\tERR_FAIL_COND(!_c_target_bag.is_valid());\n\n\t_c_target_bag->swap_items(slot_id_1, slot_id_2);\n}\nvoid Entity::target_item_cdeny_swap(int slot_id_1, int slot_id_2) {\n}\nvoid Entity::target_item_crequest_swap(int slot_id_1, int slot_id_2) {\n\tRPCS(target_items_sswap, slot_id_1, slot_id_2);\n}\n\nvoid Entity::notification_target_item_sscount_changed(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id) {\n\tERR_FAIL_COND(!item.is_valid());\n\n\tORPC(target_item_cchange_count, slot_id, item->get_stack_size());\n}\nvoid Entity::target_item_cchange_count(int slot_id, int new_count) {\n\tERR_FAIL_COND(!_c_target_bag.is_valid());\n\n\tRef<ItemInstance> ii = _c_target_bag->get_item(slot_id);\n\n\tERR_FAIL_COND(!ii.is_valid());\n\n\tii->set_stack_size(new_count);\n}\n\n//Vendors\nvoid Entity::vendor_item_buy_crequest(const int index, const int count) {\n\tRPCS(vendor_item_sbuy, index, count);\n}\nvoid Entity::vendor_item_sbuy(const int index, const int count) {\n\tcall(\"_vendor_item_sbuy\", index, count);\n}\nvoid Entity::vendor_item_sell_crequest(const int slot_id) {\n\tRPCS(vendor_item_ssell, slot_id);\n}\nvoid Entity::vendor_item_ssell(const int slot_id) {\n\tcall(\"_vendor_item_ssell\", slot_id);\n}\n\n////    DATA    ////\nvoid Entity::data_adds(Ref<EntityDataContainer> data) {\n\t_s_data.push_back(data);\n}\nvoid Entity::data_removes(int index) {\n\tERR_FAIL_INDEX(index, _s_data.size());\n\n\t_s_data.remove_at(index);\n}\nRef<EntityDataContainer> Entity::data_gets(int index) {\n\tERR_FAIL_INDEX_V(index, _s_data.size(), Ref<EntityDataContainer>());\n\n\treturn _s_data.get(index);\n}\nint Entity::data_gets_count() {\n\treturn _s_data.size();\n}\n\nvoid Entity::data_addc(Ref<EntityDataContainer> data) {\n\t_c_data.push_back(data);\n}\nvoid Entity::data_removec(int index) {\n\tERR_FAIL_INDEX(index, _c_data.size());\n\n\t_c_data.remove_at(index);\n}\nRef<EntityDataContainer> Entity::data_getc(int index) {\n\tERR_FAIL_INDEX_V(index, _c_data.size(), Ref<EntityDataContainer>());\n\n\treturn _c_data.get(index);\n}\nint Entity::data_getc_count() {\n\treturn _c_data.size();\n}\n\nVector<Variant> Entity::sdatas_get() {\n\tVARIANT_ARRAY_GET(_s_data);\n}\nvoid Entity::sdatas_set(const Vector<Variant> &data) {\n\tVARIANT_ARRAY_SET(data, _s_data, EntityDataContainer);\n}\n\n////    Actionbars    ////\n\nbool Entity::get_actionbar_locked() {\n\treturn _actionbar_locked;\n}\nvoid Entity::set_actionbar_locked(bool value) {\n\t_actionbar_locked = value;\n}\n\nRef<ActionBarProfile> Entity::get_action_bar_profile() {\n\tif (_action_bar_profile.is_valid())\n\t\treturn _action_bar_profile;\n\n\t_action_bar_profile.instantiate();\n\n\tRef<ClassProfile> cp = ProfileManager::get_singleton()->getc_player_profile()->get_class_profile(gets_entity_data()->get_path());\n\n\tif (cp.is_valid()) {\n\t\tset_actionbar_locked(cp->get_actionbar_locked());\n\t\tRef<ActionBarProfile> p = cp->get_default_action_bar_profile();\n\n\t\tif (p.is_valid())\n\t\t\t_action_bar_profile->from_actionbar_profile(p);\n\t}\n\n\treturn _action_bar_profile;\n}\n\nvoid Entity::loaded() {\n\t//sendstate = true;\n}\n\n////    PlayerData    ////\n\nbool Entity::get_maunal_process() const {\n\treturn _maunal_process;\n}\nvoid Entity::set_maunal_process(const bool value) {\n\t_maunal_process = value;\n}\n\nvoid Entity::update(float delta) {\n\tif (_s_gcd > 0.0000001) {\n\t\t_s_gcd -= delta;\n\n\t\tif (_s_gcd <= 0) {\n\t\t\t_s_gcd = 0;\n\n\t\t\tnotification_sgcd_finished();\n\t\t}\n\t}\n\n\tif (_c_gcd > 0.0000001) {\n\t\t_c_gcd -= delta;\n\n\t\tif (_c_gcd <= 0) {\n\t\t\t_c_gcd = 0;\n\n\t\t\tnotification_cgcd_finished();\n\t\t}\n\t}\n\n\tfor (int i = 0; i < _c_cooldowns.size(); ++i) {\n\t\t_c_cooldowns.write[i].cooldown -= delta;\n\t}\n\n\tfor (int i = 0; i < _c_category_cooldowns.size(); ++i) {\n\t\t_c_category_cooldowns.write[i].cooldown -= delta;\n\t}\n\n\tfor (int i = 0; i < _s_cooldowns.size(); ++i) {\n\t\tfloat cd = _s_cooldowns[i].cooldown;\n\n\t\tcd -= delta;\n\n\t\t_s_cooldowns.write[i].cooldown = cd;\n\n\t\tif (cd <= 0) {\n\t\t\tcooldown_removes(_s_cooldowns[i].id);\n\t\t\t--i;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < _s_category_cooldowns.size(); ++i) {\n\t\tfloat cd = _s_category_cooldowns[i].cooldown;\n\n\t\tcd -= delta;\n\n\t\t_s_category_cooldowns.write[i].cooldown = cd;\n\n\t\tif (cd <= 0) {\n\t\t\tcategory_cooldown_removes(_s_category_cooldowns[i].id);\n\t\t\t--i;\n\t\t}\n\t}\n\n\tupdate_auras(delta);\n\n\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer();\n\tif (_multiplayer_api.is_valid() && _multiplayer_api->is_server()) {\n\t\tif (_s_spell_cast_info.is_valid() && _s_spell_cast_info->is_casting_get()) {\n\t\t\tif (_s_spell_cast_info->update_cast_time(delta)) {\n\t\t\t\tcast_finishs();\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < ESS::get_singleton()->stat_get_count(); ++i) {\n\t\t\tif (stat_get_dirty(i)) {\n\t\t\t\tssend_stat(i, stat_gets_current(i));\n\n\t\t\t\tstat_set_dirty(i, false);\n\t\t\t}\n\t\t}\n\n\t\tif (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid() && _s_ai->get_enabled()) {\n\t\t\tif (_s_pet_owner)\n\t\t\t\t_s_ai->pet_update(delta);\n\t\t\telse\n\t\t\t\t_s_ai->update(delta);\n\t\t}\n\n\t\tfor (int i = 0; i < _s_resources.size(); ++i) {\n\t\t\tRef<EntityResource> res = _s_resources.get(i);\n\n\t\t\tERR_CONTINUE(!res.is_valid());\n\n\t\t\tif (res->get_should_process())\n\t\t\t\tres->process_server(delta);\n\n\t\t\tif (res->get_dirty()) {\n\t\t\t\tresource_sends_curr_max(i, res->get_current_value(), res->get_max_value());\n\t\t\t\tres->set_dirty(false);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (_multiplayer_api.is_valid() && !_multiplayer_api->is_server()) {\n\t\tif (_c_spell_cast_info.is_valid() && _c_spell_cast_info->is_casting_get()) {\n\t\t\t_c_spell_cast_info->update_cast_time(delta);\n\t\t}\n\n\t\tfor (int i = 0; i < _c_resources.size(); ++i) {\n\t\t\tRef<EntityResource> res = _c_resources.get(i);\n\n\t\t\tERR_CONTINUE(!res.is_valid());\n\n\t\t\tif (res->get_should_process())\n\t\t\t\tres->process_client(delta);\n\t\t}\n\t}\n}\n\nString Entity::random_name() {\n\treturn \"\";\n}\n\n//Networking\n\nEntity *Entity::sees_gets(int index) {\n\tERR_FAIL_INDEX_V(index, _s_sees.size(), NULL);\n\n\treturn _s_sees.get(index);\n}\nvoid Entity::sees_removes_index(int index) {\n\tEntity *e = _s_sees.get(index);\n\n\tif (unlikely(!INSTANCE_VALIDATE(e))) {\n\t\t_s_sees.remove_at(index);\n\t\treturn;\n\t}\n\n\te->seen_by_removes(this);\n\n\t_s_sees.remove_at(index);\n}\nvoid Entity::sees_removes(Entity *entity) {\n\tif (unlikely(!INSTANCE_VALIDATE(entity))) {\n\t\t_s_sees.erase(entity);\n\t\treturn;\n\t}\n\n\tentity->seen_by_removes(this);\n\n\t_s_sees.erase(entity);\n}\nvoid Entity::sees_removes_bind(Node *entity) {\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(!e);\n\n\tsees_removes(e);\n}\nvoid Entity::sees_adds(Entity *entity) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tentity->seen_by_adds(this);\n\n\tfor (int i = 0; i < _s_sees.size(); ++i) {\n\t\tif (_s_sees.get(i) == entity)\n\t\t\treturn;\n\t}\n\n\t_s_sees.push_back(entity);\n}\nvoid Entity::sees_adds_bind(Node *entity) {\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(!e);\n\n\tsees_adds(e);\n}\nint Entity::sees_gets_count() {\n\treturn _s_sees.size();\n}\n\nEntity *Entity::seen_by_gets(int index) {\n\tERR_FAIL_INDEX_V(index, _s_seen_by.size(), NULL);\n\n\treturn _s_seen_by.get(index);\n}\nvoid Entity::seen_by_removes_index(int index) {\n\t_s_seen_by.remove_at(index);\n}\nvoid Entity::seen_by_removes(Entity *entity) {\n\t_s_seen_by.erase(entity);\n}\nvoid Entity::seen_by_removes_bind(Node *entity) {\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(!e);\n\n\tseen_by_removes(e);\n}\nvoid Entity::seen_by_adds(Entity *entity) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(entity));\n\n\tfor (int i = 0; i < _s_seen_by.size(); ++i) {\n\t\tif (_s_seen_by.get(i) == entity)\n\t\t\treturn;\n\t}\n\n\t_s_seen_by.push_back(entity);\n}\nvoid Entity::seen_by_adds_bind(Node *entity) {\n\tEntity *e = Object::cast_to<Entity>(entity);\n\n\tERR_FAIL_COND(!e);\n\n\tseen_by_adds(e);\n}\n\nint Entity::seen_by_gets_count() {\n\treturn _s_seen_by.size();\n}\n\nError Entity::_vrpc(const StringName &p_method, const Variant **p_arg, int p_argcount) {\n\tfor (int i = 0; i < _s_seen_by.size(); ++i) {\n\t\tEntity *e = _s_seen_by.get(i);\n\n\t\tif (unlikely(!INSTANCE_VALIDATE(e))) {\n\t\t\t_s_seen_by.remove_at(i);\n\t\t\t--i;\n\t\t\tcontinue;\n\t\t}\n\n\t\tint netm = e->get_multiplayer_authority();\n\n\t\tif (netm != 1) {\n\t\t\trpcp(netm, p_method, p_arg, p_argcount);\n\t\t}\n\t}\n\n\tif (get_multiplayer_authority() != 1) {\n\t\trpcp(get_multiplayer_authority(), p_method, p_arg, p_argcount);\n\t}\n\n\treturn OK;\n}\n\n#if VERSION_MAJOR < 4\nVariant Entity::_vrpc_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {\n#else\nVariant Entity::_vrpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {\n#endif\n\tif (p_argcount < 1) {\n#if VERSION_MAJOR < 4\n\t\tr_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;\n#else\n\t\tr_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;\n#endif\n\n\t\tr_error.argument = 1;\n\t\treturn Variant();\n\t}\n\n\tif (p_args[0]->get_type() != Variant::STRING) {\n#if VERSION_MAJOR < 4\n\t\tr_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;\n#else\n\t\tr_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;\n#endif\n\n\t\tr_error.argument = 0;\n\t\tr_error.expected = Variant::STRING;\n\t\treturn Variant();\n\t}\n\n\tStringName method = *p_args[0];\n\n\tfor (int i = 0; i < _s_seen_by.size(); ++i) {\n\t\tEntity *e = _s_seen_by.get(i);\n\n#if VERSION_MAJOR < 4\n\t\tif (unlikely(!ObjectDB::instance_validate(e))) {\n#else\n\t\tif (unlikely(e == NULL)) {\n#endif\n\n\t\t\t_s_seen_by.remove_at(i);\n\t\t\t--i;\n\t\t\tcontinue;\n\t\t}\n\n\t\tint netm = e->get_multiplayer_authority();\n\n\t\tif (netm != 1)\n\t\t\trpcp(netm, method, &p_args[1], p_argcount - 1);\n\t}\n\n\t//call(method, &p_args[1], p_argcount - 1);\n\n#if VERSION_MAJOR < 4\n\tr_error.error = Variant::CallError::CALL_OK;\n#else\n\tr_error.error = Callable::CallError::CALL_OK;\n#endif\n\n\treturn Variant();\n}\n\nDictionary Entity::data_as_dict(String &data) {\n\tVariant v = JSON::parse_string(data);\n\n\tDictionary d = v;\n\n\treturn d;\n}\n\nvoid Entity::register_for_physics_process(Ref<SpellCastInfo> info) {\n\t_physics_process_scis.push_back(info);\n}\n\nEntity::Entity() {\n\t_maunal_process = false;\n\t_deserialized = false;\n\n\t_body = NULL;\n\t_body_3d = NULL;\n\t_body_2d = NULL;\n\n\t_s_guid = 0;\n\t_c_guid = 0;\n\n\t_s_class_id = 0;\n\t_c_class_id = 0;\n\n\t_s_type = 0;\n\t_c_type = 0;\n\n\t_s_entity_player_type = 0;\n\t_c_entity_player_type = 0;\n\n\t_s_model_index = 0;\n\t_c_model_index = 0;\n\n\t_s_level = 1;\n\t_c_level = 1;\n\n\t_s_level = 1;\n\t_c_level = 1;\n\n\t_s_xp = 0;\n\n\t_s_send_flag = 0;\n\n\t_c_money = 0;\n\t_s_money = 0;\n\n\t_s_entity_name = \"\";\n\t_c_entity_name = \"\";\n\n\t_s_state = PlayerStates::STATE_NORMAL;\n\t_c_state = PlayerStates::STATE_NORMAL;\n\n\t_s_gcd = 0;\n\t_c_gcd = 0;\n\n\t_s_is_dead = 0;\n\t_c_is_dead = 0;\n\n\t_s_interaction_type = EntityEnums::ENITIY_INTERACTION_TYPE_NORMAL;\n\t_c_interaction_type = EntityEnums::ENITIY_INTERACTION_TYPE_NORMAL;\n\n\t_s_seed = 0;\n\t_c_seed = _s_seed;\n\n\tfor (int i = 0; i < EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX; ++i) {\n\t\t_s_states[i] = 0;\n\t}\n\n\t_s_state = 0;\n\t_c_state = 0;\n\n\t_s_active_category_cooldowns = 0;\n\t_c_active_category_cooldowns = 0;\n\n\t_s_entity_type = 0;\n\t_c_entity_type = 0;\n\n\t_s_immunity_flags = 0;\n\n\t_s_entity_flags = 0;\n\t_c_entity_flags = 0;\n\n\t_s_target = NULL;\n\t_c_target = NULL;\n\n\t_s_free_character_talent_points = 0;\n\t_c_free_character_talent_points = 0;\n\n\t_s_free_class_talent_points = 0;\n\t_c_free_class_talent_points = 0;\n\n\t_s_free_spell_points = 0;\n\t_c_free_spell_points = 0;\n\n\t//_action_bar_profile.instantiate();\n\t_actionbar_locked = false;\n\n\t_stats.resize(ESS::get_singleton()->stat_get_count());\n\n\t_sai_state = EntityEnums::AI_STATE_OFF;\n\t_sai_state_stored = EntityEnums::AI_STATE_OFF;\n\n\t_s_original_entity_controller = EntityEnums::ENITIY_CONTROLLER_NONE;\n\t_s_entity_controller = EntityEnums::ENITIY_CONTROLLER_NONE;\n\t_c_entity_controller = EntityEnums::ENITIY_CONTROLLER_NONE;\n\n\t_s_pet_owner = NULL;\n\t_c_pet_owner = NULL;\n\t_s_pet_formation_index = 0;\n\t_s_pet_ai_state = EntityEnums::AI_STATE_OFF;\n\n\t_s_equipment.resize(ESS::get_singleton()->equip_slot_get_count());\n\t_c_equipment.resize(ESS::get_singleton()->equip_slot_get_count());\n\n\tSET_RPC_REMOTE(\"csend_request_rank_increase\");\n\tSET_RPC_REMOTE(\"csend_request_rank_decrease\");\n\n\tSET_RPC_REMOTE(\"setc_guid\");\n\tSET_RPC_REMOTE(\"setc_entity_data_id\");\n\tSET_RPC_REMOTE(\"setc_entity_type\");\n\tSET_RPC_REMOTE(\"setc_entity_name\");\n\tSET_RPC_REMOTE(\"setc_model_index\");\n\tSET_RPC_REMOTE(\"setc_level\");\n\tSET_RPC_REMOTE(\"setc_xp\");\n\tSET_RPC_REMOTE(\"setc_seed\");\n\tSET_RPC_REMOTE(\"setc_entity_controller\");\n\n\t//EntityType\n\n\t//EntityInteractionType\n\n\tSET_RPC_REMOTE(\"setc_entity_interaction_type\");\n\tSET_RPC_REMOTE(\"setc_entity_flags\");\n\tSET_RPC_REMOTE(\"setc_money\");\n\n\t////     Stats    ////\n\n\tSET_RPC_REMOTE(\"creceive_stat\");\n\n\tSET_RPC_REMOTE(\"diec\");\n\n\t//send_stat\n\n\t////    Equip Slots    ////\n\n\tSET_RPC_REMOTE(\"equips\");\n\tSET_RPC_REMOTE(\"equip_csuccess\");\n\tSET_RPC_REMOTE(\"equip_cfail\");\n\n\t////    Resources    ////\n\n\tSET_RPC_REMOTE(\"resource_addc_rpc\");\n\tSET_RPC_REMOTE(\"resource_removec\");\n\tSET_RPC_REMOTE(\"resource_clearc\");\n\n\tSET_RPC_REMOTE(\"resource_creceive_current\");\n\tSET_RPC_REMOTE(\"resource_creceive_curr_max\");\n\tSET_RPC_REMOTE(\"resource_creceive_data\");\n\n\t////    Global Cooldown    ////\n\n\tSET_RPC_REMOTE(\"gcd_startc\");\n\n\t////    States    ////\n\n\tSET_RPC_REMOTE(\"setc_state\");\n\n\t////    Crafting System    ////\n\n\tSET_RPC_REMOTE(\"crafts\");\n\n\tSET_RPC_REMOTE(\"craft_addc_recipe_id\");\n\tSET_RPC_REMOTE(\"craft_removec_recipe_id\");\n\n\t////    SpellSystem    ////\n\n\tSET_RPC_REMOTE(\"spell_casts\");\n\tSET_RPC_REMOTE(\"item_uses\");\n\n\t//Damage Operations\n\n\tSET_RPC_REMOTE(\"stake_damage\");\n\tSET_RPC_REMOTE(\"stake_damage\");\n\n\t//Heal Operations\n\n\tSET_RPC_REMOTE(\"stake_heal\");\n\tSET_RPC_REMOTE(\"sdeal_heal_to\");\n\n\t//Damage, Heal RPCs\n\n\tSET_RPC_REMOTE(\"cdamage_dealt_rpc\");\n\tSET_RPC_REMOTE(\"cdealt_damage_rpc\");\n\tSET_RPC_REMOTE(\"cheal_dealt_rpc\");\n\tSET_RPC_REMOTE(\"cdealt_heal_rpc\");\n\n\t//Interactions\n\n\tSET_RPC_REMOTE(\"sinteract\");\n\n\tSET_RPC_REMOTE(\"copen_window\");\n\n\t//XP Operations\n\n\tSET_RPC_REMOTE(\"xp_addc\");\n\tSET_RPC_REMOTE(\"levelup_cclass\");\n\tSET_RPC_REMOTE(\"levelup_ccharacter\");\n\n\t//Aura Manipulation\n\n\tSET_RPC_REMOTE(\"aura_addc_rpc\");\n\tSET_RPC_REMOTE(\"aura_removec_rpc\");\n\tSET_RPC_REMOTE(\"aura_removec_exact_rpc\");\n\tSET_RPC_REMOTE(\"aura_removec_expired_rpc\");\n\tSET_RPC_REMOTE(\"aura_removec_dispelled_rpc\");\n\tSET_RPC_REMOTE(\"aura_refreshedc_rpc\");\n\n\t////    Casting System    ////\n\n\tSET_RPC_REMOTE(\"setc_spell_cast_info\");\n\n\tSET_RPC_REMOTE(\"cast_startc_rpc\");\n\tSET_RPC_REMOTE(\"cast_failc\");\n\tSET_RPC_REMOTE(\"cast_delayc\");\n\tSET_RPC_REMOTE(\"cast_finishc\");\n\tSET_RPC_REMOTE(\"cast_interruptc\");\n\n\tSET_RPC_REMOTE(\"cast_spell_successc_rpc\");\n\n\t////    Cooldowns    ////\n\n\tSET_RPC_REMOTE(\"cooldown_addc\");\n\tSET_RPC_REMOTE(\"cooldown_removec\");\n\n\t//Category Cooldowns\n\n\tSET_RPC_REMOTE(\"category_cooldown_addc\");\n\tSET_RPC_REMOTE(\"category_cooldown_removec\");\n\n\t//Known Spells\n\n\tSET_RPC_REMOTE(\"setc_free_spell_points\");\n\tSET_RPC_REMOTE(\"spell_learns\");\n\n\tSET_RPC_REMOTE(\"spell_addc_rpc\");\n\tSET_RPC_REMOTE(\"spell_removec_rpc\");\n\n\t//Skills\n\n\tSET_RPC_REMOTE(\"skill_addc_id\");\n\tSET_RPC_REMOTE(\"skill_removec_id\");\n\tSET_RPC_REMOTE(\"skill_changec\");\n\tSET_RPC_REMOTE(\"skill_changec_max\");\n\n\t////    Target    ////\n\n\tSET_RPC_REMOTE(\"target_net_sets\");\n\tSET_RPC_REMOTE(\"target_net_setc\");\n\n\t////    Talents    ////\n\n\tSET_RPC_REMOTE(\"setc_free_talent_points\");\n\tSET_RPC_REMOTE(\"talent_sreceive_learn_request\");\n\tSET_RPC_REMOTE(\"talent_sreceive_reset_request\");\n\n\tSET_RPC_REMOTE(\"talent_sreset\");\n\n\tSET_RPC_REMOTE(\"talent_addc\");\n\tSET_RPC_REMOTE(\"talent_removec\");\n\n\t////    Inventory    ////\n\n\tSET_RPC_REMOTE(\"setc_bag_rpc\");\n\tSET_RPC_REMOTE(\"setc_target_bag_rpc\");\n\n\tSET_RPC_REMOTE(\"loots\");\n\tSET_RPC_REMOTE(\"lootc\");\n\n\tSET_RPC_REMOTE(\"item_addc_rpc\");\n\tSET_RPC_REMOTE(\"item_removes\");\n\tSET_RPC_REMOTE(\"item_removec\");\n\tSET_RPC_REMOTE(\"item_cdeny_remove\");\n\tSET_RPC_REMOTE(\"items_swaps\");\n\tSET_RPC_REMOTE(\"items_swapc\");\n\tSET_RPC_REMOTE(\"item_cdeny_swap\");\n\tSET_RPC_REMOTE(\"item_cchange_count\");\n\n\tSET_RPC_REMOTE(\"target_item_addc_rpc\");\n\tSET_RPC_REMOTE(\"target_item_removes\");\n\tSET_RPC_REMOTE(\"target_item_removec\");\n\tSET_RPC_REMOTE(\"target_item_cdeny_remove\");\n\tSET_RPC_REMOTE(\"target_items_sswap\");\n\tSET_RPC_REMOTE(\"target_items_cswap\");\n\tSET_RPC_REMOTE(\"target_item_cdeny_swap\");\n\tSET_RPC_REMOTE(\"target_item_cchange_count\");\n\n\t////    Data    ////\n\n\tSET_RPC_REMOTE(\"data_addc\");\n\tSET_RPC_REMOTE(\"data_removec\");\n}\n\nEntity::~Entity() {\n\t//Ref<EntityData> _s_entity_data;\n\t//Ref<EntityData> _c_entity_data;\n\n\t_s_resources.clear();\n\t_c_resources.clear();\n\n\t//Ref<SpellCastInfo> _s_spell_cast_info;\n\t//Ref<SpellCastInfo> _c_spell_cast_info;\n\n\t_s_auras.clear();\n\t_c_auras.clear();\n\n\t_s_cooldowns.clear();\n\t_c_cooldowns.clear();\n\n\t_s_category_cooldowns.clear();\n\t_c_category_cooldowns.clear();\n\n\t_s_data.clear();\n\t_c_data.clear();\n\n\t_s_craft_recipes.clear();\n\t_c_craft_recipes.clear();\n\n\t_s_spells.clear();\n\t_c_spells.clear();\n\n\t_s_free_class_talent_points = 0;\n\t_c_free_character_talent_points = 0;\n\n\t_s_class_talents.clear();\n\t_c_character_talents.clear();\n\n\t_stats.clear();\n\n\t_s_equipment.clear();\n\t_c_equipment.clear();\n\n\t_action_bar_profile.unref();\n\n\t_s_sees.clear();\n\t_s_seen_by.clear();\n\n\t_s_ai.unref();\n\n\t_s_pets.clear();\n\n\t_physics_process_scis.clear();\n}\n\nvoid Entity::_crafts(int id) {\n\tif (!craft_hass_recipe_id(id))\n\t\treturn;\n\n\tRef<CraftRecipe> recipe = craft_gets_recipe_id(id);\n\n\tif (!recipe.is_valid())\n\t\treturn;\n\n\tfor (int i = 0; i < recipe->get_required_tools_count(); ++i) {\n\t\tRef<CraftRecipeHelper> mat = recipe->get_required_tool(i);\n\n\t\tif (!mat.is_valid())\n\t\t\tcontinue;\n\n\t\tif (!gets_bag()->has_item(mat->get_item(), mat->get_count()))\n\t\t\treturn;\n\t}\n\n\tfor (int i = 0; i < recipe->get_required_materials_count(); ++i) {\n\t\tRef<CraftRecipeHelper> mat = recipe->get_required_material(i);\n\n\t\tif (!mat.is_valid())\n\t\t\tcontinue;\n\n\t\tif (!gets_bag()->has_item(mat->get_item(), mat->get_count()))\n\t\t\treturn;\n\t}\n\n\t//ok, player has everything\n\n\tfor (int i = 0; i < recipe->get_required_materials_count(); ++i) {\n\t\tRef<CraftRecipeHelper> mat = recipe->get_required_material(i);\n\n\t\tif (!mat.is_valid())\n\t\t\tcontinue;\n\n\t\tgets_bag()->remove_items(mat->get_item(), mat->get_count());\n\t}\n\n\tRef<ItemInstance> item = recipe->get_item()->get_item()->create_item_instance();\n\n\tgets_bag()->add_item(item);\n}\n\nvoid Entity::_notification_sxp_gained(int value) {\n\t/*\n\tif (ESS::get_singleton()->get_use_class_xp() && ESS::get_singleton()->get_automatic_class_levelups()) {\n\t\tif (ESS::get_singleton()->get_resource_db()->get_xp_data()->can_class_level_up(gets_class_level())) {\n\n\t\t\tint xpr = ESS::get_singleton()->get_resource_db()->get_xp_data()->get_class_xp(gets_class_level());\n\n\t\t\tif (xpr <= gets_class_xp()) {\n\t\t\t\tlevelup_sclass(1);\n\t\t\t\tsets_class_xp(0);\n\t\t\t}\n\t\t}\n\t}*/\n\n\tif (ESS::get_singleton()->can_character_level_up(gets_level())) {\n\t\tint xpr = ESS::get_singleton()->get_character_xp(gets_level());\n\n\t\tif (xpr <= gets_xp()) {\n\t\t\tlevelups(1);\n\t\t\tsets_xp(0);\n\t\t}\n\t}\n}\n\nvoid Entity::_notification_slevel_up(int level) {\n\tif (!gets_entity_data().is_valid())\n\t\treturn;\n\n\tRef<EntityClassData> ecd = gets_entity_data()->get_entity_class_data();\n\n\tif (!ecd.is_valid())\n\t\treturn;\n\n\tfor (int i = 0; i < ESS::get_singleton()->stat_get_main_stat_count(); ++i) {\n\t\tint st = ecd->get_stat_data()->get_level_stat_data()->get_stat_diff(i, gets_level() - level, gets_level());\n\n\t\tstat_mod_base(i, st);\n\t}\n\n\tif (!ESS::get_singleton()->get_use_class_xp()) {\n\t\tif (ESS::get_singleton()->get_use_spell_points())\n\t\t\tsets_free_spell_points(gets_free_spell_points() + ecd->get_spell_points_per_level() * level);\n\n\t\tsets_free_character_talent_points(gets_free_character_talent_points() + level);\n\t}\n\n\tif (ESS::get_singleton()->get_use_spell_points())\n\t\tsets_free_spell_points(gets_free_spell_points() + ecd->get_spell_points_per_level() * level);\n\n\tsets_free_class_talent_points(gets_free_class_talent_points() + level);\n\n\tif (ESS::get_singleton()->get_auto_learn_spells()) {\n\t\tfor (int i = 0; i < ecd->get_num_spells(); ++i) {\n\t\t\tRef<Spell> sp = ecd->get_spell(i);\n\n\t\t\tif (!sp.is_valid())\n\t\t\t\tcontinue;\n\n\t\t\tif (sp->get_level() <= gets_level() && !spell_hass(sp)) {\n\t\t\t\tRef<Spell> rs = sp->get_training_required_spell();\n\n\t\t\t\tif (rs.is_valid() && !spell_hass(rs)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tspell_learns(sp->get_id());\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid Entity::_moved() {\n\tif (cast_is_castings())\n\t\tcast_fails();\n}\n\nvoid Entity::_con_target_changed(Node *p_entity, Node *p_old_target) {\n\t//Entity *entity = Object::cast_to<Entity>(p_entity);\n\tEntity *old_target = Object::cast_to<Entity>(p_old_target);\n\n\tif (INSTANCE_VALIDATE(old_target))\n\t\told_target->notification_cuntargeted();\n\n\tif (INSTANCE_VALIDATE(getc_target())) {\n\t\tgetc_target()->notification_ctargeted();\n\n\t\tif (canc_interact())\n\t\t\tcrequest_interact();\n\t}\n}\n\nvoid Entity::_notification_sdeath() {\n\t//only if mob\n\t/*\n\tif dead:\n\t\treturn\n\n\tif starget == null:\n\t\tqueue_free()\n\t\treturn\n\n\t#warning-ignore:unused_variable\n\tfor i in range(aura_gets_count()):\n\t\taura_removes(aura_gets(0))\n\n\tdead = true\n\n\tvar ldiff : float = slevel - starget.slevel + 10.0\n\n\tif ldiff < 0:\n\t\tldiff = 0\n\n\tif ldiff > 15:\n\t\tldiff = 15\n\n\tldiff /= 10.0\n\n\tstarget.xp_adds(int(5.0 * slevel * ldiff))\n\n\tstarget = null\n\n\tsentity_interaction_type = EntityEnums.ENITIY_INTERACTION_TYPE_LOOT\n\tai_state = EntityEnums.AI_STATE_OFF\n\n\tanim_node_state_machine.travel(\"dead\")\n\n#\tset_process(false)\n\tset_physics_process(false)\n\t*/\n}\n\nvoid Entity::_spell_learns(int id) {\n\tif (ESS::get_singleton()->get_use_spell_points()) {\n\t\tERR_FAIL_COND(gets_free_spell_points() <= 0);\n\t}\n\n\tERR_FAIL_COND(!_s_entity_data.is_valid());\n\n\tRef<EntityClassData> cd = _s_entity_data->get_entity_class_data();\n\n\tERR_FAIL_COND(!cd.is_valid());\n\n\tfor (int i = 0; i < cd->get_num_spells(); ++i) {\n\t\tRef<Spell> sp = cd->get_spell(i);\n\n\t\tif (!sp.is_valid())\n\t\t\tcontinue;\n\n\t\tif (sp->get_id() == id) {\n\t\t\tint req_level = sp->get_level();\n\n\t\t\tif (req_level > gets_level()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tint cost = sp->get_training_cost();\n\n\t\t\tif (gets_money() < cost) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsets_money(gets_money() - cost);\n\n\t\t\tRef<Spell> req_spell = sp->get_training_required_spell();\n\n\t\t\tif (req_spell.is_valid() && !spell_hass(req_spell)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tspell_adds(sp);\n\n\t\t\tif (ESS::get_singleton()->get_use_spell_points())\n\t\t\t\tsets_free_spell_points(_s_free_spell_points - 1);\n\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nvoid Entity::_vendor_item_sbuy(const int index, const int count) {\n\tif (count <= 0)\n\t\treturn;\n\n\tEntity *e = gets_target();\n\n\tif (!e)\n\t\treturn;\n\n\tif (!iss_target_in_interact_range()) {\n\t\treturn;\n\t}\n\n\tRef<EntityData> ed = e->gets_entity_data();\n\n\tif (!ed.is_valid())\n\t\treturn;\n\n\tRef<EntityClassData> ecd = ed->get_entity_class_data();\n\n\tif (!ecd.is_valid())\n\t\treturn;\n\n\tRef<VendorItemData> vid = ecd->get_vendor_item_data();\n\n\tif (!vid.is_valid())\n\t\treturn;\n\n\tif (vid->get_num_vendor_datas() <= index) {\n\t\treturn;\n\t}\n\n\tRef<VendorItemDataEntry> vide = vid->get_vendor_data(index);\n\n\tif (!vide.is_valid())\n\t\treturn;\n\n\tRef<ItemTemplate> t = vide->get_item();\n\n\tif (!t.is_valid())\n\t\treturn;\n\n\tint price = vide->get_price();\n\n\tif (gets_money() < price)\n\t\treturn;\n\n\tRef<Bag> sbag = gets_bag();\n\n\tint s = count;\n\tif (t->get_stack_size() < s)\n\t\ts = t->get_stack_size();\n\n\tRef<ItemInstance> ii = t->create_item_instance();\n\tii->set_stack_size(s);\n\n\t//todo make this work with item templates\n\tif (!sbag->can_add_item(ii)) {\n\t\treturn;\n\t}\n\n\tsets_money(gets_money() - price);\n\tsbag->add_item(ii);\n}\nvoid Entity::_vendor_item_ssell(const int slot_id) {\n\tEntity *e = gets_target();\n\n\tif (!e)\n\t\treturn;\n\n\tif (!iss_target_in_interact_range()) {\n\t\treturn;\n\t}\n\n\tRef<EntityData> ed = e->gets_entity_data();\n\n\tif (!ed.is_valid())\n\t\treturn;\n\n\tRef<EntityClassData> ecd = ed->get_entity_class_data();\n\n\tif (!ecd.is_valid())\n\t\treturn;\n\n\tRef<VendorItemData> vid = ecd->get_vendor_item_data();\n\n\tif (!vid.is_valid())\n\t\treturn;\n\n\tRef<Bag> bag = gets_bag();\n\n\tRef<ItemInstance> ii = bag->get_item(slot_id);\n\n\tif (!ii.is_valid())\n\t\treturn;\n\n\tRef<ItemTemplate> it = ii->get_item_template();\n\n\tint price = it->get_price();\n\n\tif (price == 0)\n\t\treturn;\n\n\tsets_money(gets_money() + price);\n\n\tbag->remove_item(slot_id);\n}\n\nvoid Entity::_notification(int p_what) {\n\tswitch (p_what) {\n\t\tcase NOTIFICATION_POSTINITIALIZE: {\n\t\t\tcall(\"_initialize\");\n\t\t} break;\n\t\tcase NOTIFICATION_SCENE_INSTANTIATED: {\n\t\t\tset_body(get_node_or_null(_body_path));\n\n\t\t\tif (INSTANCE_VALIDATE(_body))\n\t\t\t\t_body->set_owner(this);\n\n\t\t\t_character_skeleton = get_node_or_null(_character_skeleton_path);\n\n\t\t\tif (_character_skeleton != NULL) {\n\t\t\t\tif (_character_skeleton->has_method(\"set_model_index\"))\n\t\t\t\t\t_character_skeleton->call(\"set_model_index\", _c_model_index);\n\t\t\t}\n\t\t} break;\n\t\tcase NOTIFICATION_ENTER_TREE: {\n\t\t\tif (!Engine::get_singleton()->is_editor_hint())\n\t\t\t\tset_process(true);\n\n\t\t\tif (!_body) {\n\t\t\t\tset_body(get_node_or_null(_body_path));\n\n\t\t\t\tif (INSTANCE_VALIDATE(_body))\n\t\t\t\t\t_body->set_owner(this);\n\t\t\t}\n\n\t\t\tif (!_character_skeleton) {\n\t\t\t\t_character_skeleton = get_node_or_null(_character_skeleton_path);\n\n\t\t\t\tif (_character_skeleton != NULL) {\n\t\t\t\t\tif (_character_skeleton->has_method(\"set_model_index\"))\n\t\t\t\t\t\t_character_skeleton->call(\"set_model_index\", _c_model_index);\n\t\t\t\t}\n\t\t\t}\n\t\t} break;\n\t\tcase NOTIFICATION_PROCESS: {\n\t\t\tif (!_maunal_process)\n\t\t\t\tupdate(get_process_delta_time());\n\t\t} break;\n\t\tcase NOTIFICATION_PHYSICS_PROCESS: {\n\t\t\tson_physics_process(get_physics_process_delta_time());\n\t\t} break;\n\t\tcase NOTIFICATION_EXIT_TREE: {\n\t\t\tfor (int i = 0; i < _s_seen_by.size(); ++i) {\n\t\t\t\tEntity *e = _s_seen_by.get(i);\n\n\t\t\t\tif (INSTANCE_VALIDATE(e))\n\t\t\t\t\te->sees_removes(this);\n\t\t\t}\n\t\t} break;\n\t}\n}\n\nbool Entity::_set(const StringName &p_name, const Variant &p_value) {\n\tString name = p_name;\n\n\tString main_prop = name.get_slicec('/', 0);\n\n\tif (main_prop == \"stat\") {\n\t\tint stat_id = name.get_slicec('/', 1).to_int();\n\t\tString stat_prop_name = name.get_slicec('/', 2);\n\n\t\tif (stat_prop_name == \"base\") {\n\t\t\tstat_set_base(stat_id, p_value);\n\n\t\t\treturn true;\n\t\t} else if (stat_prop_name == \"bonus\") {\n\t\t\tstat_set_bonus(stat_id, p_value);\n\n\t\t\treturn true;\n\t\t} else if (stat_prop_name == \"percent\") {\n\t\t\tstat_set_percent(stat_id, p_value);\n\n\t\t\treturn true;\n\t\t} else if (stat_prop_name == \"scurrent\") {\n\t\t\tstat_sets_current(stat_id, p_value);\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t} else if (main_prop == \"sequipment\") {\n\t\tint slot_id = name.get_slicec('/', 1).to_int();\n\n\t\tif (_s_equipment.size() <= slot_id) {\n\t\t\treturn false;\n\t\t}\n\n\t\t_s_equipment.write[slot_id] = p_value;\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nbool Entity::_get(const StringName &p_name, Variant &r_ret) const {\n\tString name = p_name;\n\n\tString main_prop = name.get_slicec('/', 0);\n\n\tif (main_prop == \"stat\") {\n\t\tint stat_id = name.get_slicec('/', 1).to_int();\n\t\tString stat_prop_name = name.get_slicec('/', 2);\n\n\t\tif (stat_prop_name == \"base\") {\n\t\t\tr_ret = stat_get_base(stat_id);\n\n\t\t\treturn true;\n\t\t} else if (stat_prop_name == \"bonus\") {\n\t\t\tr_ret = stat_get_bonus(stat_id);\n\n\t\t\treturn true;\n\t\t} else if (stat_prop_name == \"percent\") {\n\t\t\tr_ret = stat_get_percent(stat_id);\n\n\t\t\treturn true;\n\t\t} else if (stat_prop_name == \"scurrent\") {\n\t\t\tr_ret = stat_gets_current(stat_id);\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t} else if (main_prop == \"sequipment\") {\n\t\tint slot_id = name.get_slicec('/', 1).to_int();\n\n\t\tif (_s_equipment.size() <= slot_id) {\n\t\t\treturn false;\n\t\t}\n\n\t\tr_ret = _s_equipment[slot_id];\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nvoid Entity::_get_property_list(List<PropertyInfo> *p_list) const {\n#if PROPERTY_DEBUG\n\tint property_usange = PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL;\n#else\n\tint property_usange = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL;\n#endif\n\n\tfor (int i = 0; i < ESS::get_singleton()->stat_get_count(); ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::REAL, \"stat/\" + itos(i) + \"/base\", PROPERTY_HINT_NONE, \"\", property_usange));\n\t\tp_list->push_back(PropertyInfo(Variant::REAL, \"stat/\" + itos(i) + \"/percent\", PROPERTY_HINT_NONE, \"\", property_usange));\n\t\tp_list->push_back(PropertyInfo(Variant::REAL, \"stat/\" + itos(i) + \"/scurrent\", PROPERTY_HINT_NONE, \"\", property_usange));\n\t}\n\n\tfor (int i = 0; i < ESS::get_singleton()->equip_slot_get_count(); ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::OBJECT, \"sequipment/\" + itos(i), PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\", property_usange));\n\t}\n}\n\nvoid Entity::_validate_property(PropertyInfo &property) const {\n\tString name = property.name;\n\n\tif (name == \"sentity_player_type\" || name == \"centity_player_type\") {\n\t\tproperty.hint_string = ESS::get_singleton()->entity_types_get();\n\t}\n}\n\nvoid Entity::_bind_methods() {\n\t//Signals\n\tADD_SIGNAL(MethodInfo(\"deserialized\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\n\tADD_SIGNAL(MethodInfo(\"sname_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\tADD_SIGNAL(MethodInfo(\"cname_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\n\tADD_SIGNAL(MethodInfo(\"starget_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"old_target\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\tADD_SIGNAL(MethodInfo(\"ctarget_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"old_target\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\n\tADD_SIGNAL(MethodInfo(\"son_damage_received\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellDamageInfo\")));\n\tADD_SIGNAL(MethodInfo(\"con_damage_received\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellDamageInfo\")));\n\n\tADD_SIGNAL(MethodInfo(\"son_damage_dealt\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellDamageInfo\")));\n\tADD_SIGNAL(MethodInfo(\"con_damage_dealt\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellDamageInfo\")));\n\n\tADD_SIGNAL(MethodInfo(\"son_dealt_damage\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellDamageInfo\")));\n\tADD_SIGNAL(MethodInfo(\"con_dealt_damage\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellDamageInfo\")));\n\n\tADD_SIGNAL(MethodInfo(\"son_heal_received\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellHealInfo\")));\n\tADD_SIGNAL(MethodInfo(\"con_heal_received\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellHealInfo\")));\n\n\tADD_SIGNAL(MethodInfo(\"son_dealt_heal\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellHealInfo\")));\n\tADD_SIGNAL(MethodInfo(\"con_dealt_heal\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellHealInfo\")));\n\n\tADD_SIGNAL(MethodInfo(\"son_heal_dealt\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellHealInfo\")));\n\tADD_SIGNAL(MethodInfo(\"con_heal_dealt\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellHealInfo\")));\n\n\tADD_SIGNAL(MethodInfo(\"sentity_data_changed\", PropertyInfo(Variant::OBJECT, \"data\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityData\")));\n\tADD_SIGNAL(MethodInfo(\"centity_data_changed\", PropertyInfo(Variant::OBJECT, \"data\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityData\")));\n\n\tADD_SIGNAL(MethodInfo(\"diesd\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\tADD_SIGNAL(MethodInfo(\"diecd\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\n\tADD_SIGNAL(MethodInfo(\"sentity_resource_added\", PropertyInfo(Variant::OBJECT, \"resource\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityResource\")));\n\tADD_SIGNAL(MethodInfo(\"sentity_resource_removed\", PropertyInfo(Variant::OBJECT, \"resource\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityResource\")));\n\tADD_SIGNAL(MethodInfo(\"centity_resource_added\", PropertyInfo(Variant::OBJECT, \"resource\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityResource\")));\n\tADD_SIGNAL(MethodInfo(\"centity_resource_removed\", PropertyInfo(Variant::OBJECT, \"resource\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityResource\")));\n\n\t//Skills\n\tADD_SIGNAL(MethodInfo(\"sskill_added\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"skill\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySkill\")));\n\tADD_SIGNAL(MethodInfo(\"sskill_removed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"skill\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySkill\")));\n\n\tADD_SIGNAL(MethodInfo(\"cskill_added\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"skill\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySkill\")));\n\tADD_SIGNAL(MethodInfo(\"cskill_removed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"skill\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySkill\")));\n\tADD_SIGNAL(MethodInfo(\"cskill_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"skill\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySkill\")));\n\n\t//Windows\n\tADD_SIGNAL(MethodInfo(\"onc_open_winow_request\", PropertyInfo(Variant::INT, \"window_id\")));\n\n\t//setup\n\t//GDVIRTUAL_BIND(\"_setup\");\n\t//GDVIRTUAL_BIND(\"_initialize\");\n\n\tClassDB::bind_method(D_METHOD(\"_initialize\"), &Entity::_initialize);\n\tClassDB::bind_method(D_METHOD(\"setup\", \"info\"), &Entity::setup);\n\tClassDB::bind_method(D_METHOD(\"_setup\"), &Entity::_setup);\n\tClassDB::bind_method(D_METHOD(\"setup_actionbars\"), &Entity::setup_actionbars);\n\n\t//binds\n\n\tClassDB::bind_method(D_METHOD(\"stat_get_dirty\", \"stat_id\"), &Entity::stat_get_dirty);\n\tClassDB::bind_method(D_METHOD(\"stat_set_dirty\", \"stat_id\", \"value\"), &Entity::stat_set_dirty);\n\n\tClassDB::bind_method(D_METHOD(\"stat_get_base\", \"stat_id\"), &Entity::stat_get_base);\n\tClassDB::bind_method(D_METHOD(\"stat_set_base\", \"stat_id\", \"value\"), &Entity::stat_set_base);\n\tClassDB::bind_method(D_METHOD(\"stat_mod_base\", \"stat_id\", \"value\"), &Entity::stat_mod_base);\n\n\tClassDB::bind_method(D_METHOD(\"stat_get_base_calculated\", \"stat_id\"), &Entity::stat_get_base_calculated);\n\tClassDB::bind_method(D_METHOD(\"stat_set_base_calculated\", \"stat_id\", \"value\"), &Entity::stat_set_base_calculated);\n\n\tClassDB::bind_method(D_METHOD(\"stat_get_bonus\", \"stat_id\"), &Entity::stat_get_bonus);\n\tClassDB::bind_method(D_METHOD(\"stat_set_bonus\", \"stat_id\", \"value\"), &Entity::stat_set_bonus);\n\tClassDB::bind_method(D_METHOD(\"stat_mod_bonus\", \"stat_id\", \"value\"), &Entity::stat_mod_bonus);\n\n\tClassDB::bind_method(D_METHOD(\"stat_get_percent\", \"stat_id\"), &Entity::stat_get_percent);\n\tClassDB::bind_method(D_METHOD(\"stat_set_percent\", \"stat_id\", \"value\"), &Entity::stat_set_percent);\n\tClassDB::bind_method(D_METHOD(\"stat_mod_percent\", \"stat_id\", \"value\"), &Entity::stat_mod_percent);\n\n\tClassDB::bind_method(D_METHOD(\"stat_mod\", \"stat_id\", \"base\", \"bonus\", \"percent\"), &Entity::stat_mod);\n\n\tClassDB::bind_method(D_METHOD(\"stat_gets_current\", \"stat_id\"), &Entity::stat_gets_current);\n\tClassDB::bind_method(D_METHOD(\"stat_sets_current\", \"stat_id\", \"value\"), &Entity::stat_sets_current);\n\n\tClassDB::bind_method(D_METHOD(\"stat_getc_current\", \"stat_id\"), &Entity::stat_getc_current);\n\tClassDB::bind_method(D_METHOD(\"stat_setc_current\", \"stat_id\", \"value\"), &Entity::stat_setc_current);\n\n\tClassDB::bind_method(D_METHOD(\"stat_recalculate\", \"stat_id\"), &Entity::stat_recalculate);\n\n\tClassDB::bind_method(D_METHOD(\"ssend_stat\", \"id\", \"ccurrent\"), &Entity::ssend_stat);\n\tClassDB::bind_method(D_METHOD(\"creceive_stat\", \"id\", \"ccurrent\"), &Entity::creceive_stat);\n\n\tClassDB::bind_method(D_METHOD(\"dies\"), &Entity::dies);\n\tClassDB::bind_method(D_METHOD(\"diec\"), &Entity::diec);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sstat_changed\", \"stat\"), &Entity::notification_sstat_changed);\n\tClassDB::bind_method(D_METHOD(\"notification_cstat_changed\", \"stat\"), &Entity::notification_cstat_changed);\n\n\t//EventHandlers\n\t//GDVIRTUAL_BIND(\"_notification_sdeath\");\n\n\t//GDVIRTUAL_BIND(\"_notification_sgcd_started\", \"gcd\");\n\t//GDVIRTUAL_BIND(\"_notification_sgcd_finished\");\n\n\t//GDVIRTUAL_BIND(\"_notification_sxp_gained\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_slevel_up\", \"value\");\n\n\t//GDVIRTUAL_BIND(\"_notification_sentity_resource_added\", \"resource\", \"EntityResource\");\n\t//GDVIRTUAL_BIND(\"_notification_sentity_resource_removed\", \"resource\", \"EntityResource\");\n\n\t//GDVIRTUAL_BIND(\"_son_target_changed\", \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", \"old_target\", \"Entity\");\n\t//GDVIRTUAL_BIND(\"_con_target_changed\", \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", \"old_target\", \"Entity\");\n\n\t//Serverside\n\tADD_SIGNAL(MethodInfo(\"notification_sdamage\", PropertyInfo(Variant::INT, \"what\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellDamageInfo\")));\n\tADD_SIGNAL(MethodInfo(\"notification_sheal\", PropertyInfo(Variant::INT, \"what\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellHealInfo\")));\n\tADD_SIGNAL(MethodInfo(\"notification_scast\", PropertyInfo(Variant::INT, \"what\"), PropertyInfo(Variant::OBJECT, \"spell_cast_info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellCastInfo\")));\n\tADD_SIGNAL(MethodInfo(\"notification_saura\", PropertyInfo(Variant::INT, \"what\"), PropertyInfo(Variant::OBJECT, \"aura_data\", PROPERTY_HINT_RESOURCE_TYPE, \"AuraData\")));\n\n\t//GDVIRTUAL_BIND(\"_notification_saura\", \"what\", \"data\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_notification_sheal\", \"what\", \"info\", \"SpellHealInfo\");\n\t//GDVIRTUAL_BIND(\"_notification_scast\", \"what\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_notification_sdamage\", \"what\", \"info\", \"SpellDamageInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"notification_saura\", \"what\", \"data\"), &Entity::notification_saura);\n\tClassDB::bind_method(D_METHOD(\"notification_sheal\", \"what\", \"info\"), &Entity::notification_sheal);\n\tClassDB::bind_method(D_METHOD(\"notification_scast\", \"what\", \"info\"), &Entity::notification_scast);\n\tClassDB::bind_method(D_METHOD(\"notification_sdamage\", \"what\", \"info\"), &Entity::notification_sdamage);\n\n\t//Clientside\n\tADD_SIGNAL(MethodInfo(\"notification_cdamage\", PropertyInfo(Variant::INT, \"what\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellDamageInfo\")));\n\tADD_SIGNAL(MethodInfo(\"notification_cheal\", PropertyInfo(Variant::INT, \"what\"), PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellHealInfo\")));\n\tADD_SIGNAL(MethodInfo(\"notification_ccast\", PropertyInfo(Variant::INT, \"what\"), PropertyInfo(Variant::OBJECT, \"spell_cast_info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellCastInfo\")));\n\tADD_SIGNAL(MethodInfo(\"notification_caura\", PropertyInfo(Variant::INT, \"what\"), PropertyInfo(Variant::OBJECT, \"aura_data\", PROPERTY_HINT_RESOURCE_TYPE, \"AuraData\")));\n\n\t//GDVIRTUAL_BIND(\"_notification_caura\", \"what\", \"data\", \"AuraData\");\n\t//GDVIRTUAL_BIND(\"_notification_cheal\", \"what\", \"info\", \"SpellHealInfo\");\n\t//GDVIRTUAL_BIND(\"_notification_ccast\", \"what\", \"info\", \"SpellCastInfo\");\n\t//GDVIRTUAL_BIND(\"_notification_cdamage\", \"what\", \"info\", \"SpellDamageInfo\");\n\n\tClassDB::bind_method(D_METHOD(\"notification_caura\", \"what\", \"data\"), &Entity::notification_caura);\n\tClassDB::bind_method(D_METHOD(\"notification_cheal\", \"what\", \"info\"), &Entity::notification_cheal);\n\tClassDB::bind_method(D_METHOD(\"notification_ccast\", \"what\", \"info\"), &Entity::notification_ccast);\n\tClassDB::bind_method(D_METHOD(\"notification_cdamage\", \"what\", \"info\"), &Entity::notification_cdamage);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sdeath\"), &Entity::notification_sdeath);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sgcd_started\"), &Entity::notification_sgcd_started);\n\tClassDB::bind_method(D_METHOD(\"notification_sgcd_finished\"), &Entity::notification_sgcd_finished);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sentity_resource_added\", \"resource\"), &Entity::notification_sentity_resource_added);\n\tClassDB::bind_method(D_METHOD(\"notification_sentity_resource_removed\", \"resource\"), &Entity::notification_sentity_resource_removed);\n\n\t//Class Talents\n\n\tClassDB::bind_method(D_METHOD(\"gets_free_class_talent_points\"), &Entity::gets_free_class_talent_points);\n\tClassDB::bind_method(D_METHOD(\"sets_free_class_talent_points\", \"value\"), &Entity::sets_free_class_talent_points);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sfree_class_talent_points\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_free_class_talent_points\", \"gets_free_class_talent_points\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_free_class_talent_points\"), &Entity::getc_free_class_talent_points);\n\tClassDB::bind_method(D_METHOD(\"setc_free_class_talent_points\", \"value\"), &Entity::setc_free_class_talent_points);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"cfree_class_talent_points\", PROPERTY_HINT_NONE, \"\", 0), \"setc_free_class_talent_points\", \"getc_free_class_talent_points\");\n\n\t//GDVIRTUAL_BIND(\"_class_talent_sreceive_learn_request\", \"spec_index\", \"class_talent_row\", \"class_talent_culomn\");\n\t//GDVIRTUAL_BIND(\"_class_talent_sreceive_reset_request\");\n\n\tADD_SIGNAL(MethodInfo(\"sclass_talent_learned\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"class_talent_id\")));\n\tADD_SIGNAL(MethodInfo(\"cclass_talent_learned\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"class_talent_id\")));\n\n\tADD_SIGNAL(MethodInfo(\"sclass_talent_reset\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\tADD_SIGNAL(MethodInfo(\"cclass_talent_reset\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\n\t//GDVIRTUAL_BIND(\"_son_class_talent_learned\", \"class_talent_id\");\n\t//GDVIRTUAL_BIND(\"_con_class_talent_learned\", \"class_talent_id\");\n\n\t//GDVIRTUAL_BIND(\"_son_class_talent_reset\");\n\t//GDVIRTUAL_BIND(\"_con_class_talent_reset\");\n\n\tClassDB::bind_method(D_METHOD(\"class_talent_crequest_learn\", \"spec_index\", \"class_talent_row\", \"class_talent_culomn\"), &Entity::class_talent_crequest_learn);\n\tClassDB::bind_method(D_METHOD(\"class_talent_sreceive_learn_request\", \"spec_index\", \"class_talent_row\", \"class_talent_culomn\"), &Entity::class_talent_sreceive_learn_request);\n\tClassDB::bind_method(D_METHOD(\"_class_talent_sreceive_learn_request\", \"spec_index\", \"class_talent_row\", \"class_talent_culomn\"), &Entity::_class_talent_sreceive_learn_request);\n\n\tClassDB::bind_method(D_METHOD(\"class_talent_crequest_reset\"), &Entity::class_talent_crequest_reset);\n\tClassDB::bind_method(D_METHOD(\"class_talent_sreceive_reset_request\"), &Entity::class_talent_sreceive_reset_request);\n\tClassDB::bind_method(D_METHOD(\"_class_talent_sreceive_reset_request\"), &Entity::_class_talent_sreceive_reset_request);\n\n\tClassDB::bind_method(D_METHOD(\"class_talent_sreset\"), &Entity::class_talent_sreset);\n\tClassDB::bind_method(D_METHOD(\"class_talent_creset\"), &Entity::class_talent_creset);\n\n\tClassDB::bind_method(D_METHOD(\"class_talent_adds\", \"class_talent\"), &Entity::class_talent_adds);\n\tClassDB::bind_method(D_METHOD(\"class_talent_removes\", \"class_talent\"), &Entity::class_talent_removes);\n\tClassDB::bind_method(D_METHOD(\"class_talent_hass\", \"class_talent\"), &Entity::class_talent_hass);\n\tClassDB::bind_method(D_METHOD(\"class_talent_gets\", \"index\"), &Entity::class_talent_gets);\n\tClassDB::bind_method(D_METHOD(\"class_talent_gets_count\"), &Entity::class_talent_gets_count);\n\tClassDB::bind_method(D_METHOD(\"class_talents_sclear\"), &Entity::class_talents_sclear);\n\n\tClassDB::bind_method(D_METHOD(\"class_talent_addc\", \"class_talent\"), &Entity::class_talent_addc);\n\tClassDB::bind_method(D_METHOD(\"class_talent_removec\", \"class_talent\"), &Entity::class_talent_removec);\n\tClassDB::bind_method(D_METHOD(\"class_talent_hasc\", \"class_talent\"), &Entity::class_talent_hasc);\n\tClassDB::bind_method(D_METHOD(\"class_talent_getc\", \"index\"), &Entity::class_talent_getc);\n\tClassDB::bind_method(D_METHOD(\"class_talent_getc_count\"), &Entity::class_talent_getc_count);\n\tClassDB::bind_method(D_METHOD(\"class_talent_cclear\"), &Entity::class_talent_cclear);\n\n\tClassDB::bind_method(D_METHOD(\"sclass_talents_get\"), &Entity::sclass_talents_get);\n\tClassDB::bind_method(D_METHOD(\"sclass_talents_set\", \"data\"), &Entity::sclass_talents_set);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, \"sclass_talents\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sclass_talents_set\", \"sclass_talents_get\");\n\n\t//Character Talents\n\n\tClassDB::bind_method(D_METHOD(\"gets_free_character_talent_points\"), &Entity::gets_free_character_talent_points);\n\tClassDB::bind_method(D_METHOD(\"sets_free_character_talent_points\", \"value\"), &Entity::sets_free_character_talent_points);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sfree_character_talent_points\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_free_character_talent_points\", \"gets_free_character_talent_points\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_free_character_talent_points\"), &Entity::getc_free_character_talent_points);\n\tClassDB::bind_method(D_METHOD(\"setc_free_character_talent_points\", \"value\"), &Entity::setc_free_character_talent_points);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"cfree_character_talent_points\", PROPERTY_HINT_NONE, \"\", 0), \"setc_free_character_talent_points\", \"getc_free_character_talent_points\");\n\n\t//GDVIRTUAL_BIND(\"_character_talent_sreceive_learn_request\", \"spec_index\", \"character_talent_row\", \"character_talent_culomn\");\n\t//GDVIRTUAL_BIND(\"_character_talent_sreceive_reset_request\");\n\n\tADD_SIGNAL(MethodInfo(\"scharacter_talent_learned\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"character_talent_id\")));\n\tADD_SIGNAL(MethodInfo(\"ccharacter_talent_learned\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"character_talent_id\")));\n\n\tADD_SIGNAL(MethodInfo(\"scharacter_talent_reset\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\tADD_SIGNAL(MethodInfo(\"ccharacter_talent_reset\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\n\t//GDVIRTUAL_BIND(\"_son_character_talent_learned\", \"character_talent_id\");\n\t//GDVIRTUAL_BIND(\"_con_character_talent_learned\", \"character_talent_id\");\n\n\t//GDVIRTUAL_BIND(\"_son_character_talent_reset\");\n\t//GDVIRTUAL_BIND(\"_con_character_talent_reset\");\n\n\tClassDB::bind_method(D_METHOD(\"character_talent_crequest_learn\", \"spec_index\", \"character_talent_row\", \"character_talent_culomn\"), &Entity::character_talent_crequest_learn);\n\tClassDB::bind_method(D_METHOD(\"character_talent_sreceive_learn_request\", \"spec_index\", \"character_talent_row\", \"character_talent_culomn\"), &Entity::character_talent_sreceive_learn_request);\n\tClassDB::bind_method(D_METHOD(\"_character_talent_sreceive_learn_request\", \"spec_index\", \"character_talent_row\", \"character_talent_culomn\"), &Entity::_character_talent_sreceive_learn_request);\n\n\tClassDB::bind_method(D_METHOD(\"character_talent_crequest_reset\"), &Entity::character_talent_crequest_reset);\n\tClassDB::bind_method(D_METHOD(\"character_talent_sreceive_reset_request\"), &Entity::character_talent_sreceive_reset_request);\n\tClassDB::bind_method(D_METHOD(\"_character_talent_sreceive_reset_request\"), &Entity::_character_talent_sreceive_reset_request);\n\n\tClassDB::bind_method(D_METHOD(\"character_talent_sreset\"), &Entity::character_talent_sreset);\n\tClassDB::bind_method(D_METHOD(\"character_talent_creset\"), &Entity::character_talent_creset);\n\n\tClassDB::bind_method(D_METHOD(\"character_talent_adds\", \"character_talent\"), &Entity::character_talent_adds);\n\tClassDB::bind_method(D_METHOD(\"character_talent_removes\", \"character_talent\"), &Entity::character_talent_removes);\n\tClassDB::bind_method(D_METHOD(\"character_talent_hass\", \"character_talent\"), &Entity::character_talent_hass);\n\tClassDB::bind_method(D_METHOD(\"character_talent_gets\", \"index\"), &Entity::character_talent_gets);\n\tClassDB::bind_method(D_METHOD(\"character_talent_gets_count\"), &Entity::character_talent_gets_count);\n\tClassDB::bind_method(D_METHOD(\"character_talents_sclear\"), &Entity::character_talents_sclear);\n\n\tClassDB::bind_method(D_METHOD(\"character_talent_addc\", \"character_talent\"), &Entity::character_talent_addc);\n\tClassDB::bind_method(D_METHOD(\"character_talent_removec\", \"character_talent\"), &Entity::character_talent_removec);\n\tClassDB::bind_method(D_METHOD(\"character_talent_hasc\", \"character_talent\"), &Entity::character_talent_hasc);\n\tClassDB::bind_method(D_METHOD(\"character_talent_getc\", \"index\"), &Entity::character_talent_getc);\n\tClassDB::bind_method(D_METHOD(\"character_talent_getc_count\"), &Entity::character_talent_getc_count);\n\tClassDB::bind_method(D_METHOD(\"character_talent_cclear\"), &Entity::character_talent_cclear);\n\n\tClassDB::bind_method(D_METHOD(\"scharacter_talents_get\"), &Entity::scharacter_talents_get);\n\tClassDB::bind_method(D_METHOD(\"scharacter_talents_set\", \"data\"), &Entity::scharacter_talents_set);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, \"scharacter_talents\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"scharacter_talents_set\", \"scharacter_talents_get\");\n\n\t//Cooldowns\n\t//GDVIRTUAL_BIND(\"notification_scooldown_added\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"notification_scooldown_removed\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"notification_scategory_cooldown_added\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"notification_scategory_cooldown_removed\", \"id\", \"value\");\n\n\tClassDB::bind_method(D_METHOD(\"notification_scooldown_added\", \"cooldown\"), &Entity::notification_scooldown_added);\n\tClassDB::bind_method(D_METHOD(\"notification_scooldown_removed\", \"cooldown\"), &Entity::notification_scooldown_removed);\n\tClassDB::bind_method(D_METHOD(\"notification_scategory_cooldown_added\", \"category_cooldown\"), &Entity::notification_scategory_cooldown_added);\n\tClassDB::bind_method(D_METHOD(\"notification_scategory_cooldown_removed\", \"category_cooldown\"), &Entity::notification_scategory_cooldown_removed);\n\n\t//Clientside EventHandlers\n\t//GDVIRTUAL_BIND(\"_notification_cdeath\");\n\n\t//GDVIRTUAL_BIND(\"notification_ccooldown_added\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"notification_ccooldown_removed\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"notification_ccategory_cooldown_added\", \"id\", \"value\");\n\t//GDVIRTUAL_BIND(\"notification_ccategory_cooldown_removed\", \"id\", \"value\");\n\n\tClassDB::bind_method(D_METHOD(\"notification_ccooldown_added\", \"cooldown\"), &Entity::notification_ccooldown_added);\n\tClassDB::bind_method(D_METHOD(\"notification_ccooldown_removed\", \"cooldown\"), &Entity::notification_ccooldown_removed);\n\tClassDB::bind_method(D_METHOD(\"notification_ccategory_cooldown_added\", \"category_cooldown\"), &Entity::notification_ccategory_cooldown_added);\n\tClassDB::bind_method(D_METHOD(\"notification_ccategory_cooldown_removed\", \"category_cooldown\"), &Entity::notification_ccategory_cooldown_removed);\n\n\t//GDVIRTUAL_BIND(\"_notification_cgcd_started\", \"gcd\");\n\t//GDVIRTUAL_BIND(\"_notification_cgcd_finished\");\n\n\t//GDVIRTUAL_BIND(\"_notification_cxp_gained\", \"value\");\n\t//GDVIRTUAL_BIND(\"_notification_clevel_up\", \"value\");\n\n\t//GDVIRTUAL_BIND(\"_notification_centity_resource_added\", \"resource\", \"EntityResource\");\n\t//GDVIRTUAL_BIND(\"_notification_centity_resource_removed\", \"resource\", \"EntityResource\");\n\n\t//GDVIRTUAL_BIND(\"_canc_interact\");\n\t//GDVIRTUAL_BIND(\"_cans_interact\");\n\t//GDVIRTUAL_BIND(\"_sinteract\");\n\n\tClassDB::bind_method(D_METHOD(\"cast_spell_successc\", \"info\"), &Entity::cast_spell_successc);\n\tClassDB::bind_method(D_METHOD(\"cast_spell_successc_rpc\", \"data\"), &Entity::cast_spell_successc_rpc);\n\n\tClassDB::bind_method(D_METHOD(\"notification_cdeath\"), &Entity::notification_cdeath);\n\n\tClassDB::bind_method(D_METHOD(\"notification_cgcd_started\"), &Entity::notification_cgcd_started);\n\tClassDB::bind_method(D_METHOD(\"notification_cgcd_finished\"), &Entity::notification_cgcd_finished);\n\n\tClassDB::bind_method(D_METHOD(\"notification_cxp_gained\", \"value\"), &Entity::notification_cxp_gained);\n\tClassDB::bind_method(D_METHOD(\"notification_clevel_up\", \"value\"), &Entity::notification_clevel_up);\n\n\tClassDB::bind_method(D_METHOD(\"notification_centity_resource_added\", \"resource\"), &Entity::notification_centity_resource_added);\n\tClassDB::bind_method(D_METHOD(\"notification_centity_resource_removed\", \"resource\"), &Entity::notification_centity_resource_removed);\n\n\t//Modifiers/Requesters\n\tClassDB::bind_method(D_METHOD(\"sapply_passives_damage_receive\", \"data\"), &Entity::sapply_passives_damage_receive);\n\tClassDB::bind_method(D_METHOD(\"sapply_passives_damage_deal\", \"data\"), &Entity::sapply_passives_damage_deal);\n\n\t//Spell operations\n\tClassDB::bind_method(D_METHOD(\"spell_casts\", \"spell_id\"), &Entity::spell_casts);\n\tClassDB::bind_method(D_METHOD(\"spell_crequest_cast\", \"spell_id\"), &Entity::spell_crequest_cast);\n\n\t//GDVIRTUAL_BIND(\"_item_uses\", \"item_id\");\n\n\tClassDB::bind_method(D_METHOD(\"item_uses\", \"item_id\"), &Entity::item_uses);\n\tClassDB::bind_method(D_METHOD(\"item_crequest_use\", \"item_id\"), &Entity::item_crequest_use);\n\tClassDB::bind_method(D_METHOD(\"_item_uses\", \"item_id\"), &Entity::_item_uses);\n\n\t//Damage Operations\n\tClassDB::bind_method(D_METHOD(\"stake_damage\", \"data\"), &Entity::stake_damage);\n\tClassDB::bind_method(D_METHOD(\"sdeal_damage_to\", \"data\"), &Entity::sdeal_damage_to);\n\n\t//Heal Operations\n\tClassDB::bind_method(D_METHOD(\"stake_heal\", \"data\"), &Entity::stake_heal);\n\tClassDB::bind_method(D_METHOD(\"sdeal_heal_to\", \"data\"), &Entity::sdeal_heal_to);\n\n\t//Damage, Heal RPCs\n\tClassDB::bind_method(D_METHOD(\"cdamage_dealt_rpc\", \"data\"), &Entity::cdamage_dealt_rpc);\n\tClassDB::bind_method(D_METHOD(\"cdealt_damage_rpc\", \"data\"), &Entity::cdealt_damage_rpc);\n\tClassDB::bind_method(D_METHOD(\"cheal_dealt_rpc\", \"data\"), &Entity::cheal_dealt_rpc);\n\tClassDB::bind_method(D_METHOD(\"cdealt_heal_rpc\", \"data\"), &Entity::cdealt_heal_rpc);\n\n\t//Interactions\n\tClassDB::bind_method(D_METHOD(\"cans_interact\"), &Entity::cans_interact);\n\tClassDB::bind_method(D_METHOD(\"sinteract\"), &Entity::sinteract);\n\n\tClassDB::bind_method(D_METHOD(\"canc_interact\"), &Entity::canc_interact);\n\tClassDB::bind_method(D_METHOD(\"crequest_interact\"), &Entity::crequest_interact);\n\n\tClassDB::bind_method(D_METHOD(\"ssend_open_window\", \"window_id\"), &Entity::ssend_open_window);\n\tClassDB::bind_method(D_METHOD(\"copen_window\", \"window_id\"), &Entity::copen_window);\n\n\t//GDVIRTUAL_BIND(\"_iss_target_in_interact_range\");\n\t//GDVIRTUAL_BIND(\"_isc_target_in_interact_range\");\n\n\tClassDB::bind_method(D_METHOD(\"iss_target_in_interact_range\"), &Entity::iss_target_in_interact_range);\n\tClassDB::bind_method(D_METHOD(\"isc_target_in_interact_range\"), &Entity::isc_target_in_interact_range);\n\tClassDB::bind_method(D_METHOD(\"_iss_target_in_interact_range\"), &Entity::_iss_target_in_interact_range);\n\tClassDB::bind_method(D_METHOD(\"_isc_target_in_interact_range\"), &Entity::_isc_target_in_interact_range);\n\n\t//XP Operations\n\tADD_SIGNAL(MethodInfo(\"notification_sxp_gained\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"notification_cxp_gained\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"value\")));\n\n\tADD_SIGNAL(MethodInfo(\"notification_clevel_up\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"notification_slevel_up\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"value\")));\n\n\tADD_SIGNAL(MethodInfo(\"son_level_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"level\")));\n\tADD_SIGNAL(MethodInfo(\"con_level_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"level\")));\n\n\tClassDB::bind_method(D_METHOD(\"xp_adds\", \"value\"), &Entity::xp_adds);\n\tClassDB::bind_method(D_METHOD(\"xp_addc\", \"value\"), &Entity::xp_addc);\n\n\tClassDB::bind_method(D_METHOD(\"levelups\", \"value\"), &Entity::levelups);\n\tClassDB::bind_method(D_METHOD(\"levelupc\", \"value\"), &Entity::levelupc);\n\n\tClassDB::bind_method(D_METHOD(\"notification_sxp_gained\", \"value\"), &Entity::notification_sxp_gained);\n\tClassDB::bind_method(D_METHOD(\"notification_slevel_up\", \"value\"), &Entity::notification_slevel_up);\n\n\t//Aura Manipulation\n\tClassDB::bind_method(D_METHOD(\"aura_adds\", \"aura\"), &Entity::aura_adds);\n\tClassDB::bind_method(D_METHOD(\"aura_removes\", \"aura\"), &Entity::aura_removes);\n\tClassDB::bind_method(D_METHOD(\"aura_removes_exact\", \"aura\"), &Entity::aura_removes_exact);\n\tClassDB::bind_method(D_METHOD(\"aura_removes_expired\", \"aura\"), &Entity::aura_removes_expired);\n\tClassDB::bind_method(D_METHOD(\"aura_removes_dispelled\", \"aura\"), &Entity::aura_removes_dispelled);\n\t//ClassDB::bind_method(D_METHOD(\"aura_refresheds\", \"aura\"), &Entity::aura_refresheds);\n\n\tClassDB::bind_method(D_METHOD(\"aura_addc_rpc\", \"data\"), &Entity::aura_addc_rpc);\n\tClassDB::bind_method(D_METHOD(\"aura_removec_rpc\", \"data\"), &Entity::aura_removec_rpc);\n\tClassDB::bind_method(D_METHOD(\"aura_removec_exact_rpc\", \"data\"), &Entity::aura_removec_exact_rpc);\n\tClassDB::bind_method(D_METHOD(\"aura_removec_expired_rpc\", \"data\"), &Entity::aura_removec_expired_rpc);\n\tClassDB::bind_method(D_METHOD(\"aura_removec_dispelled_rpc\", \"data\"), &Entity::aura_removec_dispelled_rpc);\n\n\tClassDB::bind_method(D_METHOD(\"aura_addc\", \"aura\"), &Entity::aura_addc);\n\tClassDB::bind_method(D_METHOD(\"aura_removec\", \"aura\"), &Entity::aura_removec);\n\tClassDB::bind_method(D_METHOD(\"aura_removec_exact\", \"aura\"), &Entity::aura_removec_exact);\n\tClassDB::bind_method(D_METHOD(\"aura_removec_expired\", \"aura\"), &Entity::aura_removec_expired);\n\tClassDB::bind_method(D_METHOD(\"aura_removec_dispelled\", \"aura\"), &Entity::aura_removec_dispelled);\n\t//ClassDB::bind_method(D_METHOD(\"aura_refreshedc\", \"aura\"), &Entity::aura_refreshedc);\n\n\tClassDB::bind_method(D_METHOD(\"aura_removess_with_group\", \"aura_group\"), &Entity::aura_removess_with_group);\n\n\tClassDB::bind_method(D_METHOD(\"aura_gets_count\"), &Entity::aura_gets_count);\n\tClassDB::bind_method(D_METHOD(\"aura_gets\", \"index\"), &Entity::aura_gets);\n\tClassDB::bind_method(D_METHOD(\"aura_gets_by\", \"caster\", \"aura_id\"), &Entity::aura_gets_by_bind);\n\tClassDB::bind_method(D_METHOD(\"aura_gets_with_group_by\", \"caster\", \"aura_group\"), &Entity::aura_gets_with_group_by_bind);\n\n\tClassDB::bind_method(D_METHOD(\"aura_getc_count\"), &Entity::aura_getc_count);\n\tClassDB::bind_method(D_METHOD(\"aura_getc\", \"index\"), &Entity::aura_getc);\n\n\tClassDB::bind_method(D_METHOD(\"sauras_get\"), &Entity::sauras_get);\n\tClassDB::bind_method(D_METHOD(\"sauras_set\", \"data\"), &Entity::sauras_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"sauras\", PROPERTY_HINT_NONE, \"17/17:AuraData\", PROPERTY_USAGE_ENTITY_HIDDEN, \"AuraData\"), \"sauras_set\", \"sauras_get\");\n\n\t//Hooks\n\t//GDVIRTUAL_BIND(\"_moved\");\n\tClassDB::bind_method(D_METHOD(\"moved\"), &Entity::moved);\n\n\tADD_SIGNAL(MethodInfo(\"notification_cmouse_entered\"));\n\tADD_SIGNAL(MethodInfo(\"notification_cmouse_exited\"));\n\n\t//GDVIRTUAL_BIND(\"_notification_cmouse_enter\");\n\t//GDVIRTUAL_BIND(\"_notification_cmouse_exit\");\n\n\tClassDB::bind_method(D_METHOD(\"notification_cmouse_enter\"), &Entity::notification_cmouse_enter);\n\tClassDB::bind_method(D_METHOD(\"notification_cmouse_exit\"), &Entity::notification_cmouse_exit);\n\n\tADD_SIGNAL(MethodInfo(\"notification_ctargeted\"));\n\tADD_SIGNAL(MethodInfo(\"notification_cuntargeted\"));\n\n\t//GDVIRTUAL_BIND(\"_notification_ctargeted\");\n\t//GDVIRTUAL_BIND(\"_notification_cuntargeted\");\n\n\tClassDB::bind_method(D_METHOD(\"notification_ctargeted\"), &Entity::notification_ctargeted);\n\tClassDB::bind_method(D_METHOD(\"notification_cuntargeted\"), &Entity::notification_cuntargeted);\n\n\t//Properties\n\tClassDB::bind_method(D_METHOD(\"get_body_path\"), &Entity::get_body_path);\n\tClassDB::bind_method(D_METHOD(\"set_body_path\", \"value\"), &Entity::set_body_path);\n\tADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, \"body_path\"), \"set_body_path\", \"get_body_path\");\n\n\tClassDB::bind_method(D_METHOD(\"get_character_skeleton_path\"), &Entity::get_character_skeleton_path);\n\tClassDB::bind_method(D_METHOD(\"set_character_skeleton_path\", \"value\"), &Entity::set_character_skeleton_path);\n\tADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, \"character_skeleton_path\"), \"set_character_skeleton_path\", \"get_character_skeleton_path\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_entity_data_id\"), &Entity::gets_entity_data_id);\n\tClassDB::bind_method(D_METHOD(\"sets_entity_data_id\", \"value\"), &Entity::sets_entity_data_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"characterclass_id\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_entity_data_id\", \"gets_entity_data_id\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_entity_data_id\"), &Entity::getc_entity_data_id);\n\tClassDB::bind_method(D_METHOD(\"setc_entity_data_id\", \"value\"), &Entity::setc_entity_data_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"entity_data_id\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"setc_entity_data_id\", \"getc_entity_data_id\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_entity_player_type\"), &Entity::gets_entity_player_type);\n\tClassDB::bind_method(D_METHOD(\"sets_entity_player_type\", \"value\"), &Entity::sets_entity_player_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sentity_player_type\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_entity_player_type\", \"gets_entity_player_type\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_entity_player_type\"), &Entity::getc_entity_player_type);\n\tClassDB::bind_method(D_METHOD(\"setc_entity_player_type\", \"value\"), &Entity::setc_entity_player_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"centity_player_type\", PROPERTY_HINT_NONE, \"\", 0), \"setc_entity_player_type\", \"getc_entity_player_type\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_guid\"), &Entity::gets_guid);\n\tClassDB::bind_method(D_METHOD(\"sets_guid\", \"value\"), &Entity::sets_guid);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sguid\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_guid\", \"gets_guid\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_guid\"), &Entity::getc_guid);\n\tClassDB::bind_method(D_METHOD(\"setc_guid\", \"value\"), &Entity::setc_guid);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"cguid\", PROPERTY_HINT_NONE, \"\", 0), \"setc_guid\", \"getc_guid\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_entity_type\"), &Entity::gets_entity_type);\n\tClassDB::bind_method(D_METHOD(\"sets_entity_type\", \"value\"), &Entity::sets_entity_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sentity_type\", PROPERTY_HINT_ENUM, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_entity_type\", \"gets_entity_type\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_entity_type\"), &Entity::getc_entity_type);\n\tClassDB::bind_method(D_METHOD(\"setc_entity_type\", \"value\"), &Entity::sets_entity_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"centity_type\", PROPERTY_HINT_ENUM, \"\", 0), \"setc_entity_type\", \"getc_entity_type\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_ai_state\"), &Entity::gets_ai_state);\n\tClassDB::bind_method(D_METHOD(\"sets_ai_state\", \"value\"), &Entity::sets_ai_state);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"ai_state\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_AI_STATES, PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_ai_state\", \"gets_ai_state\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_seed\"), &Entity::gets_seed);\n\tClassDB::bind_method(D_METHOD(\"sets_seed\", \"value\"), &Entity::sets_seed);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sseed\", PROPERTY_HINT_ENUM, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_seed\", \"gets_seed\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_seed\"), &Entity::getc_seed);\n\tClassDB::bind_method(D_METHOD(\"setc_seed\", \"value\"), &Entity::setc_seed);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"cseed\", PROPERTY_HINT_NONE, \"\", 0), \"setc_seed\", \"getc_seed\");\n\n\t//Interaction type\n\t//GDVIRTUAL_BIND(\"_gets_relation_to\", \"to\", \"Entity\");\n\t//GDVIRTUAL_BIND(\"_getc_relation_to\", \"to\", \"Entity\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_relation_to\", \"to\"), &Entity::gets_relation_to_bind);\n\tClassDB::bind_method(D_METHOD(\"_gets_relation_to\", \"to\"), &Entity::_gets_relation_to);\n\n\tClassDB::bind_method(D_METHOD(\"getc_relation_to\", \"to\"), &Entity::getc_relation_to_bind);\n\tClassDB::bind_method(D_METHOD(\"_getc_relation_to\", \"to\"), &Entity::_getc_relation_to);\n\n\tClassDB::bind_method(D_METHOD(\"gets_entity_interaction_type\"), &Entity::gets_entity_interaction_type);\n\tClassDB::bind_method(D_METHOD(\"sets_entity_interaction_type\", \"value\"), &Entity::sets_entity_interaction_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sentity_interaction_type\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_INTERACTION_TYPE, PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_entity_interaction_type\", \"gets_entity_interaction_type\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_entity_interaction_type\"), &Entity::getc_entity_interaction_type);\n\tClassDB::bind_method(D_METHOD(\"setc_entity_interaction_type\", \"value\"), &Entity::setc_entity_interaction_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"centity_interaction_type\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_INTERACTION_TYPE, 0), \"setc_entity_interaction_type\", \"getc_entity_interaction_type\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_immunity_flags\"), &Entity::gets_immunity_flags);\n\tClassDB::bind_method(D_METHOD(\"sets_immunity_flags\", \"value\"), &Entity::sets_immunity_flags);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"simmunity_flags\", PROPERTY_HINT_FLAGS, EntityEnums::BINDING_STRING_ENTITY_IMMUNITY_FLAGS, PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_immunity_flags\", \"gets_immunity_flags\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_entity_flags\"), &Entity::gets_entity_flags);\n\tClassDB::bind_method(D_METHOD(\"sets_entity_flags\", \"value\"), &Entity::sets_entity_flags);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sentity_flags\", PROPERTY_HINT_FLAGS, EntityEnums::BINDING_STRING_ENTITY_FLAGS, PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_entity_flags\", \"gets_entity_flags\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_entity_flags\"), &Entity::getc_entity_flags);\n\tClassDB::bind_method(D_METHOD(\"setc_entity_flags\", \"value\"), &Entity::setc_entity_flags);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"centity_flags\", PROPERTY_HINT_FLAGS, EntityEnums::BINDING_STRING_ENTITY_FLAGS, 0), \"setc_entity_flags\", \"getc_entity_flags\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_entity_name\"), &Entity::gets_entity_name);\n\tClassDB::bind_method(D_METHOD(\"sets_entity_name\", \"value\"), &Entity::sets_entity_name);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"sentity_name\"), \"sets_entity_name\", \"gets_entity_name\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_entity_name\"), &Entity::getc_entity_name);\n\tClassDB::bind_method(D_METHOD(\"setc_entity_name\", \"value\"), &Entity::setc_entity_name);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"centity_name\", PROPERTY_HINT_NONE, \"\", 0), \"setc_entity_name\", \"getc_entity_name\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_model_index\"), &Entity::gets_model_index);\n\tClassDB::bind_method(D_METHOD(\"sets_model_index\", \"value\"), &Entity::sets_model_index);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"smodel_index\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_model_index\", \"gets_model_index\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_model_index\"), &Entity::getc_model_index);\n\tClassDB::bind_method(D_METHOD(\"setc_model_index\", \"value\"), &Entity::setc_model_index);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"cmodel_index\", PROPERTY_HINT_NONE, \"\", 0), \"setc_model_index\", \"getc_model_index\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_level\"), &Entity::gets_level);\n\tClassDB::bind_method(D_METHOD(\"sets_level\", \"value\"), &Entity::sets_level);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"slevel\"), \"sets_level\", \"gets_level\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_level\"), &Entity::getc_level);\n\tClassDB::bind_method(D_METHOD(\"setc_level\", \"value\"), &Entity::setc_level);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"clevel\", PROPERTY_HINT_NONE, \"\", 0), \"setc_level\", \"getc_level\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_xp\"), &Entity::gets_xp);\n\tClassDB::bind_method(D_METHOD(\"sets_xp\", \"value\"), &Entity::sets_xp);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sxp\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_xp\", \"gets_xp\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_xp\"), &Entity::getc_xp);\n\tClassDB::bind_method(D_METHOD(\"setc_xp\", \"value\"), &Entity::setc_xp);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"cxp\", PROPERTY_HINT_NONE, \"\", 0), \"setc_xp\", \"getc_xp\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_money\"), &Entity::gets_money);\n\tClassDB::bind_method(D_METHOD(\"sets_money\", \"value\"), &Entity::sets_money);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"smoney\"), \"sets_money\", \"gets_money\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_money\"), &Entity::getc_money);\n\tClassDB::bind_method(D_METHOD(\"setc_money\", \"value\"), &Entity::setc_money);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"cmoney\", PROPERTY_HINT_NONE, \"\", 0), \"setc_money\", \"getc_money\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_entity_data\"), &Entity::gets_entity_data);\n\tClassDB::bind_method(D_METHOD(\"sets_entity_data\", \"value\"), &Entity::sets_entity_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"sentity_data\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityData\"), \"sets_entity_data\", \"gets_entity_data\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_entity_data\"), &Entity::getc_entity_data);\n\tClassDB::bind_method(D_METHOD(\"setc_entity_data\", \"value\"), &Entity::setc_entity_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"centity_data\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityData\", 0), \"setc_entity_data\", \"getc_entity_data\");\n\n\t//todo\n\t//for (int i = 0; i < ESS::get_singleton()->stat_get_count(); ++i) {\n\t//\tADD_PROPERTYI(PropertyInfo(Variant::OBJECT, \"stats/\" + itos(i), PROPERTY_HINT_RESOURCE_TYPE, \"Stat\"), \"set_stat_int\", \"get_stat_int\", i);\n\t//}\n\n\t//Equipment System\n\n\tADD_SIGNAL(MethodInfo(\"equip_son_success\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"equip_slot\"), PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::OBJECT, \"old_item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::INT, \"bag_slot\")));\n\tADD_SIGNAL(MethodInfo(\"equip_son_fail\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"equip_slot\"), PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::OBJECT, \"old_item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::INT, \"bag_slot\")));\n\tADD_SIGNAL(MethodInfo(\"equip_con_success\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"equip_slot\"), PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::OBJECT, \"old_item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::INT, \"bag_slot\")));\n\tADD_SIGNAL(MethodInfo(\"equip_con_fail\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"equip_slot\"), PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::OBJECT, \"old_item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::INT, \"bag_slot\")));\n\n\t//GDVIRTUAL_BIND(\"_equip_should_deny\", \"equip_slot\", \"item\", \"ItemInstance\");\n\n\t//GDVIRTUAL_BIND(\"_equip_son_success\", PropertyInfo(Variant::INT, \"equip_slot\", \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\t//GDVIRTUAL_BIND(\"_equip_son_fail\", PropertyInfo(Variant::INT, \"equip_slot\", \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\t//GDVIRTUAL_BIND(\"_equip_con_success\", PropertyInfo(Variant::INT, \"equip_slot\", \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\t//GDVIRTUAL_BIND(\"_equip_con_fail\", PropertyInfo(Variant::INT, \"equip_slot\", \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\", \"old_item\", \"ItemInstance\", \"bag_slot\");\n\n\tADD_SIGNAL(MethodInfo(\"equipment_changed\", PropertyInfo(Variant::INT, \"slot\")));\n\n\tClassDB::bind_method(D_METHOD(\"equip_should_deny\", \"equip_slot\", \"item\"), &Entity::equip_should_deny);\n\n\tClassDB::bind_method(D_METHOD(\"equip_son_success\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &Entity::equip_son_success);\n\tClassDB::bind_method(D_METHOD(\"equip_son_fail\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &Entity::equip_son_fail);\n\tClassDB::bind_method(D_METHOD(\"equip_con_success\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &Entity::equip_con_success);\n\tClassDB::bind_method(D_METHOD(\"equip_con_fail\", \"equip_slot\", \"item\", \"old_item\", \"bag_slot\"), &Entity::equip_con_fail);\n\n\t//GDVIRTUAL_BIND(\"_equips\", \"equip_slot\", \"bag_slot\");\n\n\tClassDB::bind_method(D_METHOD(\"equip_crequest\", \"equip_slot\", \"bag_slot\"), &Entity::equip_crequest);\n\tClassDB::bind_method(D_METHOD(\"equips\", \"equip_slot\", \"bag_slot\"), &Entity::equips);\n\tClassDB::bind_method(D_METHOD(\"_equips\", \"equip_slot\", \"bag_slot\"), &Entity::_equips);\n\n\tClassDB::bind_method(D_METHOD(\"equip_csuccess\", \"equip_slot\", \"bag_slot\"), &Entity::equip_csuccess);\n\tClassDB::bind_method(D_METHOD(\"equip_cfail\", \"equip_slot\", \"bag_slot\"), &Entity::equip_cfail);\n\n\tClassDB::bind_method(D_METHOD(\"equip_gets_slot\", \"index\"), &Entity::equip_gets_slot);\n\tClassDB::bind_method(D_METHOD(\"equip_getc_slot\", \"index\"), &Entity::equip_getc_slot);\n\n\t//GDVIRTUAL_BIND(\"_equip_can_equip_item\", \"equip_slot\", \"item\", \"ItemInstance\");\n\n\tClassDB::bind_method(D_METHOD(\"equip_can_equip_item\", \"equip_slot\", \"item\"), &Entity::equip_can_equip_item);\n\tClassDB::bind_method(D_METHOD(\"_equip_can_equip_item\", \"equip_slot\", \"item\"), &Entity::_equip_can_equip_item);\n\n\t//GDVIRTUAL_BIND(\"_equip_applys_item\", \"item\", \"ItemInstance\");\n\t//GDVIRTUAL_BIND(\"_equip_deapplys_item\", \"item\", \"ItemInstance\");\n\n\tClassDB::bind_method(D_METHOD(\"equip_applys_item\", \"item\"), &Entity::equip_applys_item);\n\tClassDB::bind_method(D_METHOD(\"equip_deapplys_item\", \"item\"), &Entity::equip_deapplys_item);\n\n\tClassDB::bind_method(D_METHOD(\"_equip_applys_item\", \"item\"), &Entity::_equip_applys_item);\n\tClassDB::bind_method(D_METHOD(\"_equip_deapplys_item\", \"item\"), &Entity::_equip_deapplys_item);\n\n\t//GDVIRTUAL_BIND(\"_equip_applyc_item\", \"item\", \"ItemInstance\");\n\t//GDVIRTUAL_BIND(\"_equip_deapplyc_item\", \"item\", \"ItemInstance\");\n\n\tClassDB::bind_method(D_METHOD(\"cequip_applys_item\", \"item\"), &Entity::equip_applyc_item);\n\tClassDB::bind_method(D_METHOD(\"equip_deapplyc_item\", \"item\"), &Entity::equip_deapplyc_item);\n\n\tClassDB::bind_method(D_METHOD(\"_equip_applyc_item\", \"item\"), &Entity::_equip_applyc_item);\n\tClassDB::bind_method(D_METHOD(\"_equip_deapplyc_item\", \"item\"), &Entity::_equip_deapplyc_item);\n\n\t//Resources\n\tClassDB::bind_method(D_METHOD(\"resource_gets_index\", \"index\"), &Entity::resource_gets_index);\n\tClassDB::bind_method(D_METHOD(\"resource_gets_id\", \"type\"), &Entity::resource_gets_id);\n\tClassDB::bind_method(D_METHOD(\"resource_adds\", \"palyer_resource\"), &Entity::resource_adds);\n\tClassDB::bind_method(D_METHOD(\"resource_gets_count\"), &Entity::resource_gets_count);\n\tClassDB::bind_method(D_METHOD(\"resource_removes\", \"index\"), &Entity::resource_removes);\n\tClassDB::bind_method(D_METHOD(\"resource_clears\"), &Entity::resource_clears);\n\n\tClassDB::bind_method(D_METHOD(\"resource_addc_rpc\", \"index\", \"data\"), &Entity::resource_addc_rpc);\n\n\tClassDB::bind_method(D_METHOD(\"resource_getc_index\", \"index\"), &Entity::resource_getc_index);\n\tClassDB::bind_method(D_METHOD(\"resource_getc_id\", \"type\"), &Entity::resource_getc_id);\n\tClassDB::bind_method(D_METHOD(\"resource_addc\", \"palyer_resource\"), &Entity::resource_addc);\n\tClassDB::bind_method(D_METHOD(\"resource_getc_count\"), &Entity::resource_getc_count);\n\tClassDB::bind_method(D_METHOD(\"resource_removec\", \"index\"), &Entity::resource_removec);\n\tClassDB::bind_method(D_METHOD(\"resource_clearc\"), &Entity::resource_clearc);\n\n\tClassDB::bind_method(D_METHOD(\"resource_sends_current\", \"index\", \"current\"), &Entity::resource_sends_current);\n\tClassDB::bind_method(D_METHOD(\"resource_sends_curr_max\", \"index\", \"current\", \"max\"), &Entity::resource_sends_curr_max);\n\tClassDB::bind_method(D_METHOD(\"resource_sends_data\", \"index\", \"data\"), &Entity::resource_sends_data);\n\n\tClassDB::bind_method(D_METHOD(\"resource_creceive_current\", \"index\", \"current\"), &Entity::resource_creceive_current);\n\tClassDB::bind_method(D_METHOD(\"resource_creceive_curr_max\", \"index\", \"current\", \"max\"), &Entity::resource_creceive_curr_max);\n\tClassDB::bind_method(D_METHOD(\"resource_creceive_data\", \"index\", \"data\"), &Entity::resource_creceive_data);\n\n\tClassDB::bind_method(D_METHOD(\"gets_health\"), &Entity::gets_health);\n\tClassDB::bind_method(D_METHOD(\"gets_speed\"), &Entity::gets_speed);\n\tClassDB::bind_method(D_METHOD(\"getc_health\"), &Entity::getc_health);\n\tClassDB::bind_method(D_METHOD(\"getc_speed\"), &Entity::getc_speed);\n\n\tClassDB::bind_method(D_METHOD(\"sresources_get\"), &Entity::sresources_get);\n\tClassDB::bind_method(D_METHOD(\"sresources_set\", \"caster_aura_applys\"), &Entity::sresources_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"sresources\", PROPERTY_HINT_NONE, \"17/17:EntityResource\", PROPERTY_USAGE_ENTITY_HIDDEN, \"EntityResource\"), \"sresources_set\", \"sresources_get\");\n\n\t//GCD\n\tADD_SIGNAL(MethodInfo(\"sgcd_started\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::REAL, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"sgcd_finished\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\tADD_SIGNAL(MethodInfo(\"cgcd_started\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::REAL, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"cgcd_finished\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\n\tClassDB::bind_method(D_METHOD(\"gcd_hasc\"), &Entity::gcd_hasc);\n\tClassDB::bind_method(D_METHOD(\"gcd_hass\"), &Entity::gcd_hass);\n\n\tClassDB::bind_method(D_METHOD(\"gcd_getc\"), &Entity::gcd_getc);\n\tClassDB::bind_method(D_METHOD(\"gcd_setc\", \"value\"), &Entity::gcd_setc);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"cgcd\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"gcd_setc\", \"gcd_getc\");\n\n\tClassDB::bind_method(D_METHOD(\"gcd_gets\"), &Entity::gcd_gets);\n\tClassDB::bind_method(D_METHOD(\"gcd_sets\", \"value\"), &Entity::gcd_sets);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"sgcd\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"gcd_sets\", \"gcd_gets\");\n\n\tClassDB::bind_method(D_METHOD(\"gcd_starts\", \"value\"), &Entity::gcd_starts);\n\tClassDB::bind_method(D_METHOD(\"gcd_startc\", \"value\"), &Entity::gcd_startc);\n\n\t//Data\n\tClassDB::bind_method(D_METHOD(\"data_adds\", \"data\"), &Entity::data_adds);\n\tClassDB::bind_method(D_METHOD(\"data_removes\", \"index\"), &Entity::data_removes);\n\tClassDB::bind_method(D_METHOD(\"data_gets\", \"index\"), &Entity::data_gets);\n\tClassDB::bind_method(D_METHOD(\"data_gets_count\"), &Entity::data_gets_count);\n\n\tClassDB::bind_method(D_METHOD(\"data_addc\", \"data\"), &Entity::data_addc);\n\tClassDB::bind_method(D_METHOD(\"data_removec\", \"index\"), &Entity::data_removec);\n\tClassDB::bind_method(D_METHOD(\"data_getc\", \"index\"), &Entity::data_getc);\n\tClassDB::bind_method(D_METHOD(\"data_getc_count\"), &Entity::data_getc_count);\n\n\tClassDB::bind_method(D_METHOD(\"sdatas_get\"), &Entity::sdatas_get);\n\tClassDB::bind_method(D_METHOD(\"sdatas_set\", \"data\"), &Entity::sdatas_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"sdatas\", PROPERTY_HINT_NONE, \"17/17:EntityDataContainer\", PROPERTY_USAGE_ENTITY_HIDDEN, \"EntityDataContainer\"), \"sdatas_set\", \"sdatas_get\");\n\n\t//States\n\tADD_SIGNAL(MethodInfo(\"sstate_changed\", PropertyInfo(Variant::INT, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"cstate_changed\", PropertyInfo(Variant::INT, \"value\")));\n\n\tClassDB::bind_method(D_METHOD(\"getc_state\"), &Entity::getc_state);\n\tClassDB::bind_method(D_METHOD(\"setc_state\", \"state\"), &Entity::setc_state);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"cstate\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"setc_state\", \"getc_state\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_state\"), &Entity::gets_state);\n\tClassDB::bind_method(D_METHOD(\"sets_state\", \"state\"), &Entity::sets_state);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sstate\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_state\", \"gets_state\");\n\n\tClassDB::bind_method(D_METHOD(\"adds_state_ref\", \"state_index\"), &Entity::adds_state_ref);\n\tClassDB::bind_method(D_METHOD(\"removes_state_ref\", \"state_index\"), &Entity::removes_state_ref);\n\n\tClassDB::bind_method(D_METHOD(\"states_gets\"), &Entity::states_gets);\n\tClassDB::bind_method(D_METHOD(\"states_sets\", \"state\"), &Entity::states_sets);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, \"sstates\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"states_sets\", \"states_gets\");\n\n\t//Casting System\n\n\tClassDB::bind_method(D_METHOD(\"cast_is_castings\"), &Entity::cast_is_castings);\n\tClassDB::bind_method(D_METHOD(\"cast_is_castingc\"), &Entity::cast_is_castingc);\n\n\tClassDB::bind_method(D_METHOD(\"spell_gets_cast_info\"), &Entity::spell_gets_cast_info);\n\tClassDB::bind_method(D_METHOD(\"sets_spell_cast_info\", \"value\"), &Entity::sets_spell_cast_info);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"sspell_cast_info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellCastInfo\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_spell_cast_info\", \"spell_gets_cast_info\");\n\n\tClassDB::bind_method(D_METHOD(\"spell_getc_cast_info\"), &Entity::spell_getc_cast_info);\n\tClassDB::bind_method(D_METHOD(\"setc_spell_cast_info\", \"value\"), &Entity::setc_spell_cast_info);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"cspell_cast_info\", PROPERTY_HINT_RESOURCE_TYPE, \"SpellCastInfo\", 0), \"setc_spell_cast_info\", \"spell_getc_cast_info\");\n\n\tClassDB::bind_method(D_METHOD(\"cast_starts\", \"info\"), &Entity::cast_starts);\n\tClassDB::bind_method(D_METHOD(\"cast_fails\"), &Entity::cast_fails);\n\tClassDB::bind_method(D_METHOD(\"cast_delays\"), &Entity::cast_delays);\n\tClassDB::bind_method(D_METHOD(\"cast_finishs\"), &Entity::cast_finishs);\n\tClassDB::bind_method(D_METHOD(\"cast_interrupts\"), &Entity::cast_interrupts);\n\n\tClassDB::bind_method(D_METHOD(\"cast_startc_rpc\", \"data\"), &Entity::cast_startc_rpc);\n\tClassDB::bind_method(D_METHOD(\"cast_startc\", \"info\"), &Entity::cast_startc);\n\tClassDB::bind_method(D_METHOD(\"cast_failc\"), &Entity::cast_failc);\n\tClassDB::bind_method(D_METHOD(\"cast_delayc\"), &Entity::cast_delayc);\n\tClassDB::bind_method(D_METHOD(\"cast_finishc\"), &Entity::cast_finishc);\n\tClassDB::bind_method(D_METHOD(\"cast_interruptc\"), &Entity::cast_interruptc);\n\tClassDB::bind_method(D_METHOD(\"cast_spell_successs\", \"info\"), &Entity::cast_spell_successs);\n\n\t//Cooldowns\n\tADD_SIGNAL(MethodInfo(\"scooldown_added\", PropertyInfo(Variant::INT, \"id\"), PropertyInfo(Variant::REAL, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"scooldown_removed\", PropertyInfo(Variant::INT, \"id\"), PropertyInfo(Variant::REAL, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"ccooldown_added\", PropertyInfo(Variant::INT, \"id\"), PropertyInfo(Variant::REAL, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"ccooldown_removed\", PropertyInfo(Variant::INT, \"id\"), PropertyInfo(Variant::REAL, \"value\")));\n\n\tClassDB::bind_method(D_METHOD(\"cooldown_hass\", \"spell_id\"), &Entity::cooldown_hass);\n\tClassDB::bind_method(D_METHOD(\"cooldown_adds\", \"spell_id\", \"value\"), &Entity::cooldown_adds);\n\tClassDB::bind_method(D_METHOD(\"cooldown_removes\", \"spell_id\"), &Entity::cooldown_removes);\n\tClassDB::bind_method(D_METHOD(\"cooldown_gets\", \"spell_id\"), &Entity::cooldown_gets);\n\tClassDB::bind_method(D_METHOD(\"cooldown_gets_index\", \"index\"), &Entity::cooldown_gets_index);\n\tClassDB::bind_method(D_METHOD(\"cooldown_gets_count\"), &Entity::cooldown_gets_count);\n\n\tClassDB::bind_method(D_METHOD(\"cooldown_hasc\", \"spell_id\"), &Entity::cooldown_hasc);\n\tClassDB::bind_method(D_METHOD(\"cooldown_addc\", \"spell_id\", \"value\"), &Entity::cooldown_addc);\n\tClassDB::bind_method(D_METHOD(\"cooldown_removec\", \"spell_id\"), &Entity::cooldown_removec);\n\tClassDB::bind_method(D_METHOD(\"cooldown_getc\", \"spell_id\"), &Entity::cooldown_getc);\n\tClassDB::bind_method(D_METHOD(\"cooldown_getc_index\", \"index\"), &Entity::cooldown_getc_index);\n\tClassDB::bind_method(D_METHOD(\"cooldown_getc_count\"), &Entity::cooldown_getc_count);\n\n\tClassDB::bind_method(D_METHOD(\"scooldowns_get\"), &Entity::scooldowns_get);\n\tClassDB::bind_method(D_METHOD(\"scooldowns_set\", \"data\"), &Entity::scooldowns_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"scooldowns\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"scooldowns_set\", \"scooldowns_get\");\n\n\t//Category Cooldowns\n\tADD_SIGNAL(MethodInfo(\"scategory_cooldown_added\", PropertyInfo(Variant::INT, \"id\"), PropertyInfo(Variant::REAL, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"scategory_cooldown_removed\", PropertyInfo(Variant::INT, \"id\"), PropertyInfo(Variant::REAL, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"ccategory_cooldown_added\", PropertyInfo(Variant::INT, \"id\"), PropertyInfo(Variant::REAL, \"value\")));\n\tADD_SIGNAL(MethodInfo(\"ccategory_cooldown_removed\", PropertyInfo(Variant::INT, \"id\"), PropertyInfo(Variant::REAL, \"value\")));\n\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_hass\", \"category_id\"), &Entity::category_cooldown_hass);\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_adds\", \"category_id\", \"value\"), &Entity::category_cooldown_adds);\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_removes\", \"category_id\"), &Entity::category_cooldown_removes);\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_gets\", \"category_id\"), &Entity::category_cooldown_gets);\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_gets_index\", \"index\"), &Entity::category_cooldown_gets_index);\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_gets_count\"), &Entity::category_cooldown_gets_count);\n\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_hasc\", \"category_id\"), &Entity::category_cooldown_hasc);\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_addc\", \"category_id\", \"value\"), &Entity::category_cooldown_addc);\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_removec\", \"category_id\"), &Entity::category_cooldown_removec);\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_getc\", \"category_id\"), &Entity::category_cooldown_getc);\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_getc_index\", \"index\"), &Entity::category_cooldown_getc_index);\n\tClassDB::bind_method(D_METHOD(\"category_cooldown_getc_count\"), &Entity::category_cooldown_getc_count);\n\n\tClassDB::bind_method(D_METHOD(\"scategory_cooldowns_get\"), &Entity::scategory_cooldowns_get);\n\tClassDB::bind_method(D_METHOD(\"scategory_cooldowns_set\", \"data\"), &Entity::scategory_cooldowns_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"scategory_cooldowns\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"scategory_cooldowns_set\", \"scategory_cooldowns_get\");\n\n\t//Known Spells\n\tADD_SIGNAL(MethodInfo(\"sspell_added\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\")));\n\tADD_SIGNAL(MethodInfo(\"sspell_removed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\")));\n\tADD_SIGNAL(MethodInfo(\"cspell_added\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\")));\n\tADD_SIGNAL(MethodInfo(\"cspell_removed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\")));\n\n\tADD_SIGNAL(MethodInfo(\"sfree_spell_points_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"new_value\")));\n\tADD_SIGNAL(MethodInfo(\"cfree_spell_points_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::INT, \"new_value\")));\n\n\tClassDB::bind_method(D_METHOD(\"gets_free_spell_points\"), &Entity::gets_free_spell_points);\n\tClassDB::bind_method(D_METHOD(\"sets_free_spell_points\", \"value\"), &Entity::sets_free_spell_points);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sfree_spell_points\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_free_spell_points\", \"gets_free_spell_points\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_free_spell_points\"), &Entity::getc_free_spell_points);\n\tClassDB::bind_method(D_METHOD(\"setc_free_spell_points\", \"value\"), &Entity::setc_free_spell_points);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"cfree_spell_points\", PROPERTY_HINT_NONE, \"\", 0), \"setc_free_spell_points\", \"getc_free_spell_points\");\n\n\tClassDB::bind_method(D_METHOD(\"spell_learn_requestc\", \"id\"), &Entity::spell_learn_requestc);\n\tClassDB::bind_method(D_METHOD(\"spell_learns\", \"id\"), &Entity::spell_learns);\n\n\tClassDB::bind_method(D_METHOD(\"spell_hass\", \"spell\"), &Entity::spell_hass);\n\tClassDB::bind_method(D_METHOD(\"spell_hass_id\", \"id\"), &Entity::spell_hass_id);\n\tClassDB::bind_method(D_METHOD(\"spell_adds\", \"spell\"), &Entity::spell_adds);\n\tClassDB::bind_method(D_METHOD(\"spell_adds_id\", \"id\"), &Entity::spell_adds_id);\n\tClassDB::bind_method(D_METHOD(\"spell_removes\", \"spell\"), &Entity::spell_removes);\n\tClassDB::bind_method(D_METHOD(\"spell_gets\", \"spell\"), &Entity::spell_gets);\n\tClassDB::bind_method(D_METHOD(\"spell_gets_count\"), &Entity::spell_gets_count);\n\n\tClassDB::bind_method(D_METHOD(\"spell_hasc\", \"spell\"), &Entity::spell_hasc);\n\tClassDB::bind_method(D_METHOD(\"spell_hasc_id\", \"id\"), &Entity::spell_hasc_id);\n\tClassDB::bind_method(D_METHOD(\"spell_addc\", \"spell\"), &Entity::spell_addc);\n\tClassDB::bind_method(D_METHOD(\"spell_removec\", \"spell\"), &Entity::spell_removec);\n\tClassDB::bind_method(D_METHOD(\"spell_getc\", \"spell\"), &Entity::spell_getc);\n\tClassDB::bind_method(D_METHOD(\"spell_getc_count\"), &Entity::spell_getc_count);\n\n\tClassDB::bind_method(D_METHOD(\"spell_addc_rpc\", \"id\"), &Entity::spell_addc_rpc);\n\tClassDB::bind_method(D_METHOD(\"spell_removec_rpc\", \"id\"), &Entity::spell_removec_rpc);\n\n\tClassDB::bind_method(D_METHOD(\"sspells_get\"), &Entity::sspells_get);\n\tClassDB::bind_method(D_METHOD(\"sspells_set\", \"data\"), &Entity::sspells_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"sspells\", PROPERTY_HINT_NONE, \"17/17:Spell\", PROPERTY_USAGE_ENTITY_HIDDEN, \"Spell\"), \"sspells_set\", \"sspells_get\");\n\n\t//Crafting\n\t//GDVIRTUAL_BIND(\"_crafts\", \"id\");\n\n\tADD_SIGNAL(MethodInfo(\"crafts_success\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\")));\n\tADD_SIGNAL(MethodInfo(\"ccraft_success\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\")));\n\n\tADD_SIGNAL(MethodInfo(\"crafts_recipe_added\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"craft_recipe\", PROPERTY_HINT_RESOURCE_TYPE, \"CraftRecipe\")));\n\tADD_SIGNAL(MethodInfo(\"ccraft_recipe_added\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"craft_recipe\", PROPERTY_HINT_RESOURCE_TYPE, \"CraftRecipe\")));\n\n\tClassDB::bind_method(D_METHOD(\"craft_crequest\", \"id\"), &Entity::craft_crequest);\n\tClassDB::bind_method(D_METHOD(\"crafts\", \"id\"), &Entity::crafts);\n\n\tClassDB::bind_method(D_METHOD(\"craft_hass_recipe\", \"craft_recipe\"), &Entity::craft_hass_recipe);\n\tClassDB::bind_method(D_METHOD(\"craft_hass_recipe_id\", \"id\"), &Entity::craft_hass_recipe_id);\n\tClassDB::bind_method(D_METHOD(\"craft_adds_recipe\", \"craft_recipe\"), &Entity::craft_adds_recipe);\n\tClassDB::bind_method(D_METHOD(\"craft_adds_recipe_id\", \"id\"), &Entity::craft_adds_recipe_id);\n\tClassDB::bind_method(D_METHOD(\"craft_removes_recipe\", \"craft_recipe\"), &Entity::craft_removes_recipe);\n\tClassDB::bind_method(D_METHOD(\"craft_removes_recipe_id\", \"id\"), &Entity::craft_removes_recipe_id);\n\tClassDB::bind_method(D_METHOD(\"craft_gets_recipe\", \"index\"), &Entity::craft_gets_recipe);\n\tClassDB::bind_method(D_METHOD(\"craft_gets_recipe_id\", \"id\"), &Entity::craft_gets_recipe_id);\n\tClassDB::bind_method(D_METHOD(\"craft_gets_recipe_count\"), &Entity::craft_gets_recipe_count);\n\n\tClassDB::bind_method(D_METHOD(\"craft_hasc_recipe\", \"craft_recipe\"), &Entity::craft_hasc_recipe);\n\tClassDB::bind_method(D_METHOD(\"craft_hasc_recipe_id\", \"id\"), &Entity::craft_hasc_recipe_id);\n\tClassDB::bind_method(D_METHOD(\"craft_addc_recipe\", \"craft_recipe\"), &Entity::craft_addc_recipe);\n\tClassDB::bind_method(D_METHOD(\"craft_addc_recipe_id\", \"id\"), &Entity::craft_addc_recipe_id);\n\tClassDB::bind_method(D_METHOD(\"craft_removec_recipe\", \"craft_recipe\"), &Entity::craft_removec_recipe);\n\tClassDB::bind_method(D_METHOD(\"craft_removec_recipe_id\", \"id\"), &Entity::craft_removec_recipe_id);\n\tClassDB::bind_method(D_METHOD(\"craft_getc_recipe\", \"craft_recipe\"), &Entity::craft_getc_recipe);\n\tClassDB::bind_method(D_METHOD(\"craft_getc_recipe_count\"), &Entity::craft_getc_recipe_count);\n\n\tClassDB::bind_method(D_METHOD(\"scraft_recipes_get\"), &Entity::scraft_recipes_get);\n\tClassDB::bind_method(D_METHOD(\"scraft_recipes_set\", \"caster_aura_applys\"), &Entity::scraft_recipes_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"scraft_recipes\", PROPERTY_HINT_NONE, \"17/17:CraftRecipe\", PROPERTY_USAGE_ENTITY_HIDDEN, \"CraftRecipe\"), \"scraft_recipes_set\", \"scraft_recipes_get\");\n\n\t//Skills\n\tClassDB::bind_method(D_METHOD(\"skill_hass_id\", \"id\"), &Entity::skill_hass_id);\n\tClassDB::bind_method(D_METHOD(\"skill_hass\", \"skill\"), &Entity::skill_hass);\n\tClassDB::bind_method(D_METHOD(\"skill_adds\", \"skill\"), &Entity::skill_adds);\n\tClassDB::bind_method(D_METHOD(\"skill_removes\", \"skill\"), &Entity::skill_removes);\n\tClassDB::bind_method(D_METHOD(\"skill_gets\", \"skill\"), &Entity::skill_gets);\n\tClassDB::bind_method(D_METHOD(\"skill_gets_count\"), &Entity::skill_gets_count);\n\n\tClassDB::bind_method(D_METHOD(\"skill_hasc_id\", \"id\"), &Entity::skill_hasc_id);\n\tClassDB::bind_method(D_METHOD(\"skill_hasc\", \"skill\"), &Entity::skill_hasc);\n\tClassDB::bind_method(D_METHOD(\"skill_addc\", \"skill\"), &Entity::skill_addc);\n\tClassDB::bind_method(D_METHOD(\"skill_removec\", \"skill\"), &Entity::skill_removec);\n\tClassDB::bind_method(D_METHOD(\"skill_getc\", \"skill\"), &Entity::skill_getc);\n\tClassDB::bind_method(D_METHOD(\"skill_getc_count\"), &Entity::skill_getc_count);\n\n\tClassDB::bind_method(D_METHOD(\"skill_addc_id\", \"skill_id\", \"value\", \"max_value\"), &Entity::skill_addc_id);\n\tClassDB::bind_method(D_METHOD(\"skill_removec_id\", \"skill_id\"), &Entity::skill_removec_id);\n\tClassDB::bind_method(D_METHOD(\"skill_changec\", \"skill_id\", \"value\"), &Entity::skill_changec);\n\tClassDB::bind_method(D_METHOD(\"skill_changec_max\", \"skill_id\", \"value\"), &Entity::skill_changec_max);\n\n\tClassDB::bind_method(D_METHOD(\"sskills_get\"), &Entity::sskills_get);\n\tClassDB::bind_method(D_METHOD(\"sskills_set\", \"data\"), &Entity::sskills_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"sskills\", PROPERTY_HINT_NONE, \"17/17:EntitySkill\", PROPERTY_USAGE_ENTITY_HIDDEN, \"EntitySkill\"), \"sskills_set\", \"sskills_get\");\n\n\t//skeleton\n\tClassDB::bind_method(D_METHOD(\"get_body\"), &Entity::get_body);\n\tClassDB::bind_method(D_METHOD(\"get_body_3d\"), &Entity::get_body_3d);\n\tClassDB::bind_method(D_METHOD(\"get_body_2d\"), &Entity::get_body_2d);\n\tClassDB::bind_method(D_METHOD(\"set_body\", \"body\"), &Entity::set_body);\n\tClassDB::bind_method(D_METHOD(\"get_character_skeleton\"), &Entity::get_character_skeleton);\n\tClassDB::bind_method(D_METHOD(\"set_character_skeleton\", \"skeleton\"), &Entity::set_character_skeleton);\n\n\tClassDB::bind_method(D_METHOD(\"instance_body\"), &Entity::instance_body);\n\tClassDB::bind_method(D_METHOD(\"on_body_changed\"), &Entity::on_body_changed);\n\n\t//GDVIRTUAL_BIND(\"_body_changed\");\n\tADD_SIGNAL(MethodInfo(\"body_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\")));\n\n\t//Transforms\n\tClassDB::bind_method(D_METHOD(\"get_transform_3d\", \"only_stored\"), &Entity::get_transform_3d, DEFVAL(false));\n\tClassDB::bind_method(D_METHOD(\"set_transform_3d\", \"transform\", \"only_stored\"), &Entity::set_transform_3d, DEFVAL(false));\n\n\tClassDB::bind_method(D_METHOD(\"get_transform_2d\", \"only_stored\"), &Entity::get_transform_2d, DEFVAL(false));\n\tClassDB::bind_method(D_METHOD(\"set_transform_2d\", \"transform\", \"only_stored\"), &Entity::set_transform_2d, DEFVAL(false));\n\n\t////    Targeting System    ////\n\n\tClassDB::bind_method(D_METHOD(\"target_crequest_change\", \"path\"), &Entity::target_crequest_change);\n\tClassDB::bind_method(D_METHOD(\"target_net_sets\", \"path\"), &Entity::target_net_sets);\n\tClassDB::bind_method(D_METHOD(\"target_net_setc\", \"path\"), &Entity::target_net_setc);\n\n\tClassDB::bind_method(D_METHOD(\"gets_target\"), &Entity::gets_target);\n\tClassDB::bind_method(D_METHOD(\"sets_target\", \"target\"), &Entity::sets_target);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"starget\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", 0), \"sets_target\", \"gets_target\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_target\"), &Entity::getc_target);\n\tClassDB::bind_method(D_METHOD(\"setc_target\", \"target\"), &Entity::setc_target);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"ctarget\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", 0), \"setc_target\", \"getc_target\");\n\n\t////    Inventory System    ////\n\n\tADD_SIGNAL(MethodInfo(\"sbag_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\")));\n\tADD_SIGNAL(MethodInfo(\"cbag_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\")));\n\n\tClassDB::bind_method(D_METHOD(\"gets_bag\"), &Entity::gets_bag);\n\tClassDB::bind_method(D_METHOD(\"sets_bag\", \"bag\"), &Entity::sets_bag);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"sbag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\"), \"sets_bag\", \"gets_bag\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_bag\"), &Entity::getc_bag);\n\tClassDB::bind_method(D_METHOD(\"setc_bag\", \"bag\"), &Entity::setc_bag);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"cbag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\", 0), \"setc_bag\", \"getc_bag\");\n\n\tADD_SIGNAL(MethodInfo(\"starget_bag_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\")));\n\tADD_SIGNAL(MethodInfo(\"ctarget_bag_changed\", PropertyInfo(Variant::OBJECT, \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\")));\n\n\tClassDB::bind_method(D_METHOD(\"gets_target_bag\"), &Entity::gets_target_bag);\n\tClassDB::bind_method(D_METHOD(\"sets_target_bag\", \"bag\"), &Entity::sets_target_bag);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"starget_bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_target_bag\", \"gets_target_bag\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_target_bag\"), &Entity::getc_target_bag);\n\tClassDB::bind_method(D_METHOD(\"setc_target_bag\", \"bag\"), &Entity::setc_target_bag);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"ctarget_bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\", 0), \"setc_target_bag\", \"getc_target_bag\");\n\n\tClassDB::bind_method(D_METHOD(\"setc_bag_rpc\", \"data\"), &Entity::setc_bag_rpc);\n\tClassDB::bind_method(D_METHOD(\"setc_target_bag_rpc\", \"data\"), &Entity::setc_target_bag_rpc);\n\n\tClassDB::bind_method(D_METHOD(\"loot_crequest\"), &Entity::loot_crequest);\n\tClassDB::bind_method(D_METHOD(\"loots\"), &Entity::loots);\n\tClassDB::bind_method(D_METHOD(\"lootc\"), &Entity::lootc);\n\n\t//Bag\n\tClassDB::bind_method(D_METHOD(\"notification_item_sadded\", \"bag\", \"item\", \"slot_id\"), &Entity::notification_item_sadded);\n\tClassDB::bind_method(D_METHOD(\"item_addc_rpc\", \"slot_id\", \"item_data\"), &Entity::item_addc_rpc);\n\tClassDB::bind_method(D_METHOD(\"item_addc\", \"slot_id\", \"item\"), &Entity::item_addc);\n\n\tClassDB::bind_method(D_METHOD(\"notification_item_sremoved\", \"bag\", \"item\", \"slot_id\"), &Entity::notification_item_sremoved);\n\tClassDB::bind_method(D_METHOD(\"item_removes\", \"slot_id\"), &Entity::item_removes);\n\tClassDB::bind_method(D_METHOD(\"item_removec\", \"slot_id\"), &Entity::item_removec);\n\tClassDB::bind_method(D_METHOD(\"item_cdeny_remove\", \"slot_id\"), &Entity::item_cdeny_remove);\n\tClassDB::bind_method(D_METHOD(\"item_crequest_remove\", \"slot_id\"), &Entity::item_crequest_remove);\n\n\tClassDB::bind_method(D_METHOD(\"notification_items_sswapped\", \"bag\", \"slot_id_1\", \"slot_id_2\"), &Entity::notification_items_sswapped);\n\tClassDB::bind_method(D_METHOD(\"items_swaps\", \"slot_id_1\", \"slot_id_2\"), &Entity::items_swaps);\n\tClassDB::bind_method(D_METHOD(\"items_swapc\", \"slot_id_1\", \"slot_id_2\"), &Entity::items_swapc);\n\tClassDB::bind_method(D_METHOD(\"item_cdeny_swap\", \"slot_id_1\", \"slot_id_2\"), &Entity::item_cdeny_swap);\n\tClassDB::bind_method(D_METHOD(\"item_crequest_swap\", \"slot_id_1\", \"slot_id_2\"), &Entity::item_crequest_swap);\n\n\tClassDB::bind_method(D_METHOD(\"notification_item_sscount_changed\", \"bag\", \"item\", \"slot_id\"), &Entity::notification_item_sscount_changed);\n\tClassDB::bind_method(D_METHOD(\"item_cchange_count\", \"slot_id\", \"new_count\"), &Entity::item_cchange_count);\n\n\tClassDB::bind_method(D_METHOD(\"notification_soverburdened\", \"bag\"), &Entity::notification_soverburdened);\n\tClassDB::bind_method(D_METHOD(\"notification_soverburden_removed\", \"bag\"), &Entity::notification_soverburden_removed);\n\n\t//target Bag\n\tClassDB::bind_method(D_METHOD(\"notification_target_item_sadded\", \"bag\", \"item\", \"slot_id\"), &Entity::notification_target_item_sadded);\n\tClassDB::bind_method(D_METHOD(\"target_item_addc_rpc\", \"slot_id\", \"item_data\"), &Entity::target_item_addc_rpc);\n\tClassDB::bind_method(D_METHOD(\"target_item_addc\", \"slot_id\", \"item\"), &Entity::target_item_addc);\n\n\tClassDB::bind_method(D_METHOD(\"notification_target_item_sremoved\", \"bag\", \"item\", \"slot_id\"), &Entity::notification_target_item_sremoved);\n\tClassDB::bind_method(D_METHOD(\"target_item_removes\", \"slot_id\"), &Entity::target_item_removes);\n\tClassDB::bind_method(D_METHOD(\"target_item_removec\", \"slot_id\"), &Entity::target_item_removec);\n\tClassDB::bind_method(D_METHOD(\"target_item_cdeny_remove\", \"slot_id\"), &Entity::target_item_cdeny_remove);\n\tClassDB::bind_method(D_METHOD(\"target_remove_crequest_item\", \"slot_id\"), &Entity::target_remove_crequest_item);\n\n\tClassDB::bind_method(D_METHOD(\"notification_target_items_sswapped\", \"bag\", \"slot_id_1\", \"slot_id_2\"), &Entity::notification_target_items_sswapped);\n\tClassDB::bind_method(D_METHOD(\"target_items_sswap\", \"slot_id_1\", \"slot_id_2\"), &Entity::target_items_sswap);\n\tClassDB::bind_method(D_METHOD(\"target_items_cswap\", \"slot_id_1\", \"slot_id_2\"), &Entity::target_items_cswap);\n\tClassDB::bind_method(D_METHOD(\"target_item_cdeny_swap\", \"slot_id_1\", \"slot_id_2\"), &Entity::target_item_cdeny_swap);\n\tClassDB::bind_method(D_METHOD(\"target_item_crequest_swap\", \"slot_id_1\", \"slot_id_2\"), &Entity::target_item_crequest_swap);\n\n\tClassDB::bind_method(D_METHOD(\"notification_target_item_sscount_changed\", \"bag\", \"item\", \"slot_id\"), &Entity::notification_target_item_sscount_changed);\n\tClassDB::bind_method(D_METHOD(\"target_item_cchange_count\", \"slot_id\", \"new_count\"), &Entity::target_item_cchange_count);\n\n\t//Vendors\n\tClassDB::bind_method(D_METHOD(\"vendor_item_buy_crequest\", \"index\", \"count\"), &Entity::vendor_item_buy_crequest);\n\tClassDB::bind_method(D_METHOD(\"vendor_item_sbuy\", \"index\", \"count\"), &Entity::vendor_item_sbuy);\n\tClassDB::bind_method(D_METHOD(\"vendor_item_sell_crequest\", \"slot_id\"), &Entity::vendor_item_sell_crequest);\n\tClassDB::bind_method(D_METHOD(\"vendor_item_ssell\", \"slot_id\"), &Entity::vendor_item_ssell);\n\n\t//GDVIRTUAL_BIND(\"_vendor_item_sbuy\", \"index\", \"count\");\n\t//GDVIRTUAL_BIND(\"_vendor_item_ssell\", \"slot_id\");\n\n\tClassDB::bind_method(D_METHOD(\"_vendor_item_sbuy\", \"index\", \"count\"), &Entity::_vendor_item_sbuy);\n\tClassDB::bind_method(D_METHOD(\"_vendor_item_ssell\", \"slot_id\"), &Entity::_vendor_item_ssell);\n\n\t//Actionbars\n\n\tClassDB::bind_method(D_METHOD(\"get_actionbar_locked\"), &Entity::get_actionbar_locked);\n\tClassDB::bind_method(D_METHOD(\"set_actionbar_locked\", \"value\"), &Entity::set_actionbar_locked);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"actionbar_locked\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"set_actionbar_locked\", \"get_actionbar_locked\");\n\n\tClassDB::bind_method(D_METHOD(\"get_action_bar_profile\"), &Entity::get_action_bar_profile);\n\n\t//Pets\n\n\tClassDB::bind_method(D_METHOD(\"pet_adds\", \"entity\"), &Entity::pet_adds_bind);\n\tClassDB::bind_method(D_METHOD(\"pet_gets\", \"index\"), &Entity::pet_gets);\n\tClassDB::bind_method(D_METHOD(\"pet_removes_index\", \"index\"), &Entity::pet_removes_index);\n\tClassDB::bind_method(D_METHOD(\"pet_removes\", \"entity\"), &Entity::pet_removes_bind);\n\tClassDB::bind_method(D_METHOD(\"pet_gets_count\"), &Entity::pet_gets_count);\n\n\tClassDB::bind_method(D_METHOD(\"pet_addc_path\"), &Entity::pet_addc_path);\n\n\tClassDB::bind_method(D_METHOD(\"pet_addc\", \"entity\"), &Entity::pet_addc_bind);\n\tClassDB::bind_method(D_METHOD(\"pet_getc\", \"index\"), &Entity::pet_getc);\n\tClassDB::bind_method(D_METHOD(\"pet_removec_index\", \"index\"), &Entity::pet_removec_index);\n\tClassDB::bind_method(D_METHOD(\"pet_removec\", \"entity\"), &Entity::pet_removec_bind);\n\tClassDB::bind_method(D_METHOD(\"pet_getc_count\"), &Entity::pet_getc_count);\n\n\t//ClassDB::bind_method(D_METHOD(\"pets_attack\"), &Entity::pets_attack);\n\t//ClassDB::bind_method(D_METHOD(\"pets_follow\"), &Entity::pets_follow);\n\t//ClassDB::bind_method(D_METHOD(\"pets_stop\"), &Entity::pets_stop);\n\n\t// AI\n\n\tClassDB::bind_method(D_METHOD(\"gets_is_pet\"), &Entity::gets_is_pet);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"sis_pet\", PROPERTY_HINT_NONE, \"\", 0), \"\", \"gets_is_pet\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_is_pet\"), &Entity::getc_is_pet);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"cis_pet\", PROPERTY_HINT_NONE, \"\", 0), \"\", \"getc_is_pet\");\n\n\tClassDB::bind_method(D_METHOD(\"pet_gets_owner\"), &Entity::pet_gets_owner);\n\tClassDB::bind_method(D_METHOD(\"pet_sets_owner\", \"entity\"), &Entity::pet_sets_owner_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"spet_owner\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", 0), \"pet_sets_owner\", \"pet_gets_owner\");\n\n\tClassDB::bind_method(D_METHOD(\"pet_gets_formation_index\"), &Entity::pet_gets_formation_index);\n\tClassDB::bind_method(D_METHOD(\"pet_sets_formation_index\", \"value\"), &Entity::pet_sets_formation_index);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"spet_formation_index\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_ENTITY_HIDDEN), \"pet_sets_formation_index\", \"pet_gets_formation_index\");\n\n\tClassDB::bind_method(D_METHOD(\"pet_gets_ai_state\"), &Entity::pet_gets_ai_state);\n\tClassDB::bind_method(D_METHOD(\"pet_sets_ai_state\", \"value\"), &Entity::pet_sets_ai_state);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"pet_gets_ai_state\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_AI_STATES, PROPERTY_USAGE_ENTITY_HIDDEN), \"pet_sets_ai_state\", \"pet_gets_ai_state\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_original_entity_controller\"), &Entity::gets_original_entity_controller);\n\tClassDB::bind_method(D_METHOD(\"sets_original_entity_controller\", \"value\"), &Entity::sets_original_entity_controller);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"soriginal_entity_controller\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_CONTOLLER, PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_original_entity_controller\", \"gets_original_entity_controller\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_entity_controller\"), &Entity::gets_entity_controller);\n\tClassDB::bind_method(D_METHOD(\"sets_entity_controller\", \"value\"), &Entity::sets_entity_controller);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"sentity_controller\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_CONTOLLER), \"sets_entity_controller\", \"gets_entity_controller\");\n\n\tClassDB::bind_method(D_METHOD(\"getc_entity_controller\"), &Entity::getc_entity_controller);\n\tClassDB::bind_method(D_METHOD(\"setc_entity_controller\", \"value\"), &Entity::setc_entity_controller);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"centity_controller\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_CONTOLLER), \"setc_entity_controller\", \"getc_entity_controller\");\n\n\tADD_SIGNAL(MethodInfo(\"onc_entity_controller_changed\"));\n\n\tClassDB::bind_method(D_METHOD(\"getc_is_controlled\"), &Entity::getc_is_controlled);\n\n\tClassDB::bind_method(D_METHOD(\"gets_ai\"), &Entity::gets_ai);\n\tClassDB::bind_method(D_METHOD(\"sets_ai\", \"value\"), &Entity::sets_ai);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"sai\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityAI\", PROPERTY_USAGE_ENTITY_HIDDEN), \"sets_ai\", \"gets_ai\");\n\n\t//Serialization\n\t//GDVIRTUAL_BIND(\"_from_dict\", \"dict\");\n\t//GDVIRTUAL_BIND(\"_to_dict\");\n\n\tClassDB::bind_method(D_METHOD(\"is_deserialized\"), &Entity::is_deserialized);\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &Entity::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &Entity::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_from_dict\", \"dict\"), &Entity::_from_dict);\n\tClassDB::bind_method(D_METHOD(\"_to_dict\"), &Entity::_to_dict);\n\n\t//Networking\n\tClassDB::bind_method(D_METHOD(\"sees_gets\", \"index\"), &Entity::sees_gets);\n\tClassDB::bind_method(D_METHOD(\"sees_removes_index\", \"index\"), &Entity::sees_removes_index);\n\tClassDB::bind_method(D_METHOD(\"sees_removes\", \"entity\"), &Entity::sees_removes_bind);\n\tClassDB::bind_method(D_METHOD(\"sees_adds\", \"entity\"), &Entity::sees_adds_bind);\n\tClassDB::bind_method(D_METHOD(\"sees_gets_count\"), &Entity::sees_gets_count);\n\n\tClassDB::bind_method(D_METHOD(\"seen_by_gets\", \"index\"), &Entity::seen_by_gets);\n\tClassDB::bind_method(D_METHOD(\"seen_by_removes_index\", \"index\"), &Entity::seen_by_removes_index);\n\tClassDB::bind_method(D_METHOD(\"seen_by_removes\", \"entity\"), &Entity::seen_by_removes_bind);\n\tClassDB::bind_method(D_METHOD(\"seen_by_adds\", \"entity\"), &Entity::seen_by_adds_bind);\n\tClassDB::bind_method(D_METHOD(\"seen_by_gets_count\"), &Entity::seen_by_gets_count);\n\n\tMethodInfo mi;\n\n\tmi.arguments.push_back(PropertyInfo(Variant::STRING, \"method\"));\n\n\tmi.name = \"vrpc\";\n\tClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, \"vrpc\", &Entity::_vrpc_bind, mi);\n\n\tClassDB::bind_method(D_METHOD(\"register_for_physics_process\", \"info\"), &Entity::register_for_physics_process);\n\n\tClassDB::bind_method(D_METHOD(\"get_maunal_process\"), &Entity::get_maunal_process);\n\tClassDB::bind_method(D_METHOD(\"set_maunal_process\", \"value\"), &Entity::set_maunal_process);\n\n\tClassDB::bind_method(D_METHOD(\"update\", \"delta\"), &Entity::update);\n\n\tClassDB::bind_method(D_METHOD(\"_crafts\", \"id\"), &Entity::_crafts);\n\tClassDB::bind_method(D_METHOD(\"_notification_sxp_gained\", \"value\"), &Entity::_notification_sxp_gained);\n\tClassDB::bind_method(D_METHOD(\"_notification_slevel_up\", \"level\"), &Entity::_notification_slevel_up);\n\tClassDB::bind_method(D_METHOD(\"_moved\"), &Entity::_moved);\n\tClassDB::bind_method(D_METHOD(\"_con_target_changed\", \"entity\", \"old_target\"), &Entity::_con_target_changed);\n\tClassDB::bind_method(D_METHOD(\"_notification_sdeath\"), &Entity::_notification_sdeath);\n\tClassDB::bind_method(D_METHOD(\"_spell_learns\", \"id\"), &Entity::_spell_learns);\n}\n"
  },
  {
    "path": "entities/entity.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_H\n#define ENTITY_H\n\n#include \"core/version.h\"\n\n#include \"core/object/object.h\"\n#include \"core/string/ustring.h\"\n#include \"core/templates/vector.h\"\n#include \"core/variant/dictionary.h\"\n\n#include \"scene/main/multiplayer_peer.h\"\n\n#include \"scene/main/multiplayer_api.h\"\n#include \"scene/main/node.h\"\n\n#include \"../data/items/craft_recipe.h\"\n#include \"../data/items/item_instance.h\"\n#include \"../data/spells/spell.h\"\n\n#include \"core/io/json.h\"\n#include \"core/math/transform_2d.h\"\n#include \"core/math/transform_3d.h\"\n\n#include \"../data/spells/spell.h\"\n#include \"./resources/entity_resource.h\"\n\n#include \"../entity_enums.h\"\n#include \"../utility/entity_create_info.h\"\n\n#include \"../inventory/bag.h\"\n#include \"./data/entity_data_container.h\"\n\n#include \"../profiles/actionbar/action_bar_profile.h\"\n#include \"../profiles/input/input_profile.h\"\n\n#include \"./ai/entity_ai.h\"\n\n#include \"../data/auras/aura_group.h\"\n\n#include \"core/version.h\"\n\n#include \"../defines.h\"\n\n#include spatial_h_path\n\nclass EntityData;\nclass AuraData;\nclass Spell;\nclass SpellDamageInfo;\nclass SpellHealInfo;\nclass SpellCastInfo;\nclass EntityCreateInfo;\nclass CharacterSpec;\nclass EntitySkill;\nclass ClassProfile;\nclass Spatial;\nclass Node2D;\nclass EntityData;\n\nenum SpellCastDataSignals {\n\tCastFailed,\n\tStartCasting,\n\tCastFinished,\n\tSetTarget\n};\n\nVARIANT_ENUM_CAST(SpellCastDataSignals);\n\nenum PlayerStates {\n\tSTATE_FREEZE,\n\tSTATE_NORMAL\n};\n\nVARIANT_ENUM_CAST(PlayerStates);\n\nenum PlayerSendFlags {\n\tSEND_FLAG_NONE,\n\tSEND_FLAG_INVENTORY,\n\tSEND_FLAG_SPELL_DATA,\n\tSEND_FLAG_AURAS,\n};\n\nstruct EntityStat {\n\tbool dirty;\n\n\tfloat base;\n\tfloat base_calculated;\n\tfloat bonus;\n\tfloat percent;\n\n\tfloat scurrent;\n\tfloat ccurrent;\n\n\tEntityStat() {\n\t\tdirty = false;\n\n\t\tbase = 0;\n\t\tbase_calculated = 0;\n\t\tbonus = 0;\n\t\tpercent = 100;\n\n\t\tscurrent = 0;\n\t\tccurrent = 0;\n\t}\n};\n\n#define SET_RPC_OFF(p_method_name)                                                  \\\n\t{                                                                               \\\n\t\tDictionary rpc_config_dict;                                                 \\\n\t\trpc_config_dict[\"rpc_mode\"] = MultiplayerAPI::RPC_MODE_DISABLED;            \\\n\t\trpc_config_dict[\"channel\"] = 0;                                             \\\n\t\trpc_config_dict[\"call_local\"] = false;                                      \\\n\t\trpc_config_dict[\"transfer_mode\"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE; \\\n\t\trpc_config(p_method_name, rpc_config_dict);                                 \\\n\t}\n\n#define SET_RPC_REMOTE(p_method_name)                                               \\\n\t{                                                                               \\\n\t\tDictionary rpc_config_dict;                                                 \\\n\t\trpc_config_dict[\"rpc_mode\"] = MultiplayerAPI::RPC_MODE_ANY_PEER;            \\\n\t\trpc_config_dict[\"channel\"] = 0;                                             \\\n\t\trpc_config_dict[\"call_local\"] = false;                                      \\\n\t\trpc_config_dict[\"transfer_mode\"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE; \\\n\t\trpc_config(p_method_name, rpc_config_dict);                                 \\\n\t}\n\n#define SET_RPC_MASTER(p_method_name)                                               \\\n\t{                                                                               \\\n\t\tDictionary rpc_config_dict;                                                 \\\n\t\trpc_config_dict[\"rpc_mode\"] = MultiplayerAPI::RPC_MODE_AUTHORITY;           \\\n\t\trpc_config_dict[\"channel\"] = 0;                                             \\\n\t\trpc_config_dict[\"call_local\"] = false;                                      \\\n\t\trpc_config_dict[\"transfer_mode\"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE; \\\n\t\trpc_config(p_method_name, rpc_config_dict);                                 \\\n\t}\n\n#define SET_RPC_PUPPET(p_method_name)                                               \\\n\t{                                                                               \\\n\t\tDictionary rpc_config_dict;                                                 \\\n\t\trpc_config_dict[\"rpc_mode\"] = MultiplayerAPI::RPC_MODE_ANY_PEER;            \\\n\t\trpc_config_dict[\"channel\"] = 0;                                             \\\n\t\trpc_config_dict[\"call_local\"] = false;                                      \\\n\t\trpc_config_dict[\"transfer_mode\"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE; \\\n\t\trpc_config(p_method_name, rpc_config_dict);                                 \\\n\t}\n\n#define SET_RPC_REMOTESYNC(p_method_name)                                           \\\n\t{                                                                               \\\n\t\tDictionary rpc_config_dict;                                                 \\\n\t\trpc_config_dict[\"rpc_mode\"] = MultiplayerAPI::RPC_MODE_ANY_PEER;            \\\n\t\trpc_config_dict[\"channel\"] = 0;                                             \\\n\t\trpc_config_dict[\"call_local\"] = true;                                       \\\n\t\trpc_config_dict[\"transfer_mode\"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE; \\\n\t\trpc_config(p_method_name, rpc_config_dict);                                 \\\n\t}\n\n#define SET_RPC_MASTERSYNC(p_method_name)                                           \\\n\t{                                                                               \\\n\t\tDictionary rpc_config_dict;                                                 \\\n\t\trpc_config_dict[\"rpc_mode\"] = MultiplayerAPI::RPC_MODE_AUTHORITY;           \\\n\t\trpc_config_dict[\"channel\"] = 0;                                             \\\n\t\trpc_config_dict[\"call_local\"] = true;                                       \\\n\t\trpc_config_dict[\"transfer_mode\"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE; \\\n\t\trpc_config(p_method_name, rpc_config_dict);                                 \\\n\t}\n\n#define SET_RPC_PUPPETSYNC(p_method_name)                                           \\\n\t{                                                                               \\\n\t\tDictionary rpc_config_dict;                                                 \\\n\t\trpc_config_dict[\"rpc_mode\"] = MultiplayerAPI::RPC_MODE_ANY_PEER;            \\\n\t\trpc_config_dict[\"channel\"] = 0;                                             \\\n\t\trpc_config_dict[\"call_local\"] = true;                                       \\\n\t\trpc_config_dict[\"transfer_mode\"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE; \\\n\t\trpc_config(p_method_name, rpc_config_dict);                                 \\\n\t}\n\n// f.e.   RPC(method, arg0, arg1, etc)\n#define RPC(func, ...)                                                      \\\n\t{                                                                       \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer();           \\\n\t\tif (_multiplayer_api.is_valid() && _multiplayer_api->is_server()) { \\\n\t\t\trpc(#func, ##__VA_ARGS__);                                      \\\n\t\t}                                                                   \\\n\t}                                                                       \\\n\tfunc(__VA_ARGS__);\n\n#define VRPC(func, ...)                                                     \\\n\t{                                                                       \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer();           \\\n\t\tif (_multiplayer_api.is_valid() && _multiplayer_api->is_server()) { \\\n\t\t\tvrpc(#func, ##__VA_ARGS__);                                     \\\n\t\t}                                                                   \\\n\t}                                                                       \\\n\tfunc(__VA_ARGS__);\n\n#define ORPC(func, ...)                                                        \\\n\t{                                                                          \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer();              \\\n\t\tif (_multiplayer_api.is_valid()) {                                     \\\n\t\t\tif (_multiplayer_api->is_server()) {                               \\\n\t\t\t\tif (get_multiplayer_authority() != 1) {                        \\\n\t\t\t\t\trpc_id(get_multiplayer_authority(), #func, ##__VA_ARGS__); \\\n\t\t\t\t} else {                                                       \\\n\t\t\t\t\tfunc(__VA_ARGS__);                                         \\\n\t\t\t\t}                                                              \\\n\t\t\t}                                                                  \\\n\t\t} else {                                                               \\\n\t\t\tfunc(__VA_ARGS__);                                                 \\\n\t\t}                                                                      \\\n\t}\n\n#define RPCS(func, ...)                                           \\\n\t{                                                             \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer(); \\\n\t\tif (_multiplayer_api.is_valid()) {                        \\\n\t\t\tif (_multiplayer_api->is_server()) {                  \\\n\t\t\t\tfunc(__VA_ARGS__);                                \\\n\t\t\t} else {                                              \\\n\t\t\t\trpc_id(1, #func, ##__VA_ARGS__);                  \\\n\t\t\t}                                                     \\\n\t\t} else {                                                  \\\n\t\t\tfunc(__VA_ARGS__);                                    \\\n\t\t}                                                         \\\n\t}\n\n//RPC Objects\n\n#define RPCOBJ(rpcfunc, rpc_var, normalfunc, normal_var)          \\\n\t{                                                             \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer(); \\\n\t\tif (_multiplayer_api.is_valid()) {                        \\\n\t\t\trpc(#rpcfunc, rpc_var);                               \\\n\t\t}                                                         \\\n\t\tnormalfunc(normal_var);                                   \\\n\t}\n\n#define VRPCOBJ(rpcfunc, rpc_var, normalfunc, normal_var)         \\\n\t{                                                             \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer(); \\\n\t\tif (_multiplayer_api.is_valid()) {                        \\\n\t\t\tvrpc(#rpcfunc, rpc_var);                              \\\n\t\t}                                                         \\\n\t\tnormalfunc(normal_var);                                   \\\n\t}\n\n#define VRPCOBJ12(rpcfunc, rpc_var, normalfunc, normal_var1, normal_var2)   \\\n\t{                                                                       \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer();           \\\n\t\tif (_multiplayer_api.is_valid() && _multiplayer_api->is_server()) { \\\n\t\t\tvrpc(#rpcfunc, rpc_var);                                        \\\n\t\t}                                                                   \\\n\t\tnormalfunc(normal_var1, normal_var2);                               \\\n\t}\n\n#define VRPCOBJP(rpcfunc, rpc_var1, rpc_var2, normalfunc, normal_var1, normal_var2) \\\n\t{                                                                               \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer();                   \\\n\t\tif (_multiplayer_api.is_valid() && _multiplayer_api->is_server()) {         \\\n\t\t\tvrpc(#rpcfunc, rpc_var1, rpc_var2);                                     \\\n\t\t}                                                                           \\\n\t\tnormalfunc(normal_var1, normal_var2);                                       \\\n\t}\n\n#define ORPCOBJ(rpcfunc, rpc_var, normalfunc, normal_var)                          \\\n\t{                                                                              \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer();                  \\\n\t\tif (_multiplayer_api.is_valid()) {                                         \\\n\t\t\tif (_multiplayer_api->is_server() && get_multiplayer_authority() != 1) \\\n\t\t\t\trpc_id(get_multiplayer_authority(), #rpcfunc, rpc_var);            \\\n\t\t}                                                                          \\\n\t\tnormalfunc(normal_var);                                                    \\\n\t}\n\n#define RPCSOBJ(rpcfunc, rpc_var, normalfunc, normal_var)         \\\n\t{                                                             \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer(); \\\n\t\tif (_multiplayer_api.is_valid()) {                        \\\n\t\t\tif (_multiplayer_api->is_server()) {                  \\\n\t\t\t\tnormalfunc(normal_var);                           \\\n\t\t\t} else {                                              \\\n\t\t\t\trpc_id(1, #rpcfunc, rpc_var);                     \\\n\t\t\t}                                                     \\\n\t\t} else {                                                  \\\n\t\t\tnormalfunc(normal_var);                               \\\n\t\t}                                                         \\\n\t}\n\n#define ORPCOBJP(rpcfunc, rpc_var1, rpc_var2, normalfunc, normal_var1, normal_var2) \\\n\t{                                                                               \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer();                   \\\n\t\tif (_multiplayer_api.is_valid()) {                                          \\\n\t\t\tif (_multiplayer_api->is_server() && get_multiplayer_authority() != 1)  \\\n\t\t\t\trpc_id(get_multiplayer_authority(), #rpcfunc, rpc_var1, rpc_var2);  \\\n\t\t}                                                                           \\\n\t\tnormalfunc(normal_var1, normal_var2);                                       \\\n\t}\n\n// f.e. RSET(rset(\"property\", \"value\"), property, value)\n#define RSET(rset_func, variable, value)                                    \\\n\t{                                                                       \\\n\t\tRef<MultiplayerAPI> _multiplayer_api = get_multiplayer();           \\\n\t\tif (_multiplayer_api.is_valid() && _multiplayer_api->is_server()) { \\\n\t\t\trset_func;                                                      \\\n\t\t}                                                                   \\\n\t\tvariable = value;                                                   \\\n\t}\n\nclass Entity : public Node {\n\tGDCLASS(Entity, Node);\n\npublic:\n\t////    Base    ////\n\n\tNodePath get_body_path();\n\tvoid set_body_path(NodePath value);\n\tNode *get_body();\n\tSpatial *get_body_3d();\n\tNode2D *get_body_2d();\n\tvoid set_body(Node *body);\n\n\tvoid instance_body(const Ref<EntityData> &data, const int model_index);\n\tvoid on_body_changed();\n\n\tNodePath get_character_skeleton_path();\n\tvoid set_character_skeleton_path(NodePath value);\n\tNode *get_character_skeleton();\n\tvoid set_character_skeleton(Node *skeleton);\n\n\t//Transforms\n\tTransform3D get_transform_3d(bool only_stored = false) const;\n\tvoid set_transform_3d(const Transform3D &transform, bool only_stored = false);\n\n\tTransform2D get_transform_2d(bool only_stored = false) const;\n\tvoid set_transform_2d(const Transform2D &transform, bool only_stored = false);\n\n\t//GUID\n\tint gets_guid();\n\tvoid sets_guid(int value);\n\n\tint getc_guid();\n\tvoid setc_guid(int value);\n\n\t//EntityPlayerType\n\tint gets_entity_player_type();\n\tvoid sets_entity_player_type(int value);\n\n\tint getc_entity_player_type();\n\tvoid setc_entity_player_type(int value);\n\n\t//EntityType\n\tint gets_entity_type();\n\tvoid sets_entity_type(int value);\n\n\tint getc_entity_type();\n\tvoid setc_entity_type(int value);\n\n\t//Relations\n\tEntityEnums::EntityRelationType gets_relation_to_bind(Node *to);\n\tEntityEnums::EntityRelationType gets_relation_to(Entity *to);\n\n\tEntityEnums::EntityRelationType _gets_relation_to(Node *to);\n\n\tEntityEnums::EntityRelationType getc_relation_to_bind(Node *to);\n\tEntityEnums::EntityRelationType getc_relation_to(Entity *to);\n\n\tEntityEnums::EntityRelationType _getc_relation_to(Node *to);\n\n\t//EntityInteractionType\n\tEntityEnums::EntityInteractionType gets_entity_interaction_type();\n\tvoid sets_entity_interaction_type(EntityEnums::EntityInteractionType value);\n\n\tEntityEnums::EntityInteractionType getc_entity_interaction_type();\n\tvoid setc_entity_interaction_type(EntityEnums::EntityInteractionType value);\n\n\tint gets_immunity_flags();\n\tvoid sets_immunity_flags(int value);\n\n\tint gets_entity_flags();\n\tvoid sets_entity_flags(int value);\n\n\tint getc_entity_flags();\n\tvoid setc_entity_flags(int value);\n\n\tString gets_entity_name();\n\tvoid sets_entity_name(String value);\n\n\tString getc_entity_name();\n\tvoid setc_entity_name(String value);\n\n\tint gets_model_index();\n\tvoid sets_model_index(int value);\n\n\tint getc_model_index();\n\tvoid setc_model_index(int value);\n\n\tint gets_level();\n\tvoid sets_level(int value);\n\tint getc_level();\n\tvoid setc_level(int value);\n\n\tint gets_xp();\n\tvoid sets_xp(int value);\n\tint getc_xp();\n\tvoid setc_xp(int value);\n\n\tint gets_money();\n\tvoid sets_money(int value);\n\tint getc_money();\n\tvoid setc_money(int value);\n\n\tRef<EntityData> gets_entity_data();\n\tvoid sets_entity_data(Ref<EntityData> value);\n\n\tRef<EntityData> getc_entity_data();\n\tvoid setc_entity_data(Ref<EntityData> value);\n\n\tint gets_entity_data_id();\n\tvoid sets_entity_data_id(int value);\n\n\tint getc_entity_data_id();\n\tvoid setc_entity_data_id(int value);\n\n\tStringName gets_entity_data_path();\n\tvoid sets_entity_data_path(const StringName &value);\n\n\tStringName getc_entity_data_path();\n\tvoid setc_entity_data_path(const StringName &value);\n\n\tEntityEnums::AIStates gets_ai_state() const;\n\tvoid sets_ai_state(EntityEnums::AIStates state);\n\n\tEntityEnums::AIStates gets_ai_state_stored() const;\n\tvoid sets_ai_state_stored(EntityEnums::AIStates state);\n\n\tint gets_seed();\n\tvoid sets_seed(int value);\n\n\tint getc_seed();\n\tvoid setc_seed(int value);\n\n\t////     Stats    ////\n\tEntityStat get_stat(const int stat_id) const;\n\tvoid set_stat(const int stat_id, const EntityStat &entry);\n\n\tbool stat_get_dirty(const int stat_id) const;\n\tvoid stat_set_dirty(const int stat_id, const bool value);\n\n\tfloat stat_get_base(const int stat_id) const;\n\tvoid stat_set_base(const int stat_id, const float value);\n\tvoid stat_mod_base(const int stat_id, const float value);\n\n\tfloat stat_get_base_calculated(const int stat_id) const;\n\tvoid stat_set_base_calculated(const int stat_id, const float value);\n\n\tfloat stat_get_bonus(const int stat_id) const;\n\tvoid stat_set_bonus(const int stat_id, const float value);\n\tvoid stat_mod_bonus(const int stat_id, const float value);\n\n\tfloat stat_get_percent(const int stat_id) const;\n\tvoid stat_set_percent(const int stat_id, const float value);\n\tvoid stat_mod_percent(const int stat_id, const float value);\n\n\tvoid stat_mod(const int stat_id, const float base, const float bonus, const float percent);\n\n\tfloat stat_gets_current(const int stat_id) const;\n\tvoid stat_sets_current(const int stat_id, const float value);\n\n\tfloat stat_getc_current(const int stat_id) const;\n\tvoid stat_setc_current(const int stat_id, const float value);\n\n\tvoid stat_recalculate(const int stat_id);\n\n\tvoid notification_sstat_changed(const int statid, const float current);\n\tvoid notification_cstat_changed(const int statid, const float current);\n\n\tvoid ssend_stat(int id, int ccurrent);\n\tvoid creceive_stat(int id, int ccurrent);\n\n\tvoid dies();\n\tvoid diec();\n\n\t////    Equip Slots    ////\n\n\tbool equip_should_deny(int equip_slot, Ref<ItemInstance> item);\n\n\tvoid equip_son_success(int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\tvoid equip_son_fail(int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\n\tvoid equip_con_success(int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\tvoid equip_con_fail(int equip_slot, Ref<ItemInstance> item, Ref<ItemInstance> old_item, int bag_slot);\n\n\tvoid equip_crequest(int equip_slot, int bag_slot);\n\tvoid equips(int equip_slot, int bag_slot);\n\tvoid _equips(int equip_slot, int bag_slot);\n\n\tvoid equip_csuccess(int equip_slot, int bag_slot);\n\tvoid equip_cfail(int equip_slot, int bag_slot);\n\n\tRef<ItemInstance> equip_gets_slot(int index);\n\tvoid equip_sets_slot(int index, Ref<ItemInstance> item);\n\n\tRef<ItemInstance> equip_getc_slot(int index);\n\tvoid equip_setc_slot(int index, Ref<ItemInstance> item);\n\n\tbool equip_can_equip_item(int equip_slot, Ref<ItemInstance> item);\n\tbool _equip_can_equip_item(int equip_slot, Ref<ItemInstance> item);\n\n\tvoid equip_applys_item(Ref<ItemInstance> item);\n\tvoid equip_deapplys_item(Ref<ItemInstance> item);\n\n\tvoid _equip_applys_item(Ref<ItemInstance> item);\n\tvoid _equip_deapplys_item(Ref<ItemInstance> item);\n\n\tvoid equip_applyc_item(Ref<ItemInstance> item);\n\tvoid equip_deapplyc_item(Ref<ItemInstance> item);\n\n\tvoid _equip_applyc_item(Ref<ItemInstance> item);\n\tvoid _equip_deapplyc_item(Ref<ItemInstance> item);\n\n\t////    Resources    ////\n\n\tRef<EntityResource> resource_gets_index(int index);\n\tRef<EntityResource> resource_gets_id(int id);\n\tvoid resource_adds(Ref<EntityResource> resource);\n\tint resource_gets_count();\n\tvoid resource_removes(int index);\n\tvoid resource_clears();\n\n\tRef<EntityResource> resource_getc_index(int index);\n\tRef<EntityResource> resource_getc_id(int id);\n\tvoid resource_addc(int index, Ref<EntityResource> resource);\n\tint resource_getc_count();\n\tvoid resource_removec(int index);\n\tvoid resource_clearc();\n\n\tvoid resource_addc_rpc(int index, String data);\n\n\tvoid resource_sends_current(int index, int current);\n\tvoid resource_sends_curr_max(int index, int current, int max);\n\tvoid resource_sends_data(int index, String data);\n\n\tvoid resource_creceive_current(int index, int current);\n\tvoid resource_creceive_curr_max(int index, int current, int max);\n\tvoid resource_creceive_data(int index, String data);\n\n\tRef<EntityResource> gets_health();\n\tRef<EntityResource> gets_speed();\n\tRef<EntityResource> getc_health();\n\tRef<EntityResource> getc_speed();\n\n\tVector<Variant> sresources_get();\n\tvoid sresources_set(const Vector<Variant> &resources);\n\n\t////    Global Cooldown    ////\n\n\tbool gcd_hasc() const;\n\tbool gcd_hass() const;\n\n\tfloat gcd_getc() const;\n\tvoid gcd_setc(const float value);\n\n\tfloat gcd_gets() const;\n\tvoid gcd_sets(const float value);\n\n\tvoid gcd_starts(const float value);\n\tvoid gcd_startc(const float value);\n\n\t////    States    ////\n\tint getc_state();\n\tvoid setc_state(int state);\n\n\tint gets_state();\n\tvoid sets_state(int state);\n\n\tvoid adds_state_ref(int state_index);\n\tvoid removes_state_ref(int state_index);\n\n\tPoolIntArray states_gets() const;\n\tvoid states_sets(const PoolIntArray &data);\n\n\t////    Crafting System    ////\n\n\tvoid craft_crequest(int id);\n\tvoid crafts(int id);\n\n\tbool craft_hass_recipe(Ref<CraftRecipe> craft_recipe);\n\tbool craft_hass_recipe_id(int id);\n\tvoid craft_adds_recipe(Ref<CraftRecipe> craft_recipe);\n\tvoid craft_adds_recipe_id(int id);\n\tvoid craft_removes_recipe(Ref<CraftRecipe> craft_recipe);\n\tvoid craft_removes_recipe_id(int id);\n\tRef<CraftRecipe> craft_gets_recipe(int index);\n\tRef<CraftRecipe> craft_gets_recipe_id(int id);\n\tint craft_gets_recipe_count();\n\n\tbool craft_hasc_recipe(Ref<CraftRecipe> craft_recipe);\n\tbool craft_hasc_recipe_id(int id);\n\tvoid craft_addc_recipe(Ref<CraftRecipe> craft_recipe);\n\tvoid craft_addc_recipe_id(int id);\n\tvoid craft_removec_recipe(Ref<CraftRecipe> craft_recipe);\n\tvoid craft_removec_recipe_id(int id);\n\tRef<CraftRecipe> craft_getc_recipe(int index);\n\tint craft_getc_recipe_count();\n\n\tVector<Variant> scraft_recipes_get();\n\tvoid scraft_recipes_set(const Vector<Variant> &data);\n\n\t////    SpellSystem    ////\n\n\t//EventHandlers\n\tvoid notification_saura(int what, Ref<AuraData> data);\n\tvoid notification_sheal(int what, Ref<SpellHealInfo> info);\n\tvoid notification_scast(int what, Ref<SpellCastInfo> info);\n\tvoid notification_sdamage(int what, Ref<SpellDamageInfo> info);\n\n\tvoid notification_scooldown_added(int id, float value);\n\tvoid notification_scooldown_removed(int id, float value);\n\n\tvoid notification_scategory_cooldown_added(int id, float value);\n\tvoid notification_scategory_cooldown_removed(int id, float value);\n\n\tvoid notification_sentity_resource_added(Ref<EntityResource> resource);\n\tvoid notification_sentity_resource_removed(Ref<EntityResource> resource);\n\n\tvoid notification_sxp_gained(int value);\n\tvoid notification_slevel_up(int value);\n\n\tvoid notification_sdeath();\n\n\tvoid son_physics_process(float delta);\n\n\t//Clientside EventHandlers\n\tvoid notification_caura(int what, Ref<AuraData> data);\n\tvoid notification_cheal(int what, Ref<SpellHealInfo> info);\n\tvoid notification_ccast(int what, Ref<SpellCastInfo> info);\n\tvoid notification_cdamage(int what, Ref<SpellDamageInfo> info);\n\n\tvoid notification_ccooldown_added(int id, float value);\n\tvoid notification_ccooldown_removed(int id, float value);\n\n\tvoid notification_ccategory_cooldown_added(int id, float value);\n\tvoid notification_ccategory_cooldown_removed(int id, float value);\n\n\tvoid notification_centity_resource_added(Ref<EntityResource> resource);\n\tvoid notification_centity_resource_removed(Ref<EntityResource> resource);\n\n\tvoid notification_cxp_gained(int value);\n\tvoid notification_clevel_up(int value);\n\n\tvoid notification_cdeath();\n\n\t//gcd\n\tvoid notification_sgcd_started();\n\tvoid notification_sgcd_finished();\n\tvoid notification_cgcd_started();\n\tvoid notification_cgcd_finished();\n\n\t//Modifiers/Requesters\n\tvoid sapply_passives_damage_receive(Ref<SpellDamageInfo> info);\n\tvoid sapply_passives_damage_deal(Ref<SpellDamageInfo> info);\n\n\tvoid sapply_passives_heal_receive(Ref<SpellHealInfo> info);\n\tvoid sapply_passives_heal_deal(Ref<SpellHealInfo> info);\n\n\t//Spell operations\n\tvoid spell_casts(int spell_id);\n\tvoid spell_crequest_cast(int spell_id);\n\n\tvoid item_uses(int item_id);\n\tvoid item_crequest_use(int item_id);\n\tvoid _item_uses(int item_id);\n\n\t//Damage Operations\n\tvoid stake_damage(Ref<SpellDamageInfo> info);\n\tvoid sdeal_damage_to(Ref<SpellDamageInfo> info);\n\n\t//Heal Operations\n\tvoid stake_heal(Ref<SpellHealInfo> info);\n\tvoid sdeal_heal_to(Ref<SpellHealInfo> info);\n\n\t//Damage, Heal RPCs\n\tvoid cdamage_dealt_rpc(String data);\n\tvoid cdealt_damage_rpc(String data);\n\tvoid cheal_dealt_rpc(String data);\n\tvoid cdealt_heal_rpc(String data);\n\n\t//Interactions\n\tbool cans_interact();\n\tvoid sinteract();\n\n\tbool canc_interact();\n\tvoid crequest_interact();\n\n\tvoid ssend_open_window(int window_id);\n\tvoid copen_window(int window_id);\n\n\tbool iss_target_in_interact_range();\n\tbool isc_target_in_interact_range();\n\tvirtual bool _iss_target_in_interact_range();\n\tvirtual bool _isc_target_in_interact_range();\n\n\t//XP Operations\n\tvoid xp_adds(int value);\n\tvoid xp_addc(int value);\n\tvoid levelups(int value);\n\tvoid levelupc(int value);\n\n\t//Aura Manipulation\n\tvoid aura_adds(Ref<AuraData> aura);\n\tvoid aura_removes(Ref<AuraData> aura);\n\tvoid aura_removes_exact(Ref<AuraData> aura);\n\tvoid aura_removes_expired(Ref<AuraData> aura);\n\tvoid aura_removes_dispelled(Ref<AuraData> aura);\n\tvoid aura_refresheds(Ref<AuraData> aura);\n\n\tvoid aura_addc_rpc(String data);\n\tvoid aura_removec_rpc(String data);\n\tvoid aura_removec_exact_rpc(String data);\n\tvoid aura_removec_expired_rpc(String data);\n\tvoid aura_removec_dispelled_rpc(String data);\n\tvoid aura_refreshedc_rpc(String data);\n\n\tvoid aura_addc(Ref<AuraData> aura);\n\tvoid aura_removec(Ref<AuraData> aura);\n\tvoid aura_removec_exact(Ref<AuraData> aura);\n\tvoid aura_removec_expired(Ref<AuraData> aura);\n\tvoid aura_removec_dispelled(Ref<AuraData> aura);\n\tvoid aura_refreshedc(Ref<AuraData> aura);\n\n\tvoid aura_removess_with_group(Ref<AuraGroup> aura_group);\n\n\t//NOTE: No reason for shas_aura_by, just query it, and check for null.\n\tint aura_gets_count();\n\tRef<AuraData> aura_gets(int index);\n\tRef<AuraData> aura_gets_by(Entity *caster, int aura_id);\n\tRef<AuraData> aura_gets_by_bind(Node *caster, int aura_id);\n\n\tRef<AuraData> aura_gets_with_group_by(Entity *caster, Ref<AuraGroup> aura_group);\n\tRef<AuraData> aura_gets_with_group_by_bind(Node *caster, Ref<AuraGroup> aura_group);\n\n\tint aura_getc_count();\n\tRef<AuraData> aura_getc(int index);\n\n\tVector<Variant> sauras_get();\n\tvoid sauras_set(const Vector<Variant> &data);\n\n\t//Hooks\n\tvoid moved();\n\n\tvoid notification_cmouse_enter();\n\tvoid notification_cmouse_exit();\n\n\tvoid notification_ctargeted();\n\tvoid notification_cuntargeted();\n\n\t//Update\n\tvoid update_auras(float delta);\n\n\tbool gets_is_dead();\n\tbool getc_is_dead();\n\n\t////    Casting System    ////\n\n\tbool cast_is_castings();\n\tbool cast_is_castingc();\n\n\tRef<SpellCastInfo> spell_gets_cast_info();\n\tvoid sets_spell_cast_info(Ref<SpellCastInfo> info);\n\n\tRef<SpellCastInfo> spell_getc_cast_info();\n\tvoid setc_spell_cast_info(Ref<SpellCastInfo> info);\n\n\tvoid cast_starts(Ref<SpellCastInfo> info);\n\tvoid cast_fails();\n\tvoid cast_delays();\n\tvoid cast_finishs();\n\tvoid cast_interrupts();\n\n\tvoid cast_startc_rpc(String data);\n\tvoid cast_startc(Ref<SpellCastInfo> info);\n\tvoid cast_failc();\n\tvoid cast_delayc();\n\tvoid cast_finishc();\n\tvoid cast_interruptc();\n\n\tvoid cast_spell_successs(Ref<SpellCastInfo> info);\n\n\tvoid cast_spell_successc_rpc(String data);\n\tvoid cast_spell_successc(Ref<SpellCastInfo> info);\n\n\t////    Cooldowns    ////\n\n\tbool cooldown_hass(int spell_id);\n\tvoid cooldown_adds(int spell_id, float value);\n\tvoid cooldown_removes(int spell_id);\n\tfloat cooldown_gets(int spell_id);\n\tfloat cooldown_gets_index(int index);\n\tint cooldown_gets_count();\n\n\tbool cooldown_hasc(int spell_id);\n\tvoid cooldown_addc(int spell_id, float value);\n\tvoid cooldown_removec(int spell_id);\n\tfloat cooldown_getc(int spell_id);\n\tfloat cooldown_getc_index(int index);\n\tint cooldown_getc_count();\n\n\tVector<Variant> scooldowns_get();\n\tvoid scooldowns_set(const Vector<Variant> &data);\n\n\t//Category Cooldowns\n\n\tbool category_cooldown_hass(int category_id);\n\tvoid category_cooldown_adds(int category_id, float value);\n\tvoid category_cooldown_removes(int category_id);\n\tfloat category_cooldown_gets(int category_id);\n\tfloat category_cooldown_gets_index(int index);\n\tint category_cooldown_gets_count();\n\n\tbool category_cooldown_hasc(int category_id);\n\tvoid category_cooldown_addc(int category_id, float value);\n\tvoid category_cooldown_removec(int spell_id);\n\tfloat category_cooldown_getc(int category_id);\n\tfloat category_cooldown_getc_index(int index);\n\tint category_cooldown_getc_count();\n\n\tVector<Variant> scategory_cooldowns_get();\n\tvoid scategory_cooldowns_set(const Vector<Variant> &data);\n\n\t//Known Spells\n\n\tint gets_free_spell_points();\n\tvoid sets_free_spell_points(int value);\n\n\tint getc_free_spell_points();\n\tvoid setc_free_spell_points(int value);\n\n\tvoid spell_learn_requestc(int id);\n\tvoid spell_learns(int id);\n\n\tbool spell_hass(Ref<Spell> spell);\n\tbool spell_hass_id(int id);\n\tvoid spell_adds(Ref<Spell> spell);\n\tvoid spell_adds_id(int id);\n\tvoid spell_removes(Ref<Spell> spell);\n\tRef<Spell> spell_gets(int index);\n\tint spell_gets_count();\n\n\tbool spell_hasc(Ref<Spell> spell);\n\tbool spell_hasc_id(int id);\n\tvoid spell_addc(Ref<Spell> spell);\n\tvoid spell_removec(Ref<Spell> spell);\n\tRef<Spell> spell_getc(int index);\n\tint spell_getc_count();\n\n\tvoid spell_addc_rpc(int id);\n\tvoid spell_removec_rpc(int id);\n\n\tVector<Variant> sspells_get();\n\tvoid sspells_set(const Vector<Variant> &data);\n\n\t//Skills\n\n\tbool skill_hass_id(int id);\n\tbool skill_hass(Ref<EntitySkill> skill);\n\tvoid skill_adds(Ref<EntitySkill> skill);\n\tvoid skill_removes(Ref<EntitySkill> skill);\n\tRef<EntitySkill> skill_gets(int skill);\n\tint skill_gets_count();\n\n\tbool skill_hasc_id(int id);\n\tbool skill_hasc(Ref<EntitySkill> skill);\n\tvoid skill_addc(Ref<EntitySkill> skill);\n\tvoid skill_removec(Ref<EntitySkill> skill);\n\tRef<EntitySkill> skill_getc(int index);\n\tint skill_getc_count();\n\n\tvoid skill_scurrent_changed(Ref<EntitySkill> skill);\n\tvoid skill_smax_changed(Ref<EntitySkill> skill);\n\n\tvoid skill_addc_id(int skill_id, int value, int max_value);\n\tvoid skill_removec_id(int skill_id);\n\tvoid skill_changec(int skill_id, int value);\n\tvoid skill_changec_max(int skill_id, int value);\n\n\tVector<Variant> sskills_get();\n\tvoid sskills_set(const Vector<Variant> &data);\n\n\t////    Target    ////\n\n\tvoid target_crequest_change(NodePath path);\n\tvoid target_net_sets(NodePath path);\n\tvoid target_net_setc(NodePath path);\n\n\tEntity *gets_target();\n\tvoid sets_target(Node *p_target);\n\n\tEntity *getc_target();\n\tvoid setc_target(Node *p_target);\n\n\t////    Class Talents    ////\n\n\tint gets_free_class_talent_points();\n\tvoid sets_free_class_talent_points(int value);\n\n\tint getc_free_class_talent_points();\n\tvoid setc_free_class_talent_points(int value);\n\n\tvoid class_talent_crequest_learn(int spec_index, int class_talent_row, int class_talent_culomn);\n\tvoid class_talent_sreceive_learn_request(int spec_index, int class_talent_row, int class_talent_culomn);\n\tvoid _class_talent_sreceive_learn_request(int spec_index, int class_talent_row, int class_talent_culomn);\n\n\tvoid class_talent_crequest_reset();\n\tvoid class_talent_sreceive_reset_request();\n\tvoid _class_talent_sreceive_reset_request();\n\n\tvoid class_talent_sreset();\n\tvoid class_talent_creset();\n\n\tvoid class_talent_adds(int class_talent);\n\tvoid class_talent_removes(int class_talent);\n\tbool class_talent_hass(int class_talent);\n\tint class_talent_gets(int index);\n\tint class_talent_gets_count();\n\tvoid class_talents_sclear();\n\n\tvoid class_talent_addc(int class_talent);\n\tvoid class_talent_removec(int class_talent);\n\tbool class_talent_hasc(int class_talent);\n\tint class_talent_getc(int index);\n\tint class_talent_getc_count();\n\tvoid class_talent_cclear();\n\n\tPoolIntArray sclass_talents_get();\n\tvoid sclass_talents_set(const PoolIntArray &data);\n\n\t////    Character Talents    ////\n\n\tint gets_free_character_talent_points();\n\tvoid sets_free_character_talent_points(int value);\n\n\tint getc_free_character_talent_points();\n\tvoid setc_free_character_talent_points(int value);\n\n\tvoid character_talent_crequest_learn(int spec_index, int character_talent_row, int character_talent_culomn);\n\tvoid character_talent_sreceive_learn_request(int spec_index, int character_talent_row, int character_talent_culomn);\n\tvoid _character_talent_sreceive_learn_request(int spec_index, int character_talent_row, int character_talent_culomn);\n\n\tvoid character_talent_crequest_reset();\n\tvoid character_talent_sreceive_reset_request();\n\tvoid _character_talent_sreceive_reset_request();\n\n\tvoid character_talent_sreset();\n\tvoid character_talent_creset();\n\n\tvoid character_talent_adds(int character_talent);\n\tvoid character_talent_removes(int character_talent);\n\tbool character_talent_hass(int character_talent);\n\tint character_talent_gets(int index);\n\tint character_talent_gets_count();\n\tvoid character_talents_sclear();\n\n\tvoid character_talent_addc(int character_talent);\n\tvoid character_talent_removec(int character_talent);\n\tbool character_talent_hasc(int character_talent);\n\tint character_talent_getc(int index);\n\tint character_talent_getc_count();\n\tvoid character_talent_cclear();\n\n\tPoolIntArray scharacter_talents_get();\n\tvoid scharacter_talents_set(const PoolIntArray &data);\n\n\t////    Inventory    ////\n\n\tRef<Bag> gets_bag() const;\n\tvoid sets_bag(const Ref<Bag> bag);\n\n\tRef<Bag> getc_bag() const;\n\tvoid setc_bag(const Ref<Bag> bag);\n\n\tRef<Bag> gets_target_bag() const;\n\tvoid sets_target_bag(const Ref<Bag> bag);\n\n\tRef<Bag> getc_target_bag() const;\n\tvoid setc_target_bag(const Ref<Bag> bag);\n\n\tvoid setc_bag_rpc(String data);\n\tvoid setc_target_bag_rpc(String data);\n\n\tvoid loot_crequest(int index);\n\tvoid loots(int index);\n\tvoid lootc(int index);\n\n\tvoid item_addc_rpc(int slot_id, String item_data);\n\tvoid item_addc(int slot_id, Ref<ItemInstance> item);\n\n\t//Bag\n\tvoid item_removes(const int slot_id);\n\tvoid item_removec(const int slot_id);\n\tvoid item_cdeny_remove(const int slot_id);\n\tvoid item_crequest_remove(const int slot_id);\n\n\tvoid items_swaps(int slot_id_1, int slot_id_2);\n\tvoid items_swapc(int slot_id_1, int slot_id_2);\n\tvoid item_cdeny_swap(int slot_id_1, int slot_id_2);\n\tvoid item_crequest_swap(int slot_id_1, int slot_id_2);\n\n\tvoid item_cchange_count(int slot_id, int new_count);\n\n\tvoid notification_item_sadded(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id);\n\tvoid notification_item_sremoved(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id);\n\tvoid notification_items_sswapped(Ref<Bag> bag, int slot_id_1, int slot_id_2);\n\tvoid notification_item_sscount_changed(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id);\n\tvoid notification_soverburdened(Ref<Bag> bag);\n\tvoid notification_soverburden_removed(Ref<Bag> bag);\n\n\t//Target Bag\n\n\tvoid target_item_addc_rpc(int slot_id, String item_data);\n\tvoid target_item_addc(int slot_id, Ref<ItemInstance> item);\n\n\tvoid target_item_removes(const int slot_id);\n\tvoid target_item_removec(const int slot_id);\n\tvoid target_item_cdeny_remove(const int slot_id);\n\tvoid target_remove_crequest_item(const int slot_id);\n\n\tvoid target_items_sswap(int slot_id_1, int slot_id_2);\n\tvoid target_items_cswap(int slot_id_1, int slot_id_2);\n\tvoid target_item_cdeny_swap(int slot_id_1, int slot_id_2);\n\tvoid target_item_crequest_swap(int slot_id_1, int slot_id_2);\n\n\tvoid target_item_cchange_count(int slot_id, int new_count);\n\n\tvoid notification_target_item_sadded(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id);\n\tvoid notification_target_item_sremoved(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id);\n\tvoid notification_target_items_sswapped(Ref<Bag> bag, int slot_id_1, int slot_id_2);\n\tvoid notification_target_item_sscount_changed(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id);\n\n\t//Vendors\n\tvoid vendor_item_buy_crequest(const int index, const int count);\n\tvoid vendor_item_sbuy(const int index, const int count);\n\tvoid vendor_item_sell_crequest(const int slot_id);\n\tvoid vendor_item_ssell(const int slot_id);\n\n\t////    Data    ////\n\n\tvoid data_adds(Ref<EntityDataContainer> data);\n\tvoid data_removes(int index);\n\tRef<EntityDataContainer> data_gets(int index);\n\tint data_gets_count();\n\n\tvoid data_addc(Ref<EntityDataContainer> data);\n\tvoid data_removec(int index);\n\tRef<EntityDataContainer> data_getc(int index);\n\tint data_getc_count();\n\n\tVector<Variant> sdatas_get();\n\tvoid sdatas_set(const Vector<Variant> &data);\n\n\t////    Actionbars    ////\n\n\tbool get_actionbar_locked();\n\tvoid set_actionbar_locked(bool value);\n\n\tRef<ActionBarProfile> get_action_bar_profile();\n\n\tvoid loaded();\n\n\tString random_name();\n\n\tvirtual void _initialize();\n\tvoid setup(Ref<EntityCreateInfo> info);\n\tvirtual void _setup();\n\tvoid setup_actionbars();\n\n\t////    AI    ////\n\n\tbool gets_is_pet();\n\tbool getc_is_pet();\n\n\tEntity *pet_gets_owner();\n\tvoid pet_sets_owner(Entity *entity);\n\tvoid pet_sets_owner_bind(Node *entity);\n\n\tint pet_gets_formation_index();\n\tvoid pet_sets_formation_index(int value);\n\n\tEntityEnums::AIStates pet_gets_ai_state();\n\tvoid pet_sets_ai_state(EntityEnums::AIStates value);\n\n\tEntityEnums::EntityController gets_original_entity_controller();\n\tvoid sets_original_entity_controller(EntityEnums::EntityController value);\n\n\tEntityEnums::EntityController gets_entity_controller();\n\tvoid sets_entity_controller(EntityEnums::EntityController value);\n\n\tEntityEnums::EntityController getc_entity_controller();\n\tvoid setc_entity_controller(EntityEnums::EntityController value);\n\n\tbool getc_is_controlled();\n\n\tRef<EntityAI> gets_ai();\n\tvoid sets_ai(Ref<EntityAI> value);\n\n\t////    Pets    ////\n\n\tvoid pet_adds(Entity *entity);\n\tvoid pet_adds_bind(Node *entity);\n\tEntity *pet_gets(int index);\n\tvoid pet_removes_index(int index);\n\tvoid pet_removes(Entity *entity);\n\tvoid pet_removes_bind(Node *entity);\n\tint pet_gets_count();\n\n\tvoid pet_addc_path(NodePath path);\n\n\tvoid pet_addc(Entity *entity);\n\tvoid pet_addc_bind(Node *entity);\n\tEntity *pet_getc(int index);\n\tvoid pet_removec_index(int index);\n\tvoid pet_removec(Entity *entity);\n\tvoid pet_removec_bind(Node *entity);\n\tint pet_getc_count();\n\n\t//void pets_attack();\n\t//void pets_follow();\n\t//void pets_stop();\n\n\t////    Profiles    ////\n\n\tRef<ClassProfile> get_class_profile();\n\n\t////    Serialization    ////\n\n\tbool is_deserialized();\n\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tvirtual Dictionary _to_dict();\n\tvirtual void _from_dict(const Dictionary &dict);\n\n\t// Networking\n\tEntity *sees_gets(int index);\n\tvoid sees_removes_index(int index);\n\tvoid sees_removes(Entity *entity);\n\tvoid sees_removes_bind(Node *entity);\n\tvoid sees_adds(Entity *entity);\n\tvoid sees_adds_bind(Node *entity);\n\tint sees_gets_count();\n\n\tEntity *seen_by_gets(int index);\n\tvoid seen_by_removes_index(int index);\n\tvoid seen_by_removes(Entity *entity);\n\tvoid seen_by_removes_bind(Node *entity);\n\tvoid seen_by_adds(Entity *entity);\n\tvoid seen_by_adds_bind(Node *entity);\n\tint seen_by_gets_count();\n\n\ttemplate <typename... VarArgs>\n\tError vrpc(const StringName &p_method, VarArgs... p_args);\n\n\tError _vrpc(const StringName &p_method, const Variant **p_arg, int p_argcount);\n#if VERSION_MAJOR < 4\n\tVariant _vrpc_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error);\n#else\n\tVariant _vrpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);\n#endif\n\n\tDictionary data_as_dict(String &data);\n\n\tvoid register_for_physics_process(Ref<SpellCastInfo> info);\n\n\tbool get_maunal_process() const;\n\tvoid set_maunal_process(bool value);\n\n\tvoid update(float delta);\n\n\tEntity();\n\t~Entity();\n\nprotected:\n\tvoid _crafts(int id);\n\tvoid _notification_sxp_gained(int value);\n\tvoid _notification_slevel_up(int level);\n\tvoid _moved();\n\tvoid _con_target_changed(Node *p_entity, Node *p_old_target);\n\tvoid _notification_sdeath();\n\tvoid _spell_learns(int id);\n\tvoid _vendor_item_sbuy(const int index, const int count);\n\tvoid _vendor_item_ssell(const int slot_id);\n\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tvoid _validate_property(PropertyInfo &property) const;\n\tstatic void _bind_methods();\n\tvirtual void _notification(int p_what);\n\nprotected:\n\tstruct Cooldown {\n\t\tint id;\n\t\tStringName path;\n\t\tfloat cooldown;\n\n\t\tCooldown() {\n\t\t\tid = 0;\n\t\t\tcooldown = 0;\n\t\t}\n\t};\n\nprivate:\n\tbool _maunal_process;\n\n\tconst float SAVE_BASE_SECONDS = 10.0;\n\tbool _deserialized;\n\n\t////    Paths    ////\n\n\tNodePath _body_path;\n\tNode *_body;\n\tSpatial *_body_3d;\n\tNode2D *_body_2d;\n\n\tNodePath _character_skeleton_path;\n\tNode *_character_skeleton;\n\n\t////    Transforms    ////\n\n\tTransform3D _transform;\n\tTransform2D _transform_2d;\n\n\t////    PlayerData    ////\n\n\tint _s_guid;\n\tint _c_guid;\n\n\tint _s_class_id;\n\tint _c_class_id;\n\n\tStringName _s_entity_data_path;\n\n\tint _s_entity_player_type;\n\tint _c_entity_player_type;\n\n\tint _s_type;\n\tint _c_type;\n\n\tint _s_model_index;\n\tint _c_model_index;\n\n\tint _s_level;\n\tint _c_level;\n\n\tint _s_xp;\n\tint _c_xp;\n\n\tint _s_money;\n\tint _c_money;\n\n\tRef<EntityData> _s_entity_data;\n\tRef<EntityData> _c_entity_data;\n\n\tint _s_send_flag;\n\n\tString _s_entity_name;\n\tString _c_entity_name;\n\n\tEntityEnums::EntityInteractionType _s_interaction_type;\n\tEntityEnums::EntityInteractionType _c_interaction_type;\n\n\tint _s_is_dead;\n\tint _c_is_dead;\n\n\tint _s_seed;\n\tint _c_seed;\n\n\t////     Stats    ////\n\n\tVector<EntityStat> _stats;\n\n\t////    Equipment    ////\n\n\tVector<Ref<ItemInstance>> _s_equipment;\n\tVector<Ref<ItemInstance>> _c_equipment;\n\n\t////    Resources    ////\n\n\tVector<Ref<EntityResource>> _s_resources;\n\tVector<Ref<EntityResource>> _c_resources;\n\n\t////    GCD    ////\n\n\tfloat _s_gcd;\n\tfloat _c_gcd;\n\n\t////    States    ////\n\n\tint _s_states[EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX];\n\n\tint _s_state;\n\tint _c_state;\n\n\t////    SpellCastData    ////\n\n\tRef<SpellCastInfo> _s_spell_cast_info;\n\tRef<SpellCastInfo> _c_spell_cast_info;\n\n\t//// AuraComponent    ////\n\n\tVector<Ref<AuraData>> _s_auras;\n\tVector<Ref<AuraData>> _c_auras;\n\n\tint _s_entity_type;\n\tint _c_entity_type;\n\n\tint _s_immunity_flags;\n\n\tint _s_entity_flags;\n\tint _c_entity_flags;\n\n\t////    Cooldowns    ////\n\tVector<Cooldown> _s_cooldowns;\n\tVector<Cooldown> _c_cooldowns;\n\n\tVector<Cooldown> _s_category_cooldowns;\n\tVector<Cooldown> _c_category_cooldowns;\n\n\tint _s_active_category_cooldowns;\n\tint _c_active_category_cooldowns;\n\n\t////    Targeting    ////\n\n\tEntity *_s_target;\n\tEntity *_c_target;\n\n\t////    Class Talents    ////\n\n\tint _s_free_class_talent_points;\n\tint _c_free_class_talent_points;\n\n\tVector<int> _s_class_talents;\n\tVector<int> _c_class_talents;\n\n\t////    Character Talents    ////\n\n\tint _s_free_character_talent_points;\n\tint _c_free_character_talent_points;\n\n\tVector<int> _s_character_talents;\n\tVector<int> _c_character_talents;\n\n\t////    Data    ////\n\n\tVector<Ref<EntityDataContainer>> _s_data;\n\tVector<Ref<EntityDataContainer>> _c_data;\n\n\t////    Actionbars    ////\n\n\tbool _actionbar_locked;\n\tRef<ActionBarProfile> _action_bar_profile;\n\n\t////    Crafting System    ////\n\n\tVector<Ref<CraftRecipe>> _s_craft_recipes;\n\tVector<Ref<CraftRecipe>> _c_craft_recipes;\n\n\t////    Known Spells    ////\n\n\tint _s_free_spell_points;\n\tint _c_free_spell_points;\n\n\tVector<Ref<Spell>> _s_spells;\n\tVector<Ref<Spell>> _c_spells;\n\n\t////    Skills    ////\n\n\tVector<Ref<EntitySkill>> _s_skills;\n\tVector<Ref<EntitySkill>> _c_skills;\n\n\t////    Stat Allocations    ////\n\n\t//int _unallocated_stats;\n\t//int _stat_allocations[ESS::get_singleton()->stat_get_count()];\n\n\t////    Inventory    ////\n\n\tRef<Bag> _s_bag;\n\tRef<Bag> _c_bag;\n\n\tRef<Bag> _s_target_bag;\n\tRef<Bag> _c_target_bag;\n\n\t// AI\n\n\tEntityEnums::AIStates _sai_state;\n\tEntityEnums::AIStates _sai_state_stored;\n\n\tEntityEnums::EntityController _s_original_entity_controller;\n\tEntityEnums::EntityController _s_entity_controller;\n\tEntityEnums::EntityController _c_entity_controller;\n\tbool _c_is_controlled;\n\tRef<EntityAI> _s_ai;\n\n\t//Pets\n\n\tEntity *_s_pet_owner;\n\tEntity *_c_pet_owner;\n\n\tint _s_pet_formation_index;\n\n\tEntityEnums::AIStates _s_pet_ai_state;\n\n\tVector<Entity *> _s_pets;\n\tVector<Entity *> _c_pets;\n\n\t// Networking\n\n\tVector<Entity *> _s_sees;\n\tVector<Entity *> _s_seen_by;\n\n\t// Callbacks\n\n\tVector<Ref<SpellCastInfo>> _physics_process_scis;\n};\n\ntemplate <typename... VarArgs>\nError Entity::vrpc(const StringName &p_method, VarArgs... p_args) {\n\tVariant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported.\n\tconst Variant *argptrs[sizeof...(p_args) + 1];\n\tfor (uint32_t i = 0; i < sizeof...(p_args); i++) {\n\t\targptrs[i] = &args[i];\n\t}\n\treturn _vrpc(p_method, sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args));\n}\n\n#endif\n"
  },
  {
    "path": "entities/resources/entity_resource.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_resource.h\"\n\n#include \"core/version.h\"\n\n#include \"../../database/ess_resource_db.h\"\n#include \"../../singletons/ess.h\"\n#include \"../entity.h\"\n\n#include \"../../defines.h\"\n\nint EntityResource::get_id() const {\n\treturn _id;\n}\nvoid EntityResource::set_id(const int value) {\n\t_id = value;\n}\n\nString EntityResource::get_text_name() const {\n\treturn _text_name;\n}\nvoid EntityResource::set_text_name(const String value) {\n\t_text_name = value;\n}\n\nbool EntityResource::get_dirty() const {\n\treturn _dirty;\n}\nvoid EntityResource::set_dirty(const bool value) {\n\t_dirty = value;\n}\n\nbool EntityResource::get_should_process() const {\n\treturn _should_process;\n}\nvoid EntityResource::set_should_process(const bool value) {\n\t_should_process = value;\n}\n\nint EntityResource::get_current_value() const {\n\treturn _current;\n}\nvoid EntityResource::set_current_value(const int value) {\n\t_current = value;\n\n\t_dirty = true;\n\n\temit_changed();\n}\n\nint EntityResource::get_max_value() const {\n\treturn _max;\n}\nvoid EntityResource::set_max_value(const int value) {\n\t_max = value;\n\n\t_dirty = true;\n\n\temit_changed();\n}\n\nEntity *EntityResource::get_owner() {\n\treturn _owner;\n}\nvoid EntityResource::set_owner(Entity *value) {\n\t_owner = value;\n}\nvoid EntityResource::set_owner_bind(Node *owner) {\n\tif (!owner) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(owner);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_owner = e;\n}\n\nvoid EntityResource::ons_added(Entity *owner) {\n\t_owner = owner;\n\n\tif (has_method(\"_ons_added\"))\n\t\tcall(\"_ons_added\", owner);\n}\nvoid EntityResource::onc_added(Entity *owner) {\n\t_owner = owner;\n\n\tif (has_method(\"_onc_added\"))\n\t\tcall(\"_onc_added\", owner);\n}\n\nvoid EntityResource::notification_sstat_changed(const int statid, const float current) {\n\tif (has_method(\"_notification_sstat_changed\"))\n\t\tcall(\"_notification_sstat_changed\", statid, current);\n}\nvoid EntityResource::notification_cstat_changed(const int statid, const float current) {\n\tif (has_method(\"_notification_cstat_changed\"))\n\t\tcall(\"_notification_cstat_changed\", statid, current);\n}\n\nvoid EntityResource::ons_target_changed(Entity *entity, Entity *old_target) {\n\tif (has_method(\"_ons_target_changed\"))\n\t\tcall(\"_ons_target_changed\", entity, old_target);\n}\nvoid EntityResource::onc_target_changed(Entity *entity, Entity *old_target) {\n\tif (has_method(\"_ons_target_changed\"))\n\t\tcall(\"_ons_target_changed\", entity, old_target);\n}\n\nvoid EntityResource::process_server(const float delta) {\n\tcall(\"_process_server\", delta);\n}\nvoid EntityResource::_process_server(const float delta) {\n}\n\nvoid EntityResource::process_client(const float delta) {\n\tcall(\"_process_client\", delta);\n}\nvoid EntityResource::_process_client(const float delta) {\n}\n\nvoid EntityResource::receivec_update(const int current) {\n\t_current = current;\n}\nvoid EntityResource::receivec_update_full(const int current, const int max) {\n\t_current = current;\n\t_max = max;\n\n\temit_changed();\n}\nvoid EntityResource::receivec_update_string(const String str) {\n\tif (has_method(\"_receivec_update_string\"))\n\t\tcall(\"_receivec_update_string\", str);\n}\n\nPoolRealArray EntityResource::get_stacking_mods() {\n\treturn _stacking_mods;\n}\nvoid EntityResource::set_stacking_mods(const PoolRealArray &mods) {\n\t_stacking_mods.resize(0);\n\n\t_stacking_mods.append_array(mods);\n}\n\nvoid EntityResource::add_stacking_mod(const float value) {\n\t_stacking_mods.push_back(value);\n\n\tcall(\"_stacking_mod_added\", value);\n}\nvoid EntityResource::remove_stacking_mod(const float value) {\n\tfor (int i = 0; i < _stacking_mods.size(); ++i) {\n\t\tif (Math::is_equal_approx(_stacking_mods[i], value)) {\n\t\t\t_stacking_mods.remove_at(i);\n\t\t\tcall(\"_stacking_mod_removed\", value);\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nvoid EntityResource::add_non_stacking_mod(const float value) {\n\t_non_stacking_mods.push_back(value);\n\n\tcall(\"_non_stacking_mod_added\", value);\n}\nvoid EntityResource::remove_non_stacking_mod(const float value) {\n\tfor (int i = 0; i < _non_stacking_mods.size(); ++i) {\n\t\tif (Math::is_equal_approx(_non_stacking_mods[i], value)) {\n\t\t\t_non_stacking_mods.remove_at(i);\n\t\t\tcall(\"_non_stacking_mod_removed\", value);\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nfloat EntityResource::get_current_stacking_mod_value() const {\n\treturn _current_stacking_mod_value;\n}\nfloat EntityResource::get_current_positive_non_stacking_mod_value() const {\n\treturn _current_positive_non_stacking_mod_value;\n}\nfloat EntityResource::get_current_negative_non_stacking_mod_value() const {\n\treturn _current_negative_non_stacking_mod_value;\n}\n\nvoid EntityResource::refresh_current_stacking_mod_value() {\n\t_current_stacking_mod_value = 0;\n\n\tfor (int i = 0; i < _non_stacking_mods.size(); ++i) {\n\t}\n}\nvoid EntityResource::refresh_current_non_stacking_mod_values() {\n\t_current_positive_non_stacking_mod_value = 0;\n\t_current_negative_non_stacking_mod_value = 0;\n\n\tfor (int i = 0; i < _non_stacking_mods.size(); ++i) {\n\t\tfloat v = _non_stacking_mods[i];\n\t\tif (v >= 0) {\n\t\t\tif (v > _current_positive_non_stacking_mod_value) {\n\t\t\t\t_current_positive_non_stacking_mod_value = v;\n\t\t\t}\n\t\t} else {\n\t\t\tif (v < _current_negative_non_stacking_mod_value) {\n\t\t\t\t_current_negative_non_stacking_mod_value = v;\n\t\t\t}\n\t\t}\n\t}\n\n\tmods_changed();\n}\n\nvoid EntityResource::mods_changed() {\n\tcall(\"_mods_changed\");\n}\n\nPoolRealArray EntityResource::get_non_stacking_mods() {\n\treturn _non_stacking_mods;\n}\nvoid EntityResource::set_non_stacking_mods(const PoolRealArray &mods) {\n\t_non_stacking_mods.resize(0);\n\n\t_non_stacking_mods.append_array(mods);\n}\n\nDictionary EntityResource::to_dict() {\n\treturn call(\"_to_dict\");\n}\nvoid EntityResource::from_dict(const Dictionary &dict) {\n\tcall(\"_from_dict\", dict);\n}\n\nDictionary EntityResource::_to_dict() {\n\tDictionary dict;\n\n\tdict[\"data_path\"] = ESS::get_singleton()->get_resource_db()->get_entity_resource(_id)->get_path();\n\n\tdict[\"dirty\"] = _dirty;\n\tdict[\"should_process\"] = _should_process;\n\n\t//dict[\"data_id\"] = _data_id;\n\t//dict[\"data_path\"] = _data_path;\n\n\tdict[\"current\"] = _current;\n\n\tdict[\"max\"] = _max;\n\n\tArray sa;\n\tsa.resize(_stacking_mods.size());\n\tfor (int i = 0; i < _stacking_mods.size(); ++i) {\n\t\tsa.set(i, _stacking_mods[i]);\n\t}\n\n\tdict[\"stacking_mods\"] = sa;\n\n\tArray nsa;\n\tnsa.resize(_non_stacking_mods.size());\n\tfor (int i = 0; i < _non_stacking_mods.size(); ++i) {\n\t\tnsa.set(i, _non_stacking_mods[i]);\n\t}\n\n\tdict[\"non_stacking_mods\"] = nsa;\n\n\treturn dict;\n}\nvoid EntityResource::_from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\t_dirty = dict.get(\"dirty\", false);\n\t_should_process = dict.get(\"should_process\", false);\n\n\t//_data_path = dict.get(\"data_path\", \"\");\n\t//_data_id = ESS::get_singleton()->get_resource_db()->entity_data_path_to_id(_data_path);\n\n\t//_data_id = dict.get(\"data_id\", 0);\n\t_current = dict.get(\"current\", 0);\n\t_max = dict.get(\"max\", 0);\n\n\tArray sa = dict.get(\"stacking_mods\", 0);\n\t_stacking_mods.resize(sa.size());\n\tfor (int i = 0; i < sa.size(); ++i) {\n\t\t_stacking_mods.set(i, sa[i]);\n\t}\n\n\tArray nsa = dict.get(\"non_stacking_mods\", 0);\n\t_stacking_mods.resize(nsa.size());\n\tfor (int i = 0; i < nsa.size(); ++i) {\n\t\t_stacking_mods.set(i, nsa[i]);\n\t}\n\n\temit_changed();\n}\n\nEntityResource::EntityResource() {\n\t_id = 0;\n\n\t_server_side = false;\n\t_dirty = false;\n\n\t_owner = NULL;\n\n\t_should_process = has_method(\"_process\");\n\n\t_current = 0;\n\t_max = 0;\n\n\t_current_stacking_mod_value = 0;\n\t_current_positive_non_stacking_mod_value = 0;\n\t_current_negative_non_stacking_mod_value = 0;\n}\n\nEntityResource::~EntityResource() {\n\t_owner = NULL;\n}\n\nvoid EntityResource::_stacking_mod_added(const float value) {\n\t_current_stacking_mod_value += value;\n\n\tmods_changed();\n}\nvoid EntityResource::_stacking_mod_removed(const float value) {\n\t_current_stacking_mod_value -= value;\n\n\tmods_changed();\n}\n\nvoid EntityResource::_non_stacking_mod_added(const float value) {\n\tif (value >= 0) {\n\t\tif (value > _current_positive_non_stacking_mod_value) {\n\t\t\t_current_positive_non_stacking_mod_value = value;\n\t\t\tmods_changed();\n\t\t}\n\t} else {\n\t\tif (value < _current_negative_non_stacking_mod_value) {\n\t\t\t_current_negative_non_stacking_mod_value = value;\n\t\t\tmods_changed();\n\t\t}\n\t}\n}\nvoid EntityResource::_non_stacking_mod_removed(const float value) {\n\tif (value >= 0) {\n\t\tif (Math::is_equal_approx(value, _current_positive_non_stacking_mod_value)) {\n\t\t\trefresh_current_non_stacking_mod_values();\n\t\t}\n\t} else {\n\t\tif (Math::is_equal_approx(value, _current_negative_non_stacking_mod_value)) {\n\t\t\trefresh_current_non_stacking_mod_values();\n\t\t}\n\t}\n}\n\nvoid EntityResource::_mods_changed() {\n\tfloat m = 100.0 + _current_stacking_mod_value + _current_positive_non_stacking_mod_value + _current_negative_non_stacking_mod_value;\n\tm /= 100.0;\n\tm = static_cast<float>(_max) * m;\n\n\tset_current_value(static_cast<int>(m));\n}\n\nvoid EntityResource::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &EntityResource::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &EntityResource::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_text_name\"), &EntityResource::get_text_name);\n\tClassDB::bind_method(D_METHOD(\"set_text_name\", \"value\"), &EntityResource::set_text_name);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_text_name\", \"get_text_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_dirty\"), &EntityResource::get_dirty);\n\tClassDB::bind_method(D_METHOD(\"set_dirty\", \"value\"), &EntityResource::set_dirty);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"dirty\", PROPERTY_HINT_NONE, \"\", 0), \"set_dirty\", \"get_dirty\");\n\n\tClassDB::bind_method(D_METHOD(\"get_should_process\"), &EntityResource::get_should_process);\n\tClassDB::bind_method(D_METHOD(\"set_should_process\", \"value\"), &EntityResource::set_should_process);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"should_process\", PROPERTY_HINT_NONE, \"\", 0), \"set_should_process\", \"get_should_process\");\n\n\tClassDB::bind_method(D_METHOD(\"get_current_value\"), &EntityResource::get_current_value);\n\tClassDB::bind_method(D_METHOD(\"set_current_value\", \"value\"), &EntityResource::set_current_value);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"current_value\"), \"set_current_value\", \"get_current_value\");\n\n\tClassDB::bind_method(D_METHOD(\"get_max_value\"), &EntityResource::get_max_value);\n\tClassDB::bind_method(D_METHOD(\"set_max_value\", \"value\"), &EntityResource::set_max_value);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_value\"), \"set_max_value\", \"get_max_value\");\n\n\tClassDB::bind_method(D_METHOD(\"get_owner\"), &EntityResource::get_owner);\n\tClassDB::bind_method(D_METHOD(\"set_owner\", \"value\"), &EntityResource::set_owner_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"owner\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", 0), \"set_owner\", \"get_owner\");\n\n\tClassDB::bind_method(D_METHOD(\"get_stacking_mods\"), &EntityResource::get_stacking_mods);\n\tClassDB::bind_method(D_METHOD(\"set_stacking_mods\", \"value\"), &EntityResource::set_stacking_mods);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, \"stacking_mods\"), \"set_stacking_mods\", \"get_stacking_mods\");\n\n\tClassDB::bind_method(D_METHOD(\"add_stacking_mod\", \"value\"), &EntityResource::add_stacking_mod);\n\tClassDB::bind_method(D_METHOD(\"remove_stacking_mod\", \"value\"), &EntityResource::remove_stacking_mod);\n\n\tClassDB::bind_method(D_METHOD(\"get_non_stacking_mods\"), &EntityResource::get_non_stacking_mods);\n\tClassDB::bind_method(D_METHOD(\"set_non_stacking_mods\", \"value\"), &EntityResource::set_non_stacking_mods);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_REAL_ARRAY, \"non_stacking_mods\"), \"set_non_stacking_mods\", \"get_non_stacking_mods\");\n\n\tClassDB::bind_method(D_METHOD(\"add_non_stacking_mod\", \"value\"), &EntityResource::add_non_stacking_mod);\n\tClassDB::bind_method(D_METHOD(\"remove_non_stacking_mod\", \"value\"), &EntityResource::remove_non_stacking_mod);\n\n\tClassDB::bind_method(D_METHOD(\"get_current_stacking_mod_value\"), &EntityResource::get_current_stacking_mod_value);\n\tClassDB::bind_method(D_METHOD(\"get_current_positive_non_stacking_mod_value\"), &EntityResource::get_current_positive_non_stacking_mod_value);\n\tClassDB::bind_method(D_METHOD(\"get_current_negative_non_stacking_mod_value\"), &EntityResource::get_current_negative_non_stacking_mod_value);\n\n\tClassDB::bind_method(D_METHOD(\"refresh_current_stacking_mod_value\"), &EntityResource::refresh_current_stacking_mod_value);\n\tClassDB::bind_method(D_METHOD(\"refresh_current_non_stacking_mod_values\"), &EntityResource::refresh_current_non_stacking_mod_values);\n\n\tClassDB::bind_method(D_METHOD(\"mods_changed\"), &EntityResource::mods_changed);\n\n\t//GDVIRTUAL_BIND(\"_notification_sstat_changed\", \"statid\", \"curent\");\n\t//GDVIRTUAL_BIND(\"_notification_cstat_changed\", \"statid\", \"curent\");\n\n\t//GDVIRTUAL_BIND(\"_ons_target_changed\", \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", \"old_target\", \"Entity\");\n\t//GDVIRTUAL_BIND(\"_onc_target_changed\", \"entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", \"old_target\", \"Entity\");\n\n\t//GDVIRTUAL_BIND(\"_ons_added\", \"entity\", \"Entity\");\n\t//GDVIRTUAL_BIND(\"_onc_added\", \"entity\", \"Entity\");\n\n\t//GDVIRTUAL_BIND(\"_process_server\", \"delta\");\n\t//GDVIRTUAL_BIND(\"_process_client\", \"delta\");\n\n\t//GDVIRTUAL_BIND(\"_stacking_mod_added\", \"value\");\n\t//GDVIRTUAL_BIND(\"_stacking_mod_removed\", \"value\");\n\n\t//GDVIRTUAL_BIND(\"_non_stacking_mod_added\", \"value\");\n\t//GDVIRTUAL_BIND(\"_non_stacking_mod_removed\", \"value\");\n\n\t//GDVIRTUAL_BIND(\"_mods_changed\");\n\n\tClassDB::bind_method(D_METHOD(\"process_server\", \"delta\"), &EntityResource::process_server);\n\tClassDB::bind_method(D_METHOD(\"_process_server\", \"delta\"), &EntityResource::_process_server);\n\n\tClassDB::bind_method(D_METHOD(\"process_client\", \"delta\"), &EntityResource::process_client);\n\tClassDB::bind_method(D_METHOD(\"_process_client\", \"delta\"), &EntityResource::_process_client);\n\n\t//GDVIRTUAL_BIND(\"_gets_update_string\");\n\t//GDVIRTUAL_BIND(\"_receivec_update_string\", \"str\");\n\n\t//Serialization\n\t//GDVIRTUAL_BIND(\"_from_dict\", \"dict\");\n\t//GDVIRTUAL_BIND(\"_to_dict\");\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &EntityResource::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &EntityResource::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_from_dict\", \"dict\"), &EntityResource::_from_dict);\n\tClassDB::bind_method(D_METHOD(\"_to_dict\"), &EntityResource::_to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_stacking_mod_added\", \"value\"), &EntityResource::_stacking_mod_added);\n\tClassDB::bind_method(D_METHOD(\"_stacking_mod_removed\", \"value\"), &EntityResource::_stacking_mod_removed);\n\n\tClassDB::bind_method(D_METHOD(\"_non_stacking_mod_added\", \"value\"), &EntityResource::_non_stacking_mod_added);\n\tClassDB::bind_method(D_METHOD(\"_non_stacking_mod_removed\", \"value\"), &EntityResource::_non_stacking_mod_removed);\n\n\tClassDB::bind_method(D_METHOD(\"_mods_changed\"), &EntityResource::_mods_changed);\n}\n"
  },
  {
    "path": "entities/resources/entity_resource.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_RESOURCE_H\n#define ENTITY_RESOURCE_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"../../defines.h\"\n\nclass Entity;\n\nclass EntityResource : public Resource {\n\tGDCLASS(EntityResource, Resource);\n\npublic:\n\tint get_id() const;\n\tvoid set_id(const int value);\n\n\tString get_text_name() const;\n\tvoid set_text_name(const String value);\n\n\tbool get_dirty() const;\n\tvoid set_dirty(const bool value);\n\n\tbool get_should_process() const;\n\tvoid set_should_process(const bool value);\n\n\tint get_current_value() const;\n\tvoid set_current_value(const int value);\n\n\tint get_max_value() const;\n\tvoid set_max_value(const int value);\n\n\tEntity *get_owner();\n\tvoid set_owner(Entity *entity);\n\tvoid set_owner_bind(Node *owner);\n\n\tvoid ons_added(Entity *owner);\n\tvoid onc_added(Entity *owner);\n\n\tvoid notification_sstat_changed(const int statid, const float current);\n\tvoid notification_cstat_changed(const int statid, const float current);\n\n\tvoid ons_target_changed(Entity *entity, Entity *old_target);\n\tvoid onc_target_changed(Entity *entity, Entity *old_target);\n\n\tvoid process_server(const float delta);\n\tvoid _process_server(const float delta);\n\n\tvoid process_client(const float delta);\n\tvoid _process_client(const float delta);\n\n\tvoid receivec_update(const int current);\n\tvoid receivec_update_full(const int current, const int max);\n\tvoid receivec_update_string(const String str);\n\n\tPoolRealArray get_stacking_mods();\n\tvoid set_stacking_mods(const PoolRealArray &mods);\n\n\tvoid add_stacking_mod(const float value);\n\tvoid remove_stacking_mod(const float value);\n\n\tPoolRealArray get_non_stacking_mods();\n\tvoid set_non_stacking_mods(const PoolRealArray &mods);\n\n\tvoid add_non_stacking_mod(const float value);\n\tvoid remove_non_stacking_mod(const float value);\n\n\tfloat get_current_stacking_mod_value() const;\n\tfloat get_current_positive_non_stacking_mod_value() const;\n\tfloat get_current_negative_non_stacking_mod_value() const;\n\n\tvoid refresh_current_stacking_mod_value();\n\tvoid refresh_current_non_stacking_mod_values();\n\n\tvoid mods_changed();\n\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tDictionary _to_dict();\n\tvoid _from_dict(const Dictionary &dict);\n\n\tEntityResource();\n\t~EntityResource();\n\nprotected:\n\tvoid _stacking_mod_added(const float value);\n\tvoid _stacking_mod_removed(const float value);\n\n\tvoid _non_stacking_mod_added(const float value);\n\tvoid _non_stacking_mod_removed(const float value);\n\n\tvoid _mods_changed();\n\n\tstatic void _bind_methods();\n\nprivate:\n\tint _id;\n\tString _text_name;\n\n\tbool _server_side;\n\n\tEntity *_owner;\n\tbool _dirty;\n\tbool _should_process;\n\n\tint _current;\n\tint _max;\n\n\tfloat _current_stacking_mod_value;\n\tfloat _current_positive_non_stacking_mod_value;\n\tfloat _current_negative_non_stacking_mod_value;\n\n\tPoolRealArray _stacking_mods;\n\tPoolRealArray _non_stacking_mods;\n};\n\n#endif\n"
  },
  {
    "path": "entities/resources/entity_resource_cost_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_resource_cost_data.h\"\n\nint EntityResourceCostData::get_cost() {\n\treturn _cost;\n}\nvoid EntityResourceCostData::set_cost(int value) {\n\t_cost = value;\n}\n\nEntityResourceCostData::EntityResourceCostData() {\n\t_cost = 0;\n}\n\nvoid EntityResourceCostData::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_cost\"), &EntityResourceCostData::get_cost);\n\tClassDB::bind_method(D_METHOD(\"set_cost\", \"value\"), &EntityResourceCostData::set_cost);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"cost\"), \"set_cost\", \"get_cost\");\n}\n"
  },
  {
    "path": "entities/resources/entity_resource_cost_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_RESOURCE_COST_DATA_H\n#define ENTITY_RESOURCE_COST_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"entity_resource.h\"\n#include \"entity_resource_cost_data.h\"\n\nclass EntityResourceCostData : public Resource {\n\tGDCLASS(EntityResourceCostData, Resource);\n\npublic:\n\tint get_cost();\n\tvoid set_cost(int value);\n\n\tEntityResourceCostData();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _cost;\n};\n\n#endif\n"
  },
  {
    "path": "entities/resources/entity_resource_cost_data_health.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_resource_cost_data_health.h\"\n\nEntityResourceCostDataHealth::EntityResourceCostDataHealth() {\n}\n\nvoid EntityResourceCostDataHealth::_bind_methods() {\n}\n"
  },
  {
    "path": "entities/resources/entity_resource_cost_data_health.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_RESOURCE_COST_DATA_HEALTH_H\n#define ENTITY_RESOURCE_COST_DATA_HEALTH_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"entity_resource.h\"\n#include \"entity_resource_cost_data.h\"\n\nclass EntityResourceCostDataHealth : public EntityResourceCostData {\n\tGDCLASS(EntityResourceCostDataHealth, EntityResourceCostData);\n\npublic:\n\tEntityResourceCostDataHealth();\n\nprotected:\n\tstatic void _bind_methods();\n};\n\n#endif\n"
  },
  {
    "path": "entities/resources/entity_resource_cost_data_resource.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_resource_cost_data_resource.h\"\n\nRef<EntityResource> EntityResourceCostDataResource::get_entity_resource_data() {\n\treturn _entity_resource_data;\n}\nvoid EntityResourceCostDataResource::set_entity_resource_data(Ref<EntityResource> data) {\n\t_entity_resource_data = data;\n}\n\nEntityResourceCostDataResource::EntityResourceCostDataResource() {\n}\n\nvoid EntityResourceCostDataResource::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_entity_resource_data\"), &EntityResourceCostDataResource::get_entity_resource_data);\n\tClassDB::bind_method(D_METHOD(\"set_entity_resource_data\", \"value\"), &EntityResourceCostDataResource::set_entity_resource_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"entity_resource_data\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityResource\"), \"set_entity_resource_data\", \"get_entity_resource_data\");\n}\n"
  },
  {
    "path": "entities/resources/entity_resource_cost_data_resource.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_RESOURCE_COST_DATA_RESOURCE_H\n#define ENTITY_RESOURCE_COST_DATA_RESOURCE_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"entity_resource.h\"\n#include \"entity_resource_cost_data.h\"\n\nclass EntityResourceCostDataResource : public EntityResourceCostData {\n\tGDCLASS(EntityResourceCostDataResource, EntityResourceCostData);\n\npublic:\n\tRef<EntityResource> get_entity_resource_data();\n\tvoid set_entity_resource_data(Ref<EntityResource> data);\n\n\tEntityResourceCostDataResource();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tRef<EntityResource> _entity_resource_data;\n};\n\n#endif\n"
  },
  {
    "path": "entities/resources/entity_resource_health.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_resource_health.h\"\n\n#include \"../../database/ess_resource_db.h\"\n#include \"../../singletons/ess.h\"\n#include \"../entity.h\"\n#include \"entity_resource.h\"\n\nvoid EntityResourceHealth::_init() {\n\tset_current_value(100);\n\tstamina_stat_id = 0;\n\thealth_stat_id = 0;\n\n\tif (ESS::get_singleton()->stat_is_property(\"Stamina\")) {\n\t\tstamina_stat_id = ESS::get_singleton()->stat_get_id(\"Stamina\");\n\t}\n\n\tif (ESS::get_singleton()->stat_is_property(\"Health\")) {\n\t\thealth_stat_id = ESS::get_singleton()->stat_get_id(\"Health\");\n\t}\n}\nvoid EntityResourceHealth::_ons_added(Node *entity) {\n\trefresh();\n}\nvoid EntityResourceHealth::_notification_sstat_changed(int statid, float current) {\n\tif (statid == stamina_stat_id || statid == health_stat_id)\n\t\trefresh();\n}\nvoid EntityResourceHealth::refresh() {\n\tERR_FAIL_COND(get_owner() == NULL);\n\n\tfloat stamina = get_owner()->stat_gets_current(stamina_stat_id);\n\tfloat health = get_owner()->stat_gets_current(health_stat_id);\n\n\tint val = int(stamina) * 10 + int(health);\n\n\tset_max_value(val);\n\tset_current_value(val);\n}\n\nvoid EntityResourceHealth::resolve_references() {\n}\n\nEntityResourceHealth::EntityResourceHealth() {\n\tstamina_stat_id = 0;\n\thealth_stat_id = 0;\n}\n\nEntityResourceHealth::~EntityResourceHealth() {\n}\n\nvoid EntityResourceHealth::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"_init\"), &EntityResourceHealth::_init);\n\tClassDB::bind_method(D_METHOD(\"_ons_added\", \"entity\"), &EntityResourceHealth::_ons_added);\n\tClassDB::bind_method(D_METHOD(\"_notification_sstat_changed\", \"statid\", \"current\"), &EntityResourceHealth::_notification_sstat_changed);\n\tClassDB::bind_method(D_METHOD(\"refresh\"), &EntityResourceHealth::refresh);\n}\n"
  },
  {
    "path": "entities/resources/entity_resource_health.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_RESOURCE_HEALTH_H\n#define ENTITY_RESOURCE_HEALTH_H\n\n#include \"entity_resource.h\"\n\nclass Entity;\n\nclass EntityResourceHealth : public EntityResource {\n\tGDCLASS(EntityResourceHealth, EntityResource);\n\npublic:\n\tvoid _init();\n\tvoid _ons_added(Node *entity);\n\tvoid _notification_sstat_changed(int statid, float current);\n\tvoid refresh();\n\n\tvoid resolve_references();\n\n\tEntityResourceHealth();\n\t~EntityResourceHealth();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint stamina_stat_id;\n\tint health_stat_id;\n};\n\n#endif\n"
  },
  {
    "path": "entities/resources/entity_resource_speed.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_resource_speed.h\"\n\n#include \"../../database/ess_resource_db.h\"\n#include \"../../singletons/ess.h\"\n#include \"../entity.h\"\n#include \"entity_resource.h\"\n\nvoid EntityResourceSpeed::_init() {\n\tset_current_value(base_value);\n\n\tspeed_stat_id = 0;\n\n\tif (ESS::get_singleton()->stat_is_property(\"Speed\"))\n\t\tspeed_stat_id = ESS::get_singleton()->stat_get_id(\"Speed\");\n}\nvoid EntityResourceSpeed::_ons_added(Node *entity) {\n\trefresh();\n}\nvoid EntityResourceSpeed::_notification_sstat_changed(int statid, float current) {\n\tif (statid == speed_stat_id)\n\t\trefresh();\n}\nvoid EntityResourceSpeed::refresh() {\n\tERR_FAIL_COND(get_owner() == NULL);\n\n\tfloat speed_stat = get_owner()->stat_gets_current(speed_stat_id);\n\n\tset_max_value(base_value + speed_stat * 0.01);\n\tset_current_value(base_value + speed_stat * 0.01);\n}\n\nvoid EntityResourceSpeed::resolve_references() {\n}\n\nEntityResourceSpeed::EntityResourceSpeed() {\n\tspeed_stat_id = 0;\n\tbase_value = 100;\n}\n\nEntityResourceSpeed::~EntityResourceSpeed() {\n}\n\nvoid EntityResourceSpeed::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"_init\"), &EntityResourceSpeed::_init);\n\tClassDB::bind_method(D_METHOD(\"_ons_added\", \"entity\"), &EntityResourceSpeed::_ons_added);\n\tClassDB::bind_method(D_METHOD(\"_notification_sstat_changed\", \"statid\", \"current\"), &EntityResourceSpeed::_notification_sstat_changed);\n\tClassDB::bind_method(D_METHOD(\"refresh\"), &EntityResourceSpeed::refresh);\n}\n"
  },
  {
    "path": "entities/resources/entity_resource_speed.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_RESOURCE_SPEED_H\n#define ENTITY_RESOURCE_SPEED_H\n\n#include \"entity_resource.h\"\n\nclass Entity;\n\nclass EntityResourceSpeed : public EntityResource {\n\tGDCLASS(EntityResourceSpeed, EntityResource);\n\npublic:\n\tvoid _init();\n\tvoid _ons_added(Node *entity);\n\tvoid _notification_sstat_changed(int statid, float current);\n\tvoid refresh();\n\n\tvoid resolve_references();\n\n\tEntityResourceSpeed();\n\t~EntityResourceSpeed();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint speed_stat_id;\n\tint base_value;\n};\n\n#endif\n"
  },
  {
    "path": "entities/skills/entity_skill.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_skill.h\"\n\n#include \"core/version.h\"\n\n#include \"../../database/ess_resource_db.h\"\n#include \"../../singletons/ess.h\"\n\nRef<EntitySkillData> EntitySkill::get_skill() {\n\treturn _skill;\n}\nvoid EntitySkill::set_skill(Ref<EntitySkillData> value) {\n\t_skill = value;\n\n\tif (_skill.is_valid()) {\n\t\t_skill_id = _skill->get_id();\n\t\t_skill_path = _skill->get_path();\n\t} else {\n\t\t_skill_id = 0;\n\t\t_skill_path = \"\";\n\t}\n\n\temit_signal(\"skill_changed\", Ref<EntitySkill>(this));\n}\n\nint EntitySkill::get_skill_id() {\n\treturn _skill_id;\n}\nvoid EntitySkill::set_skill_id(int value) {\n\t_skill_id = value;\n\n\tif (ESS::get_singleton() != NULL) {\n\t\t_skill = ESS::get_singleton()->get_resource_db()->get_entity_skill(_skill_id);\n\t}\n\n\temit_signal(\"skill_changed\", Ref<EntitySkill>(this));\n}\n\nint EntitySkill::get_current() {\n\treturn _current;\n}\nvoid EntitySkill::set_current(int value) {\n\t_current = value;\n\n\temit_signal(\"current_changed\", Ref<EntitySkill>(this));\n}\n\nint EntitySkill::get_max() {\n\treturn _max;\n}\nvoid EntitySkill::set_max(int value) {\n\t_max = value;\n\n\temit_signal(\"max_changed\", Ref<EntitySkill>(this));\n}\n\nbool EntitySkill::get_disabled() {\n\treturn _disabled;\n}\nvoid EntitySkill::set_disabled(bool value) {\n\t_disabled = value;\n\n\temit_signal(\"skill_changed\", Ref<EntitySkill>(this));\n}\n\nDictionary EntitySkill::to_dict() {\n\treturn call(\"_to_dict\");\n}\nvoid EntitySkill::from_dict(const Dictionary &dict) {\n\tcall(\"_from_dict\", dict);\n}\n\nDictionary EntitySkill::_to_dict() {\n\tDictionary dict;\n\n\tdict[\"skill_id\"] = _skill_id;\n\tdict[\"skill_path\"] = _skill_path;\n\tdict[\"current\"] = _current;\n\tdict[\"max\"] = _max;\n\tdict[\"disabled\"] = _disabled;\n\n\treturn dict;\n}\nvoid EntitySkill::_from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\t_skill_id = dict.get(\"skill_id\", 0);\n\t_skill_path = dict.get(\"skill_path\", \"\");\n\t_current = dict.get(\"current\", 0);\n\t_max = dict.get(\"max\", 0);\n\t_disabled = dict.get(\"disabled\", true);\n}\n\nEntitySkill::EntitySkill() {\n\t_skill_id = 0;\n\t_current = 0;\n\t_max = 0;\n\t_disabled = false;\n}\n\nEntitySkill::~EntitySkill() {\n\t_skill.unref();\n}\n\nvoid EntitySkill::_bind_methods() {\n\tADD_SIGNAL(MethodInfo(\"skill_changed\", PropertyInfo(Variant::OBJECT, \"skill\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySkill\")));\n\tADD_SIGNAL(MethodInfo(\"current_changed\", PropertyInfo(Variant::OBJECT, \"skill\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySkill\")));\n\tADD_SIGNAL(MethodInfo(\"max_changed\", PropertyInfo(Variant::OBJECT, \"skill\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySkill\")));\n\n\tClassDB::bind_method(D_METHOD(\"get_skill\"), &EntitySkill::get_skill);\n\tClassDB::bind_method(D_METHOD(\"set_skill\", \"value\"), &EntitySkill::set_skill);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"skill\", PROPERTY_HINT_RESOURCE_TYPE, \"EntitySkillData\"), \"set_skill\", \"get_skill\");\n\n\tClassDB::bind_method(D_METHOD(\"get_skill_id\"), &EntitySkill::get_skill_id);\n\tClassDB::bind_method(D_METHOD(\"set_skill_id\", \"value\"), &EntitySkill::set_skill_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"skill_id\"), \"set_skill_id\", \"get_skill_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_current\"), &EntitySkill::get_current);\n\tClassDB::bind_method(D_METHOD(\"set_current\", \"value\"), &EntitySkill::set_current);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"current\"), \"set_current\", \"get_current\");\n\n\tClassDB::bind_method(D_METHOD(\"get_max\"), &EntitySkill::get_max);\n\tClassDB::bind_method(D_METHOD(\"set_max\", \"value\"), &EntitySkill::set_max);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max\"), \"set_max\", \"get_max\");\n\n\tClassDB::bind_method(D_METHOD(\"get_disabled\"), &EntitySkill::get_disabled);\n\tClassDB::bind_method(D_METHOD(\"set_disabled\", \"value\"), &EntitySkill::set_disabled);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"disabled\"), \"set_disabled\", \"get_disabled\");\n\n\t//Serialization\n\t//GDVIRTUAL_BIND(\"_from_dict\", \"dict\");\n\t//GDVIRTUAL_BIND(\"_to_dict\");\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &EntitySkill::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &EntitySkill::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_from_dict\", \"dict\"), &EntitySkill::_from_dict);\n\tClassDB::bind_method(D_METHOD(\"_to_dict\"), &EntitySkill::_to_dict);\n}\n"
  },
  {
    "path": "entities/skills/entity_skill.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_SKILL_H\n#define ENTITY_SKILL_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"entity_skill_data.h\"\n\nclass EntitySkill : public Resource {\n\tGDCLASS(EntitySkill, Resource);\n\npublic:\n\tRef<EntitySkillData> get_skill();\n\tvoid set_skill(Ref<EntitySkillData> value);\n\n\tint get_skill_id();\n\tvoid set_skill_id(int value);\n\n\tint get_current();\n\tvoid set_current(int value);\n\n\tint get_max();\n\tvoid set_max(int value);\n\n\tbool get_disabled();\n\tvoid set_disabled(bool value);\n\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tDictionary _to_dict();\n\tvoid _from_dict(const Dictionary &dict);\n\n\tEntitySkill();\n\t~EntitySkill();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tRef<EntitySkillData> _skill;\n\tint _skill_id;\n\tStringName _skill_path;\n\tint _current;\n\tint _max;\n\tbool _disabled;\n};\n\n#endif\n"
  },
  {
    "path": "entities/skills/entity_skill_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_skill_data.h\"\n\nint EntitySkillData::get_id() const {\n\treturn _id;\n}\nvoid EntitySkillData::set_id(const int value) {\n\t_id = value;\n}\n\nint EntitySkillData::get_default_value() const {\n\treturn _default_value;\n}\nvoid EntitySkillData::set_default_value(const int value) {\n\t_default_value = value;\n}\n\nint EntitySkillData::get_max_value() const {\n\treturn _max_value;\n}\nvoid EntitySkillData::set_max_value(const int value) {\n\t_max_value = value;\n}\n\nString EntitySkillData::get_text_description() const {\n\treturn _text_description;\n}\nvoid EntitySkillData::set_text_description(const String value) {\n\t_text_description = value;\n}\n\nEntitySkillData::EntitySkillData() {\n\t_id = 0;\n\t_default_value = 0;\n\t_max_value = 0;\n}\n\nEntitySkillData::~EntitySkillData() {\n}\n\nvoid EntitySkillData::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &EntitySkillData::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &EntitySkillData::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_default_value\"), &EntitySkillData::get_default_value);\n\tClassDB::bind_method(D_METHOD(\"set_default_value\", \"value\"), &EntitySkillData::set_default_value);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"default_value\"), \"set_default_value\", \"get_default_value\");\n\n\tClassDB::bind_method(D_METHOD(\"get_max_value\"), &EntitySkillData::get_max_value);\n\tClassDB::bind_method(D_METHOD(\"set_max_value\", \"value\"), &EntitySkillData::set_max_value);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_value\"), \"set_max_value\", \"get_max_value\");\n\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_name\"), \"set_name\", \"get_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_text_description\"), &EntitySkillData::get_text_description);\n\tClassDB::bind_method(D_METHOD(\"set_text_description\", \"value\"), &EntitySkillData::set_text_description);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"text_description\", PROPERTY_HINT_MULTILINE_TEXT), \"set_text_description\", \"get_text_description\");\n}\n"
  },
  {
    "path": "entities/skills/entity_skill_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_SKILL_DATA_H\n#define ENTITY_SKILL_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/string/ustring.h\"\n\n\nclass EntitySkillData : public Resource {\n\tGDCLASS(EntitySkillData, Resource);\n\npublic:\n\tint get_id() const;\n\tvoid set_id(const int value);\n\n\tint get_default_value() const;\n\tvoid set_default_value(const int value);\n\n\tint get_max_value() const;\n\tvoid set_max_value(const int value);\n\n\tString get_text_description() const;\n\tvoid set_text_description(const String value);\n\n\tEntitySkillData();\n\t~EntitySkillData();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _id;\n\tint _default_value;\n\tint _max_value;\n\tString _text_description;\n};\n\n#endif\n"
  },
  {
    "path": "entities/stats/complex_level_stat_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"complex_level_stat_data.h\"\n\n#include \"../../singletons/ess.h\"\n\nint ComplexLevelStatData::get_stat_for_level(int main_stat, int level) {\n\tERR_FAIL_INDEX_V(level, ESS::get_singleton()->get_max_character_level(), 0);\n\tERR_FAIL_INDEX_V(main_stat, ESS::get_singleton()->stat_get_main_stat_count(), 0);\n\n\treturn _stat_per_level[level][main_stat];\n}\nvoid ComplexLevelStatData::set_stat_for_level(int main_stat, int level, int value) {\n\tERR_FAIL_INDEX(level, ESS::get_singleton()->get_max_character_level());\n\tERR_FAIL_INDEX(main_stat, ESS::get_singleton()->stat_get_main_stat_count());\n\n\t_stat_per_level.write[level].set(main_stat, value);\n}\n\nint ComplexLevelStatData::_get_stat_diff(int main_stat, int old_level, int new_level) {\n\tint s = 0;\n\n\tfor (int i = old_level; i < new_level; ++i) {\n\t\ts += get_stat_for_level(main_stat, i);\n\t}\n\n\treturn s;\n}\n\nComplexLevelStatData::ComplexLevelStatData() {\n\t_stat_per_level.resize(ESS::get_singleton()->get_max_character_level());\n\n\tint msc = ESS::get_singleton()->stat_get_main_stat_count();\n\n\tfor (int i = 0; i < ESS::get_singleton()->get_max_character_level(); ++i) {\n\t\t_stat_per_level.write[i].resize(msc);\n\n\t\tfor (int j = 0; j < msc; ++j) {\n\t\t\t_stat_per_level.write[i].set(j, 0);\n\t\t}\n\t}\n}\n\nComplexLevelStatData::~ComplexLevelStatData() {\n\tfor (int i = 0; i < ESS::get_singleton()->get_max_character_level(); ++i) {\n\t\t_stat_per_level.write[i].clear();\n\t}\n}\n\nbool ComplexLevelStatData::_set(const StringName &p_name, const Variant &p_value) {\n\tString prop_name = p_name;\n\n\tif (prop_name.begins_with(\"level_\")) {\n\t\tString level_prop = prop_name.get_slice(\"/\", 0);\n\t\tint level = level_prop.get_slice(\"_\", 1).to_int();\n\n\t\tif (level >= ESS::get_singleton()->get_max_character_level())\n\t\t\treturn false;\n\n\t\tString prop = prop_name.get_slice(\"/\", 1);\n\n\t\tif (ESS::get_singleton()->stat_is_property(prop)) {\n\t\t\tint stat_id = ESS::get_singleton()->stat_get_property_id(prop);\n\n\t\t\tif (stat_id >= ESS::get_singleton()->stat_get_main_stat_count()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t_stat_per_level.write[level].set(stat_id, p_value);\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn false;\n}\n\nbool ComplexLevelStatData::_get(const StringName &p_name, Variant &r_ret) const {\n\tString prop_name = p_name;\n\n\tif (prop_name.begins_with(\"level_\")) {\n\t\tString level_prop = prop_name.get_slice(\"/\", 0);\n\t\tint level = level_prop.get_slice(\"_\", 1).to_int();\n\n\t\tif (level >= ESS::get_singleton()->get_max_character_level())\n\t\t\treturn false;\n\n\t\tString prop = prop_name.get_slice(\"/\", 1);\n\n\t\tif (ESS::get_singleton()->stat_is_property(prop)) {\n\t\t\tint stat_id = ESS::get_singleton()->stat_get_property_id(prop);\n\n\t\t\tif (stat_id >= ESS::get_singleton()->stat_get_main_stat_count()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tr_ret = _stat_per_level[level].get(stat_id);\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn false;\n}\n\nvoid ComplexLevelStatData::_get_property_list(List<PropertyInfo> *p_list) const {\n\t//int property_usange = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL;\n\tint property_usange = PROPERTY_USAGE_DEFAULT;\n\n\tint msc = ESS::get_singleton()->stat_get_main_stat_count();\n\n\tfor (int i = 0; i < ESS::get_singleton()->get_max_character_level(); ++i) {\n\t\tfor (int j = 0; j < msc; ++j) {\n\t\t\tp_list->push_back(PropertyInfo(Variant::INT, \"level_\" + String::num(i + 1) + \"/\" + ESS::get_singleton()->stat_get_property_name(j), PROPERTY_HINT_NONE, \"\", property_usange));\n\t\t}\n\t}\n}\n\nvoid ComplexLevelStatData::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"_get_stat_diff\", \"stat\", \"old_level\", \"new_level\"), &ComplexLevelStatData::_get_stat_diff);\n\n\tClassDB::bind_method(D_METHOD(\"get_stat_for_level\", \"main_stat\", \"level\"), &ComplexLevelStatData::get_stat_for_level);\n\tClassDB::bind_method(D_METHOD(\"set_stat_for_level\", \"main_stat\", \"level\", \"value\"), &ComplexLevelStatData::set_stat_for_level);\n}\n"
  },
  {
    "path": "entities/stats/complex_level_stat_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef COMPLEX_LEVEL_STAT_DATA_H\n#define COMPLEX_LEVEL_STAT_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"../../entity_enums.h\"\n#include \"level_stat_data.h\"\n\nclass ComplexLevelStatData : public LevelStatData {\n\tGDCLASS(ComplexLevelStatData, LevelStatData);\n\npublic:\n\tint get_stat_for_level(int main_stat, int level);\n\tvoid set_stat_for_level(int main_stat, int level, int value);\n\n\tint _get_stat_diff(int stat, int old_level, int new_level);\n\n\tComplexLevelStatData();\n\t~ComplexLevelStatData();\n\nprotected:\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tstatic void _bind_methods();\n\nprivate:\n\tVector<Vector<int> > _stat_per_level;\n};\n\n#endif\n"
  },
  {
    "path": "entities/stats/level_stat_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"level_stat_data.h\"\n\nint LevelStatData::get_stat_diff(int main_stat, int old_level, int new_level) {\n\tif (has_method(\"_get_stat_diff\"))\n\t\treturn call(\"_get_stat_diff\", main_stat, old_level, new_level);\n\n\treturn 0;\n}\n\nvoid LevelStatData::_bind_methods() {\n\n\t//GDVIRTUAL_BIND(\"_get_stat_diff\", \"main_stat\", \"old_level\", \"new_level\");\n\n\tClassDB::bind_method(D_METHOD(\"get_stat_diff\", \"stat\", \"old_level\", \"new_level\"), &LevelStatData::get_stat_diff);\n}\n"
  },
  {
    "path": "entities/stats/level_stat_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef LEVEL_STAT_DATA_H\n#define LEVEL_STAT_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\nclass LevelStatData : public Resource {\n\tGDCLASS(LevelStatData, Resource);\n\npublic:\n\tint get_stat_diff(int stat, int old_level, int new_level);\n\nprotected:\n\tstatic void _bind_methods();\n};\n\n#endif\n"
  },
  {
    "path": "entities/stats/simple_level_stat_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"simple_level_stat_data.h\"\n\n#include \"../../singletons/ess.h\"\n\nint SimpleLevelStatData::get_stat_per_level(int main_stat) {\n\tERR_FAIL_INDEX_V(main_stat, ESS::get_singleton()->stat_get_main_stat_count(), 0);\n\n\treturn _stat_per_level[main_stat];\n}\nvoid SimpleLevelStatData::set_stat_per_level(int main_stat, int value) {\n\tERR_FAIL_INDEX(main_stat, ESS::get_singleton()->stat_get_main_stat_count());\n\n\t_stat_per_level.set(main_stat, value);\n}\n\nint SimpleLevelStatData::_get_stat_diff(int main_stat, int old_level, int new_level) {\n\tERR_FAIL_INDEX_V(main_stat, ESS::get_singleton()->stat_get_main_stat_count(), 0);\n\n\tint s = _stat_per_level[main_stat];\n\n\ts *= new_level - old_level;\n\n\treturn s;\n}\n\nSimpleLevelStatData::SimpleLevelStatData() {\n\t_stat_per_level.resize(ESS::get_singleton()->stat_get_main_stat_count());\n\n\tfor (int i = 0; i < _stat_per_level.size(); ++i) {\n\t\t_stat_per_level.set(i, 0);\n\t}\n}\n\nSimpleLevelStatData::~SimpleLevelStatData() {\n\t_stat_per_level.clear();\n}\n\nbool SimpleLevelStatData::_set(const StringName &p_name, const Variant &p_value) {\n\tif (ESS::get_singleton()->stat_is_property(p_name)) {\n\t\tint stat_id = ESS::get_singleton()->stat_get_property_id(p_name);\n\n\t\tif (stat_id >= ESS::get_singleton()->stat_get_main_stat_count()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t_stat_per_level.set(stat_id, p_value);\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nbool SimpleLevelStatData::_get(const StringName &p_name, Variant &r_ret) const {\n\tif (ESS::get_singleton()->stat_is_property(p_name)) {\n\t\tint stat_id = ESS::get_singleton()->stat_get_property_id(p_name);\n\n\t\tif (stat_id >= ESS::get_singleton()->stat_get_main_stat_count()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tr_ret = _stat_per_level[stat_id];\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nvoid SimpleLevelStatData::_get_property_list(List<PropertyInfo> *p_list) const {\n\t//int property_usange = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL;\n\tint property_usange = PROPERTY_USAGE_DEFAULT;\n\n\tfor (int i = 0; i < ESS::get_singleton()->stat_get_main_stat_count(); ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::INT, ESS::get_singleton()->stat_get_property_name(i), PROPERTY_HINT_NONE, \"\", property_usange));\n\t}\n}\n\nvoid SimpleLevelStatData::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_stat_per_level\"), &SimpleLevelStatData::get_stat_per_level);\n\tClassDB::bind_method(D_METHOD(\"set_stat_per_level\", \"value\"), &SimpleLevelStatData::set_stat_per_level);\n\n\tClassDB::bind_method(D_METHOD(\"_get_stat_diff\", \"stat\", \"old_level\", \"new_level\"), &SimpleLevelStatData::_get_stat_diff);\n}\n"
  },
  {
    "path": "entities/stats/simple_level_stat_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SIMPLE_LEVEL_STAT_DATA_H\n#define SIMPLE_LEVEL_STAT_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"level_stat_data.h\"\n\nclass SimpleLevelStatData : public LevelStatData {\n\tGDCLASS(SimpleLevelStatData, LevelStatData);\n\npublic:\n\tint get_stat_per_level(int main_stat);\n\tvoid set_stat_per_level(int main_stat, int value);\n\n\tint _get_stat_diff(int stat, int old_level, int new_level);\n\n\tSimpleLevelStatData();\n\t~SimpleLevelStatData();\n\nprotected:\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tstatic void _bind_methods();\n\nprivate:\n\tVector<int> _stat_per_level;\n};\n\n#endif\n"
  },
  {
    "path": "entities/stats/stat_data.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"stat_data.h\"\n\n#include \"../../singletons/ess.h\"\n\nfloat StatData::get_base(int index) {\n\tERR_FAIL_INDEX_V(index, _entries.size(), 0);\n\n\treturn _entries[index];\n}\n\nvoid StatData::set_base(int index, float entry) {\n\tERR_FAIL_INDEX(index, _entries.size());\n\n\t_entries.set(index, entry);\n}\n\nRef<LevelStatData> StatData::get_level_stat_data() {\n\treturn _level_stat_data;\n}\n\nvoid StatData::set_level_stat_data(Ref<LevelStatData> value) {\n\t_level_stat_data = value;\n}\n\nbool StatData::has_mod_stats() {\n\treturn _mod_stat_count > 0;\n}\n\nint StatData::get_mod_stat_count() {\n\treturn _mod_stat_count;\n}\nvoid StatData::set_mod_stat_count(int value) {\n\t_mod_stat_count = value;\n}\n\nint StatData::get_target_stat_id(int index) {\n\tERR_FAIL_INDEX_V(index, MAX_MOD_STATS, 0);\n\n\treturn _mod_stats[index].target_stat_id;\n}\nvoid StatData::set_target_stat_id(int index, int value) {\n\tERR_FAIL_INDEX(index, MAX_MOD_STATS);\n\n\t_mod_stats[index].target_stat_id = value;\n}\n\nint StatData::get_mod_stat_id(int index) {\n\tERR_FAIL_INDEX_V(index, MAX_MOD_STATS, 0);\n\n\treturn _mod_stats[index].stat_id;\n}\nvoid StatData::set_mod_stat_id(int index, int value) {\n\tERR_FAIL_INDEX(index, MAX_MOD_STATS);\n\n\t_mod_stats[index].stat_id = value;\n}\n\nfloat StatData::get_mod_stat_multiplier(int index) {\n\tERR_FAIL_INDEX_V(index, MAX_MOD_STATS, 1);\n\n\treturn _mod_stats[index].multiplier;\n}\nvoid StatData::set_mod_stat_multiplier(int index, float value) {\n\tERR_FAIL_INDEX(index, 1);\n\n\t_mod_stats[index].multiplier = value;\n}\n\nStatData::StatData() {\n\t//TODO remove? let properties handle this?\n\t_entries.resize(ESS::get_singleton()->stat_get_count());\n\n\tfor (int i = 0; i < _entries.size(); ++i) {\n\t\t_entries.set(i, 0);\n\t}\n\n\t_mod_stat_count = 0;\n\n\tfor (int i = 0; i < MAX_MOD_STATS; ++i) {\n\t\t_mod_stats[i].stat_id = 0;\n\t\t_mod_stats[i].multiplier = 0;\n\t}\n}\n\nStatData::~StatData() {\n\t_entries.clear();\n\n\t_level_stat_data.unref();\n}\n\nbool StatData::_set(const StringName &p_name, const Variant &p_value) {\n\tString name = p_name;\n\n\tif (name.get_slicec('/', 0) == \"stat\") {\n\t\tStringName prop = name.get_slicec('/', 1);\n\n\t\tif (ESS::get_singleton()->stat_is_property(prop)) {\n\t\t\tint stat_id = ESS::get_singleton()->stat_get_property_id(prop);\n\n\t\t\tif (_entries.size() < stat_id) {\n\t\t\t\t_entries.resize(stat_id + 1);\n\t\t\t}\n\n\t\t\t_entries.set(stat_id, p_value);\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nbool StatData::_get(const StringName &p_name, Variant &r_ret) const {\n\tString name = p_name;\n\n\tif (name.get_slicec('/', 0) == \"stat\") {\n\t\tStringName prop = name.get_slicec('/', 1);\n\n\t\tif (ESS::get_singleton()->stat_is_property(prop)) {\n\t\t\tint stat_id = ESS::get_singleton()->stat_get_property_id(prop);\n\n\t\t\tif (_entries.size() < stat_id) {\n\t\t\t\tr_ret = 0;\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tr_ret = _entries[stat_id];\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nvoid StatData::_get_property_list(List<PropertyInfo> *p_list) const {\n\t//int property_usange = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL;\n\tint property_usange = PROPERTY_USAGE_DEFAULT;\n\n\tfor (int i = 0; i < ESS::get_singleton()->stat_get_count(); ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::REAL, \"stat/\" + ESS::get_singleton()->stat_get_property_name(i), PROPERTY_HINT_NONE, \"\", property_usange));\n\t}\n}\n\nvoid StatData::_validate_property(PropertyInfo &property) const {\n\tString prop = property.name;\n\tif (prop.begins_with(\"ModStat_\")) {\n\t\tint frame = prop.get_slicec('/', 0).get_slicec('_', 1).to_int();\n\t\tif (frame >= _mod_stat_count) {\n\t\t\tproperty.usage = 0;\n\t\t}\n\t}\n\n\tif (prop.ends_with(\"stat_id\")) {\n\t\tproperty.hint_string = ESS::get_singleton()->stat_get_string();\n\t} else if (prop.ends_with(\"target_stat_id\")) {\n\t\tproperty.hint_string = ESS::get_singleton()->stat_get_string();\n\t}\n}\n\nvoid StatData::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_base\", \"index\"), &StatData::get_base);\n\tClassDB::bind_method(D_METHOD(\"set_base\", \"index\", \"entry\"), &StatData::set_base);\n\n\tClassDB::bind_method(D_METHOD(\"get_level_stat_data\"), &StatData::get_level_stat_data);\n\tClassDB::bind_method(D_METHOD(\"set_level_stat_data\", \"value\"), &StatData::set_level_stat_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"level_stat_data\", PROPERTY_HINT_RESOURCE_TYPE, \"LevelStatData\"), \"set_level_stat_data\", \"get_level_stat_data\");\n\n\tClassDB::bind_method(D_METHOD(\"has_mod_stats\"), &StatData::has_mod_stats);\n\n\tClassDB::bind_method(D_METHOD(\"get_mod_stat_count\"), &StatData::get_mod_stat_count);\n\tClassDB::bind_method(D_METHOD(\"set_mod_stat_count\", \"value\"), &StatData::set_mod_stat_count);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"mod_stat_count\", PROPERTY_HINT_RANGE, \"0,\" + itos(MAX_MOD_STATS), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_mod_stat_count\", \"get_mod_stat_count\");\n\n\tClassDB::bind_method(D_METHOD(\"get_target_stat_id\", \"index\"), &StatData::get_target_stat_id);\n\tClassDB::bind_method(D_METHOD(\"set_target_stat_id\", \"index\", \"value\"), &StatData::set_target_stat_id);\n\n\tClassDB::bind_method(D_METHOD(\"get_mod_stat_id\", \"index\"), &StatData::get_mod_stat_id);\n\tClassDB::bind_method(D_METHOD(\"set_mod_stat_id\", \"index\", \"value\"), &StatData::set_mod_stat_id);\n\n\tClassDB::bind_method(D_METHOD(\"get_mod_stat_multiplier\", \"index\"), &StatData::get_mod_stat_multiplier);\n\tClassDB::bind_method(D_METHOD(\"set_mod_stat_multiplier\", \"index\", \"value\"), &StatData::set_mod_stat_multiplier);\n\n\tfor (int i = 0; i < MAX_MOD_STATS; i++) {\n\t\tADD_PROPERTYI(PropertyInfo(Variant::INT, \"ModStat_\" + itos(i) + \"/target_stat_id\", PROPERTY_HINT_ENUM, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"set_target_stat_id\", \"get_target_stat_id\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::INT, \"ModStat_\" + itos(i) + \"/stat_id\", PROPERTY_HINT_ENUM, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"set_mod_stat_id\", \"get_mod_stat_id\", i);\n\t\tADD_PROPERTYI(PropertyInfo(Variant::REAL, \"ModStat_\" + itos(i) + \"/multiplier\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), \"set_mod_stat_multiplier\", \"get_mod_stat_multiplier\", i);\n\t}\n}\n"
  },
  {
    "path": "entities/stats/stat_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef STAT_DATA_H\n#define STAT_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"scene/resources/curve.h\"\n\n#include \"level_stat_data.h\"\n\nclass StatData : public Resource {\n\tGDCLASS(StatData, Resource);\n\npublic:\n\tstruct ModStat {\n\t\tint target_stat_id;\n\t\tint stat_id;\n\t\tfloat multiplier;\n\t};\n\n\tenum {\n\t\tMAX_MOD_STATS = 8,\n\t};\n\npublic:\n\tfloat get_base(int index);\n\tvoid set_base(int index, float entry);\n\n\tRef<LevelStatData> get_level_stat_data();\n\tvoid set_level_stat_data(Ref<LevelStatData> value);\n\n\tbool has_mod_stats();\n\n\tint get_mod_stat_count();\n\tvoid set_mod_stat_count(int value);\n\n\tint get_target_stat_id(int index);\n\tvoid set_target_stat_id(int index, int value);\n\n\tint get_mod_stat_id(int index);\n\tvoid set_mod_stat_id(int index, int value);\n\n\tfloat get_mod_stat_multiplier(int index);\n\tvoid set_mod_stat_multiplier(int index, float value);\n\n\tStatData();\n\t~StatData();\n\nprotected:\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tvoid _validate_property(PropertyInfo &property) const;\n\tstatic void _bind_methods();\n\nprivate:\n\tVector<float> _entries;\n\n\tRef<LevelStatData> _level_stat_data;\n\n\tint _mod_stat_count;\n\tModStat _mod_stats[MAX_MOD_STATS];\n};\n\n#endif\n"
  },
  {
    "path": "entity_enums.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_enums.h\"\n\nconst String EntityEnums::BINDING_STRING_ENTITY_PLAYER_TYPES = \"None,Player,Networked,AI,Display\";\nconst String EntityEnums::BINDING_STRING_ENTITY_CONTOLLER = \"None,Player,AI\";\nconst String EntityEnums::BINDING_STRING_ENTITY_FLAGS = \"Untargetable,Hidden,Interactable,Hostile\";\nconst String EntityEnums::BINDING_STRING_ENTITY_STATE_TYPES = \"None,Stun,Root,Frozen,Silenced,Disoriented,Feared,Burning,Cold,Cursed,Pacified\";\nconst String EntityEnums::BINDING_STRING_COMMON_CHARCATER_SKELETON_POINTS = \"Root,Pelvis,Spine,Spine 1,Spine 2,Neck,Head,Torso,Right Hip,Left Hip,Back,Left Hand,Right Hand,Weapon Left,Weapon Right,Weapon Left Back,Weapon Right Back,Weapon Left Shield,Weapon Right Shield\";\nconst String EntityEnums::BINDING_STRING_AI_STATES = \"Off,Rest,Patrol,Follow Path,Regenerate,Attack,Pet Follow,Pet Stop,Pet Attack\";\nconst String EntityEnums::BINDING_STRING_ENTITY_IMMUNITY_FLAGS = \"Stun,Root,Freeze,Silence,Disorient,Fear,Burning,Cold,Pacify,Magic,Poison,Physical,Curse,Bleed,Melee,Holy,Shadow,Nature,Fire,Frost,Lightning,Chaos,Slow,Crit,AOE,Damage,Fall Damage,Projectile,Debuff,Attacks\";\nconst String EntityEnums::BINDING_STRING_ENTITY_RELATION_TYPE = \"Neutral,Friendly,Hostile\";\nconst String EntityEnums::BINDING_STRING_ENTITY_INTERACTION_TYPE = \"Normal,Speak,Loot,Use,Train,Vendor,None\";\nconst String EntityEnums::BINDING_STRING_ENTITY_PLAYSTYLE_TYPE = \"Melee,Spell,Hybrid,None\";\nconst String EntityEnums::BINDING_STRING_ENTITY_WINDOWS = \"Loot,Container,Vendor,Trainer\";\nconst String EntityEnums::BINDING_STRING_ENTITY_ENTITY_RESOURCE_INDICES = \"Health,Speed,Resources Begin\";\n\nvoid EntityEnums::_bind_methods() {\n\tBIND_ENUM_CONSTANT(ENTITY_PLAYER_TYPE_NONE);\n\tBIND_ENUM_CONSTANT(ENTITY_PLAYER_TYPE_PLAYER);\n\tBIND_ENUM_CONSTANT(ENTITY_PLAYER_TYPE_NETWORKED);\n\tBIND_ENUM_CONSTANT(ENTITY_PLAYER_TYPE_AI);\n\tBIND_ENUM_CONSTANT(ENTITY_PLAYER_TYPE_DISPLAY);\n\n\tBIND_ENUM_CONSTANT(ENITIY_CONTROLLER_NONE);\n\tBIND_ENUM_CONSTANT(ENITIY_CONTROLLER_PLAYER);\n\tBIND_ENUM_CONSTANT(ENITIY_CONTROLLER_AI);\n\n\tBIND_ENUM_CONSTANT(ENITIY_FLAGS_NONE);\n\tBIND_ENUM_CONSTANT(ENTITY_FLAGS_UNTARGETALBE);\n\tBIND_ENUM_CONSTANT(ENTITY_FLAGS_HIDDEN);\n\tBIND_ENUM_CONSTANT(ENTITY_FLAGS_INTERACTABLE);\n\tBIND_ENUM_CONSTANT(ENTITY_FLAGS_HOSTILE);\n\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_NONE);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_STUN);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_ROOT);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_FROZEN);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_SILENCED);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_DISORIENTED);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_FEARED);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_BURNING);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_COLD);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_CURSED);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_FLAG_PACIFIED);\n\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_NONE);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_STUN);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_ROOT);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_FROZEN);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_SILENCED);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_DISORIENTED);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_FEARED);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_BURNING);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_COLD);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_CURSED);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_PACIFIED);\n\tBIND_ENUM_CONSTANT(ENTITY_STATE_TYPE_INDEX_MAX);\n\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_ROOT);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_PELVIS);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_SPINE);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_SPINE_1);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_SPINE_2);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_NECK);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_HEAD);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_TORSO);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_RIGHT_HIP);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_LEFT_HIP);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_BACK);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_LEFT_HAND);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_RIGHT_HAND);\n\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_WEAPON_LEFT);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_WEAPON_RIGHT);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_WEAPON_LEFT_BACK);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_WEAPON_RIGHT_BACK);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_WEAPON_LEFT_SHIELD);\n\tBIND_ENUM_CONSTANT(COMMON_SKELETON_POINT_WEAPON_RIGHT_SHIELD);\n\n\tBIND_CONSTANT(COMMON_SKELETON_POINTS_MAX);\n\n\tBIND_ENUM_CONSTANT(AI_STATE_OFF);\n\tBIND_ENUM_CONSTANT(AI_STATE_REST);\n\tBIND_ENUM_CONSTANT(AI_STATE_PATROL);\n\tBIND_ENUM_CONSTANT(AI_STATE_FOLLOW_PATH);\n\tBIND_ENUM_CONSTANT(AI_STATE_REGENERATE);\n\tBIND_ENUM_CONSTANT(AI_STATE_ATTACK);\n\tBIND_ENUM_CONSTANT(AI_STATE_PET_FOLLOW);\n\tBIND_ENUM_CONSTANT(AI_STATE_PET_STOP);\n\tBIND_ENUM_CONSTANT(AI_STATE_PET_ATTACK);\n\tBIND_CONSTANT(AI_STATE_MAX);\n\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_NONE);\n\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_STUN);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_ROOT);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_FREEZE);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_SILENCE);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_DISORIENT);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_FEAR);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_BURNING);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_COLD);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_PACIFY);\n\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_MAGIC);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_POISON);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_PHYSICAL);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_CURSE);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_BLEED);\n\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_MELEE);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_HOLY);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_SHADOW);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_NATURE);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_FIRE);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_FROST);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_LIGHTNING);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_CHAOS);\n\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_SLOW);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_CRIT);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_AOE);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_DAMAGE);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_FALL_DAMAGE);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_PROJECTILE);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_DEBUFF);\n\tBIND_ENUM_CONSTANT(ENTITY_IMMUNITY_FLAG_ATTACKS);\n\n\tBIND_ENUM_CONSTANT(ENTITY_RELATION_TYPE_NEUTRAL);\n\tBIND_ENUM_CONSTANT(ENTITY_RELATION_TYPE_FRIENDLY);\n\tBIND_ENUM_CONSTANT(ENTITY_RELATION_TYPE_HOSTILE);\n\n\tBIND_ENUM_CONSTANT(ENITIY_INTERACTION_TYPE_NORMAL);\n\tBIND_ENUM_CONSTANT(ENITIY_INTERACTION_TYPE_SPEAK);\n\tBIND_ENUM_CONSTANT(ENITIY_INTERACTION_TYPE_LOOT);\n\tBIND_ENUM_CONSTANT(ENITIY_INTERACTION_TYPE_TRAIN);\n\tBIND_ENUM_CONSTANT(ENITIY_INTERACTION_TYPE_VENDOR);\n\tBIND_ENUM_CONSTANT(ENITIY_INTERACTION_TYPE_USE);\n\tBIND_ENUM_CONSTANT(ENITIY_INTERACTION_TYPE_NONE);\n\n\tBIND_ENUM_CONSTANT(ENTITY_CLASS_PLAYSTYLE_TYPE_MELEE);\n\tBIND_ENUM_CONSTANT(ENTITY_CLASS_PLAYSTYLE_TYPE_SPELL);\n\tBIND_ENUM_CONSTANT(ENTITY_CLASS_PLAYSTYLE_TYPE_HYBRID);\n\tBIND_ENUM_CONSTANT(ENTITY_CLASS_PLAYSTYLE_TYPE_NONE);\n\n\tBIND_ENUM_CONSTANT(ENTITY_WINDOW_LOOT);\n\tBIND_ENUM_CONSTANT(ENTITY_WINDOW_CONTAINER);\n\tBIND_ENUM_CONSTANT(ENTITY_WINDOW_VENDOR);\n\tBIND_ENUM_CONSTANT(ENTITY_WINDOW_TRAINER);\n\n\tBIND_ENUM_CONSTANT(ENTITY_RESOURCE_INDEX_HEALTH);\n\tBIND_ENUM_CONSTANT(ENTITY_RESOURCE_INDEX_SPEED);\n\tBIND_ENUM_CONSTANT(ENTITY_RESOURCE_INDEX_RESOURCES_BEGIN);\n\n\tBIND_CONSTANT(BASE_XP);\n\tBIND_CONSTANT(ENTITY_INTERACT_RANGE);\n\tBIND_CONSTANT(ENTITY_INTERACT_RANGE_SQUARED);\n}\n"
  },
  {
    "path": "entity_enums.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_ENUMS_H\n#define ENTITY_ENUMS_H\n\n#include \"core/version.h\"\n#include \"core/object/object.h\"\n#include \"core/string/ustring.h\"\n#include \"core/object/class_db.h\"\n\n\nclass EntityEnums : public Object {\n\tGDCLASS(EntityEnums, Object);\n\npublic:\n\tstatic const String BINDING_STRING_ENTITY_PLAYER_TYPES;\n\tstatic const String BINDING_STRING_ENTITY_CONTOLLER;\n\tstatic const String BINDING_STRING_ENTITY_FLAGS;\n\tstatic const String BINDING_STRING_ENTITY_STATE_TYPES;\n\tstatic const String BINDING_STRING_COMMON_CHARCATER_SKELETON_POINTS;\n\tstatic const String BINDING_STRING_AI_STATES;\n\tstatic const String BINDING_STRING_PET_STATES;\n\tstatic const String BINDING_STRING_ENTITY_IMMUNITY_FLAGS;\n\tstatic const String BINDING_STRING_ENTITY_RELATION_TYPE;\n\tstatic const String BINDING_STRING_ENTITY_INTERACTION_TYPE;\n\tstatic const String BINDING_STRING_ENTITY_PLAYSTYLE_TYPE;\n\tstatic const String BINDING_STRING_ENTITY_WINDOWS;\n\tstatic const String BINDING_STRING_ENTITY_ENTITY_RESOURCE_INDICES;\n\n\tenum EntityPlayerType {\n\t\tENTITY_PLAYER_TYPE_NONE,\n\t\tENTITY_PLAYER_TYPE_PLAYER,\n\t\tENTITY_PLAYER_TYPE_NETWORKED,\n\t\tENTITY_PLAYER_TYPE_AI,\n\t\tENTITY_PLAYER_TYPE_DISPLAY,\n\t};\n\n\tenum EntityController {\n\t\tENITIY_CONTROLLER_NONE,\n\t\tENITIY_CONTROLLER_PLAYER,\n\t\tENITIY_CONTROLLER_AI\n\t};\n\n\tenum EntityFlags {\n\t\tENITIY_FLAGS_NONE = 0,\n\n\t\tENTITY_FLAGS_UNTARGETALBE = 1 << 0,\n\t\tENTITY_FLAGS_HIDDEN = 1 << 1,\n\t\tENTITY_FLAGS_INTERACTABLE = 1 << 2,\n\t\tENTITY_FLAGS_HOSTILE = 1 << 3,\n\t};\n\n\tenum EntityStateTypeFlags {\n\t\tENTITY_STATE_TYPE_FLAG_NONE = 0,\n\t\tENTITY_STATE_TYPE_FLAG_STUN = 1 << 0,\n\t\tENTITY_STATE_TYPE_FLAG_ROOT = 1 << 1,\n\t\tENTITY_STATE_TYPE_FLAG_FROZEN = 1 << 2,\n\t\tENTITY_STATE_TYPE_FLAG_SILENCED = 1 << 3,\n\t\tENTITY_STATE_TYPE_FLAG_DISORIENTED = 1 << 4,\n\t\tENTITY_STATE_TYPE_FLAG_FEARED = 1 << 5,\n\t\tENTITY_STATE_TYPE_FLAG_BURNING = 1 << 6,\n\t\tENTITY_STATE_TYPE_FLAG_COLD = 1 << 7,\n\t\tENTITY_STATE_TYPE_FLAG_CURSED = 1 << 8,\n\t\tENTITY_STATE_TYPE_FLAG_PACIFIED = 1 << 9,\n\t};\n\n\tenum EntityStateTypeIndexes {\n\t\tENTITY_STATE_TYPE_INDEX_NONE = 0,\n\t\tENTITY_STATE_TYPE_INDEX_STUN = 1,\n\t\tENTITY_STATE_TYPE_INDEX_ROOT = 2,\n\t\tENTITY_STATE_TYPE_INDEX_FROZEN = 3,\n\t\tENTITY_STATE_TYPE_INDEX_SILENCED = 4,\n\t\tENTITY_STATE_TYPE_INDEX_DISORIENTED = 5,\n\t\tENTITY_STATE_TYPE_INDEX_FEARED = 6,\n\t\tENTITY_STATE_TYPE_INDEX_BURNING = 7,\n\t\tENTITY_STATE_TYPE_INDEX_COLD = 8,\n\t\tENTITY_STATE_TYPE_INDEX_CURSED = 9,\n\t\tENTITY_STATE_TYPE_INDEX_PACIFIED = 10,\n\n\t\tENTITY_STATE_TYPE_INDEX_MAX = 11,\n\t};\n\n\tstatic EntityStateTypeFlags get_state_flag_for_index(int index) {\n\t\tswitch (index) {\n\t\t\tcase ENTITY_STATE_TYPE_INDEX_STUN:\n\t\t\t\treturn ENTITY_STATE_TYPE_FLAG_STUN;\n\t\t\tcase ENTITY_STATE_TYPE_INDEX_ROOT:\n\t\t\t\treturn ENTITY_STATE_TYPE_FLAG_ROOT;\n\t\t\tcase ENTITY_STATE_TYPE_INDEX_FROZEN:\n\t\t\t\treturn ENTITY_STATE_TYPE_FLAG_FROZEN;\n\t\t\tcase ENTITY_STATE_TYPE_INDEX_SILENCED:\n\t\t\t\treturn ENTITY_STATE_TYPE_FLAG_SILENCED;\n\t\t\tcase ENTITY_STATE_TYPE_INDEX_DISORIENTED:\n\t\t\t\treturn ENTITY_STATE_TYPE_FLAG_DISORIENTED;\n\t\t\tcase ENTITY_STATE_TYPE_INDEX_FEARED:\n\t\t\t\treturn ENTITY_STATE_TYPE_FLAG_FEARED;\n\t\t\tcase ENTITY_STATE_TYPE_INDEX_BURNING:\n\t\t\t\treturn ENTITY_STATE_TYPE_FLAG_BURNING;\n\t\t\tcase ENTITY_STATE_TYPE_INDEX_COLD:\n\t\t\t\treturn ENTITY_STATE_TYPE_FLAG_COLD;\n\t\t\tcase ENTITY_STATE_TYPE_INDEX_CURSED:\n\t\t\t\treturn ENTITY_STATE_TYPE_FLAG_CURSED;\n\t\t\tcase ENTITY_STATE_TYPE_INDEX_PACIFIED:\n\t\t\t\treturn ENTITY_STATE_TYPE_FLAG_PACIFIED;\n\t\t}\n\n\t\treturn ENTITY_STATE_TYPE_FLAG_NONE;\n\t}\n\n\tenum EntityImmunityFlags {\n\t\tENTITY_IMMUNITY_FLAG_NONE = 0,\n\n\t\tENTITY_IMMUNITY_FLAG_STUN = 1 << 0,\n\t\tENTITY_IMMUNITY_FLAG_ROOT = 1 << 1,\n\t\tENTITY_IMMUNITY_FLAG_FREEZE = 1 << 2,\n\t\tENTITY_IMMUNITY_FLAG_SILENCE = 1 << 3,\n\t\tENTITY_IMMUNITY_FLAG_DISORIENT = 1 << 4,\n\t\tENTITY_IMMUNITY_FLAG_FEAR = 1 << 5,\n\t\tENTITY_IMMUNITY_FLAG_BURNING = 1 << 6,\n\t\tENTITY_IMMUNITY_FLAG_COLD = 1 << 7,\n\t\tENTITY_IMMUNITY_FLAG_PACIFY = 1 << 8,\n\n\t\tENTITY_IMMUNITY_FLAG_MAGIC = 1 << 9,\n\t\tENTITY_IMMUNITY_FLAG_POISON = 1 << 10,\n\t\tENTITY_IMMUNITY_FLAG_PHYSICAL = 1 << 11,\n\t\tENTITY_IMMUNITY_FLAG_CURSE = 1 << 12,\n\t\tENTITY_IMMUNITY_FLAG_BLEED = 1 << 13,\n\n\t\tENTITY_IMMUNITY_FLAG_MELEE = 1 << 14,\n\t\tENTITY_IMMUNITY_FLAG_HOLY = 1 << 15,\n\t\tENTITY_IMMUNITY_FLAG_SHADOW = 1 << 16,\n\t\tENTITY_IMMUNITY_FLAG_NATURE = 1 << 17,\n\t\tENTITY_IMMUNITY_FLAG_FIRE = 1 << 18,\n\t\tENTITY_IMMUNITY_FLAG_FROST = 1 << 19,\n\t\tENTITY_IMMUNITY_FLAG_LIGHTNING = 1 << 20,\n\t\tENTITY_IMMUNITY_FLAG_CHAOS = 1 << 21,\n\n\t\tENTITY_IMMUNITY_FLAG_SLOW = 1 << 22,\n\t\tENTITY_IMMUNITY_FLAG_CRIT = 1 << 23,\n\t\tENTITY_IMMUNITY_FLAG_AOE = 1 << 24,\n\t\tENTITY_IMMUNITY_FLAG_DAMAGE = 1 << 25,\n\t\tENTITY_IMMUNITY_FLAG_FALL_DAMAGE = 1 << 26,\n\t\tENTITY_IMMUNITY_FLAG_PROJECTILE = 1 << 27,\n\t\tENTITY_IMMUNITY_FLAG_DEBUFF = 1 << 28,\n\t\tENTITY_IMMUNITY_FLAG_ATTACKS = 1 << 29,\n\t\tENTITY_IMMUNITY_FLAG_DISPELL = 1 << 30,\n\t};\n\n\tenum CommonCharacterSkeletonPoints {\n\t\tCOMMON_SKELETON_POINT_ROOT = 0,\n\t\tCOMMON_SKELETON_POINT_PELVIS,\n\t\tCOMMON_SKELETON_POINT_SPINE,\n\t\tCOMMON_SKELETON_POINT_SPINE_1,\n\t\tCOMMON_SKELETON_POINT_SPINE_2,\n\t\tCOMMON_SKELETON_POINT_NECK,\n\t\tCOMMON_SKELETON_POINT_HEAD,\n\t\tCOMMON_SKELETON_POINT_TORSO,\n\t\tCOMMON_SKELETON_POINT_RIGHT_HIP,\n\t\tCOMMON_SKELETON_POINT_LEFT_HIP,\n\t\tCOMMON_SKELETON_POINT_BACK,\n\t\tCOMMON_SKELETON_POINT_LEFT_HAND,\n\t\tCOMMON_SKELETON_POINT_RIGHT_HAND,\n\n\t\tCOMMON_SKELETON_POINT_WEAPON_LEFT,\n\t\tCOMMON_SKELETON_POINT_WEAPON_RIGHT,\n\t\tCOMMON_SKELETON_POINT_WEAPON_LEFT_BACK,\n\t\tCOMMON_SKELETON_POINT_WEAPON_RIGHT_BACK,\n\n\t\tCOMMON_SKELETON_POINT_WEAPON_LEFT_SHIELD,\n\t\tCOMMON_SKELETON_POINT_WEAPON_RIGHT_SHIELD,\n\n\t\tCOMMON_SKELETON_POINTS_MAX,\n\t};\n\n\tenum AIStates {\n\t\tAI_STATE_OFF = 0,\n\t\tAI_STATE_REST,\n\t\tAI_STATE_PATROL,\n\t\tAI_STATE_FOLLOW_PATH,\n\t\tAI_STATE_REGENERATE,\n\t\tAI_STATE_ATTACK,\n\n\t\tAI_STATE_PET_OFF,\n\t\tAI_STATE_PET_FOLLOW,\n\t\tAI_STATE_PET_STOP,\n\t\tAI_STATE_PET_ATTACK,\n\n\t\tAI_STATE_MAX,\n\t};\n\n\tenum EntityRelationType {\n\t\tENTITY_RELATION_TYPE_NEUTRAL = 0,\n\t\tENTITY_RELATION_TYPE_FRIENDLY,\n\t\tENTITY_RELATION_TYPE_HOSTILE,\n\t};\n\n\tenum EntityInteractionType {\n\t\tENITIY_INTERACTION_TYPE_NORMAL = 0,\n\t\tENITIY_INTERACTION_TYPE_SPEAK,\n\t\tENITIY_INTERACTION_TYPE_LOOT,\n\t\tENITIY_INTERACTION_TYPE_USE,\n\t\tENITIY_INTERACTION_TYPE_TRAIN,\n\t\tENITIY_INTERACTION_TYPE_VENDOR,\n\t\tENITIY_INTERACTION_TYPE_NONE,\n\t};\n\n\tenum EntityClassPlaystyleType {\n\t\tENTITY_CLASS_PLAYSTYLE_TYPE_MELEE = 0,\n\t\tENTITY_CLASS_PLAYSTYLE_TYPE_SPELL,\n\t\tENTITY_CLASS_PLAYSTYLE_TYPE_HYBRID,\n\t\tENTITY_CLASS_PLAYSTYLE_TYPE_NONE,\n\t};\n\n\tenum EntityWindows {\n\t\tENTITY_WINDOW_LOOT = 0,\n\t\tENTITY_WINDOW_CONTAINER,\n\t\tENTITY_WINDOW_VENDOR,\n\t\tENTITY_WINDOW_TRAINER,\n\t};\n\n\tenum EntityResourceIndices {\n\t\tENTITY_RESOURCE_INDEX_HEALTH = 0,\n\t\tENTITY_RESOURCE_INDEX_SPEED = 1,\n\t\tENTITY_RESOURCE_INDEX_RESOURCES_BEGIN = 2,\n\t};\n\n\tenum {\n\t\tBASE_XP = 50,\n\t\tENTITY_INTERACT_RANGE = 4,\n\t\tENTITY_INTERACT_RANGE_SQUARED = ENTITY_INTERACT_RANGE * ENTITY_INTERACT_RANGE,\n\t};\n\n\tEntityEnums() {}\n\nprotected:\n\tstatic void _bind_methods();\n};\n\nVARIANT_ENUM_CAST(EntityEnums::EntityPlayerType);\nVARIANT_ENUM_CAST(EntityEnums::EntityController);\nVARIANT_ENUM_CAST(EntityEnums::EntityFlags);\nVARIANT_ENUM_CAST(EntityEnums::EntityStateTypeFlags);\nVARIANT_ENUM_CAST(EntityEnums::EntityStateTypeIndexes);\nVARIANT_ENUM_CAST(EntityEnums::CommonCharacterSkeletonPoints);\nVARIANT_ENUM_CAST(EntityEnums::AIStates);\nVARIANT_ENUM_CAST(EntityEnums::EntityImmunityFlags);\nVARIANT_ENUM_CAST(EntityEnums::EntityRelationType);\nVARIANT_ENUM_CAST(EntityEnums::EntityInteractionType);\nVARIANT_ENUM_CAST(EntityEnums::EntityClassPlaystyleType);\nVARIANT_ENUM_CAST(EntityEnums::EntityWindows);\nVARIANT_ENUM_CAST(EntityEnums::EntityResourceIndices);\n\n#endif\n"
  },
  {
    "path": "formations/ai_formation.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"ai_formation.h\"\n\n#include \"../entities/entity.h\"\n\n#include \"../defines.h\"\n\nvoid AIFormation::set_owner(Entity *entity) {\n\t_owner = entity;\n\n\tcall(\"_on_set_owner\");\n}\n\nvoid AIFormation::set_owner_bind(Node *entity) {\n\tif (!entity) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(entity);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\treturn set_owner(e);\n}\n\nEntity *AIFormation::get_owner() {\n\treturn _owner;\n}\n\nvoid AIFormation::set_editor_description(const String &p_editor_description) {\n\tset_meta(\"_editor_description_\", p_editor_description);\n}\nString AIFormation::get_editor_description() const {\n\tif (has_meta(\"_editor_description_\")) {\n\t\treturn get_meta(\"_editor_description_\");\n\t} else {\n\t\treturn \"\";\n\t}\n}\n\nVector3 AIFormation::get_position(int slot_index) {\n\tERR_FAIL_COND_V(!INSTANCE_VALIDATE(_owner), Vector3());\n\n\tif (has_method(\"_get_position\"))\n\t\treturn call(\"_get_position\", slot_index);\n\n\treturn Vector3();\n}\n\nAIFormation::AIFormation() {\n\t_owner = NULL;\n}\n\nvoid AIFormation::_bind_methods() {\n\t//GDVIRTUAL_BIND(\"_on_set_owner\");\n\t//GDVIRTUAL_BIND(\"_get_position\", \"slot_index\");\n\n\tClassDB::bind_method(D_METHOD(\"get_owner\"), &AIFormation::get_owner);\n\tClassDB::bind_method(D_METHOD(\"set_owner\", \"entity\"), &AIFormation::set_owner_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"owner\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\", 0), \"set_owner\", \"get_owner\");\n\n\tClassDB::bind_method(D_METHOD(\"get_position\", \"slot_index\"), &AIFormation::get_position);\n\n\tClassDB::bind_method(D_METHOD(\"_set_editor_description\", \"editor_description\"), &AIFormation::set_editor_description);\n\tClassDB::bind_method(D_METHOD(\"_get_editor_description\"), &AIFormation::get_editor_description);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"editor_description\", PROPERTY_HINT_MULTILINE_TEXT, \"\", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNAL), \"_set_editor_description\", \"_get_editor_description\");\n}\n"
  },
  {
    "path": "formations/ai_formation.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef AI_FORMATION_H\n#define AI_FORMATION_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\n#include \"scene/main/node.h\"\n\nclass Entity;\n\nclass AIFormation : public Resource {\n\tGDCLASS(AIFormation, Resource);\n\npublic:\n\tvoid set_owner(Entity *entity);\n\tvoid set_owner_bind(Node *entity);\n\tEntity *get_owner();\n\n\tvoid set_editor_description(const String &p_editor_description);\n\tString get_editor_description() const;\n\n\tVector3 get_position(int slot_index);\n\n\tAIFormation();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tEntity *_owner;\n};\n\n#endif\n"
  },
  {
    "path": "infos/aura_infos.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"aura_infos.h\"\n\n#include \"../data/spells/spell.h\"\n\nEntity *AuraApplyInfo::caster_get() const {\n\treturn _caster;\n}\n\nvoid AuraApplyInfo::caster_set(Entity *value) {\n\t_caster = value;\n}\n\nvoid AuraApplyInfo::caster_set_bind(Node *caster) {\n\tif (!caster) {\n\t\treturn;\n\t}\n\n\tEntity *e = Object::cast_to<Entity>(caster);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_caster = e;\n}\n\nEntity *AuraApplyInfo::target_get() const {\n\treturn _target;\n}\n\nvoid AuraApplyInfo::target_set(Entity *value) {\n\t_target = value;\n}\n\nvoid AuraApplyInfo::target_set_bind(Node *caster) {\n\tif (!caster) {\n\t\treturn;\n\t}\n\n\tEntity *e = Object::cast_to<Entity>(caster);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_target = e;\n}\n\nfloat AuraApplyInfo::spell_scale_get() const {\n\treturn _spell_scale;\n}\n\nvoid AuraApplyInfo::spell_scale_set(float value) {\n\t_spell_scale = value;\n}\n\nRef<Spell> AuraApplyInfo::get_aura() const {\n\treturn Ref<Spell>(_aura);\n}\n\nvoid AuraApplyInfo::set_aura(Ref<Spell> aura) {\n\t_aura = (*aura);\n}\n\nAuraApplyInfo::AuraApplyInfo() {\n\t_caster = NULL;\n\t_target = NULL;\n\t_spell_scale = 0;\n\t_aura = NULL;\n}\n\nAuraApplyInfo::AuraApplyInfo(Entity *caster, Entity *target, float spell_scale, Spell *aura) {\n\t_caster = caster;\n\t_target = target;\n\t_spell_scale = spell_scale;\n\t_aura = aura;\n}\n\nAuraApplyInfo::AuraApplyInfo(Entity *caster, Entity *target, float spell_scale) {\n\t_caster = caster;\n\t_target = target;\n\t_spell_scale = spell_scale;\n\t_aura = NULL;\n}\n\nvoid AuraApplyInfo::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"caster_get\"), &AuraApplyInfo::caster_get);\n\tClassDB::bind_method(D_METHOD(\"caster_set\", \"caster\"), &AuraApplyInfo::caster_set_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"caster\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), \"caster_set\", \"caster_get\");\n\n\tClassDB::bind_method(D_METHOD(\"target_get\"), &AuraApplyInfo::target_get);\n\tClassDB::bind_method(D_METHOD(\"target_set\", \"target\"), &AuraApplyInfo::target_set_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"target\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), \"target_set\", \"target_get\");\n\n\tClassDB::bind_method(D_METHOD(\"spell_scale_get\"), &AuraApplyInfo::spell_scale_get);\n\tClassDB::bind_method(D_METHOD(\"spell_scale_set\", \"value\"), &AuraApplyInfo::spell_scale_set);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"spell_scale\"), \"spell_scale_set\", \"spell_scale_get\");\n\n\tClassDB::bind_method(D_METHOD(\"get_aura\"), &AuraApplyInfo::get_aura);\n\tClassDB::bind_method(D_METHOD(\"set_aura\", \"aura\"), &AuraApplyInfo::set_aura);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"set_aura\", \"get_aura\");\n}\n"
  },
  {
    "path": "infos/aura_infos.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef AURA_INFOS_H\n#define AURA_INFOS_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n\n\n#include \"../entities/entity.h\"\n\nclass Entity;\nclass Spell;\n\nclass AuraApplyInfo : public RefCounted {\n\tGDCLASS(AuraApplyInfo, RefCounted);\n\npublic:\n\tEntity *caster_get() const;\n\tvoid caster_set(Entity *caster);\n\tvoid caster_set_bind(Node *caster);\n\n\tEntity *target_get() const;\n\tvoid target_set(Entity *caster);\n\tvoid target_set_bind(Node *caster);\n\n\tfloat spell_scale_get() const;\n\tvoid spell_scale_set(float value);\n\n\tRef<Spell> get_aura() const;\n\tvoid set_aura(Ref<Spell> aura);\n\n\tAuraApplyInfo();\n\tAuraApplyInfo(Entity *_caster, Entity *_target, float _spell_scale, Spell *_aura);\n\tAuraApplyInfo(Entity *_caster, Entity *_target, float _spell_scale);\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tEntity *_caster;\n\tEntity *_target;\n\tfloat _spell_scale;\n\tSpell *_aura;\n};\n\n#endif\n"
  },
  {
    "path": "infos/spell_cast_info.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"spell_cast_info.h\"\n\n#include \"core/version.h\"\n\n#include \"../data/items/item_instance.h\"\n#include \"../data/items/item_template.h\"\n#include \"../data/spells/spell.h\"\n#include \"../database/ess_resource_db.h\"\n#include \"../entities/entity.h\"\n#include \"../singletons/ess.h\"\n\n#include \"../defines.h\"\n\n////    SpellCastInfo    ////\n\nEntity *SpellCastInfo::caster_get() {\n\tif (_caster && !INSTANCE_VALIDATE(_caster)) {\n\t\t_caster = NULL;\n\t}\n\n\treturn _caster;\n}\nvoid SpellCastInfo::caster_set(Entity *value) {\n\t_caster = value;\n}\nvoid SpellCastInfo::caster_set_bind(Node *caster) {\n\tif (!caster) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(caster);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_caster = e;\n}\n\nEntity *SpellCastInfo::target_get() {\n\tif (_target && !INSTANCE_VALIDATE(_target)) {\n\t\t_target = NULL;\n\t}\n\n\treturn _target;\n}\nvoid SpellCastInfo::target_set(Entity *value) {\n\t_target = value;\n}\nvoid SpellCastInfo::target_set_bind(Node *target) {\n\tif (!target) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(target);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_target = e;\n}\n\nbool SpellCastInfo::has_cast_time_get() const {\n\treturn _has_cast_time;\n}\nvoid SpellCastInfo::has_cast_time_set(bool value) {\n\t_has_cast_time = value;\n}\n\nfloat SpellCastInfo::cast_time_get() const {\n\treturn _cast_time;\n}\nvoid SpellCastInfo::cast_time_set(float value) {\n\t_cast_time = value;\n}\n\nfloat SpellCastInfo::current_cast_time_get() const {\n\treturn _current_cast_time;\n}\nvoid SpellCastInfo::current_cast_time_set(float value) {\n\t_current_cast_time = value;\n}\n\nbool SpellCastInfo::is_casting_get() const {\n\treturn _is_casting;\n}\nvoid SpellCastInfo::is_casting_set(bool value) {\n\t_is_casting = value;\n}\n\nint SpellCastInfo::num_pushbacks_get() const {\n\treturn _num_pushbacks;\n}\nvoid SpellCastInfo::num_pushbacks_set(int value) {\n\t_num_pushbacks = value;\n}\n\nfloat SpellCastInfo::spell_scale_get() const {\n\treturn _spell_scale;\n}\nvoid SpellCastInfo::spell_scale_set(float value) {\n\t_spell_scale = value;\n}\n\nRef<Spell> SpellCastInfo::get_spell() const {\n\treturn _spell;\n}\nvoid SpellCastInfo::set_spell(const Ref<Spell> &spell) {\n\t_spell = spell;\n}\n\nRef<ItemInstance> SpellCastInfo::get_source_item() const {\n\treturn _source_item;\n}\nvoid SpellCastInfo::set_source_item(const Ref<ItemInstance> &item) {\n\t_source_item = item;\n}\n\nRef<ItemTemplate> SpellCastInfo::get_source_template() const {\n\treturn _source_template;\n}\nvoid SpellCastInfo::set_source_template(const Ref<ItemTemplate> &source_template) {\n\t_source_template = source_template;\n}\n\nbool SpellCastInfo::update_cast_time(float delta) {\n\t_current_cast_time += delta;\n\n\tif (_current_cast_time >= _cast_time) {\n\t\t_current_cast_time = _cast_time;\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nvoid SpellCastInfo::physics_process(float delta) {\n\tERR_FAIL_COND(!_spell.is_valid());\n\n\t_spell->son_physics_process(Ref<SpellCastInfo>(this), delta);\n}\n\nvoid SpellCastInfo::resolve_references(Node *owner) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(owner));\n\n\tERR_FAIL_COND(!owner->is_inside_tree());\n\n\t_caster = Object::cast_to<Entity>(owner);\n\n\tif (owner->is_inside_tree()) {\n\t\t_target = Object::cast_to<Entity>(owner->get_node_or_null(_target_path));\n\t}\n\n\tRef<Spell> spell = ESS::get_singleton()->get_resource_db()->get_spell(_spell_id);\n\n\tif (spell.is_valid()) {\n\t\t_spell = spell;\n\t}\n}\n\nDictionary SpellCastInfo::to_dict() {\n\tDictionary dict;\n\n\tif (INSTANCE_VALIDATE(_caster))\n\t\tdict[\"caster\"] = _caster->get_path();\n\n\tif (INSTANCE_VALIDATE(_target))\n\t\tdict[\"target\"] = _target->get_path();\n\n\tdict[\"has_cast_time\"] = _has_cast_time;\n\tdict[\"cast_time\"] = _cast_time;\n\n\tdict[\"current_cast_time\"] = _current_cast_time;\n\tdict[\"num_pushbacks\"] = _num_pushbacks;\n\tdict[\"is_casting\"] = _is_casting;\n\n\tdict[\"spell_id\"] = _spell->get_id();\n\n\t//item serialization not needed\n\n\treturn dict;\n}\nvoid SpellCastInfo::from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\t_has_cast_time = dict.get(\"has_cast_time\", true);\n\t_cast_time = dict.get(\"cast_time\", 0);\n\n\t_current_cast_time = dict.get(\"current_cast_time\", 0);\n\t_num_pushbacks = dict.get(\"num_pushbacks\", 0);\n\t_is_casting = dict.get(\"is_casting\", true);\n\n\t_spell_id = dict.get(\"spell_id\", 0);\n\n\t//item serialization not needed\n}\n\nSpellCastInfo::SpellCastInfo() {\n\t_caster = NULL;\n\t_target = NULL;\n\n\t_has_cast_time = false;\n\t_cast_time = 0;\n\t_spell_scale = 0;\n\n\t_current_cast_time = 0;\n\t_num_pushbacks = 0;\n\n\t_is_casting = false;\n\n\t_spell_id = 0;\n}\n\nSpellCastInfo::~SpellCastInfo() {\n\t_caster = NULL;\n\t_target = NULL;\n\n\t_spell.unref();\n\t_source_item.unref();\n\t_source_template.unref();\n}\n\nvoid SpellCastInfo::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"caster_get\"), &SpellCastInfo::caster_get);\n\tClassDB::bind_method(D_METHOD(\"caster_set\", \"caster\"), &SpellCastInfo::caster_set_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"caster\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), \"caster_set\", \"caster_get\");\n\n\tClassDB::bind_method(D_METHOD(\"target_get\"), &SpellCastInfo::target_get);\n\tClassDB::bind_method(D_METHOD(\"set_target\", \"caster\"), &SpellCastInfo::target_set_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"target\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), \"set_target\", \"target_get\");\n\n\tClassDB::bind_method(D_METHOD(\"has_cast_time_get\"), &SpellCastInfo::has_cast_time_get);\n\tClassDB::bind_method(D_METHOD(\"has_cast_time_set\", \"value\"), &SpellCastInfo::has_cast_time_set);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"has_cast_time\"), \"has_cast_time_set\", \"has_cast_time_get\");\n\n\tClassDB::bind_method(D_METHOD(\"cast_time_get\"), &SpellCastInfo::cast_time_get);\n\tClassDB::bind_method(D_METHOD(\"cast_time_set\", \"value\"), &SpellCastInfo::cast_time_set);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"cast_time\"), \"cast_time_set\", \"cast_time_get\");\n\n\tClassDB::bind_method(D_METHOD(\"current_cast_time_get\"), &SpellCastInfo::current_cast_time_get);\n\tClassDB::bind_method(D_METHOD(\"current_cast_time_set\", \"value\"), &SpellCastInfo::current_cast_time_set);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"current_cast_time\"), \"current_cast_time_set\", \"current_cast_time_get\");\n\n\tClassDB::bind_method(D_METHOD(\"is_casting_get\"), &SpellCastInfo::is_casting_get);\n\tClassDB::bind_method(D_METHOD(\"is_casting_set\", \"value\"), &SpellCastInfo::is_casting_set);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"is_casting\"), \"is_casting_set\", \"is_casting_get\");\n\n\tClassDB::bind_method(D_METHOD(\"num_pushbacks_get\"), &SpellCastInfo::num_pushbacks_get);\n\tClassDB::bind_method(D_METHOD(\"num_pushbacks_set\", \"value\"), &SpellCastInfo::num_pushbacks_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"num_pushbacks\"), \"num_pushbacks_set\", \"num_pushbacks_get\");\n\n\tClassDB::bind_method(D_METHOD(\"spell_scale_get\"), &SpellCastInfo::spell_scale_get);\n\tClassDB::bind_method(D_METHOD(\"spell_scale_set\", \"value\"), &SpellCastInfo::spell_scale_set);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"spell_scale\"), \"spell_scale_set\", \"spell_scale_get\");\n\n\tClassDB::bind_method(D_METHOD(\"get_spell\"), &SpellCastInfo::get_spell);\n\tClassDB::bind_method(D_METHOD(\"set_spell\", \"spell\"), &SpellCastInfo::set_spell);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"spell\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"set_spell\", \"get_spell\");\n\n\tClassDB::bind_method(D_METHOD(\"get_source_item\"), &SpellCastInfo::get_source_item);\n\tClassDB::bind_method(D_METHOD(\"set_source_item\", \"spell\"), &SpellCastInfo::set_source_item);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"source_item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), \"set_source_item\", \"get_source_item\");\n\n\tClassDB::bind_method(D_METHOD(\"get_source_template\"), &SpellCastInfo::get_source_template);\n\tClassDB::bind_method(D_METHOD(\"set_source_template\", \"spell\"), &SpellCastInfo::set_source_template);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"source_template\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemTemplate\"), \"set_source_template\", \"get_source_template\");\n\n\tClassDB::bind_method(D_METHOD(\"update_cast_time\", \"delta\"), &SpellCastInfo::update_cast_time);\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &SpellCastInfo::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &SpellCastInfo::to_dict);\n}\n"
  },
  {
    "path": "infos/spell_cast_info.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPELL_INFOS_H\n#define SPELL_INFOS_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n\n\nclass Spell;\nclass Entity;\nclass ItemInstance;\nclass ItemTemplate;\n\nclass SpellCastInfo : public Resource {\n\tGDCLASS(SpellCastInfo, Resource);\n\npublic:\n\tEntity *caster_get();\n\tvoid caster_set(Entity *caster);\n\tvoid caster_set_bind(Node *caster);\n\n\tEntity *target_get();\n\tvoid target_set(Entity *caster);\n\tvoid target_set_bind(Node *caster);\n\n\tbool has_cast_time_get() const;\n\tvoid has_cast_time_set(bool value);\n\n\tfloat cast_time_get() const;\n\tvoid cast_time_set(float value);\n\n\tfloat current_cast_time_get() const;\n\tvoid current_cast_time_set(float value);\n\n\tbool is_casting_get() const;\n\tvoid is_casting_set(bool value);\n\n\tint num_pushbacks_get() const;\n\tvoid num_pushbacks_set(int value);\n\n\tfloat spell_scale_get() const;\n\tvoid spell_scale_set(float value);\n\n\tRef<Spell> get_spell() const;\n\tvoid set_spell(const Ref<Spell> &spell);\n\n\tRef<ItemInstance> get_source_item() const;\n\tvoid set_source_item(const Ref<ItemInstance> &item);\n\n\tRef<ItemTemplate> get_source_template() const;\n\tvoid set_source_template(const Ref<ItemTemplate> &source_template);\n\n\tbool update_cast_time(float delta);\n\n\tvoid physics_process(float delta);\n\n\tvoid resolve_references(Node *owner);\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tSpellCastInfo();\n\t~SpellCastInfo();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tEntity *_caster;\n\tEntity *_target;\n\tbool _has_cast_time;\n\tfloat _cast_time;\n\tfloat _spell_scale;\n\n\tfloat _current_cast_time;\n\tint _num_pushbacks;\n\n\tbool _is_casting;\n\n\tint _spell_id;\n\tRef<Spell> _spell;\n\tRef<ItemInstance> _source_item;\n\tRef<ItemTemplate> _source_template;\n\n\tNodePath _target_path;\n};\n\n#endif\n"
  },
  {
    "path": "inventory/bag.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"bag.h\"\n\n#include \"../data/items/item_instance.h\"\n#include \"../data/items/item_template.h\"\n\nint Bag::get_allowed_item_types() const {\n\treturn _allowed_item_types;\n}\n\nvoid Bag::set_allowed_item_types(const int value) {\n\t_allowed_item_types = value;\n}\n\nbool Bag::add_item(Ref<ItemInstance> item) {\n\tERR_FAIL_COND_V(!item.is_valid(), false);\n\n\tif (has_method(\"_add_item\")) {\n\t\treturn call(\"_add_item\", item);\n\t}\n\n\tint max_stack = item->get_item_template()->get_stack_size();\n\n\tif (max_stack > 1) {\n\t\tfor (int i = 0; i < _items.size(); ++i) {\n\t\t\tRef<ItemInstance> ii = _items.get(i);\n\n\t\t\tif (!ii.is_valid())\n\t\t\t\tcontinue;\n\n\t\t\tif (ii->get_stack_size() < max_stack) {\n\t\t\t\tint fs = max_stack - ii->get_stack_size();\n\n\t\t\t\tif (fs > item->get_stack_size()) {\n\t\t\t\t\tii->set_stack_size(ii->get_stack_size() + item->get_stack_size());\n\n\t\t\t\t\titem->set_stack_size(0);\n\n\t\t\t\t\temit_signal(\"item_count_changed\", Ref<Bag>(this), ii, i);\n\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tii->set_stack_size(max_stack);\n\t\t\t\t\titem->set_stack_size(item->get_stack_size() - fs);\n\n\t\t\t\t\temit_signal(\"item_count_changed\", Ref<Bag>(this), ii, i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (int i = 0; i < _items.size(); ++i) {\n\t\tRef<ItemInstance> ii = _items.get(i);\n\n\t\tif (!ii.is_valid()) {\n\t\t\t_items.set(i, item);\n\n\t\t\temit_signal(\"item_added\", Ref<Bag>(this), item, i);\n\n\t\t\tif (get_valid_item_count() == _bag_size) {\n\t\t\t\temit_signal(\"overburdened\", Ref<Bag>(this));\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t_items.push_back(item);\n\n\temit_signal(\"item_added\", Ref<Bag>(this), item, _items.size() - 1);\n\n\tif (get_valid_item_count() == _bag_size) {\n\t\temit_signal(\"overburdened\", Ref<Bag>(this));\n\t}\n\n\treturn true;\n}\n\nvoid Bag::add_item_at(int index, Ref<ItemInstance> item, bool signal) {\n\tif (has_method(\"_add_item_at\")) {\n\t\tcall(\"_add_item_at\", index, item, signal);\n\t\treturn;\n\t}\n\n\tif (_items.size() <= index) {\n\t\t_items.resize(index + 1);\n\t}\n\n\t_items.set(index, item);\n\n\tif (signal)\n\t\temit_signal(\"item_added\", Ref<Bag>(this), item, index);\n}\n\nRef<ItemInstance> Bag::get_item(const int index) {\n\tif (has_method(\"_get_item\")) {\n\t\treturn call(\"_get_item\", index);\n\t}\n\n\tif (index >= _items.size()) {\n\t\treturn Ref<ItemInstance>();\n\t}\n\n\treturn _items.get(index);\n}\n\nRef<ItemInstance> Bag::remove_item(const int index) {\n\tif (has_method(\"_remove_item\")) {\n\t\treturn call(\"_remove_item\", index);\n\t}\n\n\tERR_FAIL_INDEX_V(index, _items.size(), Ref<ItemInstance>());\n\n\tRef<ItemInstance> ii = _items.get(index);\n\n\tif (!ii.is_valid())\n\t\treturn ii;\n\n\t_items.set(index, Ref<ItemInstance>());\n\n\temit_signal(\"item_removed\", Ref<Bag>(this), ii, index);\n\n\tif (get_valid_item_count() + 1 == _bag_size) {\n\t\temit_signal(\"overburden_removed\", Ref<Bag>(this));\n\t}\n\n\treturn ii;\n}\n\nvoid Bag::swap_items(const int item1_index, const int item2_index) {\n\tif (has_method(\"_swap_items\")) {\n\t\tcall(\"_swap_items\", item1_index, item2_index);\n\t\treturn;\n\t}\n\n\tERR_FAIL_INDEX(item1_index, _items.size());\n\tERR_FAIL_INDEX(item2_index, _items.size());\n\n\tRef<ItemInstance> ii = _items.get(item1_index);\n\n\t_items.set(item1_index, _items.get(item2_index));\n\n\t_items.set(item2_index, ii);\n\n\temit_signal(\"item_swapped\", Ref<Bag>(this), item1_index, item2_index);\n}\n\nvoid Bag::change_item_equip(int slot_id, Ref<ItemInstance> item) {\n\tif (has_method(\"_change_item_equip\")) {\n\t\tcall(\"_change_item_equip\", slot_id, item);\n\t\treturn;\n\t}\n\n\tERR_FAIL_INDEX(slot_id, _items.size());\n\n\t_items.set(slot_id, item);\n\n\temit_signal(\"change_item_equip\", Ref<Bag>(this), slot_id, item);\n}\n\nvoid Bag::set_item_count(int slot_id, int new_count) {\n\tERR_FAIL_INDEX(slot_id, _items.size());\n\n\tRef<ItemInstance> ii = _items.get(slot_id);\n\n\tERR_FAIL_COND(!ii.is_valid());\n\n\tii->set_stack_size(new_count);\n\n\temit_signal(\"item_count_changed\", Ref<Bag>(this), ii, slot_id);\n}\n\nbool Bag::can_add_item(const Ref<ItemInstance> item) {\n\tif (has_method(\"_can_add_item\")) {\n\t\treturn call(\"_can_add_item\", item);\n\t}\n\n\treturn true;\n}\n\nint Bag::get_item_count() {\n\tif (has_method(\"_get_item_count\")) {\n\t\treturn call(\"_get_item_count\");\n\t}\n\n\treturn _items.size();\n}\n\nint Bag::get_valid_item_count() {\n\tif (has_method(\"_get_valid_item_count\")) {\n\t\treturn call(\"_get_valid_item_count\");\n\t}\n\n\tint ii = 0;\n\n\tfor (int i = 0; i < _items.size(); ++i) {\n\t\tif (_items.get(i).is_valid())\n\t\t\t++ii;\n\t}\n\n\treturn ii;\n}\n\nint Bag::get_size() {\n\tif (has_method(\"_get_size\")) {\n\t\treturn call(\"_get_size\");\n\t}\n\n\treturn _bag_size;\n}\n\nvoid Bag::set_size(const int size) {\n\tif (has_method(\"_set_size\")) {\n\t\tcall(\"_set_size\", size);\n\t\treturn;\n\t}\n\n\tint item_count = get_valid_item_count();\n\n\tif (_bag_size > size && _bag_size > item_count && size <= item_count) {\n\t\t_bag_size = size;\n\n\t\temit_signal(\"overburdened\", Ref<Bag>(this));\n\n\t\treturn;\n\t}\n\n\t_bag_size = size;\n\n\tif (_items.size() < _bag_size) {\n\t\t_items.resize(_bag_size);\n\t}\n\n\temit_signal(\"size_changed\", Ref<Bag>(this));\n}\n\nbool Bag::is_full() {\n\tif (has_method(\"_is_full\")) {\n\t\treturn call(\"_is_full\");\n\t}\n\n\treturn false;\n}\n\nbool Bag::is_overburdened() {\n\tif (has_method(\"_is_overburdened\")) {\n\t\treturn call(\"_is_overburdened\");\n\t}\n\n\treturn _bag_size < get_valid_item_count();\n}\n\nbool Bag::has_item(Ref<ItemTemplate> item, int count) {\n\treturn call(\"_has_item\", item, count);\n}\nbool Bag::_has_item(Ref<ItemTemplate> item, int count) {\n\tint c = 0;\n\n\tfor (int i = 0; i < _items.size(); ++i) {\n\t\tRef<ItemInstance> ii = _items.get(i);\n\n\t\tif (ii.is_valid()) {\n\t\t\tif (ii->get_item_template() == item) {\n\t\t\t\tc += ii->get_stack_size();\n\n\t\t\t\tif (c >= count) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\nvoid Bag::remove_items(Ref<ItemTemplate> item, int count) {\n\tcall(\"_remove_items\", item, count);\n}\nvoid Bag::_remove_items(Ref<ItemTemplate> item, int count) {\n\tint c = count;\n\n\tfor (int i = 0; i < _items.size(); ++i) {\n\t\tRef<ItemInstance> ii = _items.get(i);\n\n\t\tif (ii.is_valid()) {\n\t\t\tif (ii->get_item_template() == item) {\n\t\t\t\tint ss = ii->get_stack_size();\n\n\t\t\t\tif (ss > c) {\n\t\t\t\t\tii->set_stack_size(ss - c);\n\n\t\t\t\t\temit_signal(\"item_count_changed\", Ref<Bag>(this), ii, i);\n\t\t\t\t\treturn;\n\t\t\t\t} else if (ss < c) {\n\t\t\t\t\tc -= ii->get_stack_size();\n\n\t\t\t\t\tremove_item(i);\n\t\t\t\t} else if (ss == c) {\n\t\t\t\t\tremove_item(i);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nDictionary Bag::to_dict() {\n\treturn call(\"_to_dict\");\n}\nvoid Bag::from_dict(const Dictionary &dict) {\n\tcall(\"_from_dict\", dict);\n}\n\nDictionary Bag::_to_dict() {\n\tDictionary dict;\n\n\tdict[\"allowed_item_types\"] = _allowed_item_types;\n\tdict[\"bag_size\"] = _bag_size;\n\n\tDictionary items;\n\n\tfor (int i = 0; i < _items.size(); ++i) {\n\t\tRef<ItemInstance> ii = _items[i];\n\n\t\tif (ii.is_valid())\n\t\t\titems[i] = ii->to_dict();\n\t}\n\n\tdict[\"items\"] = items;\n\n\treturn dict;\n}\nvoid Bag::_from_dict(const Dictionary &dict) {\n\t_items.clear();\n\n\tset_size(dict.get(\"bag_size\", 0));\n\n\tDictionary items = dict.get(\"items\", Dictionary());\n\n\tArray keys = items.keys();\n\n\tfor (int i = 0; i < keys.size(); ++i) {\n\t\tRef<ItemInstance> ii;\n\t\tii.instantiate();\n\n\t\tii->from_dict(items[keys.get(i)]);\n\n\t\tint key = keys.get(i);\n\n\t\tif (key >= _items.size()) {\n\t\t\t_items.resize(key + 1);\n\t\t}\n\n\t\t_items.set(key, ii);\n\t}\n\n\t_allowed_item_types = dict.get(\"allowed_item_types\", 0xFFFFFF);\n}\n\nBag::Bag() {\n\t_allowed_item_types = 0xFFFFFF;\n\t_bag_size = 0;\n}\n\nBag::~Bag() {\n\t_items.clear();\n}\n\nvoid Bag::_bind_methods() {\n\t//GDVIRTUAL_BIND(\"_add_item\", \"item\", \"ItemInstance\");\n\t//GDVIRTUAL_BIND(\"_add_item_at\", \"index\", \"item\", \"ItemInstance\", \"signal\");\n\t//GDVIRTUAL_BIND(\"_get_item\", \"index\");\n\t//GDVIRTUAL_BIND(\"_remove_item\", \"index\");\n\t//GDVIRTUAL_BIND(\"_swap_items\", \"item1_index\", \"item2_index\");\n\t//GDVIRTUAL_BIND(\"_can_add_item\", \"item\", \"ItemInstance\");\n\t//GDVIRTUAL_BIND(\"_get_item_count\");\n\t//GDVIRTUAL_BIND(\"_get_valid_item_count\");\n\t//GDVIRTUAL_BIND(\"_get_size\");\n\t//GDVIRTUAL_BIND(\"_set_size\", \"size\");\n\t//GDVIRTUAL_BIND(\"_is_full\");\n\t//GDVIRTUAL_BIND(\"_is_overburdened\");\n\t//GDVIRTUAL_BIND(\"_has_item\", \"item\", \"ItemTemplate\", \"count\");\n\t//GDVIRTUAL_BIND(\"_remove_items\", \"item\", \"ItemTemplate\", \"count\");\n\t//GDVIRTUAL_BIND(\"_change_item_equip\", \"slot_id\", \"item\", \"ItemInstance\");\n\n\tADD_SIGNAL(MethodInfo(\"item_added\", PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\"), PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::INT, \"slot_id\")));\n\tADD_SIGNAL(MethodInfo(\"item_removed\", PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\"), PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::INT, \"slot_id\")));\n\tADD_SIGNAL(MethodInfo(\"item_swapped\", PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\"), PropertyInfo(Variant::INT, \"slot_id_1\"), PropertyInfo(Variant::INT, \"slot_id_2\")));\n\tADD_SIGNAL(MethodInfo(\"item_count_changed\", PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\"), PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\"), PropertyInfo(Variant::INT, \"slot_id\")));\n\tADD_SIGNAL(MethodInfo(\"overburdened\", PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\")));\n\tADD_SIGNAL(MethodInfo(\"overburden_removed\", PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\")));\n\tADD_SIGNAL(MethodInfo(\"size_changed\", PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\")));\n\tADD_SIGNAL(MethodInfo(\"change_item_equip\", PropertyInfo(Variant::OBJECT, \"bag\", PROPERTY_HINT_RESOURCE_TYPE, \"Bag\"), PropertyInfo(Variant::INT, \"slot_id\"), PropertyInfo(Variant::OBJECT, \"item\", PROPERTY_HINT_RESOURCE_TYPE, \"ItemInstance\")));\n\n\tClassDB::bind_method(D_METHOD(\"get_allowed_item_types\"), &Bag::get_allowed_item_types);\n\tClassDB::bind_method(D_METHOD(\"set_allowed_item_types\", \"count\"), &Bag::set_allowed_item_types);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"allowed_item_types\", PROPERTY_HINT_FLAGS, ItemEnums::BINDING_STRING_ITEM_TYPE_FLAGS), \"set_allowed_item_types\", \"get_allowed_item_types\");\n\n\tClassDB::bind_method(D_METHOD(\"add_item\", \"item\"), &Bag::add_item);\n\tClassDB::bind_method(D_METHOD(\"add_item_at\", \"index\", \"item\", \"signal\"), &Bag::add_item_at, DEFVAL(true));\n\tClassDB::bind_method(D_METHOD(\"get_item\", \"index\"), &Bag::get_item);\n\tClassDB::bind_method(D_METHOD(\"remove_item\", \"index\"), &Bag::remove_item);\n\tClassDB::bind_method(D_METHOD(\"swap_items\", \"item1_index\", \"item2_index\"), &Bag::swap_items);\n\tClassDB::bind_method(D_METHOD(\"change_item_equip\", \"index\", \"item\"), &Bag::change_item_equip);\n\n\tClassDB::bind_method(D_METHOD(\"can_add_item\", \"item\"), &Bag::can_add_item);\n\n\tClassDB::bind_method(D_METHOD(\"get_item_count\"), &Bag::get_item_count);\n\n\tClassDB::bind_method(D_METHOD(\"get_size\"), &Bag::get_size);\n\tClassDB::bind_method(D_METHOD(\"set_size\", \"size\"), &Bag::set_size);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"size\"), \"set_size\", \"get_size\");\n\n\tClassDB::bind_method(D_METHOD(\"is_full\"), &Bag::is_full);\n\tClassDB::bind_method(D_METHOD(\"is_overburdened\"), &Bag::is_overburdened);\n\n\tClassDB::bind_method(D_METHOD(\"has_item\", \"item\", \"count\"), &Bag::has_item);\n\tClassDB::bind_method(D_METHOD(\"_has_item\", \"item\", \"count\"), &Bag::_has_item);\n\n\tClassDB::bind_method(D_METHOD(\"remove_items\", \"item\", \"count\"), &Bag::remove_items);\n\tClassDB::bind_method(D_METHOD(\"_remove_items\", \"item\", \"count\"), &Bag::_remove_items);\n\n\t//Serialization\n\t//GDVIRTUAL_BIND(\"_from_dict\", \"dict\");\n\t//GDVIRTUAL_BIND(\"_to_dict\");\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &Bag::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &Bag::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_from_dict\", \"dict\"), &Bag::_from_dict);\n\tClassDB::bind_method(D_METHOD(\"_to_dict\"), &Bag::_to_dict);\n}\n"
  },
  {
    "path": "inventory/bag.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef BAG_H\n#define BAG_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n\n\n#include \"../item_enums.h\"\n\nclass ItemTemplate;\nclass ItemInstance;\n\nclass Bag : public Resource {\n\tGDCLASS(Bag, Resource);\n\npublic:\n\tint get_allowed_item_types() const;\n\tvoid set_allowed_item_types(const int value);\n\n\tbool add_item(Ref<ItemInstance> item);\n\tvoid add_item_at(int index, Ref<ItemInstance> item, bool signal = true);\n\tRef<ItemInstance> get_item(const int index);\n\tRef<ItemInstance> remove_item(const int index);\n\tvoid swap_items(const int item1_index, const int item2_index);\n\tvoid change_item_equip(int slot_id, Ref<ItemInstance> item);\n\tvoid set_item_count(int slot_id, int new_count);\n\n\tbool can_add_item(Ref<ItemInstance> item);\n\n\tint get_item_count();\n\tint get_valid_item_count();\n\n\tint get_size();\n\tvoid set_size(const int size);\n\n\tbool is_full();\n\tbool is_overburdened();\n\n\tbool has_item(Ref<ItemTemplate> item, int count);\n\tbool _has_item(Ref<ItemTemplate> item, int count);\n\n\tvoid remove_items(Ref<ItemTemplate> item, int count);\n\tvoid _remove_items(Ref<ItemTemplate> item, int count);\n\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tDictionary _to_dict();\n\tvoid _from_dict(const Dictionary &dict);\n\n\tBag();\n\t~Bag();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _allowed_item_types;\n\tint _bag_size;\n\tVector<Ref<ItemInstance> > _items;\n};\n\n#endif\n"
  },
  {
    "path": "inventory/grid_bag.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"grid_bag.h\"\n\n#include \"../data/items/item_instance.h\"\n#include \"../data/items/item_template.h\"\n\nint GridBag::get_allowed_item_types() const {\n\treturn _allowed_item_types;\n}\n\nvoid GridBag::set_allowed_item_types(const int value) {\n\t_allowed_item_types = value;\n}\n\nbool GridBag::add_item(Ref<ItemInstance> item) {\n\tERR_FAIL_COND_V(!item.is_valid(), true);\n\n\tRef<ItemTemplate> item_template = item->get_item_template();\n\n\tERR_FAIL_COND_V(!item_template.is_valid(), true);\n\n\tint _item_size_x = item_template->get_inventory_size_x();\n\tint _item_size_y = item_template->get_inventory_size_y();\n\n\tfor (int x = 0; x < _size_x - _item_size_x; ++x) {\n\t\tfor (int y = 0; y < _size_y - _item_size_y; ++y) {\n\t\t\tif (_space_map[x * _size_x + y] == 0) {\n\n\t\t\t\tbool found = true;\n\t\t\t\tfor (int xx = x; xx < _item_size_x; ++xx) {\n\t\t\t\t\tfor (int yy = y; yy < _item_size_y; ++yy) {\n\t\t\t\t\t\tif (_space_map[xx * _size_x + yy] != 0) {\n\t\t\t\t\t\t\tfound = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!found)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (found) {\n\t\t\t\t\titem->set_inventory_position_x(x);\n\t\t\t\t\titem->set_inventory_position_y(y);\n\n\t\t\t\t\t_items.push_back(item);\n\n\t\t\t\t\tint index = _items.size() - 1;\n\n\t\t\t\t\tfor (int xx = x; xx < _item_size_x; ++xx) {\n\t\t\t\t\t\tfor (int yy = y; yy < _item_size_y; ++yy) {\n\t\t\t\t\t\t\t_space_map.set(xx * _size_x + yy, index);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\nbool GridBag::add_item_to_position(const int x, const int y, Ref<ItemInstance> item) {\n\tERR_FAIL_COND_V(!item.is_valid(), false);\n\tERR_FAIL_COND_V(x < 0 || y < 0, false);\n\tERR_FAIL_COND_V(x > _size_x || y > _size_y, false);\n\n\tRef<ItemTemplate> item_template = item->get_item_template();\n\n\tERR_FAIL_COND_V(!item_template.is_valid(), true);\n\n\tint _item_size_x = item_template->get_inventory_size_x();\n\tint _item_size_y = item_template->get_inventory_size_y();\n\n\tERR_FAIL_COND_V(x + _item_size_x > _size_x || y + _item_size_y > _size_y, false);\n\n\tint sx = x + _item_size_x;\n\tint sy = y + _item_size_y;\n\n\tfor (int xx = x; xx < sx; ++xx) {\n\t\tfor (int yy = y; yy < sy; ++yy) {\n\t\t\tif (_space_map[xx * _size_x + yy] != 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\titem->set_inventory_position_x(x);\n\titem->set_inventory_position_y(y);\n\n\t_items.push_back(item);\n\n\tint index = _items.size() - 1;\n\n\tfor (int xx = x; xx < sx; ++xx) {\n\t\tfor (int yy = y; yy < sy; ++yy) {\n\t\t\t_space_map.set(xx * _size_x + yy, index);\n\t\t}\n\t}\n\n\treturn true;\n}\n\nbool GridBag::can_add_item_at(const int x, const int y, const Ref<ItemInstance> item) const {\n\tERR_FAIL_COND_V(!item.is_valid(), false);\n\tERR_FAIL_COND_V(x < 0 || y < 0, false);\n\tERR_FAIL_COND_V(x > _size_x || y > _size_y, false);\n\n\tint indx = _space_map[x * _size_x + y];\n\n\tif (indx != 0) {\n\t\tRef<ItemInstance> it = _items[indx];\n\n\t\tif (it.is_valid()) {\n\t\t\tif (it->get_item_template() == item->get_item_template()) {\n\t\t\t\t//todo check stacks\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\tRef<ItemTemplate> item_template = item->get_item_template();\n\n\tERR_FAIL_COND_V(!item_template.is_valid(), true);\n\n\tint _item_size_x = item_template->get_inventory_size_x();\n\tint _item_size_y = item_template->get_inventory_size_y();\n\n\tERR_FAIL_COND_V(x + _item_size_x > _size_x || y + _item_size_y > _size_y, false);\n\n\tint sx = x + _item_size_x;\n\tint sy = y + _item_size_y;\n\n\tfor (int xx = x; xx < sx; ++xx) {\n\t\tfor (int yy = y; yy < sy; ++yy) {\n\t\t\tif (_space_map[xx * _size_x + yy] != 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n}\nint GridBag::item_count_under_area(const int x, const int y, const int size_x, const int size_y) const {\n\tERR_FAIL_COND_V(x < 0 || y < 0, false);\n\tERR_FAIL_COND_V(x > _size_x || y > _size_y, false);\n\n\tERR_FAIL_COND_V(x + size_x > _size_x || y + size_y > _size_y, false);\n\n\tint count = 0;\n\tint sx = x + size_x;\n\tint sy = y + size_y;\n\n\tfor (int xx = x; xx < sx; ++xx) {\n\t\tfor (int yy = y; yy < sy; ++yy) {\n\t\t\tif (_space_map[xx * _size_x + yy] != 0) {\n\t\t\t}\n\t\t}\n\t}\n\n\treturn count;\n}\n\nRef<ItemInstance> GridBag::get_item(const int index) const {\n\tERR_FAIL_INDEX_V(index, _items.size(), Ref<ItemInstance>(NULL));\n\n\treturn (_items.get(index));\n}\n\nRef<ItemInstance> GridBag::get_and_remove_item(const int index) {\n\tERR_FAIL_INDEX_V(index, _items.size(), Ref<ItemInstance>(NULL));\n\n\tRef<ItemInstance> item = _items.get(index);\n\n\t_items.remove_at(index);\n\n\t//Go over everything, to make sure item site changes won't cause bugs.\n\tfor (int x = 0; x < _size_x; ++x) {\n\t\tfor (int y = 0; y < _size_y; ++y) {\n\t\t\tint indx = x * _size_x + y;\n\n\t\t\tif (_space_map[indx] == index) {\n\t\t\t\t_space_map.set(indx, 0);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn item;\n}\n\nvoid GridBag::remove_item(const int index) {\n\tERR_FAIL_INDEX(index, _items.size());\n\n\t_items.remove_at(index);\n\n\t//Go over everything, to make sure item site changes won't cause bugs.\n\tfor (int x = 0; x < _size_x; ++x) {\n\t\tfor (int y = 0; y < _size_y; ++y) {\n\t\t\tint indx = x * _size_x + y;\n\n\t\t\tif (_space_map[indx] == index) {\n\t\t\t\t_space_map.set(indx, 0);\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid GridBag::basic_add_item(const Ref<ItemInstance> item) {\n\t_items.push_back(item);\n}\nvoid GridBag::basic_remove_item(const int index) {\n\t_items.remove_at(index);\n}\n\nint GridBag::get_item_count() const {\n\treturn _items.size();\n}\n\nint GridBag::get_space_map_entry(const int index) const {\n\treturn _space_map[index];\n}\nvoid GridBag::set_space_map_entry(const int index, const int value) {\n\t_space_map.set(index, value);\n}\n\nint GridBag::get_size_x() const {\n\treturn _size_x;\n}\nint GridBag::get_size_y() const {\n\treturn _size_y;\n}\n\nvoid GridBag::set_size(const int x, const int y) {\n\tERR_FAIL_COND(x == 0 || y == 0);\n\tERR_FAIL_COND(_size_x != 0 || _size_y != 0);\n\n\t_size_x = x;\n\t_size_y = y;\n\n\t_space_map.resize(x * y);\n\n\tfor (int i = 0; i < _space_map.size(); ++i) {\n\t\t_space_map.set(i, 0);\n\t}\n}\n\nGridBag::GridBag() {\n\t_allowed_item_types = 0x1FFF;\n\n\t_size_x = 0;\n\t_size_y = 0;\n}\n\nGridBag::~GridBag() {\n\t_items.clear();\n\t_space_map.clear();\n}\n\nvoid GridBag::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_allowed_item_types\"), &GridBag::get_allowed_item_types);\n\tClassDB::bind_method(D_METHOD(\"set_allowed_item_types\", \"count\"), &GridBag::set_allowed_item_types);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"allowed_item_types\", PROPERTY_HINT_FLAGS, ItemEnums::BINDING_STRING_ITEM_TYPE_FLAGS), \"set_allowed_item_types\", \"get_allowed_item_types\");\n\n\tClassDB::bind_method(D_METHOD(\"add_item\", \"item\"), &GridBag::add_item);\n\tClassDB::bind_method(D_METHOD(\"add_item_to_position\", \"x\", \"y\", \"item\"), &GridBag::add_item_to_position);\n\n\tClassDB::bind_method(D_METHOD(\"can_add_item_at\", \"x\", \"y\", \"item\"), &GridBag::can_add_item_at);\n\tClassDB::bind_method(D_METHOD(\"item_count_under_area\", \"x\", \"y\", \"item\"), &GridBag::item_count_under_area);\n\n\tClassDB::bind_method(D_METHOD(\"get_item\", \"index\"), &GridBag::get_item);\n\tClassDB::bind_method(D_METHOD(\"get_and_remove_item\", \"index\"), &GridBag::get_and_remove_item);\n\tClassDB::bind_method(D_METHOD(\"remove_item\", \"index\"), &GridBag::remove_item);\n\n\tClassDB::bind_method(D_METHOD(\"basic_add_item\", \"item\"), &GridBag::basic_add_item);\n\tClassDB::bind_method(D_METHOD(\"basic_remove_item\", \"index\"), &GridBag::basic_remove_item);\n\n\tClassDB::bind_method(D_METHOD(\"get_item_count\"), &GridBag::get_item_count);\n\n\tClassDB::bind_method(D_METHOD(\"get_space_map_entry\", \"index\"), &GridBag::get_space_map_entry);\n\tClassDB::bind_method(D_METHOD(\"set_space_map_entry\", \"index\", \"value\"), &GridBag::set_space_map_entry);\n\n\tClassDB::bind_method(D_METHOD(\"get_size_x\"), &GridBag::get_size_x);\n\tClassDB::bind_method(D_METHOD(\"get_size_y\"), &GridBag::get_size_y);\n\n\tClassDB::bind_method(D_METHOD(\"set_size\", \"x\", \"y\"), &GridBag::set_size);\n}\n"
  },
  {
    "path": "inventory/grid_bag.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef GRID_BAG_H\n#define GRID_BAG_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n\n\n#include \"../item_enums.h\"\n\nclass itemTemplate;\nclass ItemInstance;\n\nclass GridBag : public RefCounted {\n\tGDCLASS(GridBag, RefCounted);\n\npublic:\n\tint get_allowed_item_types() const;\n\tvoid set_allowed_item_types(const int value);\n\n\tbool add_item(Ref<ItemInstance> item);\n\tbool add_item_to_position(const int x, const int y, Ref<ItemInstance> item);\n\n\tbool can_add_item_at(const int x, const int y, const Ref<ItemInstance> item) const;\n\tint item_count_under_area(const int x, const int y, const int size_x, const int size_y) const;\n\n\tRef<ItemInstance> get_item(const int index) const;\n\tRef<ItemInstance> get_and_remove_item(const int index);\n\tvoid remove_item(const int index);\n\n\tvoid basic_add_item(const Ref<ItemInstance> item);\n\tvoid basic_remove_item(const int index);\n\n\tint get_item_count() const;\n\n\tint get_space_map_entry(const int index) const;\n\tvoid set_space_map_entry(const int index, const int value);\n\n\tint get_size_x() const;\n\tint get_size_y() const;\n\n\tvoid set_size(const int x, const int y);\n\n\t//to_dict();\n\t//from_dict();\n\n\tGridBag();\n\t~GridBag();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _allowed_item_types;\n\n\tint _size_x;\n\tint _size_y;\n\n\tVector<Ref<ItemInstance> > _items;\n\tVector<int> _space_map;\n};\n\n#endif\n"
  },
  {
    "path": "inventory/inventory.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"inventory.h\"\n\n#include \"../data/items/item_instance.h\"\n#include \"../data/items/item_template.h\"\n\n#include \"../entities/player.h\"\n\nint Inventory::get_allowed_item_types() const {\n\treturn _allowed_item_types;\n}\n\nvoid Inventory::set_allowed_item_types(const int value) {\n\t_allowed_item_types = value;\n}\n\nPlayer *Inventory::target_get() const {\n\treturn _target;\n}\n\nvoid Inventory::target_set(Player *value) {\n\t_target = value;\n}\n\nvoid Inventory::target_set_bind(Node *caster) {\n\tif (!caster) {\n\t\treturn;\n\t}\n\n\tPlayer *e = Object::cast_to<Player>(caster);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_target = e;\n}\n\nInventory::Inventory() {\n\t_allowed_item_types = 0xFFFFFF;\n}\n\nInventory::~Inventory() {\n}\n\nvoid Inventory::_bind_methods() {\n\tADD_SIGNAL(MethodInfo(\"changed\", PropertyInfo(Variant::OBJECT, \"inventory\", PROPERTY_HINT_RESOURCE_TYPE, \"Inventory\")));\n\n\tClassDB::bind_method(D_METHOD(\"get_allowed_item_types\"), &Inventory::get_allowed_item_types);\n\tClassDB::bind_method(D_METHOD(\"set_allowed_item_types\", \"count\"), &Inventory::set_allowed_item_types);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"allowed_item_types\", PROPERTY_HINT_FLAGS, ItemEnums::BINDING_STRING_ITEM_TYPE_FLAGS), \"set_allowed_item_types\", \"get_allowed_item_types\");\n\n\tClassDB::bind_method(D_METHOD(\"get_target\"), &Inventory::get_target);\n\tClassDB::bind_method(D_METHOD(\"set_target\", \"target\"), &Inventory::target_set_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"target\", PROPERTY_HINT_RESOURCE_TYPE, \"Player\"), \"set_target\", \"get_target\");\n}\n"
  },
  {
    "path": "inventory/inventory.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef INVENTORY_H\n#define INVENTORY_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n\n\n#include \"../item_enums.h\"\n\nclass Player;\nclass itemTemplate;\nclass ItemInstance;\n\nclass Inventory : public RefCounted {\n\tGDCLASS(Inventory, RefCounted);\n\npublic:\n\tint get_allowed_item_types() const;\n\tvoid set_allowed_item_types(const int value);\n\n\tPlayer *target_get() const;\n\tvoid target_set(Player *caster);\n\tvoid target_set_bind(Node *caster);\n\n\tInventory();\n\t~Inventory();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tPlayer *_target;\n\tint _allowed_item_types;\n};\n\n#endif\n"
  },
  {
    "path": "inventory/normal_bag.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"bag.h\"\n\n#include \"../data/items/item_instance.h\"\n#include \"../data/items/item_template.h\"\n\nint Bag::get_allowed_item_types() const {\n\treturn _allowed_item_types;\n}\n\nvoid Bag::set_allowed_item_types(const int value) {\n\t_allowed_item_types = value;\n}\n\nbool Bag::add_item(Ref<ItemInstance> item) {\n}\n\nRef<ItemInstance> Bag::get_item(const int index) const {\n\tERR_FAIL_INDEX_V(index, _items.size(), Ref<ItemInstance>(NULL));\n\n\treturn (_items.get(index));\n}\n\nRef<ItemInstance> Bag::remove_item(const int index) {\n\tERR_FAIL_INDEX_V(index, _items.size(), Ref<ItemInstance>(NULL));\n\n\tRef<ItemInstance> item = _items.get(index);\n\n\t_items.remove_at(index);\n\n\t//Go over everything, to make sure item site changes won't cause bugs.\n\tfor (int x = 0; x < _size_x; ++x) {\n\t\tfor (int y = 0; y < _size_y; ++y) {\n\t\t\tint indx = x * _size_x + y;\n\n\t\t\tif (_space_map[indx] == index) {\n\t\t\t\t_space_map.set(indx, 0);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn item;\n}\n\nbool Bag::can_add_item(const Ref<ItemInstance> item) const {\n}\n\nint Bag::get_item_count() const {\n\treturn _items.size();\n}\n\nint Bag::get_size() const {\n\treturn _items.size();\n}\n\nvoid Bag::set_size(const int x, const int y) {\n\tERR_FAIL_COND(x == 0 || y == 0);\n\tERR_FAIL_COND(_size_x != 0 || _size_y != 0);\n\n\t_size_x = x;\n\t_size_y = y;\n\n\t_space_map.resize(x * y);\n\n\tfor (int i = 0; i < _space_map.size(); ++i) {\n\t\t_space_map.set(i, 0);\n\t}\n}\n\nBag::Bag() {\n\t_allowed_item_types = 0x1FFF;\n\n\t_size = 0;\n}\n\nBag::~Bag() {\n\t_items.clear();\n}\n\nvoid Bag::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_allowed_item_types\"), &Bag::get_allowed_item_types);\n\tClassDB::bind_method(D_METHOD(\"set_allowed_item_types\", \"count\"), &Bag::set_allowed_item_types);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"allowed_item_types\", PROPERTY_HINT_FLAGS, ItemEnums::BINDING_STRING_ITEM_TYPE_FLAGS), \"set_allowed_item_types\", \"get_allowed_item_types\");\n\n\tClassDB::bind_method(D_METHOD(\"add_item\", \"item\"), &Bag::add_item);\n\tClassDB::bind_method(D_METHOD(\"add_item_to_position\", \"x\", \"y\", \"item\"), &Bag::add_item_to_position);\n\n\tClassDB::bind_method(D_METHOD(\"can_add_item_at\", \"x\", \"y\", \"item\"), &Bag::can_add_item_at);\n\tClassDB::bind_method(D_METHOD(\"item_count_under_area\", \"x\", \"y\", \"item\"), &Bag::item_count_under_area);\n\n\tClassDB::bind_method(D_METHOD(\"get_item\", \"index\"), &Bag::get_item);\n\tClassDB::bind_method(D_METHOD(\"get_and_remove_item\", \"index\"), &Bag::get_and_remove_item);\n\tClassDB::bind_method(D_METHOD(\"remove_item\", \"index\"), &Bag::remove_item);\n\n\tClassDB::bind_method(D_METHOD(\"basic_add_item\", \"item\"), &Bag::basic_add_item);\n\tClassDB::bind_method(D_METHOD(\"basic_remove_item\", \"index\"), &Bag::basic_remove_item);\n\n\tClassDB::bind_method(D_METHOD(\"get_item_count\"), &Bag::get_item_count);\n\n\tClassDB::bind_method(D_METHOD(\"get_space_map_entry\", \"index\"), &Bag::get_space_map_entry);\n\tClassDB::bind_method(D_METHOD(\"set_space_map_entry\", \"index\", \"value\"), &Bag::set_space_map_entry);\n\n\tClassDB::bind_method(D_METHOD(\"get_size_x\"), &Bag::get_size_x);\n\tClassDB::bind_method(D_METHOD(\"get_size_y\"), &Bag::get_size_y);\n\n\tClassDB::bind_method(D_METHOD(\"set_size\", \"x\", \"y\"), &Bag::set_size);\n}\n"
  },
  {
    "path": "inventory/normal_bag.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef BAG_H\n#define BAG_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/templates/vector.h\"\n\n\n#include \"../item_enums.h\"\n\nclass itemTemplate;\nclass ItemInstance;\n\nclass Bag : public RefCounted {\n\tGDCLASS(Bag, RefCounted);\n\npublic:\n\tint get_allowed_item_types() const;\n\tvoid set_allowed_item_types(const int value);\n\n\tbool add_item(Ref<ItemInstance> item);\n\tRef<ItemInstance> get_item(const int index) const;\n\tRef<ItemInstance> remove_item(const int index);\n\n\tbool can_add_item(Ref<ItemInstance> item);\n\n\tint get_item_count() const;\n\n\tint get_size() const;\n\tvoid set_size(const int size);\n\n\tbool is_full() const;\n\n\t//to_dict();\n\t//from_dict();\n\n\tBag();\n\t~Bag();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _allowed_item_types;\n\tint _item_count;\n\tVector<Ref<ItemInstance> > _items;\n};\n\n#endif\n"
  },
  {
    "path": "item_enums.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"item_enums.h\"\n\nconst String ItemEnums::BINDING_STRING_RARITY = \"None,Common,Uncommon,Superior,Heroic,Mythic,Artifact\";\nconst String ItemEnums::BINDING_STRING_RARITY_FLAG = \"Common,Uncommon,Superior,Heroic,Mythic,Artifact\";\nconst String ItemEnums::BINDING_STRING_ITEM_TYPE = \"None,Equipment,Potion,Herb,Ore,Gemstone,Food,Alchemy,Engineering,Enchanting,Tailoring,Recipe,Currency,Bag\";\nconst String ItemEnums::BINDING_STRING_ITEM_TYPE_FLAGS = \"Equipment,Potion,Herb,Ore,Gemstone,Food,Alchemy,Engineering,Enchanting,Tailoring,Recipe,Currency,Bag\";\nconst String ItemEnums::BINDING_STRING_ITEM_SUB_TYPE = \"None,Sword,Axe,Mace,Dagger,Bow,Crossbow,Gun,Wand,Quest Item\";\nconst String ItemEnums::BINDING_STRING_ITEM_SUB_SUB_TYPE = \"None,Two Hand,One Hand,Left Hand,Right Hand\";\nconst String ItemEnums::BINDING_STRING_ARMOR_TYPE = \"None,Cloth,Leather,Mail,Plate\";\n\nString ItemEnums::get_armor_type_string(int type) {\n\tswitch (type) {\n\t\tcase 0:\n\t\t\treturn \"none\";\n\t\tcase 1:\n\t\t\treturn \"cloth\";\n\t\tcase 2:\n\t\t\treturn \"leather\";\n\t\tcase 3:\n\t\t\treturn \"mail\";\n\t\tcase 4:\n\t\t\treturn \"plate\";\n\t}\n\n\treturn \"\";\n}\n"
  },
  {
    "path": "item_enums.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ITEM_ENUMS_H\n#define ITEM_ENUMS_H\n\n#include \"core/version.h\"\n\n#include \"core/object/object.h\"\n#include \"core/string/ustring.h\"\n#include \"core/object/class_db.h\"\n\n\nclass ItemEnums : public Object {\n\tGDCLASS(ItemEnums, Object);\n\npublic:\n\tstatic const String BINDING_STRING_RARITY;\n\tstatic const String BINDING_STRING_RARITY_FLAG;\n\tstatic const String BINDING_STRING_ITEM_TYPE;\n\tstatic const String BINDING_STRING_ITEM_TYPE_FLAGS;\n\tstatic const String BINDING_STRING_ITEM_SUB_TYPE;\n\tstatic const String BINDING_STRING_ITEM_SUB_SUB_TYPE;\n\tstatic const String BINDING_STRING_ARMOR_TYPE;\n\n\tenum ItemRarity {\n\t\tITEM_RARITY_NONE = 0,\n\t\tITEM_RARITY_COMMON = 1,\n\t\tITEM_RARITY_UNCOMMON = 2,\n\t\tITEM_RARITY_SUPERIOR = 3,\n\t\tITEM_RARITY_HEROIC = 4,\n\t\tITEM_RARITY_MYTHIC = 5,\n\t\tITEM_RARITY_ARTIFACT = 6,\n\t};\n\n\tenum ItemRarityFlag {\n\t\tITEM_RARITY_FLAG_NONE = 0,\n\t\tITEM_RARITY_FLAG_COMMON = 1 << 0,\n\t\tITEM_RARITY_FLAG_UNCOMMON = 1 << 1,\n\t\tITEM_RARITY_FLAG_SUPERIOR = 1 << 2,\n\t\tITEM_RARITY_FLAG_HEROIC = 1 << 3,\n\t\tITEM_RARITY_FLAG_MYTHIC = 1 << 4,\n\t\tITEM_RARITY_FLAG_ARTIFACT = 1 << 5,\n\t};\n\n\tenum ItemType {\n\t\tITEM_TYPE_NONE = 0,\n\t\tITEM_TYPE_EQUIPMENT = 1 << 0,\n\t\tITEM_TYPE_POTION = 1 << 1,\n\t\tITEM_TYPE_HERB = 1 << 2,\n\t\tITEM_TYPE_ORE = 1 << 3,\n\t\tITEM_TYPE_GEMSTONE = 1 << 4,\n\t\tITEM_TYPE_FOOD = 1 << 5,\n\t\tITEM_TYPE_ALCHEMY = 1 << 6,\n\t\tITEM_TYPE_ENGINEERING = 1 << 7,\n\t\tITEM_TYPE_ENCHANTING = 1 << 8,\n\t\tITEM_TYPE_TAILORING = 1 << 9,\n\t\tITEM_TYPE_RECIPE = 1 << 10,\n\t\tITEM_TYPE_CURRENCY = 1 << 11,\n\t\tITEM_TYPE_BAG = 1 << 12,\n\t};\n\n\tenum ItemSubtype {\n\t\tITEM_SUB_TYPE_NONE = 0,\n\t\tITEM_SUB_TYPE_SWORD,\n\t\tITEM_SUB_TYPE_AXE,\n\t\tITEM_SUB_TYPE_MACE,\n\t\tITEM_SUB_TYPE_DAGGER,\n\t\tITEM_SUB_TYPE_BOW,\n\t\tITEM_SUB_TYPE_CROSSBOW,\n\t\tITEM_SUB_TYPE_GUN,\n\t\tITEM_SUB_TYPE_WAND,\n\t\tITEM_SUB_TYPE_QUEST_ITEM,\n\t};\n\n\tenum ItemSubSubtype {\n\t\tITEM_SUB_SUB_TYPE_NONE,\n\t\tITEM_SUB_SUB_TYPE_TWO_HAND,\n\t\tITEM_SUB_SUB_TYPE_ONE_HAND,\n\t\tITEM_SUB_SUB_TYPE_LEFT_HAND,\n\t\tITEM_SUB_SUB_TYPE_RIGHT_HAND\n\t};\n\n\tenum ArmorType {\n\t\tARMOR_TYPE_NONE = 0,\n\t\tARMOR_TYPE_CLOTH = 1,\n\t\tARMOR_TYPE_LEATHER = 2,\n\t\tARMOR_TYPE_MAIL = 3,\n\t\tARMOR_TYPE_PLATE = 4,\n\t\tARMOR_TYPE_MAX = 5,\n\t};\n\n\tstatic String get_equip_slot_string(int slot);\n\tstatic String get_armor_type_string(int type);\n\n\tItemEnums() {}\n\nprotected:\n\tstatic void _bind_methods() {\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_NONE);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_COMMON);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_UNCOMMON);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_SUPERIOR);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_HEROIC);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_MYTHIC);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_ARTIFACT);\n\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_FLAG_NONE);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_FLAG_COMMON);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_FLAG_UNCOMMON);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_FLAG_SUPERIOR);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_FLAG_HEROIC);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_FLAG_MYTHIC);\n\t\tBIND_ENUM_CONSTANT(ITEM_RARITY_FLAG_ARTIFACT);\n\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_NONE);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_EQUIPMENT);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_POTION);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_HERB);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_ORE);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_GEMSTONE);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_FOOD);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_ALCHEMY);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_ENGINEERING);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_ENCHANTING);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_TAILORING);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_RECIPE);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_CURRENCY);\n\t\tBIND_ENUM_CONSTANT(ITEM_TYPE_BAG);\n\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_TYPE_NONE);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_TYPE_SWORD);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_TYPE_AXE);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_TYPE_MACE);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_TYPE_DAGGER);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_TYPE_BOW);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_TYPE_CROSSBOW);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_TYPE_GUN);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_TYPE_WAND);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_TYPE_QUEST_ITEM);\n\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_SUB_TYPE_NONE);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_SUB_TYPE_TWO_HAND);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_SUB_TYPE_ONE_HAND);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_SUB_TYPE_LEFT_HAND);\n\t\tBIND_ENUM_CONSTANT(ITEM_SUB_SUB_TYPE_RIGHT_HAND);\n\n\t\tBIND_ENUM_CONSTANT(ARMOR_TYPE_NONE);\n\t\tBIND_ENUM_CONSTANT(ARMOR_TYPE_CLOTH);\n\t\tBIND_ENUM_CONSTANT(ARMOR_TYPE_LEATHER);\n\t\tBIND_ENUM_CONSTANT(ARMOR_TYPE_MAIL);\n\t\tBIND_ENUM_CONSTANT(ARMOR_TYPE_PLATE);\n\t\tBIND_ENUM_CONSTANT(ARMOR_TYPE_MAX);\n\t}\n};\n\nVARIANT_ENUM_CAST(ItemEnums::ItemRarity);\nVARIANT_ENUM_CAST(ItemEnums::ItemRarityFlag);\nVARIANT_ENUM_CAST(ItemEnums::ItemType);\nVARIANT_ENUM_CAST(ItemEnums::ItemSubtype);\nVARIANT_ENUM_CAST(ItemEnums::ItemSubSubtype);\nVARIANT_ENUM_CAST(ItemEnums::ArmorType);\n\n#endif\n"
  },
  {
    "path": "material_cache/ess_material_cache.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"ess_material_cache.h\"\n\n#if PROPS_PRESENT\n#include \"../../props/props/prop_data.h\"\n#include \"../../props/props/prop_data_prop.h\"\n#include \"../../props/props/prop_data_tiled_wall.h\"\n#include \"../../props/tiled_wall/tiled_wall_data.h\"\n\n#if MESH_DATA_RESOURCE_PRESENT\n#define PROPS_PRESENT 1\n#include \"../../mesh_data_resource/props/prop_data_mesh_data.h\"\n#undef PROPS_PRESENT\n#endif\n\n#endif\n\n#include \"../singletons/ess.h\"\n#include \"../../texture_packer/texture_packer.h\"\n\n\n#define VARIANT_ARRAY_GET(arr)             \\\n\tVector<Variant> r;                     \\\n\tfor (int i = 0; i < arr.size(); i++) { \\\n\t\tr.push_back(arr[i]);               \\\n\t}                                      \\\n\treturn r;\n\n\n\nbool ESSMaterialCache::get_initialized() {\n\treturn _initialized;\n}\nvoid ESSMaterialCache::set_initialized(const bool value) {\n\t_initialized = value;\n}\n\nbool ESSMaterialCache::mutex_locked() {\n\treturn _locked;\n}\nvoid ESSMaterialCache::mutex_lock() {\n\t_mutex.lock();\n}\nvoid ESSMaterialCache::mutex_unlock() {\n\t_mutex.unlock();\n}\n\nint ESSMaterialCache::get_ref_count() {\n\treturn _ref_count;\n}\nvoid ESSMaterialCache::set_ref_count(const int value) {\n\t_ref_count = value;\n}\nvoid ESSMaterialCache::inc_ref_count() {\n\t_ref_count += 1;\n}\nvoid ESSMaterialCache::dec_ref_count() {\n\t_ref_count -= 1;\n}\n\n//Materials\nRef<Material> ESSMaterialCache::material_get(const int index) {\n\tERR_FAIL_INDEX_V(index, _materials.size(), Ref<Material>(NULL));\n\n\treturn _materials[index];\n}\n\nRef<Material> ESSMaterialCache::material_lod_get(const int index) {\n\tERR_FAIL_COND_V(_materials.size() == 0, Ref<Material>(NULL));\n\n\tif (index < 0) {\n\t\treturn _materials[0];\n\t}\n\n\tif (index >= _materials.size()) {\n\t\treturn _materials[_materials.size() - 1];\n\t}\n\n\treturn _materials[index];\n}\n\nvoid ESSMaterialCache::material_add(const Ref<Material> &value) {\n\tERR_FAIL_COND(!value.is_valid());\n\n\t_materials.push_back(value);\n}\n\nvoid ESSMaterialCache::material_set(const int index, const Ref<Material> &value) {\n\tERR_FAIL_INDEX(index, _materials.size());\n\n\t_materials.set(index, value);\n}\n\nvoid ESSMaterialCache::material_remove(const int index) {\n\t_materials.remove_at(index);\n}\n\nint ESSMaterialCache::material_get_num() const {\n\treturn _materials.size();\n}\n\nvoid ESSMaterialCache::materials_clear() {\n\t_materials.clear();\n}\n\nVector<Variant> ESSMaterialCache::materials_get() {\n\tVARIANT_ARRAY_GET(_materials);\n}\n\nvoid ESSMaterialCache::materials_set(const Vector<Variant> &materials) {\n\t_materials.clear();\n\n\tfor (int i = 0; i < materials.size(); i++) {\n\t\tRef<Material> material = Ref<Material>(materials[i]);\n\n\t\t_materials.push_back(material);\n\t}\n}\n\nvoid ESSMaterialCache::texture_add(const Ref<Texture> &texture) {\n\t_textures.push_back(texture);\n}\nvoid ESSMaterialCache::texture_remove(const Ref<Texture> &texture) {\n\tfor (int i = 0; i < _textures.size(); ++i) {\n\t\tif (_textures[i] == texture) {\n\t\t\t_textures.remove_at(i);\n\t\t\treturn;\n\t\t}\n\t}\n}\nvoid ESSMaterialCache::texture_remove_index(const int index) {\n\tERR_FAIL_INDEX(index, _textures.size());\n\n\t_textures.remove_at(index);\n}\nvoid ESSMaterialCache::textures_clear() {\n\t_textures.clear();\n}\nint ESSMaterialCache::texture_count() {\n\treturn _textures.size();\n}\nRef<Texture> ESSMaterialCache::texture_get(const int index) {\n\tERR_FAIL_INDEX_V(index, _textures.size(), Ref<Texture>());\n\n\treturn _textures[index];\n}\nRef<AtlasTexture> ESSMaterialCache::texture_get_atlas(const int index) {\n\tERR_FAIL_INDEX_V(index, _textures.size(), Ref<AtlasTexture>());\n\n\treturn texture_get_atlas_tex(_textures[index]);\n}\nRef<AtlasTexture> ESSMaterialCache::texture_get_atlas_tex(const Ref<Texture> &texture) {\n\treturn Ref<AtlasTexture>();\n}\nRect2 ESSMaterialCache::texture_get_uv_rect(const Ref<Texture> &texture) {\n\treturn Rect2(0, 0, 1, 1);\n}\n\n#if PROPS_PRESENT\nvoid ESSMaterialCache::prop_add_textures(const Ref<PropData> &prop) {\n\tif (!prop.is_valid()) {\n\t\treturn;\n\t}\n\n\tfor (int i = 0; i < prop->get_prop_count(); ++i) {\n#if MESH_DATA_RESOURCE_PRESENT\n\t\tRef<PropDataMeshData> pdm = prop->get_prop(i);\n\n\t\tif (pdm.is_valid()) {\n\t\t\tRef<Texture> tex = pdm->get_texture();\n\n\t\t\tif (!tex.is_valid())\n\t\t\t\tcontinue;\n\n\t\t\ttexture_add(tex);\n\n\t\t\tcontinue;\n\t\t}\n#endif\n\n\t\tRef<PropDataTiledWall> pdtw = prop->get_prop(i);\n\n\t\tif (pdtw.is_valid()) {\n\t\t\tRef<TiledWallData> twd = pdtw->get_data();\n\n\t\t\tif (!twd.is_valid())\n\t\t\t\tcontinue;\n\n\t\t\ttwd->setup_cache(Ref<ESSMaterialCache>(this));\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tRef<PropDataProp> pdp = prop->get_prop(i);\n\n\t\tif (pdp.is_valid()) {\n\t\t\tprop_add_textures(pdp->get_prop());\n\t\t}\n\t}\n}\nvoid ESSMaterialCache::prop_remove_textures(const Ref<PropData> &prop) {\n\tif (!prop.is_valid()) {\n\t\treturn;\n\t}\n\n\tfor (int i = 0; i < prop->get_prop_count(); ++i) {\n#if MESH_DATA_RESOURCE_PRESENT\n\t\tRef<PropDataMeshData> pdm = prop->get_prop(i);\n\n\t\tif (pdm.is_valid()) {\n\t\t\tRef<Texture> tex = pdm->get_texture();\n\n\t\t\tif (!tex.is_valid())\n\t\t\t\tcontinue;\n\n\t\t\ttexture_remove(tex);\n\t\t}\n#endif\n\n\t\tRef<PropDataTiledWall> pdtw = prop->get_prop(i);\n\n\t\tif (pdtw.is_valid()) {\n\t\t\tRef<TiledWallData> twd = pdtw->get_data();\n\n\t\t\tif (!twd.is_valid())\n\t\t\t\tcontinue;\n\n\t\t\tfor (int j = 0; j < twd->get_texture_count(); ++j) {\n\t\t\t\tconst Ref<Texture> &tex = twd->get_texture(j);\n\n\t\t\t\tif (tex.is_valid()) {\n\t\t\t\t\ttexture_remove(tex);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < twd->get_flavour_texture_count(); ++j) {\n\t\t\t\tconst Ref<Texture> &tex = twd->get_flavour_texture(j);\n\n\t\t\t\tif (tex.is_valid()) {\n\t\t\t\t\ttexture_remove(tex);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tRef<PropDataProp> pdp = prop->get_prop(i);\n\n\t\tif (pdp.is_valid()) {\n\t\t\tprop_remove_textures(pdp);\n\t\t}\n\t}\n}\n#endif\n\nvoid ESSMaterialCache::refresh_rects() {\n\t_initialized = true;\n}\n\nvoid ESSMaterialCache::initial_setup_default() {\n\t//Note: call only on the main thread! Shader->duplicate() can crash if done from an another thread!\n\n\tESS *ess = ESS::get_singleton();\n\n\tess->ensure_materials_loaded();\n\n\tint matc = ess->material_get_num();\n\tfor (int i = 0; i < matc; ++i) {\n\t\tRef<Material> m = ess->material_get(i);\n\n\t\tERR_CONTINUE(!m.is_valid());\n\n\t\tRef<Material> md = m->duplicate();\n\n\t\t_materials.push_back(md);\n\t}\n}\n\nvoid ESSMaterialCache::setup_material_albedo(Ref<Texture> texture) {\n\tif (has_method(\"_setup_material_albedo\"))\n\t\tcall(\"_setup_material_albedo\", texture);\n}\n\nESSMaterialCache::ESSMaterialCache() {\n\t_ref_count = 0;\n\t_initialized = false;\n\t_locked = false;\n}\n\nESSMaterialCache::~ESSMaterialCache() {\n\t_materials.clear();\n}\n\nvoid ESSMaterialCache::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_initialized\"), &ESSMaterialCache::get_initialized);\n\tClassDB::bind_method(D_METHOD(\"set_initialized\", \"value\"), &ESSMaterialCache::set_initialized);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"initialized\"), \"set_initialized\", \"get_initialized\");\n\n\tClassDB::bind_method(D_METHOD(\"mutex_locked\"), &ESSMaterialCache::mutex_locked);\n\tClassDB::bind_method(D_METHOD(\"mutex_lock\"), &ESSMaterialCache::mutex_lock);\n\tClassDB::bind_method(D_METHOD(\"mutex_unlock\"), &ESSMaterialCache::mutex_unlock);\n\n\tClassDB::bind_method(D_METHOD(\"get_ref_count\"), &ESSMaterialCache::get_ref_count);\n\tClassDB::bind_method(D_METHOD(\"set_ref_count\", \"value\"), &ESSMaterialCache::set_ref_count);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"mat_ref_count\"), \"set_ref_count\", \"get_ref_count\");\n\tClassDB::bind_method(D_METHOD(\"inc_ref_count\"), &ESSMaterialCache::inc_ref_count);\n\tClassDB::bind_method(D_METHOD(\"dec_ref_count\"), &ESSMaterialCache::dec_ref_count);\n\n\t//GDVIRTUAL_BIND(\"_setup_material_albedo\", \"texture\", \"Texture\");\n\n\tClassDB::bind_method(D_METHOD(\"material_get\", \"index\"), &ESSMaterialCache::material_get);\n\tClassDB::bind_method(D_METHOD(\"material_lod_get\", \"index\"), &ESSMaterialCache::material_lod_get);\n\tClassDB::bind_method(D_METHOD(\"material_add\", \"value\"), &ESSMaterialCache::material_add);\n\tClassDB::bind_method(D_METHOD(\"material_set\", \"index\", \"value\"), &ESSMaterialCache::material_set);\n\tClassDB::bind_method(D_METHOD(\"material_remove\", \"index\"), &ESSMaterialCache::material_remove);\n\tClassDB::bind_method(D_METHOD(\"material_get_num\"), &ESSMaterialCache::material_get_num);\n\tClassDB::bind_method(D_METHOD(\"materials_clear\"), &ESSMaterialCache::materials_clear);\n\n\tClassDB::bind_method(D_METHOD(\"materials_get\"), &ESSMaterialCache::materials_get);\n\tClassDB::bind_method(D_METHOD(\"materials_set\"), &ESSMaterialCache::materials_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"materials\", PROPERTY_HINT_NONE, \"17/17:Material\", PROPERTY_USAGE_DEFAULT, \"Material\"), \"materials_set\", \"materials_get\");\n\n\tClassDB::bind_method(D_METHOD(\"texture_add\", \"texture\"), &ESSMaterialCache::texture_add);\n\tClassDB::bind_method(D_METHOD(\"texture_remove\", \"texture\"), &ESSMaterialCache::texture_remove);\n\tClassDB::bind_method(D_METHOD(\"texture_remove_index\", \"index\"), &ESSMaterialCache::texture_remove_index);\n\tClassDB::bind_method(D_METHOD(\"textures_clear\"), &ESSMaterialCache::textures_clear);\n\tClassDB::bind_method(D_METHOD(\"texture_count\"), &ESSMaterialCache::texture_count);\n\tClassDB::bind_method(D_METHOD(\"texture_get\", \"index\"), &ESSMaterialCache::texture_get);\n\tClassDB::bind_method(D_METHOD(\"texture_get_atlas\", \"index\"), &ESSMaterialCache::texture_get_atlas);\n\tClassDB::bind_method(D_METHOD(\"texture_get_atlas_tex\", \"index\"), &ESSMaterialCache::texture_get_atlas_tex);\n\tClassDB::bind_method(D_METHOD(\"texture_get_uv_rect\", \"texture\"), &ESSMaterialCache::texture_get_uv_rect);\n\n#if PROPS_PRESENT\n\tClassDB::bind_method(D_METHOD(\"prop_add_textures\", \"prop\"), &ESSMaterialCache::prop_add_textures);\n\tClassDB::bind_method(D_METHOD(\"prop_remove_textures\", \"prop\"), &ESSMaterialCache::prop_remove_textures);\n#endif\n\n\tClassDB::bind_method(D_METHOD(\"refresh_rects\"), &ESSMaterialCache::refresh_rects);\n\n\tClassDB::bind_method(D_METHOD(\"setup_material_albedo\", \"texture\"), &ESSMaterialCache::setup_material_albedo);\n\n\tClassDB::bind_method(D_METHOD(\"initial_setup_default\"), &ESSMaterialCache::initial_setup_default);\n}\n"
  },
  {
    "path": "material_cache/ess_material_cache.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ESS_MATERIAL_CACHE_H\n#define ESS_MATERIAL_CACHE_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/math/color.h\"\n#include \"core/templates/vector.h\"\n\n#include \"core/math/rect2.h\"\n#include \"scene/resources/material.h\"\n#include \"core/os/mutex.h\"\n\n#include \"../../texture_packer/texture_packer.h\"\n\nclass PropData;\n\nclass ESSMaterialCache : public Resource {\n\tGDCLASS(ESSMaterialCache, Resource)\n\npublic:\n\tbool get_initialized();\n\tvoid set_initialized(const bool value);\n\n\tbool mutex_locked();\n\tvoid mutex_lock();\n\tvoid mutex_unlock();\n\n\tint get_ref_count();\n\tvoid set_ref_count(const int value);\n\tvoid inc_ref_count();\n\tvoid dec_ref_count();\n\n\tRef<Material> material_get(const int index);\n\tRef<Material> material_lod_get(const int index);\n\tvoid material_add(const Ref<Material> &value);\n\tvoid material_set(const int index, const Ref<Material> &value);\n\tvoid material_remove(const int index);\n\tint material_get_num() const;\n\tvoid materials_clear();\n\n\tVector<Variant> materials_get();\n\tvoid materials_set(const Vector<Variant> &materials);\n\n\tvirtual void texture_add(const Ref<Texture> &texture);\n\tvirtual void texture_remove(const Ref<Texture> &texture);\n\tvirtual void texture_remove_index(const int index);\n\tvirtual void textures_clear();\n\tvirtual int texture_count();\n\tvirtual Ref<Texture> texture_get(const int index);\n\tvirtual Ref<AtlasTexture> texture_get_atlas(const int index);\n\tvirtual Ref<AtlasTexture> texture_get_atlas_tex(const Ref<Texture> &texture);\n\tvirtual Rect2 texture_get_uv_rect(const Ref<Texture> &texture);\n\n#if PROPS_PRESENT\n\tvoid prop_add_textures(const Ref<PropData> &prop);\n\tvoid prop_remove_textures(const Ref<PropData> &prop);\n#endif\n\n\tvirtual void refresh_rects();\n\n\tvirtual void initial_setup_default();\n\n\tvoid setup_material_albedo(Ref<Texture> texture);\n\n\tESSMaterialCache();\n\t~ESSMaterialCache();\n\nprotected:\n\tstatic void _bind_methods();\n\n\tbool _locked;\n\tbool _initialized;\n\n\tVector<Ref<Material>> _materials;\n\tVector<Ref<Texture>> _textures;\n\n\tint _ref_count;\n\n\tMutex _mutex;\n};\n\n#endif\n"
  },
  {
    "path": "material_cache/ess_material_cache_pcm.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"ess_material_cache_pcm.h\"\n\n#include \"../../texture_packer/texture_packer.h\"\n#include \"../singletons/ess.h\"\n#include \"scene/resources/texture.h\"\n\nint ESSMaterialCachePCM::get_texture_flags() const {\n\treturn _packer->get_texture_flags();\n}\nvoid ESSMaterialCachePCM::set_texture_flags(const int flags) {\n\t_packer->set_texture_flags(flags);\n}\n\nint ESSMaterialCachePCM::get_max_atlas_size() const {\n\treturn _packer->get_max_atlas_size();\n}\nvoid ESSMaterialCachePCM::set_max_atlas_size(const int size) {\n\t_packer->set_max_atlas_size(size);\n}\n\nbool ESSMaterialCachePCM::get_keep_original_atlases() const {\n\treturn _packer->get_keep_original_atlases();\n}\nvoid ESSMaterialCachePCM::set_keep_original_atlases(const bool value) {\n\t_packer->set_keep_original_atlases(value);\n}\n\nColor ESSMaterialCachePCM::get_background_color() const {\n\treturn _packer->get_background_color();\n}\nvoid ESSMaterialCachePCM::set_background_color(const Color &color) {\n\t_packer->set_background_color(color);\n}\n\nint ESSMaterialCachePCM::get_margin() const {\n\treturn _packer->get_margin();\n}\nvoid ESSMaterialCachePCM::set_margin(const int margin) {\n\t_packer->set_margin(margin);\n}\n\nRef<AtlasTexture> ESSMaterialCachePCM::texture_get_atlas_tex(const Ref<Texture> &texture) {\n\tif (!_packer->contains_texture(texture)) {\n\t\treturn Ref<AtlasTexture>();\n\t}\n\n\treturn _packer->get_texture(texture);\n}\nRect2 ESSMaterialCachePCM::texture_get_uv_rect(const Ref<Texture> &texture) {\n\tif (!texture.is_valid()) {\n\t\treturn Rect2(0, 0, 1, 1);\n\t}\n\n\tRef<AtlasTexture> at = _packer->get_texture(texture);\n\n\tif (!at.is_valid()) {\n\t\treturn Rect2(0, 0, 1, 1);\n\t}\n\n\tRect2 region = at->get_region();\n\n\tRef<Texture> tex = at->get_atlas();\n\n\tif (!tex.is_valid()) {\n\t\treturn Rect2(0, 0, 1, 1);\n\t}\n\n\tRef<Image> image = tex->get_image();\n\n\tif (!image.is_valid()) {\n\t\treturn Rect2(0, 0, 1, 1);\n\t}\n\n\tfloat w = tex->get_width();\n\tfloat h = tex->get_height();\n\n\tregion.position = Size2(region.position.x / w, region.position.y / h);\n\tregion.size = Size2(region.size.x / w, region.size.y / h);\n\n\treturn region;\n}\n\nvoid ESSMaterialCachePCM::refresh_rects() {\n\tbool texture_added = false;\n\n\tfor (int i = 0; i < _textures.size(); i++) {\n\t\tRef<Texture> tex = _textures.get(i);\n\n\t\tERR_CONTINUE(!tex.is_valid());\n\n\t\tif (!_packer->contains_texture(tex)) {\n\t\t\t_packer->add_texture(tex);\n\t\t\ttexture_added = true;\n\t\t}\n\t}\n\n\tif (texture_added) {\n\t\t_packer->merge();\n\n\t\tERR_FAIL_COND(_packer->get_texture_count() == 0);\n\n\t\tRef<Texture> tex = _packer->get_generated_texture(0);\n\n\t\tsetup_material_albedo(tex);\n\t}\n\n\t_initialized = true;\n}\n\nvoid ESSMaterialCachePCM::initial_setup_default() {\n\tESSMaterialCache::initial_setup_default();\n\n\tESS *ess = ESS::get_singleton();\n\n\tset_texture_flags(ess->get_texture_flags());\n\tset_max_atlas_size(ess->get_max_atlas_size());\n\tset_keep_original_atlases(ess->get_keep_original_atlases());\n\tset_background_color(ess->get_background_color());\n\tset_margin(ess->get_margin());\n}\n\nvoid ESSMaterialCachePCM::_setup_material_albedo(Ref<Texture> texture) {\n\tint count = material_get_num();\n\n\tfor (int i = 0; i < count; ++i) {\n\t\tRef<Material> m = material_get(i);\n\n\t\tRef<StandardMaterial3D> spmat = m;\n\n\t\tif (spmat.is_valid()) {\n\t\t\tspmat->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, texture);\n\t\t\treturn;\n\t\t}\n\n\t\tRef<ShaderMaterial> shmat = m;\n\n\t\tif (shmat.is_valid()) {\n\t\t\tshmat->set_shader_parameter(\"texture_albedo\", texture);\n\t\t}\n\t}\n}\n\nESSMaterialCachePCM::ESSMaterialCachePCM() {\n\t_packer.instantiate();\n\n\t#warning implement\n\t//_packer->set_texture_flags(Texture::FLAG_MIPMAPS | Texture::FLAG_FILTER);\n\n\t_packer->set_max_atlas_size(1024);\n\t_packer->set_keep_original_atlases(false);\n\t_packer->set_margin(0);\n}\n\nESSMaterialCachePCM::~ESSMaterialCachePCM() {\n\t_packer->clear();\n\t_packer.unref();\n}\n\nvoid ESSMaterialCachePCM::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_texture_flags\"), &ESSMaterialCachePCM::get_texture_flags);\n\tClassDB::bind_method(D_METHOD(\"set_texture_flags\", \"flags\"), &ESSMaterialCachePCM::set_texture_flags);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"texture_flags\", PROPERTY_HINT_FLAGS, \"Mipmaps,Repeat,Filter,Anisotropic Linear,Convert to Linear,Mirrored Repeat,Video Surface\"), \"set_texture_flags\", \"get_texture_flags\");\n\n\tClassDB::bind_method(D_METHOD(\"get_max_atlas_size\"), &ESSMaterialCachePCM::get_max_atlas_size);\n\tClassDB::bind_method(D_METHOD(\"set_max_atlas_size\", \"size\"), &ESSMaterialCachePCM::set_max_atlas_size);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_atlas_size\"), \"set_max_atlas_size\", \"get_max_atlas_size\");\n\n\tClassDB::bind_method(D_METHOD(\"get_keep_original_atlases\"), &ESSMaterialCachePCM::get_keep_original_atlases);\n\tClassDB::bind_method(D_METHOD(\"set_keep_original_atlases\", \"value\"), &ESSMaterialCachePCM::set_keep_original_atlases);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"keep_original_atlases\"), \"set_keep_original_atlases\", \"get_keep_original_atlases\");\n\n\tClassDB::bind_method(D_METHOD(\"get_background_color\"), &ESSMaterialCachePCM::get_background_color);\n\tClassDB::bind_method(D_METHOD(\"set_background_color\", \"color\"), &ESSMaterialCachePCM::set_background_color);\n\tADD_PROPERTY(PropertyInfo(Variant::COLOR, \"background_color\"), \"set_background_color\", \"get_background_color\");\n\n\tClassDB::bind_method(D_METHOD(\"get_margin\"), &ESSMaterialCachePCM::get_margin);\n\tClassDB::bind_method(D_METHOD(\"set_margin\", \"size\"), &ESSMaterialCachePCM::set_margin);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"margin\"), \"set_margin\", \"get_margin\");\n\n\tClassDB::bind_method(D_METHOD(\"_setup_material_albedo\", \"texture\"), &ESSMaterialCachePCM::_setup_material_albedo);\n}\n"
  },
  {
    "path": "material_cache/ess_material_cache_pcm.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ESS_MATERIAL_CACHE_PCM_H\n#define ESS_MATERIAL_CACHE_PCM_H\n\n#include \"ess_material_cache.h\"\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/math/color.h\"\n#include \"core/templates/vector.h\"\n\n#include \"core/math/rect2.h\"\n#include \"scene/resources/material.h\"\n#include \"scene/resources/texture.h\"\n\n#include \"../../texture_packer/texture_packer.h\"\n\nclass TexturePacker;\nclass PropData;\n\nclass ESSMaterialCachePCM : public ESSMaterialCache {\n\tGDCLASS(ESSMaterialCachePCM, ESSMaterialCache);\n\npublic:\n\tint get_texture_flags() const;\n\tvoid set_texture_flags(const int flags);\n\n\tint get_max_atlas_size() const;\n\tvoid set_max_atlas_size(const int size);\n\n\tbool get_keep_original_atlases() const;\n\tvoid set_keep_original_atlases(const bool value);\n\n\tColor get_background_color() const;\n\tvoid set_background_color(const Color &color);\n\n\tint get_margin() const;\n\tvoid set_margin(const int margin);\n\n\tRef<AtlasTexture> texture_get_atlas_tex(const Ref<Texture> &texture);\n\tRect2 texture_get_uv_rect(const Ref<Texture> &texture);\n\n\tvoid refresh_rects();\n\n\tvoid initial_setup_default();\n\n\tvoid _setup_material_albedo(Ref<Texture> texture);\n\n\tESSMaterialCachePCM();\n\t~ESSMaterialCachePCM();\n\nprotected:\n\tstatic void _bind_methods();\n\n\tRef<TexturePacker> _packer;\n};\n\n#endif\n"
  },
  {
    "path": "pipelines/spell_damage_info.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"spell_damage_info.h\"\n\n#include \"core/version.h\"\n\n#include \"../data/spells/spell.h\"\n#include \"../database/ess_resource_db.h\"\n#include \"../entities/entity.h\"\n#include \"../singletons/ess.h\"\n\n#include \"../defines.h\"\n\nbool SpellDamageInfo::get_immune() const {\n\treturn _crit;\n}\nvoid SpellDamageInfo::set_immune(const bool value) {\n\t_crit = value;\n}\n\nint SpellDamageInfo::damage_get() const {\n\treturn _damage;\n}\nvoid SpellDamageInfo::damage_set(const int value) {\n\t_damage = value;\n}\n\nbool SpellDamageInfo::crit_get() const {\n\treturn _crit;\n}\nvoid SpellDamageInfo::crit_set(const bool value) {\n\t_crit = value;\n}\n\nint SpellDamageInfo::amount_absorbed_get() const {\n\treturn _amount_absorbed;\n}\nvoid SpellDamageInfo::amount_absorbed_set(const int value) {\n\t_amount_absorbed = value;\n}\n\nint SpellDamageInfo::damage_type_get() const {\n\treturn _damage_type;\n}\nvoid SpellDamageInfo::damage_type_set(const int value) {\n\t_damage_type = value;\n}\n\nEntity *SpellDamageInfo::dealer_get() {\n\treturn _dealer;\n}\nvoid SpellDamageInfo::dealer_set(Entity *value) {\n\t_dealer = value;\n}\nvoid SpellDamageInfo::dealer_set_bind(Node *value) {\n\tif (!value) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(value);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_dealer = e;\n}\n\nEntity *SpellDamageInfo::receiver_get() {\n\treturn _receiver;\n}\nvoid SpellDamageInfo::receiver_set(Entity *value) {\n\t_receiver = value;\n}\nvoid SpellDamageInfo::receiver_set_bind(Node *value) {\n\tif (!value) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(value);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_receiver = e;\n}\n\nRef<RefCounted> SpellDamageInfo::source_get() {\n\treturn _damage_source;\n}\nvoid SpellDamageInfo::source_set(Ref<RefCounted> value) {\n\t_damage_source_type = DAMAGE_SOURCE_UNKNOWN;\n\t_damage_source = value;\n\t_damage_source_id = 0;\n\n\tif (value->has_method(\"get_id\")) {\n\t\t_damage_source_id = value->call(\"get_id\");\n\t}\n}\n\nRef<Spell> SpellDamageInfo::spell_source_get() {\n\treturn Ref<Spell>(_damage_source);\n}\n\nvoid SpellDamageInfo::spell_source_set(const Ref<Spell> &value) {\n\t_damage_source_type = DAMAGE_SOURCE_SPELL;\n\t_damage_source = value;\n\n\tif (value.is_valid())\n\t\t_damage_source_id = value->get_id();\n}\n\nRef<Spell> SpellDamageInfo::aura_source_get() {\n\treturn Ref<Spell>(_damage_source);\n}\n\nvoid SpellDamageInfo::aura_source_set(const Ref<Spell> &value) {\n\t_damage_source_type = DAMAGE_SOURCE_AURA;\n\t_damage_source = value;\n\n\tif (value.is_valid())\n\t\t_damage_source_id = value->get_id();\n}\n\nint SpellDamageInfo::source_get_id() const {\n\treturn _damage_source_id;\n}\n\nvoid SpellDamageInfo::source_set_id(const int value) {\n\t_damage_source_id = value;\n}\n\nint SpellDamageInfo::source_get_type() const {\n\treturn _damage_source_type;\n}\n\nvoid SpellDamageInfo::source_set_type(const int value) {\n\t_damage_source_type = value;\n}\n\nvoid SpellDamageInfo::reset() {\n\t_original_damage = -1;\n}\n\nvoid SpellDamageInfo::resolve_references(Node *owner) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(owner));\n\tERR_FAIL_COND(!owner->is_inside_tree());\n\n\t_dealer = Object::cast_to<Entity>(owner->get_node_or_null(_dealer_path));\n\t_receiver = Object::cast_to<Entity>(owner->get_node_or_null(_receiver_path));\n\n\tif (_damage_source_type == DAMAGE_SOURCE_SPELL) {\n\t\t_damage_source = ESS::get_singleton()->get_resource_db()->get_spell(_damage_source_id);\n\t} else if (_damage_source_type == DAMAGE_SOURCE_AURA) {\n\t\t_damage_source = ESS::get_singleton()->get_resource_db()->get_spell(_damage_source_id);\n\t}\n}\n\nDictionary SpellDamageInfo::to_dict() {\n\tDictionary dict;\n\n\tif (INSTANCE_VALIDATE(_dealer))\n\t\tdict[\"dealer_path\"] = _dealer->get_path();\n\n\tif (INSTANCE_VALIDATE(_receiver))\n\t\tdict[\"receiver_path\"] = _receiver->get_path();\n\n\tdict[\"immune\"] = _immune;\n\tdict[\"damage\"] = _damage;\n\n\tdict[\"original_damage\"] = _original_damage;\n\tdict[\"amount_absorbed\"] = _amount_absorbed;\n\tdict[\"crit\"] = _crit;\n\n\tdict[\"damage_type\"] = _damage_type;\n\n\tdict[\"damage_source_type\"] = _damage_source_type;\n\tdict[\"damage_source_id\"] = _damage_source_id;\n\n\treturn dict;\n}\nvoid SpellDamageInfo::from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\t_immune = dict.get(\"immune\", true);\n\t_damage = dict.get(\"damage\", 0);\n\n\t_original_damage = dict.get(\"original_damage\", 0);\n\t_amount_absorbed = dict.get(\"amount_absorbed\", 0);\n\t_crit = dict.get(\"crit\", false);\n\n\t_damage_type = dict.get(\"spell_type\", 0);\n\t_damage_source_type = dict.get(\"damage_source_type\", DAMAGE_SOURCE_UNKNOWN);\n\t_damage_source_id = dict.get(\"damage_source_id\", 0);\n}\n\nSpellDamageInfo::SpellDamageInfo() {\n\t_immune = false;\n\t_damage = 0;\n\t_original_damage = 0;\n\t_crit = false;\n\t_damage_type = 0;\n\t_dealer = NULL;\n\t_receiver = NULL;\n\t_damage_source_type = DAMAGE_SOURCE_UNKNOWN;\n\t_damage_source_id = 0;\n}\n\nSpellDamageInfo::~SpellDamageInfo() {\n\t_damage_source.unref();\n}\n\nvoid SpellDamageInfo::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_immune\"), &SpellDamageInfo::get_immune);\n\tClassDB::bind_method(D_METHOD(\"set_immune\", \"value\"), &SpellDamageInfo::set_immune);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"immune\"), \"set_immune\", \"get_immune\");\n\n\tClassDB::bind_method(D_METHOD(\"damage_get\"), &SpellDamageInfo::damage_get);\n\tClassDB::bind_method(D_METHOD(\"damage_set\", \"value\"), &SpellDamageInfo::damage_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"damage\"), \"damage_set\", \"damage_get\");\n\n\tClassDB::bind_method(D_METHOD(\"crit_get\"), &SpellDamageInfo::crit_get);\n\tClassDB::bind_method(D_METHOD(\"crit_set\", \"value\"), &SpellDamageInfo::crit_set);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"crit\"), \"crit_set\", \"crit_get\");\n\n\tClassDB::bind_method(D_METHOD(\"amount_absorbed_get\"), &SpellDamageInfo::amount_absorbed_get);\n\tClassDB::bind_method(D_METHOD(\"amount_absorbed_set\", \"value\"), &SpellDamageInfo::amount_absorbed_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"amount_absorbed\"), \"amount_absorbed_set\", \"amount_absorbed_get\");\n\n\tClassDB::bind_method(D_METHOD(\"damage_type_get\"), &SpellDamageInfo::damage_type_get);\n\tClassDB::bind_method(D_METHOD(\"damage_type_set\", \"value\"), &SpellDamageInfo::damage_type_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"damage_type_get\"), \"damage_type_set\", \"damage_type_get\");\n\n\tClassDB::bind_method(D_METHOD(\"dealer_get\"), &SpellDamageInfo::dealer_get);\n\tClassDB::bind_method(D_METHOD(\"dealer_set\", \"value\"), &SpellDamageInfo::dealer_set_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"dealer\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), \"dealer_set\", \"dealer_get\");\n\n\tClassDB::bind_method(D_METHOD(\"receiver_get\"), &SpellDamageInfo::receiver_get);\n\tClassDB::bind_method(D_METHOD(\"receiver_set\", \"value\"), &SpellDamageInfo::receiver_set_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"receiver\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), \"receiver_set\", \"receiver_get\");\n\n\tClassDB::bind_method(D_METHOD(\"source_get\"), &SpellDamageInfo::source_get);\n\tClassDB::bind_method(D_METHOD(\"source_set\", \"value\"), &SpellDamageInfo::source_set);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"source\", PROPERTY_HINT_RESOURCE_TYPE, \"Resource\"), \"source_set\", \"source_get\");\n\n\tClassDB::bind_method(D_METHOD(\"spell_source_get\"), &SpellDamageInfo::spell_source_get);\n\tClassDB::bind_method(D_METHOD(\"spell_source_set\", \"value\"), &SpellDamageInfo::spell_source_set);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"spell_source\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"spell_source_set\", \"spell_source_get\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_source_get\"), &SpellDamageInfo::aura_source_get);\n\tClassDB::bind_method(D_METHOD(\"aura_source_set\", \"value\"), &SpellDamageInfo::aura_source_set);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_source\", PROPERTY_HINT_RESOURCE_TYPE, \"Aura\"), \"aura_source_set\", \"aura_source_get\");\n\n\tClassDB::bind_method(D_METHOD(\"source_get_id\"), &SpellDamageInfo::source_get_id);\n\tClassDB::bind_method(D_METHOD(\"source_set_id\", \"value\"), &SpellDamageInfo::source_set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"source_id\"), \"source_set_id\", \"source_get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"source_get_type\"), &SpellDamageInfo::source_get_type);\n\tClassDB::bind_method(D_METHOD(\"source_set_type\", \"value\"), &SpellDamageInfo::source_set_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"source_type\"), \"source_set_type\", \"source_get_type\");\n\n\tClassDB::bind_method(D_METHOD(\"reset\"), &SpellDamageInfo::reset);\n\n\tBIND_CONSTANT(DAMAGE_SOURCE_UNKNOWN);\n\tBIND_CONSTANT(DAMAGE_SOURCE_SPELL);\n\tBIND_CONSTANT(DAMAGE_SOURCE_AURA);\n}\n"
  },
  {
    "path": "pipelines/spell_damage_info.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPELL_DAMAGE_INFO_H\n#define SPELL_DAMAGE_INFO_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n\n\n#include \"../spell_enums.h\"\n#include \"scene/main/node.h\"\n\nclass Entity;\nclass Spell;\n\nclass SpellDamageInfo : public RefCounted {\n\tGDCLASS(SpellDamageInfo, RefCounted);\n\npublic:\n\tenum DamageSourceType {\n\t\tDAMAGE_SOURCE_UNKNOWN = 0,\n\t\tDAMAGE_SOURCE_SPELL,\n\t\tDAMAGE_SOURCE_AURA,\n\t};\n\nprotected:\n\tstatic void _bind_methods();\n\npublic:\n\tbool get_immune() const;\n\tvoid set_immune(const bool value);\n\n\tint damage_get() const;\n\tvoid damage_set(const int value);\n\n\tbool crit_get() const;\n\tvoid crit_set(const bool value);\n\n\tint amount_absorbed_get() const;\n\tvoid amount_absorbed_set(const int value);\n\n\tint damage_type_get() const;\n\tvoid damage_type_set(const int value);\n\n\tEntity *dealer_get();\n\tvoid dealer_set(Entity *value);\n\tvoid dealer_set_bind(Node *value);\n\n\tEntity *receiver_get();\n\tvoid receiver_set(Entity *value);\n\tvoid receiver_set_bind(Node *value);\n\n\tRef<RefCounted> source_get();\n\tvoid source_set(Ref<RefCounted> value);\n\n\tRef<Spell> spell_source_get();\n\tvoid spell_source_set(const Ref<Spell> &value);\n\n\tRef<Spell> aura_source_get();\n\tvoid aura_source_set(const Ref<Spell> &value);\n\n\tint source_get_id() const;\n\tvoid source_set_id(const int value);\n\n\tint source_get_type() const;\n\tvoid source_set_type(const int value);\n\n\tvoid reset();\n\n\tvoid resolve_references(Node *owner);\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tSpellDamageInfo();\n\t~SpellDamageInfo();\n\nprivate:\n\tbool _immune;\n\tint _damage;\n\tint _original_damage;\n\tint _amount_absorbed;\n\tbool _crit;\n\tint _damage_type;\n\n\tint _damage_source_type;\n\tRef<RefCounted> _damage_source;\n\tint _damage_source_id;\n\n\tEntity *_dealer;\n\tEntity *_receiver;\n\n\tNodePath _dealer_path;\n\tNodePath _receiver_path;\n};\n\n#endif\n"
  },
  {
    "path": "pipelines/spell_heal_info.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"spell_heal_info.h\"\n\n#include \"core/version.h\"\n\n#include \"../data/spells/spell.h\"\n#include \"../database/ess_resource_db.h\"\n#include \"../entities/entity.h\"\n#include \"../singletons/ess.h\"\n\n#include \"../defines.h\"\n\nbool SpellHealInfo::get_immune() const {\n\treturn _crit;\n}\nvoid SpellHealInfo::set_immune(const bool value) {\n\t_crit = value;\n}\n\nint SpellHealInfo::heal_get() {\n\treturn _heal;\n}\n\nvoid SpellHealInfo::heal_set(int value) {\n\t_heal = value;\n}\n\nbool SpellHealInfo::crit_get() const {\n\treturn _crit;\n}\nvoid SpellHealInfo::crit_set(const bool value) {\n\t_crit = value;\n}\n\nint SpellHealInfo::amount_absorbed_get() const {\n\treturn _amount_absorbed;\n}\nvoid SpellHealInfo::amount_absorbed_set(const int value) {\n\t_amount_absorbed = value;\n}\n\nint SpellHealInfo::heal_type_get() const {\n\treturn _heal_type;\n}\nvoid SpellHealInfo::heal_type_set(const int value) {\n\t_heal_type = value;\n}\n\nEntity *SpellHealInfo::dealer_get() {\n\treturn _dealer;\n}\nvoid SpellHealInfo::dealer_set(Entity *value) {\n\t_dealer = value;\n}\nvoid SpellHealInfo::dealer_set_bind(Node *value) {\n\tif (!value) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(value);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_dealer = e;\n}\n\nEntity *SpellHealInfo::receiver_get() {\n\treturn _receiver;\n}\nvoid SpellHealInfo::receiver_set(Entity *value) {\n\t_receiver = value;\n}\nvoid SpellHealInfo::receiver_set_bind(Node *value) {\n\tif (!value) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(value);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_receiver = e;\n}\n\nRef<RefCounted> SpellHealInfo::source_get() {\n\treturn _heal_source;\n}\nvoid SpellHealInfo::source_set(Ref<RefCounted> value) {\n\t_heal_source_type = HEAL_SOURCE_UNKNOWN;\n\t_heal_source = value;\n\t_heal_source_id = 0;\n\n\tif (value->has_method(\"get_id\")) {\n\t\t_heal_source_id = value->call(\"get_id\");\n\t}\n}\n\nRef<Spell> SpellHealInfo::spell_source_get() {\n\treturn Ref<Spell>(_heal_source);\n}\n\nvoid SpellHealInfo::spell_source_set(const Ref<Spell> &value) {\n\t_heal_source_type = HEAL_SOURCE_SPELL;\n\t_heal_source = value;\n\n\tif (value.is_valid())\n\t\t_heal_source_id = value->get_id();\n}\n\nRef<Spell> SpellHealInfo::aura_source_get() {\n\treturn Ref<Spell>(_heal_source);\n}\n\nvoid SpellHealInfo::aura_source_set(const Ref<Spell> &value) {\n\t_heal_source_type = HEAL_SOURCE_AURA;\n\t_heal_source = value;\n\n\tif (value.is_valid())\n\t\t_heal_source_id = value->get_id();\n}\n\nint SpellHealInfo::source_get_id() const {\n\treturn _heal_source_id;\n}\n\nvoid SpellHealInfo::source_set_id(const int value) {\n\t_heal_source_id = value;\n}\n\nint SpellHealInfo::source_get_type() const {\n\treturn _heal_source_type;\n}\n\nvoid SpellHealInfo::source_set_type(const int value) {\n\t_heal_source_type = value;\n}\n\nvoid SpellHealInfo::reset() {\n\t_original_heal = -1;\n}\n\nvoid SpellHealInfo::resolve_references(Node *owner) {\n\tERR_FAIL_COND(!INSTANCE_VALIDATE(owner));\n\tERR_FAIL_COND(!owner->is_inside_tree());\n\n\t_dealer = Object::cast_to<Entity>(owner->get_node_or_null(_dealer_path));\n\t_receiver = Object::cast_to<Entity>(owner->get_node_or_null(_receiver_path));\n\n\tif (_heal_source_type == HEAL_SOURCE_SPELL) {\n\t\t_heal_source = ESS::get_singleton()->get_resource_db()->get_spell(_heal_source_id);\n\t} else if (_heal_source_type == HEAL_SOURCE_AURA) {\n\t\t_heal_source = ESS::get_singleton()->get_resource_db()->get_spell(_heal_source_id);\n\t}\n}\n\nDictionary SpellHealInfo::to_dict() {\n\tDictionary dict;\n\n\tif (INSTANCE_VALIDATE(_dealer))\n\t\tdict[\"dealer_path\"] = _dealer->get_path();\n\n\tif (INSTANCE_VALIDATE(_receiver))\n\t\tdict[\"receiver_path\"] = _receiver->get_path();\n\n\tdict[\"immune\"] = _immune;\n\tdict[\"heal\"] = _heal;\n\n\tdict[\"original_heal\"] = _original_heal;\n\tdict[\"amount_absorbed\"] = _amount_absorbed;\n\tdict[\"crit\"] = _crit;\n\n\tdict[\"heal_type\"] = _heal_type;\n\n\tdict[\"heal_source_type\"] = _heal_source_type;\n\tdict[\"heal_source_id\"] = _heal_source_id;\n\n\treturn dict;\n}\nvoid SpellHealInfo::from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\t_immune = dict.get(\"immune\", true);\n\t_heal = dict.get(\"heal\", 0);\n\n\t_original_heal = dict.get(\"original_heal\", 0);\n\t_amount_absorbed = dict.get(\"amount_absorbed\", 0);\n\t_crit = dict.get(\"crit\", false);\n\t_heal_type = dict.get(\"heal_type\", SpellEnums::SPELL_TYPE_NONE);\n\n\t_heal_source_type = dict.get(\"heal_source_type\", HEAL_SOURCE_UNKNOWN);\n\t_heal_source_id = dict.get(\"heal_source_id\", 0);\n}\n\nSpellHealInfo::SpellHealInfo() {\n\t_immune = false;\n\t_heal = 0;\n\t_original_heal = 0;\n\t_crit = false;\n\t_heal_type = 0;\n\t_dealer = NULL;\n\t_receiver = NULL;\n\t_heal_source_type = HEAL_SOURCE_UNKNOWN;\n\t_heal_source_id = 0;\n}\n\nSpellHealInfo::~SpellHealInfo() {\n\t_heal_source.unref();\n}\n\nvoid SpellHealInfo::_bind_methods() {\n\n\tClassDB::bind_method(D_METHOD(\"get_immune\"), &SpellHealInfo::get_immune);\n\tClassDB::bind_method(D_METHOD(\"set_immune\", \"value\"), &SpellHealInfo::set_immune);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"immune\"), \"set_immune\", \"get_immune\");\n\n\tClassDB::bind_method(D_METHOD(\"heal_get\"), &SpellHealInfo::heal_get);\n\tClassDB::bind_method(D_METHOD(\"heal_set\", \"value\"), &SpellHealInfo::heal_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"heal\"), \"heal_set\", \"heal_get\");\n\n\tClassDB::bind_method(D_METHOD(\"crit_get\"), &SpellHealInfo::crit_get);\n\tClassDB::bind_method(D_METHOD(\"crit_set\", \"value\"), &SpellHealInfo::crit_set);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"crit\"), \"crit_set\", \"crit_get\");\n\n\tClassDB::bind_method(D_METHOD(\"amount_absorbed_get\"), &SpellHealInfo::amount_absorbed_get);\n\tClassDB::bind_method(D_METHOD(\"amount_absorbed_set\", \"value\"), &SpellHealInfo::amount_absorbed_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"amount_absorbed\"), \"amount_absorbed_set\", \"amount_absorbed_get\");\n\n\tClassDB::bind_method(D_METHOD(\"heal_type_get\"), &SpellHealInfo::heal_type_get);\n\tClassDB::bind_method(D_METHOD(\"heal_type_set\", \"value\"), &SpellHealInfo::heal_type_set);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"heal_type_get\"), \"heal_type_set\", \"heal_type_get\");\n\n\tClassDB::bind_method(D_METHOD(\"dealer_get\"), &SpellHealInfo::dealer_get);\n\tClassDB::bind_method(D_METHOD(\"dealer_set\", \"value\"), &SpellHealInfo::dealer_set_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"dealer\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), \"dealer_set\", \"dealer_get\");\n\n\tClassDB::bind_method(D_METHOD(\"receiver_get\"), &SpellHealInfo::receiver_get);\n\tClassDB::bind_method(D_METHOD(\"receiver_set\", \"value\"), &SpellHealInfo::receiver_set_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"receiver\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), \"receiver_set\", \"receiver_get\");\n\n\tClassDB::bind_method(D_METHOD(\"source_get\"), &SpellHealInfo::source_get);\n\tClassDB::bind_method(D_METHOD(\"source_set\", \"value\"), &SpellHealInfo::source_set);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"source\", PROPERTY_HINT_RESOURCE_TYPE, \"Resource\"), \"source_set\", \"source_get\");\n\n\tClassDB::bind_method(D_METHOD(\"spell_source_get\"), &SpellHealInfo::spell_source_get);\n\tClassDB::bind_method(D_METHOD(\"spell_source_set\", \"value\"), &SpellHealInfo::spell_source_set);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"spell_source\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"spell_source_set\", \"spell_source_get\");\n\n\tClassDB::bind_method(D_METHOD(\"aura_source_get\"), &SpellHealInfo::aura_source_get);\n\tClassDB::bind_method(D_METHOD(\"aura_source_set\", \"value\"), &SpellHealInfo::aura_source_set);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"aura_source\", PROPERTY_HINT_RESOURCE_TYPE, \"Spell\"), \"aura_source_set\", \"aura_source_get\");\n\n\tClassDB::bind_method(D_METHOD(\"source_get_id\"), &SpellHealInfo::source_get_id);\n\tClassDB::bind_method(D_METHOD(\"source_set_id\", \"value\"), &SpellHealInfo::source_set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"source_id\"), \"source_set_id\", \"source_get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"source_get_type\"), &SpellHealInfo::source_get_type);\n\tClassDB::bind_method(D_METHOD(\"source_set_type\", \"value\"), &SpellHealInfo::source_set_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"source_type\"), \"source_set_type\", \"source_get_type\");\n\n\tClassDB::bind_method(D_METHOD(\"reset\"), &SpellHealInfo::reset);\n\n\tBIND_CONSTANT(HEAL_SOURCE_UNKNOWN);\n\tBIND_CONSTANT(HEAL_SOURCE_SPELL);\n\tBIND_CONSTANT(HEAL_SOURCE_AURA);\n}\n"
  },
  {
    "path": "pipelines/spell_heal_info.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPELL_HEAL_INFO_H\n#define SPELL_HEAL_INFO_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n\n\n#include \"../spell_enums.h\"\n#include \"scene/main/node.h\"\n\nclass Entity;\nclass Spell;\n\nclass SpellHealInfo : public RefCounted {\n\tGDCLASS(SpellHealInfo, RefCounted);\n\npublic:\n\tenum HealSourceType {\n\t\tHEAL_SOURCE_UNKNOWN = 0,\n\t\tHEAL_SOURCE_SPELL,\n\t\tHEAL_SOURCE_AURA,\n\t};\n\nprotected:\n\tstatic void _bind_methods();\n\npublic:\n\tint heal_get();\n\tvoid heal_set(int value);\n\n\tbool get_immune() const;\n\tvoid set_immune(const bool value);\n\n\tint damage_get() const;\n\tvoid damage_set(const int value);\n\n\tbool crit_get() const;\n\tvoid crit_set(const bool value);\n\n\tint amount_absorbed_get() const;\n\tvoid amount_absorbed_set(const int value);\n\n\tint heal_type_get() const;\n\tvoid heal_type_set(const int value);\n\n\tEntity *dealer_get();\n\tvoid dealer_set(Entity *value);\n\tvoid dealer_set_bind(Node *value);\n\n\tEntity *receiver_get();\n\tvoid receiver_set(Entity *value);\n\tvoid receiver_set_bind(Node *value);\n\n\tRef<RefCounted> source_get();\n\tvoid source_set(Ref<RefCounted> value);\n\n\tRef<Spell> spell_source_get();\n\tvoid spell_source_set(const Ref<Spell> &value);\n\n\tRef<Spell> aura_source_get();\n\tvoid aura_source_set(const Ref<Spell> &value);\n\n\tint source_get_id() const;\n\tvoid source_set_id(const int value);\n\n\tint source_get_type() const;\n\tvoid source_set_type(const int value);\n\n\tvoid reset();\n\n\tvoid resolve_references(Node *owner);\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tSpellHealInfo();\n\t~SpellHealInfo();\n\nprivate:\n\tbool _immune;\n\tint _heal;\n\tint _original_heal;\n\tint _amount_absorbed;\n\tbool _crit;\n\tint _heal_type;\n\n\tint _heal_source_type;\n\tRef<RefCounted> _heal_source;\n\tint _heal_source_id;\n\n\tEntity *_dealer;\n\tEntity *_receiver;\n\n\tNodePath _dealer_path;\n\tNodePath _receiver_path;\n};\n\n#endif\n"
  },
  {
    "path": "profiles/actionbar/action_bar_button_entry.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"action_bar_button_entry.h\"\n\n#include \"core/version.h\"\n\n#include \"action_bar_entry.h\"\n\nconst String ActionBarButtonEntry::BINDING_STRING_ACTIONBAR_BUTTON_ENTRY_TYPE = \"None,Spell,Item\";\n\nRef<ActionBarEntry> ActionBarButtonEntry::get_owner() {\n\treturn Ref<ActionBarEntry>(_owner);\n}\nvoid ActionBarButtonEntry::set_owner(ActionBarEntry *owner) {\n\t_owner = owner;\n}\n\nint ActionBarButtonEntry::get_action_bar_id() const {\n\treturn _action_bar_id;\n}\n\nvoid ActionBarButtonEntry::set_action_bar_id(const int value) {\n\t_action_bar_id = value;\n\n\temit_change();\n}\n\nint ActionBarButtonEntry::get_slot_id() const {\n\treturn _slot_id;\n}\n\nvoid ActionBarButtonEntry::set_slot_id(const int value) {\n\t_slot_id = value;\n\n\temit_change();\n}\n\nActionBarButtonEntry::ActionBarButtonEntryType ActionBarButtonEntry::get_type() const {\n\treturn _type;\n}\n\nvoid ActionBarButtonEntry::set_type(const ActionBarButtonEntry::ActionBarButtonEntryType value) {\n\t_type = value;\n\n\temit_change();\n}\n\nStringName ActionBarButtonEntry::get_item_path() const {\n\treturn _item_path;\n}\n\nvoid ActionBarButtonEntry::set_item_path(const StringName &value) {\n\t_item_path = value;\n\n\temit_change();\n}\n\nvoid ActionBarButtonEntry::emit_change() {\n\temit_signal(\"changed\", Ref<ActionBarButtonEntry>(this));\n\n\tif (_owner != NULL)\n\t\t_owner->emit_change();\n}\n\nDictionary ActionBarButtonEntry::to_dict() const {\n\tDictionary dict;\n\n\tdict[\"action_bar_id\"] = _action_bar_id;\n\tdict[\"slot_id\"] = _slot_id;\n\tdict[\"type\"] = _type;\n\tdict[\"item_path\"] = _item_path;\n\n\treturn dict;\n}\nvoid ActionBarButtonEntry::from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\t_action_bar_id = dict.get(\"action_bar_id\", 0);\n\t_slot_id = dict.get(\"slot_id\", 0);\n\t_type = VariantCaster<ActionBarButtonEntryType>().cast(dict.get(\"type\", ACTION_BAR_BUTTON_ENTRY_TYPE_NONE));\n\t_item_path = dict.get(\"item_path\", \"\");\n\n\temit_change();\n}\n\nActionBarButtonEntry::ActionBarButtonEntry() {\n\t_owner = NULL;\n\n\t_action_bar_id = 0;\n\t_slot_id = 0;\n\t_type = ACTION_BAR_BUTTON_ENTRY_TYPE_NONE;\n}\n\nActionBarButtonEntry::ActionBarButtonEntry(const int actionBarId, const int slotId) {\n\t_owner = NULL;\n\n\t_action_bar_id = actionBarId;\n\t_slot_id = slotId;\n\n\t_type = ACTION_BAR_BUTTON_ENTRY_TYPE_NONE;\n}\n\nActionBarButtonEntry::ActionBarButtonEntry(const int actionBarId, const int slotId, const ActionBarButtonEntryType type, const StringName &item_path) {\n\t_owner = NULL;\n\n\t_action_bar_id = actionBarId;\n\t_slot_id = slotId;\n\t_type = type;\n\t_item_path = item_path;\n}\n\nActionBarButtonEntry::~ActionBarButtonEntry() {\n}\n\nvoid ActionBarButtonEntry::_bind_methods() {\n\tADD_SIGNAL(MethodInfo(\"changed\", PropertyInfo(Variant::OBJECT, \"action_bar_button_entry\", PROPERTY_HINT_RESOURCE_TYPE, \"ActionBarButtonEntry\")));\n\n\tClassDB::bind_method(D_METHOD(\"get_owner\"), &ActionBarButtonEntry::get_owner);\n\n\tClassDB::bind_method(D_METHOD(\"get_action_bar_id\"), &ActionBarButtonEntry::get_action_bar_id);\n\tClassDB::bind_method(D_METHOD(\"set_action_bar_id\", \"value\"), &ActionBarButtonEntry::set_action_bar_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"action_bar_id\"), \"set_action_bar_id\", \"get_action_bar_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_slot_id\"), &ActionBarButtonEntry::get_slot_id);\n\tClassDB::bind_method(D_METHOD(\"set_slot_id\", \"value\"), &ActionBarButtonEntry::set_slot_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"slot_id\"), \"set_slot_id\", \"get_slot_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_type\"), &ActionBarButtonEntry::get_type);\n\tClassDB::bind_method(D_METHOD(\"set_type\", \"value\"), &ActionBarButtonEntry::set_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"type\", PROPERTY_HINT_ENUM, ActionBarButtonEntry::BINDING_STRING_ACTIONBAR_BUTTON_ENTRY_TYPE), \"set_type\", \"get_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_item_path\"), &ActionBarButtonEntry::get_item_path);\n\tClassDB::bind_method(D_METHOD(\"set_item_path\", \"value\"), &ActionBarButtonEntry::set_item_path);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"item_path\"), \"set_item_path\", \"get_item_path\");\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &ActionBarButtonEntry::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &ActionBarButtonEntry::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"emit_change\"), &ActionBarButtonEntry::emit_change);\n\n\tBIND_ENUM_CONSTANT(ACTION_BAR_BUTTON_ENTRY_TYPE_NONE);\n\tBIND_ENUM_CONSTANT(ACTION_BAR_BUTTON_ENTRY_TYPE_SPELL);\n\tBIND_ENUM_CONSTANT(ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM);\n}\n"
  },
  {
    "path": "profiles/actionbar/action_bar_button_entry.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ACTION_BAR_BUTTON_ENTRY_H\n#define ACTION_BAR_BUTTON_ENTRY_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n#include \"core/variant/dictionary.h\"\n\n\nclass ActionBarEntry;\n\nclass ActionBarButtonEntry : public RefCounted {\n\tGDCLASS(ActionBarButtonEntry, RefCounted);\n\npublic:\n\tstatic const String BINDING_STRING_ACTIONBAR_BUTTON_ENTRY_TYPE;\n\n\tenum ActionBarButtonEntryType {\n\t\tACTION_BAR_BUTTON_ENTRY_TYPE_NONE,\n\t\tACTION_BAR_BUTTON_ENTRY_TYPE_SPELL,\n\t\tACTION_BAR_BUTTON_ENTRY_TYPE_ITEM\n\t};\n\n\tRef<ActionBarEntry> get_owner();\n\tvoid set_owner(ActionBarEntry *owner);\n\n\tint get_action_bar_id() const;\n\tvoid set_action_bar_id(const int value);\n\n\tint get_slot_id() const;\n\tvoid set_slot_id(int value);\n\n\tActionBarButtonEntryType get_type() const;\n\tvoid set_type(const ActionBarButtonEntryType value);\n\n\tStringName get_item_path() const;\n\tvoid set_item_path(const StringName &value);\n\n\tvoid emit_change();\n\n\tDictionary to_dict() const;\n\tvoid from_dict(const Dictionary &dict);\n\n\tActionBarButtonEntry();\n\tActionBarButtonEntry(const int actionBarId, const int slotId);\n\tActionBarButtonEntry(const int actionBarId, const int slotId, const ActionBarButtonEntryType type, const StringName &item_path);\n\t~ActionBarButtonEntry();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _action_bar_id;\n\tint _slot_id;\n\tActionBarButtonEntryType _type;\n\tStringName _item_path;\n\n\tActionBarEntry *_owner;\n};\n\nVARIANT_ENUM_CAST(ActionBarButtonEntry::ActionBarButtonEntryType);\n\n#endif\n"
  },
  {
    "path": "profiles/actionbar/action_bar_entry.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"action_bar_entry.h\"\n\n#include \"core/version.h\"\n\n#include \"action_bar_profile.h\"\n\n#include \"../../defines.h\"\n\nRef<ActionBarProfile> ActionBarEntry::get_owner() {\n\treturn Ref<ActionBarProfile>(_owner);\n}\nvoid ActionBarEntry::set_owner(ActionBarProfile *owner) {\n\t_owner = owner;\n}\n\nfloat ActionBarEntry::get_size() const {\n\treturn _size;\n}\n\nvoid ActionBarEntry::set_size(const float value) {\n\t_size = value;\n\n\temit_change();\n}\n\nint ActionBarEntry::get_action_bar_id() const {\n\treturn _action_bar_id;\n}\n\nvoid ActionBarEntry::set_action_bar_id(const int value) {\n\t_action_bar_id = value;\n\n\temit_change();\n}\n\nint ActionBarEntry::get_slot_num() const {\n\treturn _slot_num;\n}\n\nvoid ActionBarEntry::set_slot_num(const int value) {\n\t_slot_num = value;\n\n\temit_change();\n}\n\nint ActionBarEntry::get_action_bar_entry_count() const {\n\treturn _button_entries.size();\n}\n\nvoid ActionBarEntry::emit_change() {\n\temit_signal(\"changed\");\n\n\tif (_owner != NULL)\n\t\t_owner->emit_change();\n}\n\nRef<ActionBarButtonEntry> ActionBarEntry::get_button_for_slotid(const int slotId) {\n\tfor (int i = 0; i < _button_entries.size(); ++i) {\n\t\tif (_button_entries.get(i)->get_slot_id() == slotId) {\n\t\t\treturn _button_entries.get(i);\n\t\t}\n\t}\n\n\tRef<ActionBarButtonEntry> abe = Ref<ActionBarButtonEntry>(memnew(ActionBarButtonEntry(_action_bar_id, slotId, ActionBarButtonEntry::ACTION_BAR_BUTTON_ENTRY_TYPE_NONE, StringName())));\n\tabe->set_owner(this);\n\t_button_entries.push_back(abe);\n\n\temit_change();\n\n\treturn Ref<ActionBarButtonEntry>(abe);\n}\n\nRef<ActionBarButtonEntry> ActionBarEntry::get_button(const int index) {\n\tERR_FAIL_INDEX_V(index, _button_entries.size(), Ref<ActionBarButtonEntry>(NULL));\n\n\treturn _button_entries.get(index);\n}\n\nDictionary ActionBarEntry::to_dict() const {\n\tDictionary dict;\n\n\tdict[\"action_bar_id\"] = _action_bar_id;\n\tdict[\"slot_num\"] = _slot_num;\n\n\tArray arr;\n\n\tfor (int i = 0; i < _button_entries.size(); ++i) {\n\t\tDictionary d = _button_entries[i]->to_dict();\n\n\t\tarr.append(d);\n\t}\n\n\tdict[\"button_entries\"] = arr;\n\n\treturn dict;\n}\nvoid ActionBarEntry::from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\tfor (int i = 0; i < _button_entries.size(); ++i) {\n\t\t_button_entries.get(i)->set_owner(NULL);\n\t}\n\n\t_button_entries.clear();\n\n\t_action_bar_id = dict.get(\"action_bar_id\", 0);\n\t_slot_num = dict.get(\"slot_num\", 0);\n\n\tArray arr = dict.get(\"button_entries\", Array());\n\n\tfor (int i = 0; i < arr.size(); ++i) {\n\t\tRef<ActionBarButtonEntry> e;\n\t\te.instantiate();\n\n\t\te->from_dict(arr.get(i));\n\t\te->set_owner(this);\n\n\t\t_button_entries.push_back(e);\n\t}\n\n\temit_change();\n}\n\nActionBarEntry::ActionBarEntry() {\n\t_owner = NULL;\n\n\t_action_bar_id = 0;\n\t_size = 45;\n\t_slot_num = 12;\n}\n\nActionBarEntry::~ActionBarEntry() {\n\t_button_entries.clear();\n}\n\nvoid ActionBarEntry::_bind_methods() {\n\tADD_SIGNAL(MethodInfo(\"changed\"));\n\n\tClassDB::bind_method(D_METHOD(\"get_owner\"), &ActionBarEntry::get_owner);\n\n\tClassDB::bind_method(D_METHOD(\"get_size\"), &ActionBarEntry::get_size);\n\tClassDB::bind_method(D_METHOD(\"set_size\", \"value\"), &ActionBarEntry::set_size);\n\tADD_PROPERTY(PropertyInfo(Variant::REAL, \"size\"), \"set_size\", \"get_size\");\n\n\tClassDB::bind_method(D_METHOD(\"get_action_bar_id\"), &ActionBarEntry::get_action_bar_id);\n\tClassDB::bind_method(D_METHOD(\"set_action_bar_id\", \"value\"), &ActionBarEntry::set_action_bar_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"action_bar_id\"), \"set_action_bar_id\", \"get_action_bar_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_slot_num\"), &ActionBarEntry::get_slot_num);\n\tClassDB::bind_method(D_METHOD(\"set_slot_num\", \"value\"), &ActionBarEntry::set_slot_num);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"slot_num\"), \"set_slot_num\", \"get_slot_num\");\n\n\tClassDB::bind_method(D_METHOD(\"get_action_bar_entry_count\"), &ActionBarEntry::get_action_bar_entry_count);\n\n\tClassDB::bind_method(D_METHOD(\"get_button_for_slotid\", \"slot_id\"), &ActionBarEntry::get_button_for_slotid);\n\tClassDB::bind_method(D_METHOD(\"get_button\", \"index\"), &ActionBarEntry::get_button);\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &ActionBarEntry::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &ActionBarEntry::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"emit_change\"), &ActionBarEntry::emit_change);\n}\n"
  },
  {
    "path": "profiles/actionbar/action_bar_entry.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ACTION_BAR_ENTRY_H\n#define ACTION_BAR_ENTRY_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n#include \"core/templates/vector.h\"\n#include \"core/variant/array.h\"\n#include \"core/variant/dictionary.h\"\n\n\n#include \"action_bar_button_entry.h\"\n\nclass ActionBarProfile;\n\nclass ActionBarEntry : public RefCounted {\n\tGDCLASS(ActionBarEntry, RefCounted);\n\npublic:\n\tRef<ActionBarProfile> get_owner();\n\tvoid set_owner(ActionBarProfile *owner);\n\n\tfloat get_size() const;\n\tvoid set_size(const float value);\n\n\tint get_action_bar_id() const;\n\tvoid set_action_bar_id(const int value);\n\n\tint get_slot_num() const;\n\tvoid set_slot_num(const int value);\n\n\tint get_action_bar_entry_count() const;\n\n\tvoid emit_change();\n\n\tRef<ActionBarButtonEntry> get_button_for_slotid(const int slotId);\n\tRef<ActionBarButtonEntry> get_button(const int index);\n\n\tDictionary to_dict() const;\n\tvoid from_dict(const Dictionary &dict);\n\n\tActionBarEntry();\n\t~ActionBarEntry();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _action_bar_id;\n\tint _slot_num;\n\tVector<Ref<ActionBarButtonEntry> > _button_entries;\n\n\tfloat _size;\n\n\tActionBarProfile *_owner;\n};\n\n#endif\n"
  },
  {
    "path": "profiles/actionbar/action_bar_profile.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"action_bar_profile.h\"\n\n#include \"core/version.h\"\n\n#include \"../class_profile.h\"\n\nRef<ClassProfile> ActionBarProfile::get_owner() {\n\treturn Ref<ClassProfile>(_owner);\n}\nvoid ActionBarProfile::set_owner(ClassProfile *owner) {\n\t_owner = owner;\n}\n\nString ActionBarProfile::get_action_bar_profile_name() {\n\treturn _name;\n}\n\nvoid ActionBarProfile::set_action_bar_profile_name(const String &value) {\n\t_name = value;\n\n\temit_change();\n}\n\nVector<Ref<ActionBarEntry>> &ActionBarProfile::get_action_bars() {\n\treturn _action_bars;\n}\n\nvoid ActionBarProfile::load_defaults() {\n\t_action_bars.clear();\n\n\tRef<ActionBarEntry> actionBarEntry = Ref<ActionBarEntry>(memnew(ActionBarEntry()));\n\tactionBarEntry->set_action_bar_id(1);\n\tactionBarEntry->set_slot_num(12);\n\tactionBarEntry->set_owner(this);\n\t_action_bars.push_back(Ref<ActionBarEntry>(actionBarEntry));\n\n\tactionBarEntry = Ref<ActionBarEntry>(memnew(ActionBarEntry()));\n\tactionBarEntry->set_action_bar_id(2);\n\tactionBarEntry->set_slot_num(12);\n\tactionBarEntry->set_owner(this);\n\t_action_bars.push_back(Ref<ActionBarEntry>(actionBarEntry));\n\n\tactionBarEntry = Ref<ActionBarEntry>(memnew(ActionBarEntry()));\n\tactionBarEntry->set_action_bar_id(3);\n\tactionBarEntry->set_slot_num(12);\n\tactionBarEntry->set_owner(this);\n\t_action_bars.push_back(Ref<ActionBarEntry>(actionBarEntry));\n\n\tactionBarEntry = Ref<ActionBarEntry>(memnew(ActionBarEntry()));\n\tactionBarEntry->set_action_bar_id(4);\n\tactionBarEntry->set_slot_num(12);\n\tactionBarEntry->set_owner(this);\n\t_action_bars.push_back(Ref<ActionBarEntry>(actionBarEntry));\n\n\temit_change();\n}\n\nint ActionBarProfile::get_action_bar_count() const {\n\treturn _action_bars.size();\n}\n\nvoid ActionBarProfile::add_action_bar(Ref<ActionBarEntry> actionbar) {\n\tERR_FAIL_COND(!actionbar.is_valid());\n\n\tactionbar->set_owner(this);\n\t_action_bars.push_back(Ref<ActionBarEntry>(actionbar));\n\n\temit_change();\n}\n\nRef<ActionBarEntry> ActionBarProfile::get_action_bar(int index) {\n\tERR_FAIL_INDEX_V(index, _action_bars.size(), Ref<ActionBarEntry>(NULL));\n\n\treturn _action_bars.get(index);\n}\n\nvoid ActionBarProfile::remove_action_bar(const int index) {\n\t_action_bars.get(index)->set_owner(NULL);\n\n\t_action_bars.remove_at(index);\n\n\temit_change();\n}\n\nvoid ActionBarProfile::clear_action_bars() {\n\tfor (int i = 0; i < _action_bars.size(); ++i) {\n\t\t_action_bars.get(i)->set_owner(NULL);\n\t}\n\n\t_action_bars.clear();\n\n\temit_change();\n}\n\nDictionary ActionBarProfile::to_dict() const {\n\tDictionary dict;\n\n\tdict[\"name\"] = _name;\n\n\tArray arr;\n\n\tfor (int i = 0; i < _action_bars.size(); ++i) {\n\t\tDictionary d = _action_bars[i]->to_dict();\n\n\t\tarr.append(d);\n\t}\n\n\tdict[\"action_bars\"] = arr;\n\n\treturn dict;\n}\nvoid ActionBarProfile::from_dict(const Dictionary &dict) {\n\tif (dict.is_empty())\n\t\treturn;\n\n\n\tfor (int i = 0; i < _action_bars.size(); ++i) {\n\t\t_action_bars.get(i)->set_owner(NULL);\n\t}\n\n\t_action_bars.clear();\n\n\t_name = dict.get(\"name\", \"\");\n\n\tArray arr = dict.get(\"action_bars\", Array());\n\n\tfor (int i = 0; i < arr.size(); ++i) {\n\t\tRef<ActionBarEntry> e;\n\t\te.instantiate();\n\n\t\te->from_dict(arr.get(i));\n\t\te->set_owner(this);\n\n\t\t_action_bars.push_back(e);\n\t}\n\n\temit_change();\n}\n\nvoid ActionBarProfile::from_actionbar_profile(Ref<ActionBarProfile> other) {\n\tfor (int i = 0; i < _action_bars.size(); ++i) {\n\t\t_action_bars.get(i)->set_owner(NULL);\n\t}\n\n\t_action_bars.clear();\n\n\t_name = other->get_action_bar_profile_name();\n\n\tfor (int i = 0; i < other->get_action_bar_count(); ++i) {\n\t\tRef<ActionBarEntry> e = other->get_action_bar(i);\n\n\t\te->set_owner(this);\n\t\t_action_bars.push_back(e);\n\t}\n\n\temit_change();\n}\n\nActionBarProfile::ActionBarProfile() {\n\t_owner = NULL;\n}\n\nActionBarProfile::~ActionBarProfile() {\n\t_action_bars.clear();\n}\n\nvoid ActionBarProfile::emit_change() {\n\temit_signal(\"changed\");\n\n\tif (_owner != NULL)\n\t\t_owner->emit_change();\n}\n\nvoid ActionBarProfile::_bind_methods() {\n\tADD_SIGNAL(MethodInfo(\"changed\"));\n\n\tClassDB::bind_method(D_METHOD(\"get_owner\"), &ActionBarProfile::get_owner);\n\n\tClassDB::bind_method(D_METHOD(\"get_action_bar_profile_name\"), &ActionBarProfile::get_action_bar_profile_name);\n\tClassDB::bind_method(D_METHOD(\"set_action_bar_profile_name\", \"value\"), &ActionBarProfile::set_action_bar_profile_name);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"action_bar_profile_name\"), \"set_action_bar_profile_name\", \"get_action_bar_profile_name\");\n\n\tClassDB::bind_method(D_METHOD(\"load_defaults\"), &ActionBarProfile::load_defaults);\n\n\tClassDB::bind_method(D_METHOD(\"get_action_bar_count\"), &ActionBarProfile::get_action_bar_count);\n\tClassDB::bind_method(D_METHOD(\"add_action_bar\", \"actionbar\"), &ActionBarProfile::add_action_bar);\n\tClassDB::bind_method(D_METHOD(\"get_action_bar\", \"index\"), &ActionBarProfile::get_action_bar);\n\tClassDB::bind_method(D_METHOD(\"remove_action_bar\", \"index\"), &ActionBarProfile::remove_action_bar);\n\tClassDB::bind_method(D_METHOD(\"clear_action_bars\"), &ActionBarProfile::clear_action_bars);\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &ActionBarProfile::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &ActionBarProfile::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"from_actionbar_profile\", \"other\"), &ActionBarProfile::from_actionbar_profile);\n\n\tClassDB::bind_method(D_METHOD(\"emit_change\"), &ActionBarProfile::emit_change);\n}\n"
  },
  {
    "path": "profiles/actionbar/action_bar_profile.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ACTION_BAR_PROFILE_H\n#define ACTION_BAR_PROFILE_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n#include \"core/templates/vector.h\"\n#include \"core/string/ustring.h\"\n#include \"core/variant/array.h\"\n#include \"core/variant/dictionary.h\"\n\n\n#include \"action_bar_entry.h\"\n\nclass ClassProfile;\n\nclass ActionBarProfile : public RefCounted {\n\tGDCLASS(ActionBarProfile, RefCounted);\n\npublic:\n\tRef<ClassProfile> get_owner();\n\tvoid set_owner(ClassProfile *owner);\n\n\tString get_action_bar_profile_name();\n\tvoid set_action_bar_profile_name(const String &value);\n\tVector<Ref<ActionBarEntry> > &get_action_bars();\n\tvoid load_defaults();\n\n\tint get_action_bar_count() const;\n\tvoid add_action_bar(Ref<ActionBarEntry> actionbar);\n\tRef<ActionBarEntry> get_action_bar(const int index);\n\tvoid remove_action_bar(const int index);\n\tvoid clear_action_bars();\n\n\tDictionary to_dict() const;\n\tvoid from_dict(const Dictionary &dict);\n\n\tvoid from_actionbar_profile(Ref<ActionBarProfile> other);\n\n\tvoid emit_change();\n\n\tActionBarProfile();\n\t~ActionBarProfile();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tString _name;\n\tVector<Ref<ActionBarEntry> > _action_bars;\n\n\tClassProfile *_owner;\n};\n\n#endif\n"
  },
  {
    "path": "profiles/class_profile.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"class_profile.h\"\n\n#include \"core/version.h\"\n\nStringName ClassProfile::get_class_path() const {\n\treturn _class_path;\n}\n\nvoid ClassProfile::set_class_path(const StringName &value) {\n\t_class_path = value;\n}\n\nString ClassProfile::get_character_class_name() const {\n\treturn _character_class_name;\n}\n\nvoid ClassProfile::set_character_class_name(const String &value) {\n\t_character_class_name = value;\n}\n\nint ClassProfile::get_level() const {\n\treturn _level;\n}\n\nvoid ClassProfile::set_level(const int value) {\n\t_level = value;\n\n\temit_change();\n}\n\nint ClassProfile::get_xp() const {\n\treturn _xp;\n}\n\nvoid ClassProfile::set_xp(int value) {\n\t_xp = value;\n\n\temit_change();\n}\n\nbool ClassProfile::get_actionbar_locked() const {\n\treturn _actionbar_locked;\n}\nvoid ClassProfile::set_actionbar_locked(const bool value) {\n\t_actionbar_locked = value;\n\n\temit_change();\n}\n\nRef<InputProfile> ClassProfile::get_input_profile() {\n\treturn _input_profile;\n}\nRef<ActionBarProfile> ClassProfile::get_default_action_bar_profile() {\n\treturn _action_bar_profile;\n}\n\nvoid ClassProfile::emit_change() {\n\temit_signal(\"changed\");\n}\n\nbool ClassProfile::has_custom_data(const String &p_name) const {\n\treturn _custom_data.has(p_name);\n}\n\nvoid ClassProfile::set_custom_data(const String &p_name, const Variant &p_value) {\n\tif (p_value.get_type() == Variant::NIL) {\n\t\t_custom_data.erase(p_name);\n\n\t\temit_change();\n\n\t\treturn;\n\t};\n\n\t_custom_data[p_name] = p_value;\n\n\temit_change();\n}\n\nVariant ClassProfile::get_custom_data(const String &p_name) const {\n\tERR_FAIL_COND_V(!_custom_data.has(p_name), Variant());\n\n\treturn _custom_data[p_name];\n}\n\nvoid ClassProfile::remove_custom_data(const String &p_name) {\n\t_custom_data.erase(p_name);\n\n\temit_change();\n}\n\nDictionary ClassProfile::to_dict() const {\n\tDictionary dict;\n\n\tdict[\"character_class_name\"] = _character_class_name;\n\tdict[\"class_path\"] = _class_path;\n\tdict[\"level\"] = _level;\n\tdict[\"xp\"] = _xp;\n\tdict[\"actionbar_locked\"] = _actionbar_locked;\n\n\tdict[\"actionbar_profile\"] = _action_bar_profile->to_dict();\n\tdict[\"input_profile\"] = _input_profile->to_dict();\n\n\tdict[\"custom_data\"] = _custom_data;\n\n\treturn dict;\n}\nvoid ClassProfile::from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\t_character_class_name = dict.get(\"character_class_name\", \"\");\n\t_class_path = dict.get(\"class_path\", \"\");\n\t_level = dict.get(\"level\", 1);\n\t_xp = dict.get(\"xp\", 0);\n\t_actionbar_locked = dict.get(\"actionbar_locked\", false);\n\n\t_action_bar_profile->from_dict(dict.get(\"actionbar_profile\", Dictionary()));\n\t_input_profile->from_dict(dict.get(\"input_profile\", Dictionary()));\n\n\t_custom_data = dict.get(\"custom_data\", Dictionary());\n\n\temit_change();\n}\n\nClassProfile::ClassProfile() {\n\t_action_bar_profile.instantiate();\n\t_action_bar_profile->set_owner(this);\n\n\t_input_profile.instantiate();\n\t_input_profile->set_owner(this);\n\n\t_level = 1;\n\t_xp = 0;\n\t_actionbar_locked = false;\n}\n\nClassProfile::ClassProfile(const StringName &class_path) {\n\t_action_bar_profile.instantiate();\n\t_action_bar_profile->set_owner(this);\n\n\t_input_profile.instantiate();\n\t_input_profile->set_owner(this);\n\n\t_class_path = class_path;\n\t_level = 1;\n\t_xp = 0;\n\t_actionbar_locked = false;\n}\n\nClassProfile::ClassProfile(const String &class_name, const StringName &class_path, const int level, const int xp, const bool locked) {\n\t_action_bar_profile.instantiate();\n\t_action_bar_profile->set_owner(this);\n\n\t_input_profile.instantiate();\n\t_input_profile->set_owner(this);\n\n\t_character_class_name = class_name;\n\t_class_path = class_path;\n\t_level = level;\n\t_xp = xp;\n\t_actionbar_locked = true;\n}\n\nClassProfile::~ClassProfile() {\n\t_input_profile.unref();\n\t_action_bar_profile.unref();\n\n\t_custom_data.clear();\n}\n\nvoid ClassProfile::load_defaults() {\n\t_action_bar_profile->load_defaults();\n\t_input_profile->load_defaults();\n\n\temit_change();\n}\n\nvoid ClassProfile::_bind_methods() {\n\tADD_SIGNAL(MethodInfo(\"changed\"));\n\n\tClassDB::bind_method(D_METHOD(\"get_class_path\"), &ClassProfile::get_class_path);\n\tClassDB::bind_method(D_METHOD(\"set_class_path\", \"value\"), &ClassProfile::set_class_path);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"class_path\"), \"set_class_path\", \"get_class_path\");\n\n\tClassDB::bind_method(D_METHOD(\"get_character_class_name\"), &ClassProfile::get_character_class_name);\n\tClassDB::bind_method(D_METHOD(\"set_character_class_name\", \"value\"), &ClassProfile::set_character_class_name);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"character_class_name\"), \"set_character_class_name\", \"get_character_class_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_level\"), &ClassProfile::get_level);\n\tClassDB::bind_method(D_METHOD(\"set_level\", \"value\"), &ClassProfile::set_level);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"level\"), \"set_level\", \"get_level\");\n\n\tClassDB::bind_method(D_METHOD(\"get_xp\"), &ClassProfile::get_xp);\n\tClassDB::bind_method(D_METHOD(\"set_xp\", \"value\"), &ClassProfile::set_xp);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"xp\"), \"set_xp\", \"get_xp\");\n\n\tClassDB::bind_method(D_METHOD(\"get_actionbar_locked\"), &ClassProfile::get_actionbar_locked);\n\tClassDB::bind_method(D_METHOD(\"set_actionbar_locked\", \"value\"), &ClassProfile::set_actionbar_locked);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"actionbar_locked\"), \"set_actionbar_locked\", \"get_actionbar_locked\");\n\n\tClassDB::bind_method(D_METHOD(\"has_custom_data\", \"name\"), &ClassProfile::has_custom_data);\n\tClassDB::bind_method(D_METHOD(\"set_custom_data\", \"name\", \"value\"), &ClassProfile::set_custom_data);\n\tClassDB::bind_method(D_METHOD(\"remove_custom_data\", \"name\"), &ClassProfile::remove_custom_data);\n\tClassDB::bind_method(D_METHOD(\"get_custom_data\", \"name\"), &ClassProfile::get_custom_data);\n\n\tClassDB::bind_method(D_METHOD(\"get_input_profile\"), &ClassProfile::get_input_profile);\n\tClassDB::bind_method(D_METHOD(\"get_default_action_bar_profile\"), &ClassProfile::get_default_action_bar_profile);\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &ClassProfile::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &ClassProfile::to_dict);\n}\n"
  },
  {
    "path": "profiles/class_profile.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef CLASS_PROFILE_H\n#define CLASS_PROFILE_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n#include \"core/string/ustring.h\"\n#include \"core/variant/dictionary.h\"\n\n\n#include \"actionbar/action_bar_profile.h\"\n#include \"input/input_profile.h\"\n\nclass ClassProfile : public RefCounted {\n\tGDCLASS(ClassProfile, RefCounted);\n\npublic:\n\tStringName get_class_path() const;\n\tvoid set_class_path(const StringName &value);\n\n\tString get_character_class_name() const;\n\tvoid set_character_class_name(const String &value);\n\n\tint get_level() const;\n\tvoid set_level(const int value);\n\n\tint get_xp() const;\n\tvoid set_xp(const int value);\n\n\tbool get_actionbar_locked() const;\n\tvoid set_actionbar_locked(const bool value);\n\n\tRef<InputProfile> get_input_profile();\n\tRef<ActionBarProfile> get_default_action_bar_profile();\n\n\tvoid emit_change();\n\n\tbool has_custom_data(const String &p_name) const;\n\tvoid set_custom_data(const String &p_name, const Variant &p_value);\n\tvoid remove_custom_data(const String &p_name);\n\tVariant get_custom_data(const String &p_name) const;\n\n\tDictionary to_dict() const;\n\tvoid from_dict(const Dictionary &dict);\n\n\tClassProfile();\n\tClassProfile(const StringName &class_path);\n\tClassProfile(const String &class_name, const StringName &class_path, const int level, const int xp, const bool locked);\n\t~ClassProfile();\n\n\tvoid load_defaults();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tString _character_class_name;\n\tStringName _class_path;\n\tint _level;\n\tint _xp;\n\tbool _actionbar_locked;\n\n\tRef<InputProfile> _input_profile;\n\tRef<ActionBarProfile> _action_bar_profile;\n\n\tDictionary _custom_data;\n};\n\n#endif\n"
  },
  {
    "path": "profiles/input/input_profile.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"input_profile.h\"\n\n#include \"core/version.h\"\n\n#include \"core/string/ustring.h\"\n#include \"core/config/project_settings.h\"\n\n\n#include \"../class_profile.h\"\n\nRef<ClassProfile> InputProfile::get_owner() {\n\treturn Ref<ClassProfile>(_owner);\n}\nvoid InputProfile::set_owner(ClassProfile *owner) {\n\t_owner = owner;\n}\n\nArray InputProfile::get_data() {\n\treturn _data;\n}\nvoid InputProfile::set_data(const Array &data) {\n\t_data = data;\n}\n\nvoid InputProfile::load_to_projectsettings() {\n\tfor (int i = 0; i < _data.size(); ++i) {\n\t\tArray arr = _data[i];\n\n\t\tProjectSettings::get_singleton()->set(arr[0], arr[1]);\n\t}\n}\n\nvoid InputProfile::save_from_projectsettings() {\n\t_data.clear();\n\n\tList<PropertyInfo> pinfo;\n\tProjectSettings::get_singleton()->get_property_list(&pinfo);\n\n\tfor (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {\n\t\tconst PropertyInfo &pi = E->get();\n\n\t\tif (!pi.name.begins_with(\"input/\"))\n\t\t\tcontinue;\n\n\t\tString name = pi.name.substr(pi.name.find(\"/\") + 1, pi.name.length());\n\n\t\tDictionary action = ProjectSettings::get_singleton()->get(pi.name);\n\n\t\tArray arr;\n\t\tarr.push_back(name);\n\t\tarr.push_back(action);\n\n\t\t_data.push_back(arr);\n\t}\n}\n\nvoid InputProfile::load_defaults() {\n\t_data.clear();\n}\n\nvoid InputProfile::emit_change() {\n\temit_signal(\"changed\");\n\n\tif (_owner != NULL)\n\t\t_owner->emit_change();\n}\n\nDictionary InputProfile::to_dict() const {\n\tDictionary dict;\n\n\tdict[\"data\"] = _data;\n\n\treturn dict;\n}\nvoid InputProfile::from_dict(const Dictionary &dict) {\n\t_data = dict.get(\"data\", Array());\n\n\temit_change();\n}\n\nInputProfile::InputProfile() {\n}\n\nvoid InputProfile::_bind_methods() {\n\tADD_SIGNAL(MethodInfo(\"changed\"));\n\n\tClassDB::bind_method(D_METHOD(\"get_owner\"), &InputProfile::get_owner);\n\n\tClassDB::bind_method(D_METHOD(\"load_defaults\"), &InputProfile::load_defaults);\n\n\tClassDB::bind_method(D_METHOD(\"get_data\"), &InputProfile::get_data);\n\tClassDB::bind_method(D_METHOD(\"set_data\", \"data\"), &InputProfile::set_data);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"data\"), \"set_data\", \"get_data\");\n\n\tClassDB::bind_method(D_METHOD(\"load_to_projectsettings\"), &InputProfile::load_to_projectsettings);\n\tClassDB::bind_method(D_METHOD(\"save_from_projectsettings\"), &InputProfile::save_from_projectsettings);\n}"
  },
  {
    "path": "profiles/input/input_profile.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef INPUT_PROFILE_H\n#define INPUT_PROFILE_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n#include \"core/string/ustring.h\"\n\n\nclass ClassProfile;\n\nclass InputProfile : public RefCounted {\n\tGDCLASS(InputProfile, RefCounted);\n\npublic:\n\tRef<ClassProfile> get_owner();\n\tvoid set_owner(ClassProfile *owner);\n\n\tArray get_data();\n\tvoid set_data(const Array &data);\n\n\tvoid load_to_projectsettings();\n\tvoid save_from_projectsettings();\n\n\tvoid load_defaults();\n\n\tvoid emit_change();\n\n\tDictionary to_dict() const;\n\tvoid from_dict(const Dictionary &dict);\n\n\tInputProfile();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tArray _data;\n\n\tClassProfile *_owner;\n};\n\n#endif\n"
  },
  {
    "path": "profiles/input/input_profile_modifier.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"input_profile_modifier.h\"\n\nint InputProfileModifier::get_modifier_count() {\n\treturn _modifier_actions->size();\n}\n\nvoid InputProfileModifier::clear_modifiers() {\n\t_modifier_actions->clear();\n}\n\nvoid InputProfileModifier::add_modifier(String modifier) {\n\t_modifier_actions->push_back(modifier);\n}\n\nString InputProfileModifier::get_modifier(int index) {\n\treturn _modifier_actions->get(index);\n}\n\nvoid InputProfileModifier::set_modifier(int index, String value) {\n\t_modifier_actions->set(index, value);\n}\n\nvoid InputProfileModifier::remove_modifier(int index) {\n\t_modifier_actions->remove_at(index);\n}\n\nint InputProfileModifier::get_entry_count() {\n\treturn _entries->size();\n}\n\nvoid InputProfileModifier::clear_entries() {\n\t_entries->clear();\n}\n\nvoid InputProfileModifier::add_entry(Ref<InputProfileModifierEntry> modifier) {\n\t_entries->push_back(Ref<InputProfileModifierEntry>(modifier));\n}\n\nRef<InputProfileModifierEntry> InputProfileModifier::get_entry(int index) {\n\treturn _entries->get(index);\n}\n\nvoid InputProfileModifier::set_entry(int index, Ref<InputProfileModifierEntry> value) {\n\t_entries->set(index, Ref<InputProfileModifierEntry>(value));\n}\n\nvoid InputProfileModifier::remove_entry(int index) {\n\t_entries->remove_at(index);\n}\n\nInputProfileModifier::InputProfileModifier() {\n\t_modifier_actions = memnew(Vector<String>());\n\t_entries = memnew(Vector<Ref<InputProfileModifierEntry> >());\n}\n\nInputProfileModifier::~InputProfileModifier() {\n\t_modifier_actions->clear();\n\t_entries->clear();\n\n\tmemdelete(_modifier_actions);\n\tmemdelete(_entries);\n}\n\nvoid InputProfileModifier::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_modifier_count\"), &InputProfileModifier::get_modifier_count);\n\tClassDB::bind_method(D_METHOD(\"clear_modifiers\"), &InputProfileModifier::clear_modifiers);\n\tClassDB::bind_method(D_METHOD(\"add_modifier\", \"modifier\"), &InputProfileModifier::add_modifier);\n\tClassDB::bind_method(D_METHOD(\"get_modifier\", \"index\"), &InputProfileModifier::get_modifier);\n\tClassDB::bind_method(D_METHOD(\"set_modifier\", \"index\", \"value\"), &InputProfileModifier::set_modifier);\n\tClassDB::bind_method(D_METHOD(\"remove_modifier\", \"index\"), &InputProfileModifier::remove_modifier);\n\n\tClassDB::bind_method(D_METHOD(\"get_entry_count\"), &InputProfileModifier::get_entry_count);\n\tClassDB::bind_method(D_METHOD(\"clear_entries\"), &InputProfileModifier::clear_entries);\n\tClassDB::bind_method(D_METHOD(\"add_entry\", \"entry\"), &InputProfileModifier::add_entry);\n\tClassDB::bind_method(D_METHOD(\"get_entry\", \"index\"), &InputProfileModifier::get_entry);\n\tClassDB::bind_method(D_METHOD(\"set_entry\", \"index\", \"value\"), &InputProfileModifier::set_entry);\n\tClassDB::bind_method(D_METHOD(\"remove_entry\", \"index\"), &InputProfileModifier::remove_entry);\n}\n"
  },
  {
    "path": "profiles/input/input_profile_modifier.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef INPUT_PROFILE_MODIFIER_H\n#define INPUT_PROFILE_MODIFIER_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n#include \"core/templates/vector.h\"\n#include \"core/string/ustring.h\"\n\n\n#include \"input_profile_modifier_entry.h\"\n\nclass InputProfileModifier : public RefCounted {\n\tGDCLASS(InputProfileModifier, RefCounted);\n\npublic:\n\tint get_modifier_count();\n\tvoid clear_modifiers();\n\tvoid add_modifier(String modifier);\n\tString get_modifier(int index);\n\tvoid set_modifier(int index, String value);\n\tvoid remove_modifier(int index);\n\n\tint get_entry_count();\n\tvoid clear_entries();\n\tvoid add_entry(Ref<InputProfileModifierEntry> modifier);\n\tRef<InputProfileModifierEntry> get_entry(int index);\n\tvoid set_entry(int index, Ref<InputProfileModifierEntry> value);\n\tvoid remove_entry(int index);\n\n\tInputProfileModifier();\n\t~InputProfileModifier();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tVector<String> *_modifier_actions;\n\tVector<Ref<InputProfileModifierEntry> > *_entries;\n};\n\n#endif\n"
  },
  {
    "path": "profiles/input/input_profile_modifier_entry.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"input_profile_modifier_entry.h\"\n\nString InputProfileModifierEntry::get_action() {\n\treturn _action;\n}\n\nvoid InputProfileModifierEntry::set_action(String value) {\n\t_action = value;\n}\n\nString InputProfileModifierEntry::get_translate_to() {\n\treturn _translate_to;\n}\n\nvoid InputProfileModifierEntry::set_translate_to(String value) {\n\t_action = _translate_to;\n}\n\nInputProfileModifierEntry::InputProfileModifierEntry() {\n}\n\nvoid InputProfileModifierEntry::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_action\"), &InputProfileModifierEntry::get_action);\n\tClassDB::bind_method(D_METHOD(\"set_action\", \"value\"), &InputProfileModifierEntry::set_action);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"action\"), \"set_action\", \"get_action\");\n\n\tClassDB::bind_method(D_METHOD(\"get_translate_to\"), &InputProfileModifierEntry::get_translate_to);\n\tClassDB::bind_method(D_METHOD(\"set_translate_to\", \"value\"), &InputProfileModifierEntry::set_translate_to);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"translate_to\"), \"set_translate_to\", \"get_translate_to\");\n}\n"
  },
  {
    "path": "profiles/input/input_profile_modifier_entry.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef INPUT_PROFILE_MODIFIER_ENTRY_H\n#define INPUT_PROFILE_MODIFIER_ENTRY_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n#include \"core/string/ustring.h\"\n\n\nclass InputProfileModifierEntry : public RefCounted {\n\tGDCLASS(InputProfileModifierEntry, RefCounted);\n\npublic:\n\tString get_action();\n\tvoid set_action(String value);\n\n\tString get_translate_to();\n\tvoid set_translate_to(String value);\n\n\tInputProfileModifierEntry();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tString _action;\n\tString _translate_to;\n};\n\n#endif\n"
  },
  {
    "path": "profiles/player_profile.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"player_profile.h\"\n\n#include \"core/version.h\"\n\n#include \"../defines.h\"\n\nconst String PlayerProfile::DEFAULT_PROFILE_FILE_NAME = \"default.profile\";\n\nint PlayerProfile::get_id() {\n\treturn _id;\n}\n\nvoid PlayerProfile::set_id(int value) {\n\t_id = value;\n}\n\nString PlayerProfile::get_profile_name() {\n\treturn _profile_name;\n}\n\nvoid PlayerProfile::set_profile_name(String value) {\n\t_profile_name = value;\n}\n\nint PlayerProfile::get_last_used_character() const {\n\treturn _last_used_character;\n}\n\nvoid PlayerProfile::set_last_used_character(const int value) {\n\t_last_used_character = value;\n\n\temit_change();\n}\n\nint PlayerProfile::get_class_profile_count() const {\n\treturn _class_profiles.size();\n}\n\nRef<ClassProfile> PlayerProfile::get_class_profile_index(const int index) {\n\treturn _class_profiles.get(index);\n}\n\nvoid PlayerProfile::add_class_profile(Ref<ClassProfile> profile) {\n\tprofile->CONNECT(\"changed\", this, PlayerProfile, _on_class_profile_changed);\n\n\t_class_profiles.push_back(profile);\n\n\temit_change();\n}\n\nvoid PlayerProfile::clear_class_profiles() {\n\tfor (int i = 0; i < _class_profiles.size(); ++i) {\n\t\t_class_profiles.get(i)->DISCONNECT(\"changed\", this, PlayerProfile, _on_class_profile_changed);\n\t}\n\n\t_class_profiles.clear();\n\n\temit_change();\n}\n\nvoid PlayerProfile::remove_class_profile(const int index) {\n\t_class_profiles.get(index)->DISCONNECT(\"changed\", this, PlayerProfile, _on_class_profile_changed);\n\n\t_class_profiles.remove_at(index);\n\n\temit_change();\n}\n\nVector<Ref<ClassProfile>> &PlayerProfile::get_class_profiles() {\n\treturn _class_profiles;\n}\n\nRef<ClassProfile> PlayerProfile::get_class_profile(const StringName &class_path) {\n\tfor (int i = 0; i < _class_profiles.size(); ++i) {\n\t\tif (_class_profiles.get(i)->get_class_path() == class_path) {\n\t\t\treturn Ref<ClassProfile>(_class_profiles.get(i));\n\t\t}\n\t}\n\n\tRef<ClassProfile> class_profile = Ref<ClassProfile>(memnew(ClassProfile(class_path)));\n\n\tclass_profile->load_defaults();\n\n\tclass_profile->CONNECT(\"changed\", this, PlayerProfile, _on_class_profile_changed);\n\n\t_class_profiles.push_back(Ref<ClassProfile>(class_profile));\n\n\temit_change();\n\n\treturn class_profile;\n}\n\nvoid PlayerProfile::emit_change() {\n\temit_signal(\"changed\", Ref<PlayerProfile>(this));\n}\n\nDictionary PlayerProfile::get_custom_data() {\n\treturn _custom_data;\n}\nvoid PlayerProfile::set_custom_data(const Dictionary &dict) {\n\t_custom_data = dict;\n\n\temit_change();\n}\n\nDictionary PlayerProfile::to_dict() const {\n\tDictionary dict;\n\n\tdict[\"last_used_character\"] = _last_used_character;\n\tdict[\"profile_name\"] = _profile_name;\n\n\tArray arr;\n\n\tfor (int i = 0; i < _class_profiles.size(); ++i) {\n\t\tDictionary d = _class_profiles[i]->to_dict();\n\n\t\tarr.append(d);\n\t}\n\n\tdict[\"class_profiles\"] = arr;\n\n\tdict[\"custom_data\"] = _custom_data;\n\n\treturn dict;\n}\nvoid PlayerProfile::from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\tclear_class_profiles();\n\n\t_last_used_character = dict.get(\"last_used_character\", \"\");\n\t_profile_name = dict.get(\"profile_name\", 0);\n\n\tArray arr = dict.get(\"class_profiles\", Array());\n\n\tfor (int i = 0; i < arr.size(); ++i) {\n\t\tRef<ClassProfile> c;\n\t\tc.instantiate();\n\n\t\tc->from_dict(arr.get(i));\n\n\t\tc->CONNECT(\"changed\", this, PlayerProfile, _on_class_profile_changed);\n\n\t\t_class_profiles.push_back(c);\n\t}\n\n\t_custom_data = dict.get(\"custom_data\", Dictionary());\n\n\temit_change();\n}\n\nPlayerProfile::PlayerProfile() {\n\t_id = 0;\n\t_last_used_character = 0;\n\t_profile_name = DEFAULT_PROFILE_FILE_NAME;\n}\n\nPlayerProfile::~PlayerProfile() {\n\t_custom_data.clear();\n\n\t_class_profiles.clear();\n}\n\nvoid PlayerProfile::load_defaults() {\n\tclear_class_profiles();\n\n\tfor (int i = 0; i < _class_profiles.size(); ++i) {\n\t\t_class_profiles.get(i)->load_defaults();\n\n\t\t_class_profiles.get(i)->CONNECT(\"changed\", this, PlayerProfile, _on_class_profile_changed);\n\t}\n\n\temit_change();\n}\n\nvoid PlayerProfile::_on_class_profile_changed() {\n\temit_change();\n}\n\nvoid PlayerProfile::_bind_methods() {\n\tADD_SIGNAL(MethodInfo(\"changed\", PropertyInfo(Variant::OBJECT, \"profile\", PROPERTY_HINT_RESOURCE_TYPE, \"PlayerProfile\")));\n\n\tClassDB::bind_method(D_METHOD(\"get_id\"), &PlayerProfile::get_id);\n\tClassDB::bind_method(D_METHOD(\"set_id\", \"value\"), &PlayerProfile::set_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"id\"), \"set_id\", \"get_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_profile_name\"), &PlayerProfile::get_profile_name);\n\tClassDB::bind_method(D_METHOD(\"set_profile_name\", \"value\"), &PlayerProfile::set_profile_name);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"profile_name\"), \"set_profile_name\", \"get_profile_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_last_used_character\"), &PlayerProfile::get_last_used_character);\n\tClassDB::bind_method(D_METHOD(\"set_last_used_character\", \"value\"), &PlayerProfile::set_last_used_character);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"set_last_used_character\"), \"set_last_used_character\", \"get_last_used_character\");\n\n\tClassDB::bind_method(D_METHOD(\"get_custom_data\"), &PlayerProfile::get_custom_data);\n\tClassDB::bind_method(D_METHOD(\"set_custom_data\", \"value\"), &PlayerProfile::set_custom_data);\n\tADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, \"custom_data\"), \"set_custom_data\", \"get_custom_data\");\n\n\tClassDB::bind_method(D_METHOD(\"get_class_profile_count\"), &PlayerProfile::get_class_profile_count);\n\tClassDB::bind_method(D_METHOD(\"get_class_profile_index\", \"index\"), &PlayerProfile::get_class_profile_index);\n\tClassDB::bind_method(D_METHOD(\"add_class_profile\", \"profile\"), &PlayerProfile::add_class_profile);\n\tClassDB::bind_method(D_METHOD(\"clear_class_profiles\"), &PlayerProfile::clear_class_profiles);\n\tClassDB::bind_method(D_METHOD(\"remove_class_profile\", \"index\"), &PlayerProfile::remove_class_profile);\n\n\tClassDB::bind_method(D_METHOD(\"get_class_profile\", \"class_id\"), &PlayerProfile::get_class_profile);\n\n\tClassDB::bind_method(D_METHOD(\"load_defaults\"), &PlayerProfile::load_defaults);\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &PlayerProfile::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &PlayerProfile::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_on_class_profile_changed\"), &PlayerProfile::_on_class_profile_changed);\n\n\tClassDB::bind_method(D_METHOD(\"emit_change\"), &PlayerProfile::emit_change);\n}\n"
  },
  {
    "path": "profiles/player_profile.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef PLAYER_PROFILE_H\n#define PLAYER_PROFILE_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n#include \"core/string/ustring.h\"\n#include \"core/variant/dictionary.h\"\n\n\n#include \"class_profile.h\"\n\nclass PlayerProfile : public RefCounted {\n\tGDCLASS(PlayerProfile, RefCounted);\n\npublic:\n\tstatic const String DEFAULT_PROFILE_FILE_NAME;\n\n\tint get_id();\n\tvoid set_id(int value);\n\n\tString get_profile_name();\n\tvoid set_profile_name(String value);\n\n\tint get_last_used_character() const;\n\tvoid set_last_used_character(const int value);\n\n\tint get_class_profile_count() const;\n\tRef<ClassProfile> get_class_profile_index(const int index);\n\tvoid add_class_profile(Ref<ClassProfile> profile);\n\tvoid clear_class_profiles();\n\tvoid remove_class_profile(const int index);\n\n\tVector<Ref<ClassProfile> > &get_class_profiles();\n\tRef<ClassProfile> get_class_profile(const StringName &class_path);\n\n\tDictionary get_custom_data();\n\tvoid set_custom_data(const Dictionary &dict);\n\n\tDictionary to_dict() const;\n\tvoid from_dict(const Dictionary &dict);\n\n\tvoid emit_change();\n\n\tPlayerProfile();\n\t~PlayerProfile();\n\n\tvoid load_defaults();\n\nprotected:\n\tvoid _on_class_profile_changed();\n\n\tstatic void _bind_methods();\n\nprivate:\n\tint _id;\n\tint _last_used_character;\n\tString _profile_name;\n\n\tDictionary _custom_data;\n\n\tVector<Ref<ClassProfile> > _class_profiles;\n};\n\n#endif\n"
  },
  {
    "path": "projectiles/3d/spell_follow_projectile_3d.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"spell_follow_projectile_3d.h\"\n\n#include \"../../infos/spell_cast_info.h\"\n\nvoid SpellFollowProjectile3D::setup_projectile(Ref<SpellCastInfo> info) {\n\t_info = info;\n}\n\nSpellFollowProjectile3D::SpellFollowProjectile3D() {\n}\nSpellFollowProjectile3D::~SpellFollowProjectile3D() {\n\t_info.unref();\n}\n\nvoid SpellFollowProjectile3D::_bind_methods() {\n\t//ClassDB::bind_method(D_METHOD(\"setup_projectile\", \"info\"), &SpellFollowProjectile3D::setup_projectile);\n}\n"
  },
  {
    "path": "projectiles/3d/spell_follow_projectile_3d.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPELL_PROJECTILE_3D\n#define SPELL_PROJECTILE_3D\n\n#include \"../../defines.h\"\n\n#include spatial_h_path\n\nclass SpellCastInfo;\n\nclass SpellFollowProjectile3D : public Spatial {\n\tGDCLASS(SpellFollowProjectile3D, Spatial);\n\npublic:\n\tvoid setup_projectile(Ref<SpellCastInfo> info);\n\n\tSpellFollowProjectile3D();\n\t~SpellFollowProjectile3D();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tRef<SpellCastInfo> _info;\n};\n\n#endif\n"
  },
  {
    "path": "props/prop_data_entity.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"prop_data_entity.h\"\n\n#if PROPS_PRESENT\n\nRef<EntityData> PropDataEntity::get_entity_data() const {\n\treturn _entity_data;\n}\nvoid PropDataEntity::set_entity_data(const Ref<EntityData> &value) {\n\t_entity_data = value;\n}\n\nint PropDataEntity::get_level() const {\n\treturn _level;\n}\nvoid PropDataEntity::set_level(const int value) {\n\t_level = value;\n}\n\nPropDataEntity::PropDataEntity() {\n\t_level = 1;\n}\nPropDataEntity::~PropDataEntity() {\n\t_entity_data.unref();\n}\n\nvoid PropDataEntity::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_entity_data\"), &PropDataEntity::get_entity_data);\n\tClassDB::bind_method(D_METHOD(\"set_entity_data\", \"value\"), &PropDataEntity::set_entity_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"entity_data\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityData\"), \"set_entity_data\", \"get_entity_data\");\n\n\tClassDB::bind_method(D_METHOD(\"get_level\"), &PropDataEntity::get_level);\n\tClassDB::bind_method(D_METHOD(\"set_level\", \"value\"), &PropDataEntity::set_level);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"level\"), \"set_level\", \"get_level\");\n}\n\n#endif"
  },
  {
    "path": "props/prop_data_entity.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef PROP_DATA_ENTITY_H\n#define PROP_DATA_ENTITY_H\n\n#if PROPS_PRESENT\n\n#include \"../../props/props/prop_data_entry.h\"\n\n#include \"../entities/data/entity_data.h\"\n\nclass PropDataEntity : public PropDataEntry {\n\tGDCLASS(PropDataEntity, PropDataEntry);\n\npublic:\n\tRef<EntityData> get_entity_data() const;\n\tvoid set_entity_data(const Ref<EntityData> &value);\n\n\tint get_level() const;\n\tvoid set_level(const int value);\n\n\tPropDataEntity();\n\t~PropDataEntity();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _level;\n\tRef<EntityData> _entity_data;\n};\n\n#endif\n\n#endif\n"
  },
  {
    "path": "register_types.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"register_types.h\"\n\n#include \"entity_enums.h\"\n#include \"item_enums.h\"\n\n#include \"singletons/ess.h\"\n\n#include \"data/auras/aura_group.h\"\n\n#include \"data/items/equipment_data.h\"\n#include \"data/spells/spell_cooldown_manipulation_data.h\"\n\n#include \"entities/data/entity_class_data.h\"\n#include \"entities/data/entity_data.h\"\n#include \"entities/data/entity_data_container.h\"\n#include \"entities/data/item_container_data.h\"\n#include \"entities/data/item_container_data_entry.h\"\n#include \"entities/data/vendor_item_data.h\"\n#include \"entities/data/vendor_item_data_entry.h\"\n\n#include \"entities/skills/entity_skill.h\"\n#include \"entities/skills/entity_skill_data.h\"\n\n#include \"entities/data/character_spec.h\"\n\n#include \"data/items/model_visual.h\"\n#include \"data/items/model_visual_entry.h\"\n\n#include \"data/atlases/character_atlas.h\"\n#include \"data/atlases/character_atlas_entry.h\"\n\n#include \"skeleton/character_bones.h\"\n\n#include \"data/items/item_instance.h\"\n#include \"data/items/item_template.h\"\n\n#include \"data/spells/spell.h\"\n#include \"entities/stats/complex_level_stat_data.h\"\n#include \"entities/stats/level_stat_data.h\"\n#include \"entities/stats/simple_level_stat_data.h\"\n#include \"entities/stats/stat_data.h\"\n\n#include \"inventory/bag.h\"\n//#include \"inventory/inventory.h\"\n\n#include \"data/items/craft_recipe.h\"\n#include \"data/items/craft_recipe_helper.h\"\n\n#include \"infos/aura_infos.h\"\n#include \"infos/spell_cast_info.h\"\n\n#include \"pipelines/spell_damage_info.h\"\n#include \"pipelines/spell_heal_info.h\"\n\n#include \"entities/resources/entity_resource.h\"\n#include \"entities/resources/entity_resource_cost_data.h\"\n#include \"entities/resources/entity_resource_cost_data_health.h\"\n#include \"entities/resources/entity_resource_cost_data_resource.h\"\n#include \"entities/resources/entity_resource_health.h\"\n#include \"entities/resources/entity_resource_speed.h\"\n\n#include \"entities/auras/aura_data.h\"\n#include \"entities/entity.h\"\n\n#include \"drag_and_drop/es_drag_and_drop.h\"\n\n#include \"skeleton/character_skeleton_2d.h\"\n#include \"skeleton/character_skeleton_3d.h\"\n\n#include \"data/species/entity_species_data.h\"\n#include \"data/species/species_instance.h\"\n#include \"data/species/species_model_data.h\"\n\n#include \"skeleton/skeleton_model_entry.h\"\n\n#include \"utility/entity_create_info.h\"\n\n#include \"data/loot/loot_data_base.h\"\n\n#include \"data/spells/spell_effect_visual.h\"\n#include \"data/spells/spell_effect_visual_simple.h\"\n\n#include \"projectiles/3d/spell_follow_projectile_3d.h\"\n\n#include \"entities/ai/entity_ai.h\"\n\n#include \"formations/ai_formation.h\"\n\n#include \"profiles/input/input_profile.h\"\n#include \"profiles/input/input_profile_modifier.h\"\n#include \"profiles/input/input_profile_modifier_entry.h\"\n\n#include \"profiles/actionbar/action_bar_button_entry.h\"\n#include \"profiles/actionbar/action_bar_entry.h\"\n#include \"profiles/actionbar/action_bar_profile.h\"\n\n#include \"profiles/class_profile.h\"\n#include \"profiles/player_profile.h\"\n\n#include \"spawners/ess_entity_spawner.h\"\n\n#include \"singletons/profile_manager.h\"\n\n#include \"editor/ess_editor_plugin.h\"\n\n#include \"database/ess_resource_db.cpp\"\n#include \"database/ess_resource_db_folders.h\"\n#include \"database/ess_resource_db_map.h\"\n#include \"database/ess_resource_db_static.h\"\n\n#include \"material_cache/ess_material_cache.h\"\n#include \"material_cache/ess_material_cache_pcm.h\"\n\n#if PROPS_PRESENT\n#include \"props/prop_data_entity.h\"\n#endif\n\nstatic ESS *entity_data_manager = NULL;\nstatic ProfileManager *profile_manager = NULL;\n\nvoid initialize_entity_spell_system_module(ModuleInitializationLevel p_level) {\n\tif (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {\n#if PROPS_PRESENT\n\t\tGDREGISTER_CLASS(PropDataEntity);\n#endif\n\n\t\tGDREGISTER_CLASS(SpellEnums);\n\n\t\t//data\n\t\tGDREGISTER_CLASS(CraftRecipeHelper);\n\t\tGDREGISTER_CLASS(CraftRecipe);\n\n\t\tGDREGISTER_CLASS(Spell);\n\t\tGDREGISTER_CLASS(AuraGroup);\n\n\t\tGDREGISTER_CLASS(EntityData);\n\t\tGDREGISTER_CLASS(EntityClassData);\n\t\tGDREGISTER_CLASS(VendorItemData);\n\t\tGDREGISTER_CLASS(VendorItemDataEntry);\n\n\t\tGDREGISTER_CLASS(EntityDataContainer);\n\n\t\tGDREGISTER_CLASS(ItemContainerData);\n\t\tGDREGISTER_CLASS(ItemContainerDataEntry);\n\n\t\tGDREGISTER_CLASS(ItemEnums);\n\t\tGDREGISTER_CLASS(ItemTemplate);\n\t\tGDREGISTER_CLASS(ItemInstance);\n\t\tGDREGISTER_CLASS(SpellCooldownManipulationData);\n\n\t\tGDREGISTER_CLASS(EquipmentData);\n\n\t\tGDREGISTER_CLASS(EntitySkill);\n\t\tGDREGISTER_CLASS(EntitySkillData);\n\n\t\tGDREGISTER_CLASS(ModelVisual);\n\t\tGDREGISTER_CLASS(ModelVisualEntry);\n\n\t\tGDREGISTER_CLASS(CharacterAtlas);\n\t\tGDREGISTER_CLASS(CharacterAtlasEntry);\n\n\t\tGDREGISTER_CLASS(CharacterBones);\n\n\t\t//entity data\n\t\tGDREGISTER_CLASS(EntityEnums);\n\n\t\tGDREGISTER_CLASS(StatData);\n\n\t\tGDREGISTER_CLASS(LevelStatData);\n\t\tGDREGISTER_CLASS(SimpleLevelStatData);\n\t\tGDREGISTER_CLASS(ComplexLevelStatData);\n\n\t\tGDREGISTER_CLASS(CharacterSpec);\n\n\t\tGDREGISTER_CLASS(Bag);\n\n\t\tGDREGISTER_CLASS(SpellDamageInfo);\n\t\tGDREGISTER_CLASS(SpellHealInfo);\n\t\tGDREGISTER_CLASS(AuraData);\n\n\t\tGDREGISTER_CLASS(EntityResourceCostData);\n\t\tGDREGISTER_CLASS(EntityResourceCostDataHealth);\n\t\tGDREGISTER_CLASS(EntityResourceCostDataResource);\n\t\tGDREGISTER_CLASS(EntityResource);\n\t\tGDREGISTER_CLASS(EntityResourceHealth);\n\t\tGDREGISTER_CLASS(EntityResourceSpeed);\n\n\t\t//entities\n\t\tGDREGISTER_CLASS(EntityCreateInfo);\n\t\tGDREGISTER_CLASS(Entity);\n\n\t\t//spellinfos\n\t\tGDREGISTER_CLASS(SpellCastInfo);\n\n\t\t//aurainfos\n\t\tGDREGISTER_CLASS(AuraApplyInfo);\n\n\t\t//UI\n\t\tGDREGISTER_CLASS(ESDragAndDrop);\n\n\t\t//Skeleton\n\t\tGDREGISTER_CLASS(CharacterSkeleton2D);\n\t\tGDREGISTER_CLASS(CharacterSkeleton3D);\n\n\t\tGDREGISTER_CLASS(EntitySpeciesData);\n\t\tGDREGISTER_CLASS(SpeciesModelData);\n\t\tGDREGISTER_CLASS(SpeciesInstance);\n\n\t\tGDREGISTER_CLASS(SkeletonModelEntry);\n\n\t\tGDREGISTER_CLASS(LootDataBase);\n\n\t\tGDREGISTER_CLASS(SpellEffectVisual);\n\t\tGDREGISTER_CLASS(SpellEffectVisualSimple);\n\n\t\t//Projectiles\n\t\tGDREGISTER_CLASS(SpellFollowProjectile3D);\n\n\t\t//AI\n\t\tGDREGISTER_CLASS(EntityAI);\n\n\t\tGDREGISTER_CLASS(AIFormation);\n\n\t\t//Resources\n\t\tGDREGISTER_ABSTRACT_CLASS(ESSResourceDB);\n\t\tGDREGISTER_CLASS(ESSResourceDBStatic);\n\t\tGDREGISTER_CLASS(ESSResourceDBFolders);\n\t\tGDREGISTER_CLASS(ESSResourceDBMap);\n\n\t\t//ProfileManager\n\t\tGDREGISTER_CLASS(InputProfileModifier);\n\t\tGDREGISTER_CLASS(InputProfileModifierEntry);\n\t\tGDREGISTER_CLASS(InputProfile);\n\n\t\tGDREGISTER_CLASS(ActionBarButtonEntry);\n\t\tGDREGISTER_CLASS(ActionBarEntry);\n\t\tGDREGISTER_CLASS(ActionBarProfile);\n\n\t\tGDREGISTER_CLASS(ClassProfile);\n\t\tGDREGISTER_CLASS(PlayerProfile);\n\n\t\tGDREGISTER_CLASS(ProfileManager);\n\n\t\tGDREGISTER_CLASS(ESSEntitySpawner);\n\n\t\tGDREGISTER_CLASS(ESSMaterialCache);\n\t\tGDREGISTER_CLASS(ESSMaterialCachePCM);\n\n\t\tentity_data_manager = memnew(ESS);\n\t\tGDREGISTER_CLASS(ESS);\n\t\tEngine::get_singleton()->add_singleton(Engine::Singleton(\"ESS\", ESS::get_singleton()));\n\n\t\tprofile_manager = memnew(ProfileManager);\n\t\tGDREGISTER_CLASS(ProfileManager);\n\t\tEngine::get_singleton()->add_singleton(Engine::Singleton(\"ProfileManager\", ProfileManager::get_singleton()));\n\t}\n\n#ifdef TOOLS_ENABLED\n\tif (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) {\n\t\t//EditorPlugins::add_by_type<ESSEditorPlugin>();\n\t}\n#endif\n}\n\nvoid uninitialize_entity_spell_system_module(ModuleInitializationLevel p_level) {\n\tif (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {\n\t\tif (entity_data_manager) {\n\t\t\tmemdelete(entity_data_manager);\n\t\t}\n\n\t\tif (profile_manager) {\n\t\t\tmemdelete(profile_manager);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "register_types.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_SPELL_SYSTEM_REGISTER_TYPES_H\n#define ENTITY_SPELL_SYSTEM_REGISTER_TYPES_H\n\n#include \"modules/register_module_types.h\"\n\nvoid initialize_entity_spell_system_module(ModuleInitializationLevel p_level);\nvoid uninitialize_entity_spell_system_module(ModuleInitializationLevel p_level);\n\n#endif"
  },
  {
    "path": "singletons/ess.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"ess.h\"\n\n#include \"../database/ess_resource_db.h\"\n#include \"../material_cache/ess_material_cache.h\"\n#include \"../spawners/ess_entity_spawner.h\"\n#include \"../utility/entity_create_info.h\"\n#include \"core/config/project_settings.h\"\n\nESS *ESS::instance;\n\nESS *ESS::get_singleton() {\n\treturn instance;\n}\n\nbool ESS::get_use_spell_points() const {\n\treturn _use_spell_points;\n}\nvoid ESS::set_use_spell_points(const bool value) {\n\t_use_spell_points = value;\n}\n\nbool ESS::get_scale_spells_by_default() const {\n\treturn _scale_spells_by_default;\n}\nvoid ESS::set_scale_spells_by_default(const bool value) {\n\t_scale_spells_by_default = value;\n}\n\nbool ESS::get_automatic_load() const {\n\treturn _automatic_load;\n}\nvoid ESS::set_automatic_load(const bool load) {\n\t_automatic_load = load;\n}\n\nbool ESS::get_use_class_xp() const {\n\treturn _use_class_xp;\n}\nvoid ESS::set_use_class_xp(const bool value) {\n\t_use_class_xp = value;\n}\n\nbool ESS::get_allow_class_spell_learning() const {\n\treturn _allow_class_spell_learning;\n}\nvoid ESS::set_allow_class_spell_learning(const bool value) {\n\t_allow_class_spell_learning = value;\n}\n\nbool ESS::get_allow_class_recipe_learning() const {\n\treturn _allow_class_recipe_learning;\n}\nvoid ESS::set_allow_class_recipe_learning(const bool value) {\n\t_allow_class_recipe_learning = value;\n}\n\nint ESS::get_auto_learn_spells() const {\n\treturn _auto_learn_spells;\n}\nvoid ESS::set_auto_learn_spells(const int value) {\n\t_auto_learn_spells = value;\n}\n\nRef<ESSResourceDB> ESS::get_resource_db() {\n\treturn _ess_resource_db;\n}\nvoid ESS::set_resource_db(const Ref<ESSResourceDB> &resource_db) {\n\t_ess_resource_db = resource_db;\n}\n\nESSEntitySpawner *ESS::get_entity_spawner() {\n\treturn _ess_entity_spawner;\n}\nvoid ESS::set_entity_spawner(ESSEntitySpawner *spawner) {\n\t_ess_entity_spawner = spawner;\n}\n\nvoid ESS::set_entity_spawner_bind(Node *spawner) {\n\t_ess_entity_spawner = Object::cast_to<ESSEntitySpawner>(spawner);\n}\n\nString ESS::get_resource_db_path() {\n\treturn _ess_resource_db_path;\n}\nvoid ESS::set_resource_db_path(const String &path) {\n\t_ess_resource_db_path = path;\n}\n\nvoid ESS::request_entity_spawn(Ref<EntityCreateInfo> info) {\n\tif (_ess_entity_spawner)\n\t\t_ess_entity_spawner->request_entity_spawn(info);\n}\nvoid ESS::request_entity_spawn_deferred(Ref<EntityCreateInfo> info) {\n\tif (_ess_entity_spawner)\n\t\t_ess_entity_spawner->request_entity_spawn_deferred(info);\n}\n\nvoid ESS::load_resource_db() {\n\tERR_FAIL_COND(_ess_resource_db_path == \"\");\n\n\tRef<ESSResourceDB> d = load_resource(_ess_resource_db_path, \"ESSResourceDB\");\n\n\tERR_FAIL_COND(!d.is_valid());\n\n\t_ess_resource_db = d;\n}\n\nvoid ESS::load_all() {\n\tload_resource_db();\n\n\t_ess_resource_db->initialize();\n}\n\n//Stats\nvoid ESS::stat_set_string(const String &stat_enum_string) {\n\t_stat_enum_string = stat_enum_string;\n\n\t_stat_id_to_name.clear();\n\t_stat_name_to_id.clear();\n\n\t_stat_id_to_property.clear();\n\t_stat_property_to_id.clear();\n\n\tint slicec = stat_enum_string.get_slice_count(\",\");\n\t_stat_id_to_name.resize(slicec);\n\t_stat_id_to_property.resize(slicec);\n\n\tfor (int i = 0; i < slicec; ++i) {\n\t\tString slice = stat_enum_string.get_slicec(',', i);\n\t\tStringName s = StringName(slice);\n\n\t\t_stat_id_to_name.set(i, s);\n\t\t_stat_name_to_id[s] = i;\n\n\t\tString st = slice;\n\t\tst = st.to_lower();\n\t\tst = st.replace(\" \", \"_\");\n\t\tStringName stp = StringName(st);\n\n\t\t_stat_id_to_property.set(i, stp);\n\t\t_stat_property_to_id[stp] = i;\n\t}\n}\nString ESS::stat_get_string() const {\n\treturn _stat_enum_string;\n}\n\nint ESS::stat_get_id(const StringName &name) const {\n\tERR_FAIL_COND_V(!_stat_name_to_id.has(name), 0);\n\n\treturn _stat_name_to_id[name];\n}\nStringName ESS::stat_get_name(const int id) const {\n\tERR_FAIL_INDEX_V(id, _stat_id_to_name.size(), StringName());\n\n\treturn _stat_id_to_name[id];\n}\n\nint ESS::stat_get_property_id(const StringName &name) const {\n\tERR_FAIL_COND_V(!_stat_property_to_id.has(name), 0);\n\n\treturn _stat_property_to_id[name];\n}\nStringName ESS::stat_get_property_name(const int id) const {\n\tERR_FAIL_INDEX_V(id, _stat_id_to_property.size(), StringName());\n\n\treturn _stat_id_to_property[id];\n}\nbool ESS::stat_is_property(const StringName &name) const {\n\treturn _stat_property_to_id.has(name);\n}\n\nint ESS::stat_get_count() const {\n\treturn _stat_id_to_name.size();\n}\n\nPoolStringArray ESS::stats_get() const {\n\tPoolStringArray arr;\n\tarr.resize(_stat_id_to_name.size());\n\n\tfor (int i = 0; i < _stat_id_to_name.size(); ++i) {\n\t\tarr.set(i, _stat_id_to_name[i]);\n\t}\n\n\treturn arr;\n}\n\nvoid ESS::stats_set(const PoolStringArray &array) {\n\t_stat_enum_string = \"\";\n\n\t_stat_id_to_name.clear();\n\t_stat_name_to_id.clear();\n\n\t_stat_id_to_property.clear();\n\t_stat_property_to_id.clear();\n\n\t_stat_id_to_name.resize(array.size());\n\t_stat_id_to_property.resize(array.size());\n\n\tif (array.size() > 0)\n\t\t_stat_enum_string += array[0];\n\n\tfor (int i = 0; i < array.size(); ++i) {\n\t\tStringName s = StringName(array[i]);\n\n\t\t_stat_id_to_name.set(i, s);\n\t\t_stat_name_to_id[s] = i;\n\n\t\tString st = array[i];\n\t\tst = st.to_lower();\n\t\tst = st.replace(\" \", \"_\");\n\t\tStringName stp = StringName(st);\n\n\t\t_stat_id_to_property.set(i, stp);\n\t\t_stat_property_to_id[stp] = i;\n\n\t\t_stat_enum_string += \",\";\n\t\t_stat_enum_string += array[i];\n\t}\n}\n\nint ESS::stat_get_main_stat_count() const {\n\treturn _stat_main_stat_count;\n}\nvoid ESS::stat_set_main_stat_count(const int index) {\n\t_stat_main_stat_count = index;\n}\n\n//Equipslots\nvoid ESS::equip_slot_set_string(const String &equip_slot_enum_string) {\n\t_equip_slot_id_to_name.clear();\n\t_equip_slot_name_to_id.clear();\n\n\t_equip_slot_id_to_property.clear();\n\t_equip_slot_property_to_id.clear();\n\n\tint slicec = equip_slot_enum_string.get_slice_count(\",\");\n\t_equip_slot_id_to_name.resize(slicec);\n\t_equip_slot_id_to_property.resize(slicec);\n\n\tfor (int i = 0; i < slicec; ++i) {\n\t\tString slice = equip_slot_enum_string.get_slicec(',', i);\n\t\tStringName s = StringName(slice);\n\n\t\t_equip_slot_id_to_name.set(i, s);\n\t\t_equip_slot_name_to_id[s] = i;\n\n\t\tString st = slice;\n\t\tst = st.to_lower();\n\t\tst = st.replace(\" \", \"_\");\n\t\tStringName stp = StringName(st);\n\n\t\t_equip_slot_id_to_property.set(i, stp);\n\t\t_equip_slot_property_to_id[stp] = i;\n\t}\n\n\t_equip_slot_enum_string = equip_slot_enum_string + \",None\";\n}\nString ESS::equip_slot_get_string() const {\n\treturn _equip_slot_enum_string;\n}\n\nint ESS::equip_slot_get_id(const StringName &name) const {\n\tERR_FAIL_COND_V(!_equip_slot_name_to_id.has(name), 0);\n\n\treturn _equip_slot_name_to_id[name];\n}\nStringName ESS::equip_slot_get_name(const int id) const {\n\tERR_FAIL_INDEX_V(id, _equip_slot_id_to_name.size(), StringName());\n\n\treturn _equip_slot_id_to_name[id];\n}\n\nint ESS::equip_slot_get_property_id(const StringName &name) const {\n\tERR_FAIL_COND_V(!_equip_slot_property_to_id.has(name), 0);\n\n\treturn _equip_slot_property_to_id[name];\n}\nStringName ESS::equip_slot_get_property_name(const int id) const {\n\tERR_FAIL_INDEX_V(id, _equip_slot_id_to_property.size(), StringName());\n\n\treturn _equip_slot_id_to_property[id];\n}\nbool ESS::equip_slot_is_property(const StringName &name) const {\n\treturn _equip_slot_property_to_id.has(name);\n}\n\nint ESS::equip_slot_get_count() const {\n\treturn _equip_slot_id_to_name.size();\n}\n\nPoolStringArray ESS::equip_slots_get() const {\n\tPoolStringArray arr;\n\tarr.resize(_equip_slot_id_to_name.size());\n\n\tfor (int i = 0; i < _equip_slot_id_to_name.size(); ++i) {\n\t\tarr.set(i, _equip_slot_id_to_name[i]);\n\t}\n\n\treturn arr;\n}\n\nvoid ESS::equip_slots_set(const PoolStringArray &array) {\n\t_equip_slot_enum_string = \"\";\n\n\t_equip_slot_id_to_name.clear();\n\t_equip_slot_name_to_id.clear();\n\n\t_equip_slot_id_to_property.clear();\n\t_equip_slot_property_to_id.clear();\n\n\t_equip_slot_id_to_name.resize(array.size());\n\t_equip_slot_id_to_property.resize(array.size());\n\n\tif (array.size() > 0)\n\t\t_equip_slot_enum_string += array[0];\n\n\tfor (int i = 0; i < array.size(); ++i) {\n\t\tStringName s = StringName(array[i]);\n\n\t\t_equip_slot_id_to_name.set(i, s);\n\t\t_equip_slot_name_to_id[s] = i;\n\n\t\tString st = array[i];\n\t\tst = st.to_lower();\n\t\tst = st.replace(\" \", \"_\");\n\t\tStringName stp = StringName(st);\n\n\t\t_equip_slot_id_to_property.set(i, stp);\n\t\t_equip_slot_property_to_id[stp] = i;\n\n\t\t_equip_slot_enum_string += \",\";\n\t\t_equip_slot_enum_string += array[i];\n\t}\n}\n\n//Skeletons\nString ESS::entity_types_get() const {\n\treturn _entity_types;\n}\nvoid ESS::entity_types_set(const String &value) {\n\t_entity_types = value;\n}\n\nString ESS::skeletons_bones_index_get(const int index) const {\n\tERR_FAIL_INDEX_V(index, _skeletons_bones.size(), String());\n\n\treturn _skeletons_bones[index];\n}\nint ESS::skeletons_bones_count() {\n\treturn _skeletons_bones.size();\n}\n\nPoolStringArray ESS::skeletons_bones_get() const {\n\treturn _skeletons_bones;\n}\nvoid ESS::skeletons_bones_set(const PoolStringArray &value) {\n\t_skeletons_bones = value;\n}\n\nString ESS::skeletons_bone_attachment_index_get(const int index) const {\n\tERR_FAIL_INDEX_V(index, _skeletons_bone_attachment_points.size(), String());\n\n\treturn _skeletons_bone_attachment_points[index];\n}\nint ESS::skeletons_bone_attachments_count() {\n\treturn _skeletons_bone_attachment_points.size();\n}\n\nPoolStringArray ESS::skeletons_bone_attachment_points_get() const {\n\treturn _skeletons_bone_attachment_points;\n}\nvoid ESS::skeletons_bone_attachment_points_set(const PoolStringArray &value) {\n\t_skeletons_bone_attachment_points = value;\n}\n\n//Other\nString ESS::model_visual_groups_get() const {\n\treturn _model_visual_groups;\n}\nvoid ESS::model_visual_groups_set(const String &value) {\n\t_model_visual_groups = value;\n}\n\nString ESS::texture_layers_get() const {\n\treturn _texture_layers;\n}\nvoid ESS::texture_layers_set(const String &value) {\n\t_texture_layers = value;\n}\n\n//Diminishing Returns\nString ESS::dminishing_return_categories_get() const {\n\treturn _dminishing_return_categories;\n}\nvoid ESS::dminishing_return_categories_set(const String &value) {\n\t_dminishing_return_categories = value;\n}\n\nfloat ESS::dminishing_return_length_get() const {\n\treturn _dminishing_return_length;\n}\nvoid ESS::dminishing_return_length_set(const float value) {\n\t_dminishing_return_length = value;\n}\n\nint ESS::dminishing_return_steps_get() const {\n\treturn _dminishing_return_steps;\n}\nvoid ESS::dminishing_return_steps_set(const int value) {\n\t_dminishing_return_steps = value;\n}\n\n//Levels/XP\nint ESS::get_max_character_level() const {\n\treturn _character_xps.size();\n}\nint ESS::get_max_class_level() const {\n\treturn _class_xps.size();\n}\n\nint ESS::get_character_xp(int current_level) {\n\tcurrent_level -= 1;\n\n\tERR_FAIL_INDEX_V(current_level, _character_xps.size(), 9999999);\n\n\treturn _character_xps.get(current_level);\n}\nvoid ESS::set_character_xp(int current_level, int value) {\n\tcurrent_level -= 1;\n\n\tERR_FAIL_INDEX(current_level, _character_xps.size());\n\n\t_character_xps.set(current_level, value);\n}\nbool ESS::can_character_level_up(int current_level) {\n\tcurrent_level -= 1;\n\n\treturn current_level < _character_xps.size();\n}\n\nPoolIntArray ESS::get_character_xp_data() {\n\treturn _character_xps;\n}\nvoid ESS::set_character_xp_data(const PoolIntArray &data) {\n\t_character_xps = data;\n}\n\nint ESS::get_class_xp(int current_level) {\n\tcurrent_level -= 1;\n\n\tERR_FAIL_INDEX_V(current_level, _class_xps.size(), 9999999);\n\n\treturn _class_xps.get(current_level);\n}\nvoid ESS::set_class_xp(int current_level, int value) {\n\tcurrent_level -= 1;\n\n\tERR_FAIL_INDEX(current_level, _class_xps.size());\n\n\t_class_xps.set(current_level, value);\n}\nbool ESS::can_class_level_up(int level) {\n\treturn level < _class_xps.size();\n}\n\nPoolIntArray ESS::get_class_xp_data() {\n\treturn _class_xps;\n}\nvoid ESS::set_class_xp_data(const PoolIntArray &data) {\n\t_class_xps = data;\n}\n\n#ifdef TEXTURE_PACKER_PRESENT\nint ESS::get_texture_flags() const {\n\treturn _texture_flags;\n}\nvoid ESS::set_texture_flags(const int flags) {\n\t_texture_flags = flags;\n}\n\nint ESS::get_max_atlas_size() const {\n\treturn _max_atlas_size;\n}\nvoid ESS::set_max_atlas_size(const int size) {\n\t_max_atlas_size = size;\n}\n\nbool ESS::get_keep_original_atlases() const {\n\treturn _keep_original_atlases;\n}\nvoid ESS::set_keep_original_atlases(const bool value) {\n\t_keep_original_atlases = value;\n}\n\nColor ESS::get_background_color() const {\n\treturn _background_color;\n}\nvoid ESS::set_background_color(const Color &color) {\n\t_background_color = color;\n}\n\nint ESS::get_margin() const {\n\treturn _margin;\n}\nvoid ESS::set_margin(const int margin) {\n\t_margin = margin;\n}\n#endif\n\nStringName ESS::get_default_ess_material_cache_class() {\n\treturn _default_ess_material_cache_class;\n}\nvoid ESS::set_default_ess_material_cache_class(const StringName &cls_name) {\n\t_default_ess_material_cache_class = cls_name;\n}\n\nPoolStringArray ESS::material_paths_get() const {\n\treturn _material_paths;\n}\nvoid ESS::material_paths_set(const PoolStringArray &value) {\n\t_material_paths = value;\n}\n\nvoid ESS::material_add(const Ref<Material> &value) {\n\tERR_FAIL_COND(!value.is_valid());\n\n\t_materials.push_back(value);\n}\n\nRef<Material> ESS::material_get(const int index) {\n\tERR_FAIL_INDEX_V(index, _materials.size(), Ref<Material>());\n\n\treturn _materials[index];\n}\n\nvoid ESS::material_set(const int index, const Ref<Material> &value) {\n\tERR_FAIL_INDEX(index, _materials.size());\n\n\t_materials.set(index, value);\n}\n\nvoid ESS::material_remove(const int index) {\n\t_materials.remove_at(index);\n}\n\nint ESS::material_get_num() const {\n\treturn _materials.size();\n}\n\nvoid ESS::materials_clear() {\n\t_materials.clear();\n}\n\nvoid ESS::materials_load() {\n\t_materials.clear();\n\n\tfor (int i = 0; i < _material_paths.size(); ++i) {\n\t\tStringName path = _material_paths[i];\n\n\t\tERR_CONTINUE(path == \"\");\n\n\t\tRef<Material> d = load_resource(path, \"Material\");\n\n\t\tERR_CONTINUE(!d.is_valid());\n\n\t\t_materials.push_back(d);\n\t}\n}\n\nvoid ESS::ensure_materials_loaded() {\n\tif (_materials.size() != _material_paths.size()) {\n\t\tmaterials_load();\n\t}\n}\n\nVector<Variant> ESS::materials_get() {\n\tVARIANT_ARRAY_GET(_materials);\n}\n\nvoid ESS::materials_set(const Vector<Variant> &materials) {\n\t_materials.clear();\n\n\tfor (int i = 0; i < materials.size(); i++) {\n\t\tRef<Material> material = Ref<Material>(materials[i]);\n\n\t\t_materials.push_back(material);\n\t}\n}\n\nRef<ESSMaterialCache> ESS::material_cache_get(const uint64_t key) {\n\t_material_cache_mutex.lock();\n\n\tif (_material_cache.has(key)) {\n\t\tRef<ESSMaterialCache> m = _material_cache[key];\n\n\t\tm->inc_ref_count();\n\n\t\t_material_cache_mutex.unlock();\n\n\t\treturn m;\n\t}\n\n\tESSMaterialCache *p = Object::cast_to<ESSMaterialCache>(ClassDB::instantiate(_default_ess_material_cache_class));\n\n\tif (!p) {\n\t\tERR_PRINT(\"Can't instance the given ESSMaterialCache! class_name: \" + String(_default_ess_material_cache_class));\n\t}\n\n\tRef<ESSMaterialCache> m(p);\n\n\t_material_cache[key] = m;\n\n\t_material_cache_mutex.unlock();\n\n\treturn m;\n}\nvoid ESS::material_cache_unref(const uint64_t key) {\n\t_material_cache_mutex.lock();\n\n\tif (!_material_cache.has(key)) {\n\t\t_material_cache_mutex.unlock();\n\n\t\tERR_PRINT(\"ESS::material_cache_custom_key_unref: can't find cache!\");\n\n\t\treturn;\n\t}\n\n\tRef<ESSMaterialCache> m = _material_cache[key];\n\n\tm->dec_ref_count();\n\tif (m->get_ref_count() <= 0) {\n\t\t_material_cache.erase(key);\n\t}\n\n\t_material_cache_mutex.unlock();\n}\n\nRef<Resource> ESS::load_resource(const String &path, const String &type_hint) {\n\treturn ResourceLoader::load(path, type_hint);\n}\n\nvoid ESS::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_use_spell_points\"), &ESS::get_use_spell_points);\n\tClassDB::bind_method(D_METHOD(\"set_use_spell_points\", \"value\"), &ESS::set_use_spell_points);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"use_spell_points\"), \"set_use_spell_points\", \"get_use_spell_points\");\n\n\tClassDB::bind_method(D_METHOD(\"get_scale_spells_by_default\"), &ESS::get_scale_spells_by_default);\n\tClassDB::bind_method(D_METHOD(\"set_scale_spells_by_default\", \"value\"), &ESS::set_scale_spells_by_default);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"scale_spells_by_default\"), \"set_scale_spells_by_default\", \"get_scale_spells_by_default\");\n\n\tClassDB::bind_method(D_METHOD(\"get_automatic_load\"), &ESS::get_automatic_load);\n\tClassDB::bind_method(D_METHOD(\"set_automatic_load\", \"load\"), &ESS::set_automatic_load);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"automatic_load\"), \"set_automatic_load\", \"get_automatic_load\");\n\n\tClassDB::bind_method(D_METHOD(\"get_use_class_xp\"), &ESS::get_use_class_xp);\n\tClassDB::bind_method(D_METHOD(\"set_use_class_xp\", \"value\"), &ESS::set_use_class_xp);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"use_class_xp\"), \"set_use_class_xp\", \"get_use_class_xp\");\n\n\tClassDB::bind_method(D_METHOD(\"get_allow_class_spell_learning\"), &ESS::get_allow_class_spell_learning);\n\tClassDB::bind_method(D_METHOD(\"set_allow_class_spell_learning\", \"value\"), &ESS::set_allow_class_spell_learning);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"allow_class_spell_learning\"), \"set_allow_class_spell_learning\", \"get_allow_class_spell_learning\");\n\n\tClassDB::bind_method(D_METHOD(\"get_allow_class_recipe_learning\"), &ESS::get_allow_class_recipe_learning);\n\tClassDB::bind_method(D_METHOD(\"set_allow_class_recipe_learning\", \"value\"), &ESS::set_allow_class_recipe_learning);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"allow_class_recipe_learning\"), \"set_allow_class_recipe_learning\", \"get_allow_class_recipe_learning\");\n\n\tClassDB::bind_method(D_METHOD(\"get_auto_learn_spells\"), &ESS::get_auto_learn_spells);\n\tClassDB::bind_method(D_METHOD(\"set_auto_learn_spells\", \"value\"), &ESS::set_auto_learn_spells);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"auto_learn_spells\"), \"set_auto_learn_spells\", \"get_auto_learn_spells\");\n\n\tClassDB::bind_method(D_METHOD(\"get_resource_db\"), &ESS::get_resource_db);\n\tClassDB::bind_method(D_METHOD(\"set_resource_db\"), &ESS::set_resource_db);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"resource_db\", PROPERTY_HINT_RESOURCE_TYPE, \"ESSResourceDB\"), \"set_resource_db\", \"get_resource_db\");\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_spawner\"), &ESS::get_entity_spawner);\n\tClassDB::bind_method(D_METHOD(\"set_entity_spawner\"), &ESS::set_entity_spawner_bind);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"entity_spawner\", PROPERTY_HINT_RESOURCE_TYPE, \"ESSEntitySpawner\"), \"set_entity_spawner\", \"get_entity_spawner\");\n\n\tClassDB::bind_method(D_METHOD(\"get_resource_db_path\"), &ESS::get_resource_db_path);\n\tClassDB::bind_method(D_METHOD(\"set_resource_db_path\", \"path\"), &ESS::set_resource_db_path);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"resource_db_path\"), \"set_resource_db_path\", \"get_resource_db_path\");\n\n\t//load\n\tClassDB::bind_method(D_METHOD(\"load_resource_db\"), &ESS::load_resource_db);\n\n\tClassDB::bind_method(D_METHOD(\"load_resource\", \"path\", \"type_hint\"), &ESS::load_resource, DEFVAL(\"\"));\n\n\tClassDB::bind_method(D_METHOD(\"request_entity_spawn\", \"info\"), &ESS::request_entity_spawn);\n\tClassDB::bind_method(D_METHOD(\"request_entity_spawn_deferred\", \"info\"), &ESS::request_entity_spawn_deferred);\n\n\tClassDB::bind_method(D_METHOD(\"load_all\"), &ESS::load_all);\n\n\t//Stats\n\tClassDB::bind_method(D_METHOD(\"stat_get_string\"), &ESS::stat_get_string);\n\tClassDB::bind_method(D_METHOD(\"stat_set_string\", \"stat_enum_string\"), &ESS::stat_set_string);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"stat_string\"), \"stat_set_string\", \"stat_get_string\");\n\n\tClassDB::bind_method(D_METHOD(\"stat_get_id\", \"name\"), &ESS::stat_get_id);\n\tClassDB::bind_method(D_METHOD(\"stat_get_name\", \"id\"), &ESS::stat_get_name);\n\n\tClassDB::bind_method(D_METHOD(\"stat_get_property_id\", \"name\"), &ESS::stat_get_property_id);\n\tClassDB::bind_method(D_METHOD(\"stat_get_property_name\", \"id\"), &ESS::stat_get_property_name);\n\tClassDB::bind_method(D_METHOD(\"stat_is_property\", \"name\"), &ESS::stat_is_property);\n\n\tClassDB::bind_method(D_METHOD(\"stat_get_count\"), &ESS::stat_get_count);\n\n\tClassDB::bind_method(D_METHOD(\"stats_get\"), &ESS::stats_get);\n\tClassDB::bind_method(D_METHOD(\"stats_set\", \"array\"), &ESS::stats_set);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, \"stats\"), \"stats_set\", \"stats_get\");\n\n\tClassDB::bind_method(D_METHOD(\"stat_get_main_stat_count\"), &ESS::stat_get_main_stat_count);\n\tClassDB::bind_method(D_METHOD(\"stat_set_main_stat_count\", \"index\"), &ESS::stat_set_main_stat_count);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"main_stat_count\"), \"stat_set_main_stat_count\", \"stat_get_main_stat_count\");\n\n\t//Equipslots\n\tClassDB::bind_method(D_METHOD(\"equip_slot_get_string\"), &ESS::equip_slot_get_string);\n\tClassDB::bind_method(D_METHOD(\"equip_slot_set_string\", \"equip_slot_enum_string\"), &ESS::equip_slot_set_string);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"equip_slot_string\"), \"equip_slot_set_string\", \"equip_slot_get_string\");\n\n\tClassDB::bind_method(D_METHOD(\"equip_slot_get_id\", \"name\"), &ESS::equip_slot_get_id);\n\tClassDB::bind_method(D_METHOD(\"equip_slot_get_name\", \"id\"), &ESS::equip_slot_get_name);\n\n\tClassDB::bind_method(D_METHOD(\"equip_slot_get_property_id\", \"name\"), &ESS::equip_slot_get_property_id);\n\tClassDB::bind_method(D_METHOD(\"equip_slot_get_property_name\", \"id\"), &ESS::equip_slot_get_property_name);\n\tClassDB::bind_method(D_METHOD(\"equip_slot_is_property\", \"name\"), &ESS::equip_slot_is_property);\n\n\tClassDB::bind_method(D_METHOD(\"equip_slot_get_count\"), &ESS::equip_slot_get_count);\n\n\tClassDB::bind_method(D_METHOD(\"equip_slots_get\"), &ESS::equip_slots_get);\n\tClassDB::bind_method(D_METHOD(\"equip_slots_set\", \"array\"), &ESS::equip_slots_set);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, \"equip_slots\"), \"equip_slots_set\", \"equip_slots_get\");\n\n\t//Skeletons\n\tClassDB::bind_method(D_METHOD(\"entity_types_get\"), &ESS::entity_types_get);\n\tClassDB::bind_method(D_METHOD(\"entity_types_set\", \"value\"), &ESS::entity_types_set);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"entity_types\"), \"entity_types_set\", \"entity_types_get\");\n\n\tClassDB::bind_method(D_METHOD(\"skeletons_bones_index_get\", \"index\"), &ESS::skeletons_bones_index_get);\n\tClassDB::bind_method(D_METHOD(\"skeletons_bones_count\"), &ESS::skeletons_bones_count);\n\n\tClassDB::bind_method(D_METHOD(\"skeletons_bones_get\"), &ESS::skeletons_bones_get);\n\tClassDB::bind_method(D_METHOD(\"skeletons_bones_set\", \"value\"), &ESS::skeletons_bones_set);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, \"skeletons_bones\"), \"skeletons_bones_set\", \"skeletons_bones_get\");\n\n\tClassDB::bind_method(D_METHOD(\"skeletons_bone_attachment_index_get\", \"index\"), &ESS::skeletons_bone_attachment_index_get);\n\tClassDB::bind_method(D_METHOD(\"skeletons_bone_attachments_count\"), &ESS::skeletons_bone_attachments_count);\n\n\tClassDB::bind_method(D_METHOD(\"skeletons_bone_attachment_points_get\"), &ESS::skeletons_bone_attachment_points_get);\n\tClassDB::bind_method(D_METHOD(\"skeletons_bone_attachment_points_set\", \"value\"), &ESS::skeletons_bone_attachment_points_set);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, \"skeletons_bone_attachment_points\"), \"skeletons_bone_attachment_points_set\", \"skeletons_bone_attachment_points_get\");\n\n\t//Other\n\tClassDB::bind_method(D_METHOD(\"model_visual_groups_get\"), &ESS::model_visual_groups_get);\n\tClassDB::bind_method(D_METHOD(\"model_visual_groups_set\", \"value\"), &ESS::model_visual_groups_set);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"model_visual_groups\"), \"model_visual_groups_set\", \"model_visual_groups_get\");\n\n\tClassDB::bind_method(D_METHOD(\"texture_layers_get\"), &ESS::texture_layers_get);\n\tClassDB::bind_method(D_METHOD(\"texture_layers_set\", \"value\"), &ESS::texture_layers_set);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"texture_layers\"), \"texture_layers_set\", \"texture_layers_get\");\n\n\t//Levels/XP\n\tClassDB::bind_method(D_METHOD(\"get_max_character_level\"), &ESS::get_max_character_level);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_character_level\"), \"\", \"get_max_character_level\");\n\n\tClassDB::bind_method(D_METHOD(\"get_max_class_level\"), &ESS::get_max_class_level);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_class_level\"), \"\", \"get_max_class_level\");\n\n\tClassDB::bind_method(D_METHOD(\"get_character_xp\", \"current_level\"), &ESS::get_character_xp);\n\tClassDB::bind_method(D_METHOD(\"set_character_xp\", \"current_level\", \"value\"), &ESS::set_character_xp);\n\tClassDB::bind_method(D_METHOD(\"can_character_level_up\", \"current_level\"), &ESS::can_character_level_up);\n\n\tClassDB::bind_method(D_METHOD(\"get_character_xp_data\"), &ESS::get_character_xp_data);\n\tClassDB::bind_method(D_METHOD(\"set_character_xp_data\", \"data\"), &ESS::set_character_xp_data);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, \"character_xp_data\"), \"set_character_xp_data\", \"get_character_xp_data\");\n\n\tClassDB::bind_method(D_METHOD(\"get_class_xp\", \"current_level\"), &ESS::get_class_xp);\n\tClassDB::bind_method(D_METHOD(\"set_class_xp\", \"current_level\", \"value\"), &ESS::set_class_xp);\n\tClassDB::bind_method(D_METHOD(\"can_class_level_up\", \"current_level\"), &ESS::can_class_level_up);\n\n\tClassDB::bind_method(D_METHOD(\"get_class_xp_data\"), &ESS::get_class_xp_data);\n\tClassDB::bind_method(D_METHOD(\"set_class_xp_data\", \"data\"), &ESS::set_character_xp_data);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, \"class_xp_data\"), \"set_class_xp_data\", \"get_class_xp_data\");\n\n#ifdef TEXTURE_PACKER_PRESENT\n\tClassDB::bind_method(D_METHOD(\"get_texture_flags\"), &ESS::get_texture_flags);\n\tClassDB::bind_method(D_METHOD(\"set_texture_flags\", \"flags\"), &ESS::set_texture_flags);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"texture_flags\", PROPERTY_HINT_FLAGS, \"Mipmaps,Repeat,Filter,Anisotropic Linear,Convert to Linear,Mirrored Repeat,Video Surface\"), \"set_texture_flags\", \"get_texture_flags\");\n\n\tClassDB::bind_method(D_METHOD(\"get_max_atlas_size\"), &ESS::get_max_atlas_size);\n\tClassDB::bind_method(D_METHOD(\"set_max_atlas_size\", \"size\"), &ESS::set_max_atlas_size);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_atlas_size\"), \"set_max_atlas_size\", \"get_max_atlas_size\");\n\n\tClassDB::bind_method(D_METHOD(\"get_keep_original_atlases\"), &ESS::get_keep_original_atlases);\n\tClassDB::bind_method(D_METHOD(\"set_keep_original_atlases\", \"value\"), &ESS::set_keep_original_atlases);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"keep_original_atlases\"), \"set_keep_original_atlases\", \"get_keep_original_atlases\");\n\n\tClassDB::bind_method(D_METHOD(\"get_background_color\"), &ESS::get_background_color);\n\tClassDB::bind_method(D_METHOD(\"set_background_color\", \"color\"), &ESS::set_background_color);\n\tADD_PROPERTY(PropertyInfo(Variant::COLOR, \"background_color\"), \"set_background_color\", \"get_background_color\");\n\n\tClassDB::bind_method(D_METHOD(\"get_margin\"), &ESS::get_margin);\n\tClassDB::bind_method(D_METHOD(\"set_margin\", \"size\"), &ESS::set_margin);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"margin\"), \"set_margin\", \"get_margin\");\n#endif\n\n\tClassDB::bind_method(D_METHOD(\"get_default_ess_material_cache_class\"), &ESS::get_default_ess_material_cache_class);\n\tClassDB::bind_method(D_METHOD(\"set_default_ess_material_cache_class\", \"cls_name\"), &ESS::set_default_ess_material_cache_class);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"default_ess_material_cache_class\"), \"set_default_ess_material_cache_class\", \"get_default_ess_material_cache_class\");\n\n\tClassDB::bind_method(D_METHOD(\"material_paths_get\"), &ESS::material_paths_get);\n\tClassDB::bind_method(D_METHOD(\"material_paths_set\", \"value\"), &ESS::material_paths_set);\n\tADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, \"material_paths\"), \"material_paths_set\", \"material_paths_get\");\n\n\tClassDB::bind_method(D_METHOD(\"material_add\", \"value\"), &ESS::material_add);\n\tClassDB::bind_method(D_METHOD(\"material_get\", \"index\"), &ESS::material_get);\n\tClassDB::bind_method(D_METHOD(\"material_set\", \"index\", \"value\"), &ESS::material_set);\n\tClassDB::bind_method(D_METHOD(\"material_remove\", \"index\"), &ESS::material_remove);\n\tClassDB::bind_method(D_METHOD(\"material_get_num\"), &ESS::material_get_num);\n\tClassDB::bind_method(D_METHOD(\"materials_clear\"), &ESS::materials_clear);\n\tClassDB::bind_method(D_METHOD(\"materials_load\"), &ESS::materials_load);\n\tClassDB::bind_method(D_METHOD(\"ensure_materials_loaded\"), &ESS::ensure_materials_loaded);\n\n\tClassDB::bind_method(D_METHOD(\"materials_get\"), &ESS::materials_get);\n\tClassDB::bind_method(D_METHOD(\"materials_set\"), &ESS::materials_set);\n\tADD_PROPERTY(PropertyInfo(Variant::ARRAY, \"materials\", PROPERTY_HINT_NONE, \"17/17:Material\", PROPERTY_USAGE_DEFAULT, \"Material\"), \"materials_set\", \"materials_get\");\n\n\tClassDB::bind_method(D_METHOD(\"material_cache_get\", \"key\"), &ESS::material_cache_get);\n\tClassDB::bind_method(D_METHOD(\"material_cache_unref\", \"key\"), &ESS::material_cache_unref);\n}\n\nESS::ESS() {\n\tinstance = this;\n\t_ess_entity_spawner = NULL;\n\n\t_use_spell_points = GLOBAL_DEF(\"ess/spells/use_spell_points\", false);\n\t_scale_spells_by_default = GLOBAL_DEF(\"ess/spells/scale_spells_by_default\", false);\n\t_allow_class_spell_learning = GLOBAL_DEF(\"ess/spells/allow_class_spell_learning\", false);\n\t_allow_class_recipe_learning = GLOBAL_DEF(\"ess/spells/allow_class_recipe_learning\", false);\n\n\t_use_class_xp = GLOBAL_DEF(\"ess/level/use_class_xp\", false);\n\t_automatic_class_levelups = GLOBAL_DEF(\"ess/level/automatic_class_levelups\", false);\n\t_use_global_class_level = GLOBAL_DEF(\"ess/level/use_global_class_level\", false);\n\t_auto_learn_spells = GLOBAL_DEF(\"ess/level/auto_learn_spells\", true);\n\n\t_automatic_load = GLOBAL_DEF(\"ess/data/automatic_load\", false);\n\n\t_ess_resource_db_path = GLOBAL_DEF(\"ess/data/ess_resource_db_path\", \"\");\n\n\tstat_set_string(GLOBAL_DEF(\"ess/enums/stats\", \"Agility,Strength,Stamina,Intellect,Spirit,Health,Speed,Global Cooldown,Haste\"));\n\t_stat_main_stat_count = GLOBAL_DEF(\"ess/enums/main_stat_count\", 5);\n\n\tequip_slot_set_string(GLOBAL_DEF(\"ess/enums/equip_slots\", \"Head,Neck,Shoulder,Chest,Gloves,Belt,Legs,Feet,Ring_1,Ring_2,Trinket_1,Trinket_2,Main_Hand,Off_Hand\"));\n\n\t_entity_types = GLOBAL_DEF(\"ess/enums/entity_types\", \"None,Creature,Totem,Idol,Humanoid,Mechanical,Beast,Dragonkin,Elemental,Ghost,Energy,Anomaly,Demon,Object\");\n\t_skeletons_bones = GLOBAL_DEF(\"ess/enums/skeletons_bones\", PoolStringArray());\n\t_skeletons_bone_attachment_points = GLOBAL_DEF(\"ess/enums/skeletons_bone_attachment_points\", PoolStringArray());\n\n\t_model_visual_groups = GLOBAL_DEF(\"ess/enums/model_visual_groups\", \"None,Bodypart,Alt Bodypart,Attachment\");\n\n\t_texture_layers = GLOBAL_DEF(\"ess/enums/texture_layers\", \"None,Skin,Underwear,Shirt,Clothes Base,Clothes 1,Clothes 2,Clothes 3,Clothes 4,Clothes 5,Belt,Tabard,Overlay\");\n\n\t_dminishing_return_categories = GLOBAL_DEF(\"ess/enums/dminishing_return_categories\", \"Stun,Sleep,Disorient\");\n\t_dminishing_return_length = GLOBAL_DEF(\"ess/enums/dminishing_return_length\", 15.0);\n\t_dminishing_return_steps = GLOBAL_DEF(\"ess/enums/dminishing_return_steps\", 4);\n\n\t_class_xps = GLOBAL_DEF(\"ess/xp/class_xps\", PoolIntArray());\n\t_character_xps = GLOBAL_DEF(\"ess/xp/character_xps\", PoolIntArray());\n\n#if TEXTURE_PACKER_PRESENT\n\t_default_ess_material_cache_class = GLOBAL_DEF(\"ess/material_cache/default_ess_material_cache_class\", \"ESSMaterialCachePCM\");\n#else\n\t_default_ess_material_cache_class = GLOBAL_DEF(\"ess/material_cache/default_ess_material_cache_class\", \"ESSMaterialCache\");\n#endif\n\n#ifdef TEXTURE_PACKER_PRESENT\n#if VERSION_MAJOR < 4\n\t_texture_flags = GLOBAL_DEF(\"ess/material_cache/texture_flags\", Texture::FLAG_MIPMAPS | Texture::FLAG_FILTER);\n#else\n\t_texture_flags = GLOBAL_DEF(\"ess/material_cache/texture_flags\", 0);\n#endif\n\n\t_max_atlas_size = GLOBAL_DEF(\"ess/material_cache/max_atlas_size\", 1024);\n\t_keep_original_atlases = GLOBAL_DEF(\"ess/material_cache/keep_original_atlases\", false);\n\t_background_color = GLOBAL_DEF(\"ess/material_cache/background_color\", Color());\n\t_margin = GLOBAL_DEF(\"ess/material_cache/margin\", 0);\n#endif\n\n\t_material_paths = GLOBAL_DEF(\"ess/material_cache/material_paths\", PoolStringArray());\n\n\tif (!Engine::get_singleton()->is_editor_hint() && _automatic_load) {\n\t\tcall_deferred(\"load_all\");\n\t}\n}\n\nESS::~ESS() {\n\tinstance = NULL;\n\n\t_ess_resource_db.unref();\n\t_ess_entity_spawner = NULL;\n\n\t_stat_id_to_name.clear();\n\t_stat_name_to_id.clear();\n\n\t_stat_id_to_property.clear();\n\t_stat_property_to_id.clear();\n\n\t_equip_slot_id_to_name.clear();\n\t_equip_slot_name_to_id.clear();\n\n\t_equip_slot_id_to_property.clear();\n\t_equip_slot_property_to_id.clear();\n\n\t_skeletons_bones.resize(0);\n\n\t_class_xps.resize(0);\n\t_character_xps.resize(0);\n}\n"
  },
  {
    "path": "singletons/ess.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ESS_H\n#define ESS_H\n\n#include \"core/version.h\"\n\n#include \"core/config/engine.h\"\n#include \"core/core_bind.h\"\n#include \"core/io/resource.h\"\n#include \"core/object/object.h\"\n#include \"core/string/ustring.h\"\n\n\n#include \"scene/main/node.h\"\n\n#include \"../defines.h\"\n\nclass ESSResourceDB;\nclass ESSEntitySpawner;\nclass EntityCreateInfo;\nclass ESSMaterialCache;\n\nclass ESS : public Object {\n\tGDCLASS(ESS, Object);\n\npublic:\n\tstatic ESS *get_singleton();\n\n\tbool get_use_spell_points() const;\n\tvoid set_use_spell_points(const bool value);\n\n\tbool get_scale_spells_by_default() const;\n\tvoid set_scale_spells_by_default(const bool value);\n\n\tbool get_automatic_load() const;\n\tvoid set_automatic_load(const bool load);\n\n\tbool get_load_folders() const;\n\tvoid set_load_folders(const bool load);\n\n\tbool get_use_class_xp() const;\n\tvoid set_use_class_xp(const bool value);\n\n\tbool get_allow_class_spell_learning() const;\n\tvoid set_allow_class_spell_learning(const bool value);\n\n\tbool get_allow_class_recipe_learning() const;\n\tvoid set_allow_class_recipe_learning(const bool value);\n\n\tint get_auto_learn_spells() const;\n\tvoid set_auto_learn_spells(const int value);\n\n\tRef<ESSResourceDB> get_resource_db();\n\tvoid set_resource_db(const Ref<ESSResourceDB> &resource_db);\n\n\tESSEntitySpawner *get_entity_spawner();\n\tvoid set_entity_spawner(ESSEntitySpawner *spawner);\n\tvoid set_entity_spawner_bind(Node *spawner);\n\n\tString get_resource_db_path();\n\tvoid set_resource_db_path(const String &path);\n\n\tvoid request_entity_spawn(Ref<EntityCreateInfo> info);\n\tvoid request_entity_spawn_deferred(Ref<EntityCreateInfo> info);\n\n\tvoid load_resource_db();\n\tRef<Resource> load_resource(const String &path, const String &type_hint = \"\");\n\n\tvoid load_all();\n\n\t//Stats\n\tString stat_get_string() const;\n\tvoid stat_set_string(const String &stat_enum_string);\n\n\tint stat_get_id(const StringName &name) const;\n\tStringName stat_get_name(const int id) const;\n\n\tint stat_get_property_id(const StringName &name) const;\n\tStringName stat_get_property_name(const int id) const;\n\tbool stat_is_property(const StringName &name) const;\n\n\tint stat_get_count() const;\n\n\tPoolStringArray stats_get() const;\n\tvoid stats_set(const PoolStringArray &array);\n\n\tint stat_get_main_stat_count() const;\n\tvoid stat_set_main_stat_count(const int index);\n\n\t//Equipslots\n\tString equip_slot_get_string() const;\n\tvoid equip_slot_set_string(const String &equip_slot_enum_string);\n\n\tint equip_slot_get_id(const StringName &name) const;\n\tStringName equip_slot_get_name(const int id) const;\n\n\tint equip_slot_get_property_id(const StringName &name) const;\n\tStringName equip_slot_get_property_name(const int id) const;\n\tbool equip_slot_is_property(const StringName &name) const;\n\n\tint equip_slot_get_count() const;\n\n\tPoolStringArray equip_slots_get() const;\n\tvoid equip_slots_set(const PoolStringArray &array);\n\n\t//Skeletons\n\tString entity_types_get() const;\n\tvoid entity_types_set(const String &value);\n\n\tString skeletons_bones_index_get(const int index) const;\n\tint skeletons_bones_count();\n\n\tPoolStringArray skeletons_bones_get() const;\n\tvoid skeletons_bones_set(const PoolStringArray &value);\n\n\tString skeletons_bone_attachment_index_get(const int index) const;\n\tint skeletons_bone_attachments_count();\n\n\tPoolStringArray skeletons_bone_attachment_points_get() const;\n\tvoid skeletons_bone_attachment_points_set(const PoolStringArray &value);\n\n\t//Other\n\tString model_visual_groups_get() const;\n\tvoid model_visual_groups_set(const String &value);\n\n\tString texture_layers_get() const;\n\tvoid texture_layers_set(const String &value);\n\n\t//Diminishing Returns\n\tString dminishing_return_categories_get() const;\n\tvoid dminishing_return_categories_set(const String &value);\n\n\tfloat dminishing_return_length_get() const;\n\tvoid dminishing_return_length_set(const float value);\n\n\tint dminishing_return_steps_get() const;\n\tvoid dminishing_return_steps_set(const int value);\n\n\t//Levels/XP\n\tint get_max_character_level() const;\n\tint get_max_class_level() const;\n\n\tint get_character_xp(int current_level);\n\tvoid set_character_xp(int current_level, int value);\n\tbool can_character_level_up(int current_level);\n\n\tPoolIntArray get_character_xp_data();\n\tvoid set_character_xp_data(const PoolIntArray &data);\n\n\tint get_class_xp(int current_level);\n\tvoid set_class_xp(int current_level, int value);\n\tbool can_class_level_up(int current_level);\n\n\tPoolIntArray get_class_xp_data();\n\tvoid set_class_xp_data(const PoolIntArray &data);\n\n#ifdef TEXTURE_PACKER_PRESENT\n\tint get_texture_flags() const;\n\tvoid set_texture_flags(const int flags);\n\n\tint get_max_atlas_size() const;\n\tvoid set_max_atlas_size(const int size);\n\n\tbool get_keep_original_atlases() const;\n\tvoid set_keep_original_atlases(const bool value);\n\n\tColor get_background_color() const;\n\tvoid set_background_color(const Color &color);\n\n\tint get_margin() const;\n\tvoid set_margin(const int margin);\n#endif\n\n\tStringName get_default_ess_material_cache_class();\n\tvoid set_default_ess_material_cache_class(const StringName &cls_name);\n\n\tPoolStringArray material_paths_get() const;\n\tvoid material_paths_set(const PoolStringArray &array);\n\n\tvoid material_add(const Ref<Material> &value);\n\tRef<Material> material_get(const int index);\n\tvoid material_set(const int index, const Ref<Material> &value);\n\tvoid material_remove(const int index);\n\tint material_get_num() const;\n\tvoid materials_clear();\n\tvoid materials_load();\n\tvoid ensure_materials_loaded();\n\n\tVector<Variant> materials_get();\n\tvoid materials_set(const Vector<Variant> &materials);\n\n\tRef<ESSMaterialCache> material_cache_get(const uint64_t key);\n\tvoid material_cache_unref(const uint64_t key);\n\n\tESS();\n\t~ESS();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tbool _automatic_load;\n\n\tRef<ESSResourceDB> _ess_resource_db;\n\tESSEntitySpawner *_ess_entity_spawner;\n\n\tString _ess_resource_db_path;\n\n\tstatic ESS *instance;\n\n\tbool _use_spell_points;\n\tbool _scale_spells_by_default;\n\tbool _automatic_class_levelups;\n\tbool _use_global_class_level;\n\tbool _use_class_xp;\n\tbool _allow_class_spell_learning;\n\tbool _allow_class_recipe_learning;\n\tbool _auto_learn_spells;\n\n\t//Stats\n\tVector<StringName> _stat_id_to_name;\n\tHashMap<StringName, int> _stat_name_to_id;\n\n\tVector<StringName> _stat_id_to_property;\n\tHashMap<StringName, int> _stat_property_to_id;\n\n\tString _stat_enum_string;\n\tint _stat_main_stat_count;\n\n\t//Equipslots\n\tVector<StringName> _equip_slot_id_to_name;\n\tHashMap<StringName, int> _equip_slot_name_to_id;\n\n\tVector<StringName> _equip_slot_id_to_property;\n\tHashMap<StringName, int> _equip_slot_property_to_id;\n\n\tString _equip_slot_enum_string;\n\n\t//Entity Types\n\tString _entity_types;\n\tPoolStringArray _skeletons_bones;\n\tPoolStringArray _skeletons_bone_attachment_points;\n\n\t//Other\n\tString _model_visual_groups;\n\tString _texture_layers;\n\n\t//Diminishing Returns\n\tString _dminishing_return_categories;\n\tfloat _dminishing_return_length;\n\tint _dminishing_return_steps;\n\n\t//Levels/XP\n\tPoolIntArray _class_xps;\n\tPoolIntArray _character_xps;\n\n\tStringName _default_ess_material_cache_class;\n\n\tMutex _material_cache_mutex;\n\n\tVMap<uint64_t, Ref<ESSMaterialCache>> _material_cache;\n\n#ifdef TEXTURE_PACKER_PRESENT\n\tint _texture_flags;\n\tint _max_atlas_size;\n\tbool _keep_original_atlases;\n\tColor _background_color;\n\tint _margin;\n#endif\n\n\tPoolStringArray _material_paths;\n\tVector<Ref<Material>> _materials;\n};\n\n#endif\n"
  },
  {
    "path": "singletons/profile_manager.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"profile_manager.h\"\n#include \"core/io/json.h\"\n#include \"core/io/file_access.h\"\n\n#include \"core/version.h\"\n\n#include \"core/config/engine.h\"\n#include \"core/config/project_settings.h\"\n\n\n#include \"../defines.h\"\n\nProfileManager *ProfileManager::_instance;\n\nProfileManager *ProfileManager::get_singleton() {\n\treturn _instance;\n}\n\nbool ProfileManager::get_automatic_load() const {\n\treturn _automatic_load;\n}\nvoid ProfileManager::set_automatic_load(const bool load) {\n\t_automatic_load = load;\n}\n\nbool ProfileManager::get_automatic_save() const {\n\treturn _automatic_save;\n}\nvoid ProfileManager::set_automatic_save(const bool load) {\n\t_automatic_save = load;\n}\n\nString ProfileManager::get_save_file() const {\n\treturn _save_file;\n}\nvoid ProfileManager::set_save_file(const String &file) {\n\t_save_file = file;\n\n\tif (_automatic_save)\n\t\tsave();\n}\n\nint ProfileManager::gets_player_profile_count() const {\n\treturn _s_player_profiles.size();\n}\nRef<PlayerProfile> ProfileManager::gets_player_profile_index(const int index) {\n\treturn _s_player_profiles.get(index);\n}\nvoid ProfileManager::adds_player_profile(const Ref<PlayerProfile> &profile) {\n\t_s_player_profiles.push_back(profile);\n}\nvoid ProfileManager::clears_player_profiles() {\n\t//for (int i = 0; i < _s_player_profiles.size(); ++i) {\n\t//\t_c_player_profile->disconnect(\"changed\", this, \"_on_player_profile_changed\");\n\t//}\n\n\t_s_player_profiles.clear();\n}\nvoid ProfileManager::removes_player_profile(const int index) {\n\t_s_player_profiles.remove_at(index);\n}\n\nRef<PlayerProfile> ProfileManager::getc_player_profile() {\n\treturn _c_player_profile;\n}\n\nvoid ProfileManager::save() {\n\tcall(\"_save\");\n}\n\nvoid ProfileManager::load() {\n\tcall(\"_load\");\n\n\temit_signal(\"changed\");\n}\n\nvoid ProfileManager::_save() {\n\tError err;\n\tRef<FileAccess> f = FileAccess::open(_save_file, FileAccess::WRITE, &err);\n\n\tif (!f.is_valid()) {\n\t\tERR_FAIL_MSG(\"Couldn't open file: \" + err);\n\t}\n\n\tf->store_line(JSON::stringify(to_dict()));\n\t//f->close();\n}\n\nvoid ProfileManager::_load() {\n\tif (FileAccess::exists(_save_file)) {\n\t\t//clears_player_profiles();\n\n\t\tError err;\n\t\tString text = FileAccess::get_file_as_string(_save_file, &err);\n\n\t\tif (err) {\n\t\t\tload_defaults();\n\t\t\tERR_FAIL_MSG(\"Couldn't open file: \" + err);\n\t\t}\n\n\t\tVariant v = JSON::parse_string(text);\n\n\t\tif (v.get_type() == Variant::NIL) {\n\t\t\tload_defaults();\n\t\t\tERR_FAIL_MSG(\"Error parsing profile\");\n\t\t}\n\n\t\tDictionary d = v;\n\n\t\tfrom_dict(d);\n\t} else {\n\t\tload_defaults();\n\t}\n}\n\nvoid ProfileManager::save_profile(const String &name) {\n}\n\nvoid ProfileManager::load_profile(const String &name) {\n\tload_defaults();\n}\n\nvoid ProfileManager::load_defaults() {\n}\n\nDictionary ProfileManager::to_dict() const {\n\tDictionary dict;\n\n\tdict[\"cplayer_profile\"] = _c_player_profile->to_dict();\n\n\tArray arr;\n\n\tfor (int i = 0; i < _s_player_profiles.size(); ++i) {\n\t\tDictionary d = _s_player_profiles[i]->to_dict();\n\n\t\tarr.append(d);\n\t}\n\n\tdict[\"splayer_profiles\"] = arr;\n\n\treturn dict;\n}\nvoid ProfileManager::from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\tclears_player_profiles();\n\n\t_c_player_profile->DISCONNECT(\"changed\", this, ProfileManager, _on_player_profile_changed);\n\t_c_player_profile->from_dict(dict.get(\"cplayer_profile\", Dictionary()));\n\t_c_player_profile->CONNECT(\"changed\", this, ProfileManager, _on_player_profile_changed);\n\n\tArray arr = dict.get(\"splayer_profiles\", Array());\n\n\tfor (int i = 0; i < arr.size(); ++i) {\n\t\tRef<PlayerProfile> c;\n\t\tc.instantiate();\n\n\t\tc->from_dict(arr.get(i));\n\n\t\tc->CONNECT(\"changed\", this, ProfileManager, _on_player_profile_changed);\n\n\t\t_s_player_profiles.push_back(c);\n\t}\n}\n\nvoid ProfileManager::on_keybinds_changed(const StringName &class_path) {\n\tgetc_player_profile()->get_class_profile(class_path)->get_input_profile()->save_from_projectsettings();\n\n\temit_signal(\"keybinds_changed\");\n}\n\nProfileManager::ProfileManager() {\n\t_instance = this;\n\n\t_automatic_load = GLOBAL_DEF(\"ess/profiles/automatic_load\", false);\n\t_automatic_save = GLOBAL_DEF(\"ess/profiles/automatic_save\", false);\n\t_save_file = GLOBAL_DEF(\"ess/profiles/save_file\", \"user://profile.save\");\n\n\t_c_player_profile.instantiate();\n\n\t_c_player_profile->CONNECT(\"changed\", this, ProfileManager, _on_player_profile_changed);\n\n\tif (!Engine::get_singleton()->is_editor_hint() && _automatic_load)\n\t\tcall_deferred(\"load\");\n}\n\nProfileManager::~ProfileManager() {\n\t_instance = NULL;\n\n\t_c_player_profile->DISCONNECT(\"changed\", this, ProfileManager, _on_player_profile_changed);\n\n\t_s_player_profiles.clear();\n}\n\nvoid ProfileManager::_on_player_profile_changed(Ref<PlayerProfile> profile) {\n\tif (!Engine::get_singleton()->is_editor_hint() && _automatic_save)\n\t\tsave();\n}\n\nvoid ProfileManager::_bind_methods() {\n\tADD_SIGNAL(MethodInfo(\"keybinds_changed\"));\n\tADD_SIGNAL(MethodInfo(\"changed\"));\n\n\t//GDVIRTUAL_BIND(\"_save\");\n\t//GDVIRTUAL_BIND(\"_load\");\n\n\tClassDB::bind_method(D_METHOD(\"_save\"), &ProfileManager::_save);\n\tClassDB::bind_method(D_METHOD(\"_load\"), &ProfileManager::_load);\n\n\tClassDB::bind_method(D_METHOD(\"get_automatic_load\"), &ProfileManager::get_automatic_load);\n\tClassDB::bind_method(D_METHOD(\"set_automatic_load\", \"load\"), &ProfileManager::set_automatic_load);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"automatic_load\"), \"set_automatic_load\", \"get_automatic_load\");\n\n\tClassDB::bind_method(D_METHOD(\"get_automatic_save\"), &ProfileManager::get_automatic_save);\n\tClassDB::bind_method(D_METHOD(\"set_automatic_save\", \"load\"), &ProfileManager::set_automatic_save);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"automatic_save\"), \"set_automatic_save\", \"get_automatic_save\");\n\n\tClassDB::bind_method(D_METHOD(\"get_save_file\"), &ProfileManager::get_save_file);\n\tClassDB::bind_method(D_METHOD(\"set_save_file\", \"path\"), &ProfileManager::set_save_file);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"set_save_file\"), \"set_save_file\", \"get_save_file\");\n\n\tClassDB::bind_method(D_METHOD(\"gets_player_profile_count\"), &ProfileManager::gets_player_profile_count);\n\tClassDB::bind_method(D_METHOD(\"gets_player_profile_index\", \"index\"), &ProfileManager::gets_player_profile_index);\n\tClassDB::bind_method(D_METHOD(\"adds_player_profile\", \"profile\"), &ProfileManager::adds_player_profile);\n\tClassDB::bind_method(D_METHOD(\"clears_player_profiles\"), &ProfileManager::clears_player_profiles);\n\tClassDB::bind_method(D_METHOD(\"removes_player_profile\", \"index\"), &ProfileManager::removes_player_profile);\n\n\tClassDB::bind_method(D_METHOD(\"getc_player_profile\"), &ProfileManager::getc_player_profile);\n\n\tClassDB::bind_method(D_METHOD(\"save\"), &ProfileManager::save);\n\tClassDB::bind_method(D_METHOD(\"load\"), &ProfileManager::load);\n\tClassDB::bind_method(D_METHOD(\"save_profile\", \"name\"), &ProfileManager::save_profile);\n\tClassDB::bind_method(D_METHOD(\"load_profile\", \"name\"), &ProfileManager::load_profile);\n\tClassDB::bind_method(D_METHOD(\"load_defaults\"), &ProfileManager::load_defaults);\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &ProfileManager::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &ProfileManager::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_on_player_profile_changed\", \"profile\"), &ProfileManager::_on_player_profile_changed);\n\n\tClassDB::bind_method(D_METHOD(\"on_keybinds_changed\", \"class_path\"), &ProfileManager::on_keybinds_changed);\n}\n"
  },
  {
    "path": "singletons/profile_manager.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef PROFILE_MANAGER_H\n#define PROFILE_MANAGER_H\n\n#include \"core/version.h\"\n\n#include \"core/object/object.h\"\n#include \"core/templates/vector.h\"\n\n\n#include \"../profiles/player_profile.h\"\n\nclass ProfileManager : public Object {\n\tGDCLASS(ProfileManager, Object);\n\npublic:\n\tstatic ProfileManager *get_singleton();\n\n\tbool get_automatic_load() const;\n\tvoid set_automatic_load(const bool load);\n\n\tbool get_automatic_save() const;\n\tvoid set_automatic_save(const bool load);\n\n\tString get_save_file() const;\n\tvoid set_save_file(const String &file);\n\n\tint gets_player_profile_count() const;\n\tRef<PlayerProfile> gets_player_profile_index(const int index);\n\tvoid adds_player_profile(const Ref<PlayerProfile> &profile);\n\tvoid clears_player_profiles();\n\tvoid removes_player_profile(const int index);\n\n\tRef<PlayerProfile> getc_player_profile();\n\n\tvoid save();\n\tvoid load();\n\n\tvoid _save();\n\tvoid _load();\n\n\tvoid save_profile(const String &name);\n\tvoid load_profile(const String &name);\n\n\tvoid load_defaults();\n\n\tDictionary to_dict() const;\n\tvoid from_dict(const Dictionary &dict);\n\n\tvoid on_keybinds_changed(const StringName &class_path);\n\n\tProfileManager();\n\t~ProfileManager();\n\nprotected:\n\tvoid _on_player_profile_changed(Ref<PlayerProfile> profile);\n\tstatic void _bind_methods();\n\nprivate:\n\tstatic ProfileManager *_instance;\n\n\tbool _automatic_load;\n\tbool _automatic_save;\n\n\tString _save_file;\n\n\tVector<Ref<PlayerProfile> > _s_player_profiles;\n\tRef<PlayerProfile> _c_player_profile;\n};\n\n#endif\n"
  },
  {
    "path": "skeleton/character_bones.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"character_bones.h\"\n\nCharacterBones::CharacterBones() {\n}\n\nvoid CharacterBones::_bind_methods() {\n}\n"
  },
  {
    "path": "skeleton/character_bones.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef CHARACTER_BONES_H\n#define CHARACTER_BONES_H\n\n#include \"scene/2d/node_2d.h\"\n\nclass CharacterBones : public Node2D {\n\tGDCLASS(CharacterBones, Node2D);\n\npublic:\n\tCharacterBones();\n\nprotected:\n\tstatic void _bind_methods();\n\n\t//private:\n};\n\n#endif\n"
  },
  {
    "path": "skeleton/character_skeleton_2d.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"character_skeleton_2d.h\"\n\n#include \"../singletons/ess.h\"\n\n#include \"../data/items/model_visual.h\"\n\n#include \"../defines.h\"\n\nint CharacterSkeleton2D::get_entity_type() const {\n\treturn _entity_type;\n}\nvoid CharacterSkeleton2D::set_entity_type(const int value) {\n\t_entity_type = value;\n\n\tint bones_size = ESS::get_singleton()->skeletons_bones_index_get(_entity_type).get_slice_count(\",\");\n\tint attachment_size = ESS::get_singleton()->skeletons_bone_attachment_index_get(_entity_type).get_slice_count(\",\");\n\n\t_attach_point_nodes.resize(attachment_size);\n\t_entries.resize(bones_size);\n}\n\nint CharacterSkeleton2D::get_model_index() {\n\treturn _model_index;\n}\nvoid CharacterSkeleton2D::set_model_index(int value) {\n\t_model_index = value;\n}\n\nbool CharacterSkeleton2D::get_model_dirty() const {\n\treturn _model_dirty;\n}\nvoid CharacterSkeleton2D::set_model_dirty(bool value) {\n\t_model_dirty = value;\n}\n\nNodePath CharacterSkeleton2D::attach_point_path_get(const int index) const {\n\tERR_FAIL_INDEX_V(index, _attach_point_nodes.size(), NodePath());\n\n\treturn _attach_point_nodes[index].path;\n}\nvoid CharacterSkeleton2D::attach_point_path_set(const int index, const NodePath &path) {\n\tERR_FAIL_INDEX(index, _attach_point_nodes.size());\n\n\t_attach_point_nodes.write[index].path = path;\n\t_attach_point_nodes.write[index].node = get_node_or_null(path);\n}\n\nNode *CharacterSkeleton2D::attach_point_node_get(const int index) {\n\tERR_FAIL_INDEX_V(index, _attach_point_nodes.size(), NULL);\n\n\treturn _attach_point_nodes[index].node;\n}\n\nint CharacterSkeleton2D::attach_point_count() const {\n\treturn _attach_point_nodes.size();\n}\n\nNode *CharacterSkeleton2D::common_attach_point_node_get(const EntityEnums::CommonCharacterSkeletonPoints index) {\n\tERR_FAIL_INDEX_V(common_attach_point_index_get(index), _attach_point_nodes.size(), NULL);\n\n\treturn _attach_point_nodes[common_attach_point_index_get(index)].node;\n}\nvoid CharacterSkeleton2D::common_attach_point_add(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene) {\n\tint index = common_attach_point_index_get(point);\n\n\tERR_FAIL_INDEX(index, _attach_point_nodes.size());\n\n\tNode *n = _attach_point_nodes[index].node;\n\n\tif (INSTANCE_VALIDATE(n) && n->has_method(\"add\")) {\n\t\tn->call(\"add\", scene);\n\t}\n}\nvoid CharacterSkeleton2D::common_attach_point_add_timed(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene, const float time) {\n\tint index = common_attach_point_index_get(point);\n\n\tERR_FAIL_INDEX(index, _attach_point_nodes.size());\n\n\tNode *n = _attach_point_nodes[index].node;\n\n\tif (INSTANCE_VALIDATE(n) && n->has_method(\"add_timed\")) {\n\t\tn->call(\"add_timed\", scene, time);\n\t}\n}\nvoid CharacterSkeleton2D::common_attach_point_remove(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene) {\n\tint index = common_attach_point_index_get(point);\n\n\tERR_FAIL_INDEX(index, _attach_point_nodes.size());\n\n\tNode *n = _attach_point_nodes[index].node;\n\n\tif (INSTANCE_VALIDATE(n) && n->has_method(\"remove\")) {\n\t\tn->call(\"remove\", scene);\n\t}\n}\nint CharacterSkeleton2D::common_attach_point_index_get(const EntityEnums::CommonCharacterSkeletonPoints point) {\n\treturn call(\"_common_attach_point_index_get\", point);\n}\nint CharacterSkeleton2D::_common_attach_point_index_get(const EntityEnums::CommonCharacterSkeletonPoints point) {\n\treturn 0;\n}\n\nNodePath CharacterSkeleton2D::get_animation_player_path() {\n\treturn _animation_player_path;\n}\n\nvoid CharacterSkeleton2D::set_animation_player_path(NodePath path) {\n\t_animation_player_path = path;\n\n\tNode *node = get_node_or_null(_animation_player_path);\n\n\tif (node != NULL) {\n\t\t_animation_player = Object::cast_to<AnimationPlayer>(node);\n\t} else {\n\t\t_animation_player = NULL;\n\t}\n}\n\nAnimationPlayer *CharacterSkeleton2D::get_animation_player() {\n\treturn _animation_player;\n}\n\nNodePath CharacterSkeleton2D::get_animation_tree_path() {\n\treturn _animation_tree_path;\n}\n\nvoid CharacterSkeleton2D::set_animation_tree_path(NodePath path) {\n\t_animation_tree_path = path;\n\n\tNode *node = get_node_or_null(_animation_tree_path);\n\n\tif (node != NULL) {\n\t\t_animation_tree = Object::cast_to<AnimationTree>(node);\n\t} else {\n\t\t_animation_tree = NULL;\n\t}\n}\n\nAnimationTree *CharacterSkeleton2D::get_animation_tree() {\n\treturn _animation_tree;\n}\n\nvoid CharacterSkeleton2D::update_nodes() {\n\tfor (int i = 0; i < _attach_point_nodes.size(); ++i) {\n\t\t_attach_point_nodes.write[i].node = get_node_or_null(_attach_point_nodes[i].path);\n\t}\n\n\tset_animation_player_path(_animation_player_path);\n\tset_animation_tree_path(_animation_tree_path);\n}\n\nvoid CharacterSkeleton2D::add_model_visual(Ref<ModelVisual> vis) {\n\tERR_FAIL_COND(!vis.is_valid());\n\n\tfor (int i = 0; i < vis->get_visual_entry_count(); ++i) {\n\t\tRef<ModelVisualEntry> e = vis->get_visual_entry(i);\n\n\t\tif (e.is_valid())\n\t\t\tadd_model_visual_entry(vis, e);\n\t}\n\n\t_model_visuals.push_back(vis);\n\n\tset_process(true);\n\t_model_dirty = true;\n}\nvoid CharacterSkeleton2D::remove_model_visual(Ref<ModelVisual> vis) {\n\tERR_FAIL_COND(!vis.is_valid());\n\n\tint index = _model_visuals.find(vis);\n\n\tif (index == -1)\n\t\treturn;\n\n\tfor (int i = 0; i < _entries.size(); ++i) {\n\t\tRef<ModelVisualEntry> e = vis->get_visual_entry(i);\n\n\t\tif (e.is_valid())\n\t\t\tremove_model_visual_entry(vis, e);\n\t}\n\n\t_model_visuals.remove_at(index);\n\n\tset_process(true);\n\t_model_dirty = true;\n}\nvoid CharacterSkeleton2D::remove_model_visual_index(int index) {\n\tERR_FAIL_INDEX(index, _model_visuals.size());\n\n\tset_process(true);\n\t_model_dirty = true;\n\n\t_model_visuals.remove_at(index);\n}\nRef<ModelVisual> CharacterSkeleton2D::get_model_visual(int index) {\n\tERR_FAIL_INDEX_V(index, _model_visuals.size(), Ref<ModelVisual>());\n\n\tset_process(true);\n\t_model_dirty = true;\n\n\treturn _model_visuals.get(index);\n}\nint CharacterSkeleton2D::get_model_visual_count() {\n\treturn _model_visuals.size();\n}\nvoid CharacterSkeleton2D::clear_model_visuals() {\n\t_model_visuals.clear();\n\n\tfor (int i = 0; i < _entries.size(); ++i) {\n\t\t_entries.write[i].clear();\n\t}\n\n\t_model_dirty = true;\n\tset_process(true);\n}\n\nvoid CharacterSkeleton2D::add_model_visual_entry(Ref<ModelVisual> vis, Ref<ModelVisualEntry> ive) {\n\tERR_FAIL_COND(!vis.is_valid());\n\tERR_FAIL_COND(!ive.is_valid());\n\n\tif (ive->get_type() == ModelVisualEntry::MODEL_VISUAL_ENTRY_TYPE_ATTACHMENT) {\n\t\tEntityEnums::CommonCharacterSkeletonPoints target_bone = static_cast<EntityEnums::CommonCharacterSkeletonPoints>(ive->get_bone());\n\n\t\tfor (int i = 0; i < ive->get_size(); ++i) {\n\t\t\tRef<PackedScene> ps = ive->get_attachment(i);\n\n\t\t\tif (ps.is_valid()) {\n\t\t\t\tcommon_attach_point_add(target_bone, ps);\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}\n\n\tint target_bone_idx = ive->get_bone();\n\n\tVector<Ref<SkeletonModelEntry> > &entries = _entries.write[target_bone_idx];\n\n\tfor (int i = 0; i < entries.size(); ++i) {\n\t\tRef<SkeletonModelEntry> e = entries.get(i);\n\n\t\tif (e->get_entry() == ive) {\n\t\t\te->set_count(e->get_count() + 1);\n\t\t\treturn;\n\t\t}\n\t}\n\n\tRef<SkeletonModelEntry> e;\n\te.instantiate();\n\n\te->set_priority(vis->get_layer());\n\t//e->set_color(ive->get_color());\n\te->set_entry(ive);\n\n\tentries.push_back(e);\n\t_model_dirty = true;\n\tset_process(true);\n}\nvoid CharacterSkeleton2D::remove_model_visual_entry(Ref<ModelVisual> vis, Ref<ModelVisualEntry> ive) {\n\tERR_FAIL_COND(!vis.is_valid());\n\tERR_FAIL_COND(!ive.is_valid());\n\n\tif (ive->get_type() == ModelVisualEntry::MODEL_VISUAL_ENTRY_TYPE_ATTACHMENT) {\n\t\tEntityEnums::CommonCharacterSkeletonPoints target_bone = static_cast<EntityEnums::CommonCharacterSkeletonPoints>(ive->get_bone());\n\n\t\tfor (int i = 0; i < ive->get_size(); ++i) {\n\t\t\tRef<PackedScene> ps = ive->get_attachment(i);\n\n\t\t\tif (ps.is_valid()) {\n\t\t\t\tcommon_attach_point_remove(target_bone, ps);\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}\n\n\tint target_bone_idx = ive->get_bone();\n\n\tVector<Ref<SkeletonModelEntry> > &entries = _entries.write[target_bone_idx];\n\n\tfor (int i = 0; i < entries.size(); ++i) {\n\t\tRef<SkeletonModelEntry> e = entries.get(i);\n\n\t\tif (e->get_entry() == ive) {\n\t\t\te->set_count(e->get_count() - 1);\n\n\t\t\tif (e->get_count() <= 0) {\n\t\t\t\tentries.remove_at(i);\n\n\t\t\t\t_model_dirty = true;\n\t\t\t\tset_process(true);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nRef<SkeletonModelEntry> CharacterSkeleton2D::get_model_entry(const int bone_index, const int index) {\n\tERR_FAIL_INDEX_V(bone_index, _entries.size(), Ref<SkeletonModelEntry>());\n\tERR_FAIL_INDEX_V(index, _entries[bone_index].size(), Ref<SkeletonModelEntry>());\n\n\treturn _entries[bone_index].get(index);\n}\nint CharacterSkeleton2D::get_model_entry_count(const int bone_index) {\n\tERR_FAIL_INDEX_V(bone_index, _entries.size(), 0);\n\n\treturn _entries[bone_index].size();\n}\n\nvoid CharacterSkeleton2D::sort_layers() {\n\tfor (int i = 0; i < _entries.size(); ++i) {\n\t\tVector<Ref<SkeletonModelEntry> > &entries = _entries.write[i];\n\n\t\tentries.sort_custom<_ModelEntryComparator>();\n\t}\n}\n\nvoid CharacterSkeleton2D::build_model() {\n\tcall(\"_build_model\");\n}\n\nvoid CharacterSkeleton2D::_build_model() {\n\tset_process(false);\n}\n\nArray CharacterSkeleton2D::merge_mesh_array(Array arr) const {\n\tERR_FAIL_COND_V(arr.size() != VisualServer::ARRAY_MAX, arr);\n\n\tPoolVector3Array verts = arr[VisualServer::ARRAY_VERTEX];\n\tPoolVector3Array normals = arr[VisualServer::ARRAY_NORMAL];\n\tPoolVector2Array uvs = arr[VisualServer::ARRAY_TEX_UV];\n\tPoolColorArray colors = arr[VisualServer::ARRAY_COLOR];\n\tPoolIntArray indices = arr[VisualServer::ARRAY_INDEX];\n\tPoolIntArray bones = arr[VisualServer::ARRAY_BONES];\n\tPoolRealArray weights = arr[VisualServer::ARRAY_WEIGHTS];\n\n\tint i = 0;\n\twhile (i < verts.size()) {\n\t\tVector3 v = verts[i];\n\n\t\tArray equals;\n\t\tfor (int j = i + 1; j < verts.size(); ++j) {\n\t\t\tVector3 vc = verts[j];\n\n\t\t\tif (Math::is_equal_approx(v.x, vc.x) && Math::is_equal_approx(v.y, vc.y) && Math::is_equal_approx(v.z, vc.z))\n\t\t\t\tequals.push_back(j);\n\t\t}\n\n\t\tfor (int k = 0; k < equals.size(); ++k) {\n\t\t\tint rem = equals[k];\n\t\t\tint remk = rem - k;\n\n\t\t\tverts.remove_at(remk);\n\t\t\tnormals.remove_at(remk);\n\t\t\tuvs.remove_at(remk);\n\t\t\tcolors.remove_at(remk);\n\n\t\t\tint bindex = remk * 4;\n\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\tbones.remove_at(bindex);\n\t\t\t\tweights.remove_at(bindex);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < indices.size(); ++j) {\n\t\t\t\tint indx = indices[j];\n\n\t\t\t\tif (indx == remk)\n\t\t\t\t\tindices.set(j, i);\n\t\t\t\telse if (indx > remk)\n\t\t\t\t\tindices.set(j, indx - 1);\n\t\t\t}\n\t\t}\n\n\t\t++i;\n\t}\n\n\tarr[VisualServer::ARRAY_VERTEX] = verts;\n\tarr[VisualServer::ARRAY_NORMAL] = normals;\n\tarr[VisualServer::ARRAY_TEX_UV] = uvs;\n\tarr[VisualServer::ARRAY_COLOR] = colors;\n\tarr[VisualServer::ARRAY_INDEX] = indices;\n\tarr[VisualServer::ARRAY_BONES] = bones;\n\tarr[VisualServer::ARRAY_WEIGHTS] = weights;\n\n\treturn arr;\n}\nArray CharacterSkeleton2D::bake_mesh_array_uv(Array arr, Ref<Texture> tex, float mul_color) const {\n\tERR_FAIL_COND_V(arr.size() != VisualServer::ARRAY_MAX, arr);\n\tERR_FAIL_COND_V(!tex.is_valid(), arr);\n\n\tRef<Image> img = tex->get_image();\n\n\tERR_FAIL_COND_V(!img.is_valid(), arr);\n\n\tVector2 imgsize = img->get_size();\n\n\tPoolVector2Array uvs = arr[VisualServer::ARRAY_TEX_UV];\n\tPoolColorArray colors = arr[VisualServer::ARRAY_COLOR];\n\n#if !GODOT4\n\timg->lock();\n#endif\n\n\tfor (int i = 0; i < uvs.size(); ++i) {\n\t\tVector2 uv = uvs[i];\n\t\tuv *= imgsize;\n\n\t\tColor c = img->get_pixelv(uv);\n\n\t\tcolors.set(i, colors[i] * c * mul_color);\n\t}\n\n#if !GODOT4\n\timg->unlock();\n#endif\n\n\tarr[VisualServer::ARRAY_COLOR] = colors;\n\n\treturn arr;\n}\n\nCharacterSkeleton2D::CharacterSkeleton2D() {\n\t_model_dirty = false;\n\t_model_index = 0;\n\t_entity_type = 0;\n\n\t_animation_player = NULL;\n\t_animation_tree = NULL;\n}\n\nCharacterSkeleton2D::~CharacterSkeleton2D() {\n\t_attach_point_nodes.clear();\n\n\tfor (int i = 0; i < _entries.size(); ++i) {\n\t\t_entries.write[i].clear();\n\t}\n\n\t_entries.clear();\n\n\t_model_visuals.clear();\n}\n\nvoid CharacterSkeleton2D::_notification(int p_what) {\n\tswitch (p_what) {\n\t\tcase NOTIFICATION_ENTER_TREE: {\n\t\t\tupdate_nodes();\n\t\t} break;\n\t\tcase NOTIFICATION_PROCESS: {\n\t\t\tif (_model_dirty)\n\t\t\t\tbuild_model();\n\t\t} break;\n\t\tcase NOTIFICATION_EXIT_TREE: {\n\t\t} break;\n\t}\n}\n\nbool CharacterSkeleton2D::_set(const StringName &p_name, const Variant &p_value) {\n\tString name = p_name;\n\n\tif (name.begins_with(\"attach_point_paths\")) {\n\t\tint index = name.get_slicec('/', 1).get_slicec('_', 0).to_int();\n\n\t\tif (index >= _attach_point_nodes.size()) {\n\t\t\t_attach_point_nodes.resize(index + 1);\n\t\t}\n\n\t\tNodePath np = p_value;\n\n\t\t_attach_point_nodes.write[index].path = np;\n\n\t\tif (is_inside_tree())\n\t\t\t_attach_point_nodes.write[index].node = get_node_or_null(p_value);\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\nbool CharacterSkeleton2D::_get(const StringName &p_name, Variant &r_ret) const {\n\tString name = p_name;\n\n\tif (name.begins_with(\"attach_point_paths\")) {\n\t\tint index = name.get_slicec('/', 1).get_slicec('_', 0).to_int();\n\n\t\tif (index >= _attach_point_nodes.size()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tr_ret = _attach_point_nodes[index].path;\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\nvoid CharacterSkeleton2D::_get_property_list(List<PropertyInfo> *p_list) const {\n\tif (ESS::get_singleton()->skeletons_bone_attachments_count() == 0) {\n\t\treturn;\n\t}\n\n\tString bones = ESS::get_singleton()->skeletons_bone_attachment_index_get(_entity_type);\n\tint slicec = bones.get_slice_count(\",\");\n\n\tfor (int i = 0; i < slicec; ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::NODE_PATH, \"attach_point_paths/\" + itos(i) + \"_\" + bones.get_slicec(',', i)));\n\t}\n}\n\nvoid CharacterSkeleton2D::_validate_property(PropertyInfo &property) const {\n\tif (property.name == \"entity_type\") {\n\t\tproperty.hint_string = ESS::get_singleton()->entity_types_get();\n\t}\n}\n\nvoid CharacterSkeleton2D::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_entity_type\"), &CharacterSkeleton2D::get_entity_type);\n\tClassDB::bind_method(D_METHOD(\"set_entity_type\", \"value\"), &CharacterSkeleton2D::set_entity_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"entity_type\", PROPERTY_HINT_ENUM, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_entity_type\", \"get_entity_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_model_index\"), &CharacterSkeleton2D::get_model_index);\n\tClassDB::bind_method(D_METHOD(\"set_model_index\", \"value\"), &CharacterSkeleton2D::set_model_index);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"model_index\"), \"set_model_index\", \"get_model_index\");\n\n\tClassDB::bind_method(D_METHOD(\"add_model_visual\", \"vis\"), &CharacterSkeleton2D::add_model_visual);\n\tClassDB::bind_method(D_METHOD(\"remove_model_visual\", \"vis\"), &CharacterSkeleton2D::remove_model_visual);\n\tClassDB::bind_method(D_METHOD(\"remove_model_visual_index\", \"index\"), &CharacterSkeleton2D::remove_model_visual_index);\n\tClassDB::bind_method(D_METHOD(\"get_model_visual\", \"index\"), &CharacterSkeleton2D::get_model_visual);\n\tClassDB::bind_method(D_METHOD(\"get_model_visual_count\"), &CharacterSkeleton2D::get_model_visual_count);\n\tClassDB::bind_method(D_METHOD(\"clear_model_visuals\"), &CharacterSkeleton2D::clear_model_visuals);\n\n\t//GDVIRTUAL_BIND(\"_build_model\");\n\n\tClassDB::bind_method(D_METHOD(\"get_model_dirty\"), &CharacterSkeleton2D::get_model_dirty);\n\tClassDB::bind_method(D_METHOD(\"set_model_dirty\", \"value\"), &CharacterSkeleton2D::set_model_dirty);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"model_dirty\"), \"set_model_dirty\", \"get_model_dirty\");\n\n\tClassDB::bind_method(D_METHOD(\"get_animation_player_path\"), &CharacterSkeleton2D::get_animation_player_path);\n\tClassDB::bind_method(D_METHOD(\"set_animation_player_path\", \"path\"), &CharacterSkeleton2D::set_animation_player_path);\n\tADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, \"animation_player_path\"), \"set_animation_player_path\", \"get_animation_player_path\");\n\n\tClassDB::bind_method(D_METHOD(\"get_animation_tree_path\"), &CharacterSkeleton2D::get_animation_tree_path);\n\tClassDB::bind_method(D_METHOD(\"set_animation_tree_path\", \"path\"), &CharacterSkeleton2D::set_animation_tree_path);\n\tADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, \"animation_tree_path\"), \"set_animation_tree_path\", \"get_animation_tree_path\");\n\n\tClassDB::bind_method(D_METHOD(\"add_model_visual_entry\", \"vis\", \"ive\"), &CharacterSkeleton2D::add_model_visual_entry);\n\tClassDB::bind_method(D_METHOD(\"remove_model_visual_entry\", \"vis\", \"ive\"), &CharacterSkeleton2D::remove_model_visual_entry);\n\tClassDB::bind_method(D_METHOD(\"get_model_entry\", \"bone_index\", \"index\"), &CharacterSkeleton2D::get_model_entry);\n\tClassDB::bind_method(D_METHOD(\"get_model_entry_count\", \"bone_index\"), &CharacterSkeleton2D::get_model_entry_count);\n\n\tClassDB::bind_method(D_METHOD(\"sort_layers\"), &CharacterSkeleton2D::sort_layers);\n\n\tClassDB::bind_method(D_METHOD(\"build_model\"), &CharacterSkeleton2D::build_model);\n\tClassDB::bind_method(D_METHOD(\"_build_model\"), &CharacterSkeleton2D::_build_model);\n\n\tClassDB::bind_method(D_METHOD(\"merge_mesh_array\", \"arr\"), &CharacterSkeleton2D::merge_mesh_array);\n\tClassDB::bind_method(D_METHOD(\"bake_mesh_array_uv\", \"arr\", \"tex\", \"mul_color\"), &CharacterSkeleton2D::bake_mesh_array_uv, DEFVAL(0.7));\n\n\t//Bone Paths\n\tClassDB::bind_method(D_METHOD(\"attach_point_path_get\", \"index\"), &CharacterSkeleton2D::attach_point_path_get);\n\tClassDB::bind_method(D_METHOD(\"attach_point_path_set\", \"index\", \"path\"), &CharacterSkeleton2D::attach_point_path_set);\n\n\tClassDB::bind_method(D_METHOD(\"attach_point_node_get\", \"index\"), &CharacterSkeleton2D::attach_point_node_get);\n\n\tClassDB::bind_method(D_METHOD(\"attach_point_count\"), &CharacterSkeleton2D::attach_point_count);\n\n\t//GDVIRTUAL_BIND(\"_common_attach_point_index_get\", \"point\", PROPERTY_HINT_NONE, EntityEnums::BINDING_STRING_COMMON_CHARCATER_SKELETON_POINTS);\n\n\tClassDB::bind_method(D_METHOD(\"common_attach_point_node_get\", \"point\"), &CharacterSkeleton2D::common_attach_point_node_get);\n\tClassDB::bind_method(D_METHOD(\"common_attach_point_add\", \"point\", \"scene\"), &CharacterSkeleton2D::common_attach_point_add);\n\tClassDB::bind_method(D_METHOD(\"common_attach_point_add_timed\", \"point\", \"scene\", \"time\"), &CharacterSkeleton2D::common_attach_point_add_timed);\n\tClassDB::bind_method(D_METHOD(\"common_attach_point_remove\", \"point\", \"scene\"), &CharacterSkeleton2D::common_attach_point_remove);\n\tClassDB::bind_method(D_METHOD(\"common_attach_point_index_get\", \"point\"), &CharacterSkeleton2D::common_attach_point_index_get);\n\tClassDB::bind_method(D_METHOD(\"_common_attach_point_index_get\", \"point\"), &CharacterSkeleton2D::_common_attach_point_index_get);\n\n\tClassDB::bind_method(D_METHOD(\"get_animation_player\"), &CharacterSkeleton2D::get_animation_player);\n\tClassDB::bind_method(D_METHOD(\"get_animation_tree\"), &CharacterSkeleton2D::get_animation_tree);\n\n\tClassDB::bind_method(D_METHOD(\"update_nodes\"), &CharacterSkeleton2D::update_nodes);\n}\n"
  },
  {
    "path": "skeleton/character_skeleton_2d.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef CHARACTER_SKELETON_2D_H\n#define CHARACTER_SKELETON_2D_H\n\n#include \"core/version.h\"\n\n#include \"core/templates/vector.h\"\n#include \"core/string/ustring.h\"\n#include \"core/string/node_path.h\"\n\n\n#include \"scene/2d/node_2d.h\"\n\n#include \"scene/main/node.h\"\n\n#include \"scene/animation/animation_player.h\"\n#include \"scene/animation/animation_tree.h\"\n\n#include \"../entity_enums.h\"\n#include \"skeleton_model_entry.h\"\n\n#include \"../data/items/model_visual_entry.h\"\n\n#include \"../defines.h\"\n\n#include spatial_h_path\n\n#if GODOT4\n#define Texture Texture2D\n#endif\n\nclass ModelVisual;\n\nclass CharacterSkeleton2D : public Node2D {\n\tGDCLASS(CharacterSkeleton2D, Node2D);\n\npublic:\n\tint get_entity_type() const;\n\tvoid set_entity_type(const int value);\n\n\tint get_model_index();\n\tvoid set_model_index(int value);\n\n\tbool get_model_dirty() const;\n\tvoid set_model_dirty(bool value);\n\n\tNodePath attach_point_path_get(const int index) const;\n\tvoid attach_point_path_set(const int index, const NodePath &path);\n\n\tNode *attach_point_node_get(const int index);\n\n\tint attach_point_count() const;\n\n\tNode *common_attach_point_node_get(const EntityEnums::CommonCharacterSkeletonPoints point);\n\tvoid common_attach_point_add(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene);\n\tvoid common_attach_point_add_timed(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene, const float time);\n\tvoid common_attach_point_remove(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene);\n\tint common_attach_point_index_get(const EntityEnums::CommonCharacterSkeletonPoints point);\n\tvirtual int _common_attach_point_index_get(const EntityEnums::CommonCharacterSkeletonPoints point);\n\n\tNodePath get_animation_player_path();\n\tvoid set_animation_player_path(NodePath path);\n\n\tAnimationPlayer *get_animation_player();\n\n\tNodePath get_animation_tree_path();\n\tvoid set_animation_tree_path(NodePath path);\n\n\tAnimationTree *get_animation_tree();\n\n\tvoid update_nodes();\n\n\tvoid add_model_visual(Ref<ModelVisual> vis);\n\tvoid remove_model_visual(Ref<ModelVisual> vis);\n\tvoid remove_model_visual_index(int index);\n\tRef<ModelVisual> get_model_visual(int index);\n\tint get_model_visual_count();\n\tvoid clear_model_visuals();\n\n\tvoid add_model_visual_entry(Ref<ModelVisual> vis, Ref<ModelVisualEntry> ive);\n\tvoid remove_model_visual_entry(Ref<ModelVisual> vis, Ref<ModelVisualEntry> ive);\n\n\tRef<SkeletonModelEntry> get_model_entry(const int bone_index, const int index);\n\tint get_model_entry_count(const int bone_index);\n\n\tvoid sort_layers();\n\n\tvoid build_model();\n\tvoid _build_model();\n\n\tArray merge_mesh_array(Array arr) const;\n\tArray bake_mesh_array_uv(Array arr, Ref<Texture> tex, float mul_color = 0.7) const;\n\n\tCharacterSkeleton2D();\n\t~CharacterSkeleton2D();\n\nprotected:\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tvoid _validate_property(PropertyInfo &property) const;\n\tstatic void _bind_methods();\n\tvirtual void _notification(int p_notification);\n\nprotected:\n\tstruct _ModelEntryComparator {\n\t\t_FORCE_INLINE_ bool operator()(const Ref<SkeletonModelEntry> &a, const Ref<SkeletonModelEntry> &b) const {\n\t\t\tif (!a.is_valid() || !b.is_valid()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn (a->get_priority() > b->get_priority());\n\t\t}\n\t};\n\n\tstruct AttachPointNode {\n\t\tNodePath path;\n\t\tNode *node;\n\n\t\tAttachPointNode() {\n\t\t\tnode = NULL;\n\t\t}\n\t};\n\nprivate:\n\tint _entity_type;\n\tint _model_index;\n\tNodePath _animation_player_path;\n\tNodePath _animation_tree_path;\n\n\tAnimationPlayer *_animation_player;\n\tAnimationTree *_animation_tree;\n\n\tVector<AttachPointNode> _attach_point_nodes;\n\n\tbool _model_dirty;\n\tVector<Ref<ModelVisual> > _model_visuals;\n\tVector<Vector<Ref<SkeletonModelEntry> > > _entries;\n};\n\n#endif\n"
  },
  {
    "path": "skeleton/character_skeleton_3d.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"character_skeleton_3d.h\"\n\n#include \"../singletons/ess.h\"\n\n#include \"../data/items/model_visual.h\"\n\n#include \"../defines.h\"\n\nint CharacterSkeleton3D::get_entity_type() const {\n\treturn _entity_type;\n}\nvoid CharacterSkeleton3D::set_entity_type(const int value) {\n\t_entity_type = value;\n\n\tint bones_size = ESS::get_singleton()->skeletons_bones_index_get(_entity_type).get_slice_count(\",\");\n\tint attachment_size = ESS::get_singleton()->skeletons_bone_attachment_index_get(_entity_type).get_slice_count(\",\");\n\n\t_attach_point_nodes.resize(attachment_size);\n\t_entries.resize(bones_size);\n}\n\nint CharacterSkeleton3D::get_model_index() {\n\treturn _model_index;\n}\nvoid CharacterSkeleton3D::set_model_index(int value) {\n\t_model_index = value;\n}\n\nbool CharacterSkeleton3D::get_model_dirty() const {\n\treturn _model_dirty;\n}\nvoid CharacterSkeleton3D::set_model_dirty(bool value) {\n\t_model_dirty = value;\n}\n\nNodePath CharacterSkeleton3D::attach_point_path_get(const int index) const {\n\tERR_FAIL_INDEX_V(index, _attach_point_nodes.size(), NodePath());\n\n\treturn _attach_point_nodes[index].path;\n}\nvoid CharacterSkeleton3D::attach_point_path_set(const int index, const NodePath &path) {\n\tERR_FAIL_INDEX(index, _attach_point_nodes.size());\n\n\t_attach_point_nodes.write[index].path = path;\n\t_attach_point_nodes.write[index].node = get_node_or_null(path);\n}\n\nNode *CharacterSkeleton3D::attach_point_node_get(const int index) {\n\tERR_FAIL_INDEX_V(index, _attach_point_nodes.size(), NULL);\n\n\treturn _attach_point_nodes[index].node;\n}\n\nint CharacterSkeleton3D::attach_point_count() const {\n\treturn _attach_point_nodes.size();\n}\n\nNode *CharacterSkeleton3D::common_attach_point_node_get(const EntityEnums::CommonCharacterSkeletonPoints index) {\n\tERR_FAIL_INDEX_V(common_attach_point_index_get(index), _attach_point_nodes.size(), NULL);\n\n\treturn _attach_point_nodes[common_attach_point_index_get(index)].node;\n}\nvoid CharacterSkeleton3D::common_attach_point_add(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene) {\n\tint index = common_attach_point_index_get(point);\n\n\tERR_FAIL_INDEX(index, _attach_point_nodes.size());\n\n\tNode *n = _attach_point_nodes[index].node;\n\n\tif (INSTANCE_VALIDATE(n) && n->has_method(\"add\")) {\n\t\tn->call(\"add\", scene);\n\t}\n}\nvoid CharacterSkeleton3D::common_attach_point_add_timed(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene, const float time) {\n\tint index = common_attach_point_index_get(point);\n\n\tERR_FAIL_INDEX(index, _attach_point_nodes.size());\n\n\tNode *n = _attach_point_nodes[index].node;\n\n\tif (INSTANCE_VALIDATE(n) && n->has_method(\"add_timed\")) {\n\t\tn->call(\"add_timed\", scene, time);\n\t}\n}\nvoid CharacterSkeleton3D::common_attach_point_remove(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene) {\n\tint index = common_attach_point_index_get(point);\n\n\tERR_FAIL_INDEX(index, _attach_point_nodes.size());\n\n\tNode *n = _attach_point_nodes[index].node;\n\n\tif (INSTANCE_VALIDATE(n) && n->has_method(\"remove\")) {\n\t\tn->call(\"remove\", scene);\n\t}\n}\nint CharacterSkeleton3D::common_attach_point_index_get(const EntityEnums::CommonCharacterSkeletonPoints point) {\n\treturn call(\"_common_attach_point_index_get\", point);\n}\nint CharacterSkeleton3D::_common_attach_point_index_get(const EntityEnums::CommonCharacterSkeletonPoints point) {\n\treturn 0;\n}\n\nNodePath CharacterSkeleton3D::get_animation_player_path() {\n\treturn _animation_player_path;\n}\n\nvoid CharacterSkeleton3D::set_animation_player_path(NodePath path) {\n\t_animation_player_path = path;\n\n\tNode *node = get_node_or_null(_animation_player_path);\n\n\tif (node != NULL) {\n\t\t_animation_player = Object::cast_to<AnimationPlayer>(node);\n\t} else {\n\t\t_animation_player = NULL;\n\t}\n}\n\nAnimationPlayer *CharacterSkeleton3D::get_animation_player() {\n\treturn _animation_player;\n}\n\nNodePath CharacterSkeleton3D::get_animation_tree_path() {\n\treturn _animation_tree_path;\n}\n\nvoid CharacterSkeleton3D::set_animation_tree_path(NodePath path) {\n\t_animation_tree_path = path;\n\n\tNode *node = get_node_or_null(_animation_tree_path);\n\n\tif (node != NULL) {\n\t\t_animation_tree = Object::cast_to<AnimationTree>(node);\n\t} else {\n\t\t_animation_tree = NULL;\n\t}\n}\n\nAnimationTree *CharacterSkeleton3D::get_animation_tree() {\n\treturn _animation_tree;\n}\n\nvoid CharacterSkeleton3D::update_nodes() {\n\tfor (int i = 0; i < _attach_point_nodes.size(); ++i) {\n\t\t_attach_point_nodes.write[i].node = get_node_or_null(_attach_point_nodes[i].path);\n\t}\n\n\tset_animation_player_path(_animation_player_path);\n\tset_animation_tree_path(_animation_tree_path);\n}\n\nint CharacterSkeleton3D::bone_additional_mesh_transform_bone_index_get(const int index) const {\n\tERR_FAIL_INDEX_V(index, _bone_model_additional_mesh_transforms.size(), 0);\n\n\treturn _bone_model_additional_mesh_transforms[index].bone_index;\n}\nvoid CharacterSkeleton3D::bone_additional_mesh_transform_bone_index_set(const int index, const int bone_index) {\n\tERR_FAIL_INDEX(index, _bone_model_additional_mesh_transforms.size());\n\n\t_bone_model_additional_mesh_transforms.write[index].bone_index = bone_index;\n}\n\nTransform3D CharacterSkeleton3D::bone_additional_mesh_transform_transform_get(const int index) const {\n\tERR_FAIL_INDEX_V(index, _bone_model_additional_mesh_transforms.size(), Transform3D());\n\n\treturn _bone_model_additional_mesh_transforms[index].transform;\n}\nvoid CharacterSkeleton3D::bone_additional_mesh_transform_transform_set(const int index, const Transform3D &transform) {\n\tERR_FAIL_INDEX(index, _bone_model_additional_mesh_transforms.size());\n\n\t_bone_model_additional_mesh_transforms.write[index].transform = transform;\n}\n\nTransform3D CharacterSkeleton3D::bone_additional_mesh_transform_user_transform_get(const int index) const {\n\tERR_FAIL_INDEX_V(index, _bone_model_additional_mesh_transforms.size(), Transform3D());\n\n\treturn _bone_model_additional_mesh_transforms[index].user_transform;\n}\nvoid CharacterSkeleton3D::bone_additional_mesh_transform_user_transform_set(const int index, const Transform3D &transform) {\n\tERR_FAIL_INDEX(index, _bone_model_additional_mesh_transforms.size());\n\n\t_bone_model_additional_mesh_transforms.write[index].user_transform = transform;\n}\n\nvoid CharacterSkeleton3D::bone_additional_mesh_transform_set_count(const int size) {\n\t_bone_model_additional_mesh_transforms.resize(size);\n}\nint CharacterSkeleton3D::bone_additional_mesh_transform_get_count() const {\n\treturn _bone_model_additional_mesh_transforms.size();\n}\n\nvoid CharacterSkeleton3D::add_model_visual(Ref<ModelVisual> vis) {\n\tERR_FAIL_COND(!vis.is_valid());\n\n\tfor (int i = 0; i < vis->get_visual_entry_count(); ++i) {\n\t\tRef<ModelVisualEntry> e = vis->get_visual_entry(i);\n\n\t\tif (e.is_valid())\n\t\t\tadd_model_visual_entry(vis, e);\n\t}\n\n\t_model_visuals.push_back(vis);\n\n\tset_process(true);\n\t_model_dirty = true;\n}\nvoid CharacterSkeleton3D::remove_model_visual(Ref<ModelVisual> vis) {\n\tERR_FAIL_COND(!vis.is_valid());\n\n\tint index = _model_visuals.find(vis);\n\n\tif (index == -1)\n\t\treturn;\n\n\tfor (int i = 0; i < vis->get_visual_entry_count(); ++i) {\n\t\tRef<ModelVisualEntry> e = vis->get_visual_entry(i);\n\n\t\tif (e.is_valid())\n\t\t\tremove_model_visual_entry(vis, e);\n\t}\n\n\t_model_visuals.remove_at(index);\n\n\tset_process(true);\n\t_model_dirty = true;\n}\nvoid CharacterSkeleton3D::remove_model_visual_index(int index) {\n\tERR_FAIL_INDEX(index, _model_visuals.size());\n\n\tset_process(true);\n\t_model_dirty = true;\n\n\t_model_visuals.remove_at(index);\n}\nRef<ModelVisual> CharacterSkeleton3D::get_model_visual(int index) {\n\tERR_FAIL_INDEX_V(index, _model_visuals.size(), Ref<ModelVisual>());\n\n\tset_process(true);\n\t_model_dirty = true;\n\n\treturn _model_visuals.get(index);\n}\nint CharacterSkeleton3D::get_model_visual_count() {\n\treturn _model_visuals.size();\n}\nvoid CharacterSkeleton3D::clear_model_visuals() {\n\t_model_visuals.clear();\n\n\tfor (int i = 0; i < _entries.size(); ++i) {\n\t\t_entries.write[i].clear();\n\t}\n\n\t_model_dirty = true;\n\tset_process(true);\n}\n\nvoid CharacterSkeleton3D::add_model_visual_entry(Ref<ModelVisual> vis, Ref<ModelVisualEntry> ive) {\n\tERR_FAIL_COND(!vis.is_valid());\n\tERR_FAIL_COND(!ive.is_valid());\n\n\tif (ive->get_type() == ModelVisualEntry::MODEL_VISUAL_ENTRY_TYPE_ATTACHMENT) {\n\t\tEntityEnums::CommonCharacterSkeletonPoints target_bone = static_cast<EntityEnums::CommonCharacterSkeletonPoints>(ive->get_bone());\n\n\t\tfor (int i = 0; i < ive->get_size(); ++i) {\n\t\t\tRef<PackedScene> ps = ive->get_attachment(i);\n\n\t\t\tif (ps.is_valid()) {\n\t\t\t\tcommon_attach_point_add(target_bone, ps);\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}\n\n\tint target_bone_idx = ive->get_bone();\n\n\tVector<Ref<SkeletonModelEntry> > &entries = _entries.write[target_bone_idx];\n\n\tfor (int i = 0; i < entries.size(); ++i) {\n\t\tRef<SkeletonModelEntry> e = entries.get(i);\n\n\t\tif (e->get_entry() == ive) {\n\t\t\te->set_count(e->get_count() + 1);\n\t\t\treturn;\n\t\t}\n\t}\n\n\tRef<SkeletonModelEntry> e;\n\te.instantiate();\n\n\te->set_priority(vis->get_layer());\n\t//e->set_color(ive->get_color());\n\te->set_entry(ive);\n\n\tentries.push_back(e);\n\t_model_dirty = true;\n\tset_process(true);\n}\nvoid CharacterSkeleton3D::remove_model_visual_entry(Ref<ModelVisual> vis, Ref<ModelVisualEntry> ive) {\n\tERR_FAIL_COND(!vis.is_valid());\n\tERR_FAIL_COND(!ive.is_valid());\n\n\tif (ive->get_type() == ModelVisualEntry::MODEL_VISUAL_ENTRY_TYPE_ATTACHMENT) {\n\t\tEntityEnums::CommonCharacterSkeletonPoints target_bone = static_cast<EntityEnums::CommonCharacterSkeletonPoints>(ive->get_bone());\n\n\t\tfor (int i = 0; i < ive->get_size(); ++i) {\n\t\t\tRef<PackedScene> ps = ive->get_attachment(i);\n\n\t\t\tif (ps.is_valid()) {\n\t\t\t\tcommon_attach_point_remove(target_bone, ps);\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}\n\n\tint target_bone_idx = ive->get_bone();\n\n\tVector<Ref<SkeletonModelEntry> > &entries = _entries.write[target_bone_idx];\n\n\tfor (int i = 0; i < entries.size(); ++i) {\n\t\tRef<SkeletonModelEntry> e = entries.get(i);\n\n\t\tif (e->get_entry() == ive) {\n\t\t\te->set_count(e->get_count() - 1);\n\n\t\t\tif (e->get_count() <= 0) {\n\t\t\t\tentries.remove_at(i);\n\n\t\t\t\t_model_dirty = true;\n\t\t\t\tset_process(true);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nRef<SkeletonModelEntry> CharacterSkeleton3D::get_model_entry(const int bone_index, const int index) {\n\tERR_FAIL_INDEX_V(bone_index, _entries.size(), Ref<SkeletonModelEntry>());\n\tERR_FAIL_INDEX_V(index, _entries[bone_index].size(), Ref<SkeletonModelEntry>());\n\n\treturn _entries[bone_index].get(index);\n}\nint CharacterSkeleton3D::get_model_entry_count(const int bone_index) {\n\tERR_FAIL_INDEX_V(bone_index, _entries.size(), 0);\n\n\treturn _entries[bone_index].size();\n}\n\nvoid CharacterSkeleton3D::sort_layers() {\n\tfor (int i = 0; i < _entries.size(); ++i) {\n\t\tVector<Ref<SkeletonModelEntry> > &entries = _entries.write[i];\n\n\t\tentries.sort_custom<_ModelEntryComparator>();\n\t}\n}\n\nvoid CharacterSkeleton3D::build_model() {\n\tcall(\"_build_model\");\n}\n\nvoid CharacterSkeleton3D::_build_model() {\n\tset_process(false);\n}\n\nArray CharacterSkeleton3D::merge_mesh_array(Array arr) const {\n\tERR_FAIL_COND_V(arr.size() != VisualServer::ARRAY_MAX, arr);\n\n\tPoolVector3Array verts = arr[VisualServer::ARRAY_VERTEX];\n\tPoolVector3Array normals = arr[VisualServer::ARRAY_NORMAL];\n\tPoolVector2Array uvs = arr[VisualServer::ARRAY_TEX_UV];\n\tPoolColorArray colors = arr[VisualServer::ARRAY_COLOR];\n\tPoolIntArray indices = arr[VisualServer::ARRAY_INDEX];\n\tPoolIntArray bones = arr[VisualServer::ARRAY_BONES];\n\tPoolRealArray weights = arr[VisualServer::ARRAY_WEIGHTS];\n\n\tint i = 0;\n\twhile (i < verts.size()) {\n\t\tVector3 v = verts[i];\n\n\t\tArray equals;\n\t\tfor (int j = i + 1; j < verts.size(); ++j) {\n\t\t\tVector3 vc = verts[j];\n\n\t\t\tif (Math::is_equal_approx(v.x, vc.x) && Math::is_equal_approx(v.y, vc.y) && Math::is_equal_approx(v.z, vc.z))\n\t\t\t\tequals.push_back(j);\n\t\t}\n\n\t\tfor (int k = 0; k < equals.size(); ++k) {\n\t\t\tint rem = equals[k];\n\t\t\tint remk = rem - k;\n\n\t\t\tverts.remove_at(remk);\n\t\t\tnormals.remove_at(remk);\n\t\t\tuvs.remove_at(remk);\n\t\t\tcolors.remove_at(remk);\n\n\t\t\tint bindex = remk * 4;\n\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\tbones.remove_at(bindex);\n\t\t\t\tweights.remove_at(bindex);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < indices.size(); ++j) {\n\t\t\t\tint indx = indices[j];\n\n\t\t\t\tif (indx == remk)\n\t\t\t\t\tindices.set(j, i);\n\t\t\t\telse if (indx > remk)\n\t\t\t\t\tindices.set(j, indx - 1);\n\t\t\t}\n\t\t}\n\n\t\t++i;\n\t}\n\n\tarr[VisualServer::ARRAY_VERTEX] = verts;\n\tarr[VisualServer::ARRAY_NORMAL] = normals;\n\tarr[VisualServer::ARRAY_TEX_UV] = uvs;\n\tarr[VisualServer::ARRAY_COLOR] = colors;\n\tarr[VisualServer::ARRAY_INDEX] = indices;\n\tarr[VisualServer::ARRAY_BONES] = bones;\n\tarr[VisualServer::ARRAY_WEIGHTS] = weights;\n\n\treturn arr;\n}\nArray CharacterSkeleton3D::bake_mesh_array_uv(Array arr, Ref<Texture> tex, float mul_color) const {\n\tERR_FAIL_COND_V(arr.size() != VisualServer::ARRAY_MAX, arr);\n\tERR_FAIL_COND_V(!tex.is_valid(), arr);\n\n\tRef<Image> img = tex->get_image();\n\n\tERR_FAIL_COND_V(!img.is_valid(), arr);\n\n\tVector2 imgsize = img->get_size();\n\n\tPoolVector2Array uvs = arr[VisualServer::ARRAY_TEX_UV];\n\tPoolColorArray colors = arr[VisualServer::ARRAY_COLOR];\n\n#if !GODOT4\n\timg->lock();\n#endif\n\n\tfor (int i = 0; i < uvs.size(); ++i) {\n\t\tVector2 uv = uvs[i];\n\t\tuv *= imgsize;\n\n\t\tColor c = img->get_pixelv(uv);\n\n\t\tcolors.set(i, colors[i] * c * mul_color);\n\t}\n\n#if !GODOT4\n\timg->unlock();\n#endif\n\n\tarr[VisualServer::ARRAY_COLOR] = colors;\n\n\treturn arr;\n}\n\nCharacterSkeleton3D::CharacterSkeleton3D() {\n\t_model_dirty = false;\n\t_model_index = 0;\n\t_entity_type = 0;\n\n\t_animation_player = NULL;\n\t_animation_tree = NULL;\n}\n\nCharacterSkeleton3D::~CharacterSkeleton3D() {\n\t_attach_point_nodes.clear();\n\n\tfor (int i = 0; i < _entries.size(); ++i) {\n\t\t_entries.write[i].clear();\n\t}\n\n\t_entries.clear();\n\n\t_model_visuals.clear();\n}\n\nvoid CharacterSkeleton3D::_notification(int p_what) {\n\tswitch (p_what) {\n\t\tcase NOTIFICATION_ENTER_TREE: {\n\t\t\tupdate_nodes();\n\t\t} break;\n\t\tcase NOTIFICATION_PROCESS: {\n\t\t\tif (_model_dirty)\n\t\t\t\tbuild_model();\n\t\t} break;\n\t\tcase NOTIFICATION_EXIT_TREE: {\n\t\t} break;\n\t}\n}\n\nbool CharacterSkeleton3D::_set(const StringName &p_name, const Variant &p_value) {\n\tString name = p_name;\n\n\tif (name.begins_with(\"attach_point_paths\")) {\n\t\tint index = name.get_slicec('/', 1).get_slicec('_', 0).to_int();\n\n\t\tif (index >= _attach_point_nodes.size()) {\n\t\t\t_attach_point_nodes.resize(index + 1);\n\t\t}\n\n\t\tNodePath np = p_value;\n\n\t\t_attach_point_nodes.write[index].path = np;\n\n\t\tif (is_inside_tree())\n\t\t\t_attach_point_nodes.write[index].node = get_node_or_null(p_value);\n\n\t\treturn true;\n\t} else if (name.begins_with(\"bone_model_additional_mesh_transforms\")) {\n\t\tint index = name.get_slicec('/', 1).to_int();\n\n\t\tif (index >= _bone_model_additional_mesh_transforms.size()) {\n\t\t\t_bone_model_additional_mesh_transforms.resize(index + 1);\n\t\t}\n\n\t\tString p = name.get_slicec('/', 2);\n\n\t\tif (p == \"bone_index\") {\n\t\t\tint bi = p_value;\n\n\t\t\t_bone_model_additional_mesh_transforms.write[index].bone_index = bi;\n\n\t\t\treturn true;\n\t\t} else if (p == \"transform\") {\n\t\t\tTransform3D tf = p_value;\n\n\t\t\t_bone_model_additional_mesh_transforms.write[index].transform = tf;\n\n\t\t\treturn true;\n\t\t} else if (p == \"user_transform\") {\n\t\t\tTransform3D tf = p_value;\n\n\t\t\t_bone_model_additional_mesh_transforms.write[index].user_transform = tf;\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn false;\n}\nbool CharacterSkeleton3D::_get(const StringName &p_name, Variant &r_ret) const {\n\tString name = p_name;\n\n\tif (name.begins_with(\"attach_point_paths\")) {\n\t\tint index = name.get_slicec('/', 1).get_slicec('_', 0).to_int();\n\n\t\tif (index >= _attach_point_nodes.size()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tr_ret = _attach_point_nodes[index].path;\n\n\t\treturn true;\n\t} else if (name.begins_with(\"bone_model_additional_mesh_transforms\")) {\n\t\tint index = name.get_slicec('/', 1).to_int();\n\n\t\tif (index >= _bone_model_additional_mesh_transforms.size()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tString p = name.get_slicec('/', 2);\n\n\t\tif (p == \"bone_index\") {\n\t\t\tr_ret = _bone_model_additional_mesh_transforms[index].bone_index;\n\n\t\t\treturn true;\n\t\t} else if (p == \"transform\") {\n\t\t\tr_ret = _bone_model_additional_mesh_transforms[index].transform;\n\n\t\t\treturn true;\n\t\t} else if (p == \"user_transform\") {\n\t\t\tr_ret = _bone_model_additional_mesh_transforms[index].user_transform;\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn false;\n}\nvoid CharacterSkeleton3D::_get_property_list(List<PropertyInfo> *p_list) const {\n\tif (ESS::get_singleton()->skeletons_bone_attachments_count() == 0) {\n\t\treturn;\n\t}\n\n\tString bones = ESS::get_singleton()->skeletons_bone_attachment_index_get(_entity_type);\n\tint slicec = bones.get_slice_count(\",\");\n\n\tfor (int i = 0; i < slicec; ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::NODE_PATH, \"attach_point_paths/\" + itos(i) + \"_\" + bones.get_slicec(',', i)));\n\t}\n\n\tfor (int i = 0; i < _bone_model_additional_mesh_transforms.size(); ++i) {\n\t\tp_list->push_back(PropertyInfo(Variant::INT, \"bone_model_additional_mesh_transforms/\" + itos(i) + \"/bone_index\", PROPERTY_HINT_ENUM, ESS::get_singleton()->skeletons_bones_index_get(_entity_type)));\n\t\tp_list->push_back(PropertyInfo(Variant::TRANSFORM3D, \"bone_model_additional_mesh_transforms/\" + itos(i) + \"/transform\"));\n\t\tp_list->push_back(PropertyInfo(Variant::TRANSFORM3D, \"bone_model_additional_mesh_transforms/\" + itos(i) + \"/user_transform\"));\n\t}\n}\n\nvoid CharacterSkeleton3D::_validate_property(PropertyInfo &property) const {\n\tif (property.name == \"entity_type\") {\n\t\tproperty.hint_string = ESS::get_singleton()->entity_types_get();\n\t}\n}\n\nvoid CharacterSkeleton3D::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_entity_type\"), &CharacterSkeleton3D::get_entity_type);\n\tClassDB::bind_method(D_METHOD(\"set_entity_type\", \"value\"), &CharacterSkeleton3D::set_entity_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"entity_type\", PROPERTY_HINT_ENUM, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"set_entity_type\", \"get_entity_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_model_index\"), &CharacterSkeleton3D::get_model_index);\n\tClassDB::bind_method(D_METHOD(\"set_model_index\", \"value\"), &CharacterSkeleton3D::set_model_index);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"model_index\"), \"set_model_index\", \"get_model_index\");\n\n\tClassDB::bind_method(D_METHOD(\"add_model_visual\", \"vis\"), &CharacterSkeleton3D::add_model_visual);\n\tClassDB::bind_method(D_METHOD(\"remove_model_visual\", \"vis\"), &CharacterSkeleton3D::remove_model_visual);\n\tClassDB::bind_method(D_METHOD(\"remove_model_visual_index\", \"index\"), &CharacterSkeleton3D::remove_model_visual_index);\n\tClassDB::bind_method(D_METHOD(\"get_model_visual\", \"index\"), &CharacterSkeleton3D::get_model_visual);\n\tClassDB::bind_method(D_METHOD(\"get_model_visual_count\"), &CharacterSkeleton3D::get_model_visual_count);\n\tClassDB::bind_method(D_METHOD(\"clear_model_visuals\"), &CharacterSkeleton3D::clear_model_visuals);\n\n\t//GDVIRTUAL_BIND(\"_build_model\");\n\n\tClassDB::bind_method(D_METHOD(\"get_model_dirty\"), &CharacterSkeleton3D::get_model_dirty);\n\tClassDB::bind_method(D_METHOD(\"set_model_dirty\", \"value\"), &CharacterSkeleton3D::set_model_dirty);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"model_dirty\"), \"set_model_dirty\", \"get_model_dirty\");\n\n\tClassDB::bind_method(D_METHOD(\"get_animation_player_path\"), &CharacterSkeleton3D::get_animation_player_path);\n\tClassDB::bind_method(D_METHOD(\"set_animation_player_path\", \"path\"), &CharacterSkeleton3D::set_animation_player_path);\n\tADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, \"animation_player_path\"), \"set_animation_player_path\", \"get_animation_player_path\");\n\n\tClassDB::bind_method(D_METHOD(\"get_animation_tree_path\"), &CharacterSkeleton3D::get_animation_tree_path);\n\tClassDB::bind_method(D_METHOD(\"set_animation_tree_path\", \"path\"), &CharacterSkeleton3D::set_animation_tree_path);\n\tADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, \"animation_tree_path\"), \"set_animation_tree_path\", \"get_animation_tree_path\");\n\n\tClassDB::bind_method(D_METHOD(\"bone_additional_mesh_transform_bone_index_get\", \"index\"), &CharacterSkeleton3D::bone_additional_mesh_transform_bone_index_get);\n\tClassDB::bind_method(D_METHOD(\"bone_additional_mesh_transform_bone_index_set\", \"index\", \"bone_index\"), &CharacterSkeleton3D::bone_additional_mesh_transform_bone_index_set);\n\n\tClassDB::bind_method(D_METHOD(\"bone_additional_mesh_transform_transform_get\", \"index\"), &CharacterSkeleton3D::bone_additional_mesh_transform_transform_get);\n\tClassDB::bind_method(D_METHOD(\"bone_additional_mesh_transform_transform_set\", \"index\", \"transform\"), &CharacterSkeleton3D::bone_additional_mesh_transform_transform_set);\n\n\tClassDB::bind_method(D_METHOD(\"bone_additional_mesh_transform_user_transform_get\", \"index\"), &CharacterSkeleton3D::bone_additional_mesh_transform_user_transform_get);\n\tClassDB::bind_method(D_METHOD(\"bone_additional_mesh_transform_user_transform_set\", \"index\", \"transform\"), &CharacterSkeleton3D::bone_additional_mesh_transform_user_transform_set);\n\n\tClassDB::bind_method(D_METHOD(\"bone_additional_mesh_transform_set_count\", \"size\"), &CharacterSkeleton3D::bone_additional_mesh_transform_set_count);\n\tClassDB::bind_method(D_METHOD(\"bone_additional_mesh_transform_get_count\"), &CharacterSkeleton3D::bone_additional_mesh_transform_get_count);\n\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"bone_additional_mesh_transform_count\", PROPERTY_HINT_NONE, \"\", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), \"bone_additional_mesh_transform_set_count\", \"bone_additional_mesh_transform_get_count\");\n\n\tClassDB::bind_method(D_METHOD(\"add_model_visual_entry\", \"vis\", \"ive\"), &CharacterSkeleton3D::add_model_visual_entry);\n\tClassDB::bind_method(D_METHOD(\"remove_model_visual_entry\", \"vis\", \"ive\"), &CharacterSkeleton3D::remove_model_visual_entry);\n\tClassDB::bind_method(D_METHOD(\"get_model_entry\", \"bone_index\", \"index\"), &CharacterSkeleton3D::get_model_entry);\n\tClassDB::bind_method(D_METHOD(\"get_model_entry_count\", \"bone_index\"), &CharacterSkeleton3D::get_model_entry_count);\n\n\tClassDB::bind_method(D_METHOD(\"sort_layers\"), &CharacterSkeleton3D::sort_layers);\n\n\tClassDB::bind_method(D_METHOD(\"build_model\"), &CharacterSkeleton3D::build_model);\n\tClassDB::bind_method(D_METHOD(\"_build_model\"), &CharacterSkeleton3D::_build_model);\n\n\tClassDB::bind_method(D_METHOD(\"merge_mesh_array\", \"arr\"), &CharacterSkeleton3D::merge_mesh_array);\n\tClassDB::bind_method(D_METHOD(\"bake_mesh_array_uv\", \"arr\", \"tex\", \"mul_color\"), &CharacterSkeleton3D::bake_mesh_array_uv, DEFVAL(0.7));\n\n\t//Bone Paths\n\tClassDB::bind_method(D_METHOD(\"attach_point_path_get\", \"index\"), &CharacterSkeleton3D::attach_point_path_get);\n\tClassDB::bind_method(D_METHOD(\"attach_point_path_set\", \"index\", \"path\"), &CharacterSkeleton3D::attach_point_path_set);\n\n\tClassDB::bind_method(D_METHOD(\"attach_point_node_get\", \"index\"), &CharacterSkeleton3D::attach_point_node_get);\n\n\tClassDB::bind_method(D_METHOD(\"attach_point_count\"), &CharacterSkeleton3D::attach_point_count);\n\n\t//GDVIRTUAL_BIND(\"_common_attach_point_index_get\", \"point\", PROPERTY_HINT_NONE, EntityEnums::BINDING_STRING_COMMON_CHARCATER_SKELETON_POINTS);\n\n\tClassDB::bind_method(D_METHOD(\"common_attach_point_node_get\", \"point\"), &CharacterSkeleton3D::common_attach_point_node_get);\n\tClassDB::bind_method(D_METHOD(\"common_attach_point_add\", \"point\", \"scene\"), &CharacterSkeleton3D::common_attach_point_add);\n\tClassDB::bind_method(D_METHOD(\"common_attach_point_add_timed\", \"point\", \"scene\", \"time\"), &CharacterSkeleton3D::common_attach_point_add_timed);\n\tClassDB::bind_method(D_METHOD(\"common_attach_point_remove\", \"point\", \"scene\"), &CharacterSkeleton3D::common_attach_point_remove);\n\tClassDB::bind_method(D_METHOD(\"common_attach_point_index_get\", \"point\"), &CharacterSkeleton3D::common_attach_point_index_get);\n\tClassDB::bind_method(D_METHOD(\"_common_attach_point_index_get\", \"point\"), &CharacterSkeleton3D::_common_attach_point_index_get);\n\n\tClassDB::bind_method(D_METHOD(\"get_animation_player\"), &CharacterSkeleton3D::get_animation_player);\n\tClassDB::bind_method(D_METHOD(\"get_animation_tree\"), &CharacterSkeleton3D::get_animation_tree);\n\n\tClassDB::bind_method(D_METHOD(\"update_nodes\"), &CharacterSkeleton3D::update_nodes);\n}\n"
  },
  {
    "path": "skeleton/character_skeleton_3d.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef CHARACTER_SKELETON_3D_H\n#define CHARACTER_SKELETON_3D_H\n\n#include \"core/version.h\"\n\n#include \"core/templates/vector.h\"\n#include \"core/string/ustring.h\"\n#include \"core/string/node_path.h\"\n\n\n#include \"scene/main/node.h\"\n\n#include \"scene/animation/animation_player.h\"\n#include \"scene/animation/animation_tree.h\"\n\n#include \"../entity_enums.h\"\n#include \"skeleton_model_entry.h\"\n\n#include \"../data/items/model_visual_entry.h\"\n\n#include \"../defines.h\"\n\n#include spatial_h_path\n\n#if GODOT4\n#define Texture Texture2D\n#endif\n\nclass ModelVisual;\n\n//Rename to HumanoidCharSkeleton -> maybe make that a subclass?\nclass CharacterSkeleton3D : public Spatial {\n\tGDCLASS(CharacterSkeleton3D, Spatial);\n\npublic:\n\tint get_entity_type() const;\n\tvoid set_entity_type(const int value);\n\n\tint get_model_index();\n\tvoid set_model_index(int value);\n\n\tbool get_model_dirty() const;\n\tvoid set_model_dirty(bool value);\n\n\tNodePath attach_point_path_get(const int index) const;\n\tvoid attach_point_path_set(const int index, const NodePath &path);\n\n\tNode *attach_point_node_get(const int index);\n\n\tint attach_point_count() const;\n\n\tNode *common_attach_point_node_get(const EntityEnums::CommonCharacterSkeletonPoints point);\n\tvoid common_attach_point_add(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene);\n\tvoid common_attach_point_add_timed(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene, const float time);\n\tvoid common_attach_point_remove(const EntityEnums::CommonCharacterSkeletonPoints point, const Ref<PackedScene> &scene);\n\tint common_attach_point_index_get(const EntityEnums::CommonCharacterSkeletonPoints point);\n\tvirtual int _common_attach_point_index_get(const EntityEnums::CommonCharacterSkeletonPoints point);\n\n\tNodePath get_animation_player_path();\n\tvoid set_animation_player_path(NodePath path);\n\n\tAnimationPlayer *get_animation_player();\n\n\tNodePath get_animation_tree_path();\n\tvoid set_animation_tree_path(NodePath path);\n\n\tAnimationTree *get_animation_tree();\n\n\tvoid update_nodes();\n\n\tint bone_additional_mesh_transform_bone_index_get(const int index) const;\n\tvoid bone_additional_mesh_transform_bone_index_set(const int index, const int bone_index);\n\n\tTransform3D bone_additional_mesh_transform_transform_get(const int index) const;\n\tvoid bone_additional_mesh_transform_transform_set(const int index, const Transform3D &transform);\n\n\tTransform3D bone_additional_mesh_transform_user_transform_get(const int index) const;\n\tvoid bone_additional_mesh_transform_user_transform_set(const int index, const Transform3D &transform);\n\n\tvoid bone_additional_mesh_transform_set_count(const int size);\n\tint bone_additional_mesh_transform_get_count() const;\n\n\tvoid add_model_visual(Ref<ModelVisual> vis);\n\tvoid remove_model_visual(Ref<ModelVisual> vis);\n\tvoid remove_model_visual_index(int index);\n\tRef<ModelVisual> get_model_visual(int index);\n\tint get_model_visual_count();\n\tvoid clear_model_visuals();\n\n\tvoid add_model_visual_entry(Ref<ModelVisual> vis, Ref<ModelVisualEntry> ive);\n\tvoid remove_model_visual_entry(Ref<ModelVisual> vis, Ref<ModelVisualEntry> ive);\n\n\tRef<SkeletonModelEntry> get_model_entry(const int bone_index, const int index);\n\tint get_model_entry_count(const int bone_index);\n\n\tvoid sort_layers();\n\n\tvoid build_model();\n\tvoid _build_model();\n\n\tArray merge_mesh_array(Array arr) const;\n\tArray bake_mesh_array_uv(Array arr, Ref<Texture> tex, float mul_color = 0.7) const;\n\n\tCharacterSkeleton3D();\n\t~CharacterSkeleton3D();\n\nprotected:\n\tbool _set(const StringName &p_name, const Variant &p_value);\n\tbool _get(const StringName &p_name, Variant &r_ret) const;\n\tvoid _get_property_list(List<PropertyInfo> *p_list) const;\n\tvoid _validate_property(PropertyInfo &property) const;\n\tstatic void _bind_methods();\n\tvirtual void _notification(int p_notification);\n\nprotected:\n\tstruct _ModelEntryComparator {\n\t\t_FORCE_INLINE_ bool operator()(const Ref<SkeletonModelEntry> &a, const Ref<SkeletonModelEntry> &b) const {\n\t\t\tif (!a.is_valid() || !b.is_valid()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn (a->get_priority() > b->get_priority());\n\t\t}\n\t};\n\n\tstruct AttachPointNode {\n\t\tNodePath path;\n\t\tNode *node;\n\n\t\tAttachPointNode() {\n\t\t\tnode = NULL;\n\t\t}\n\t};\n\n\tstruct BoneModelAdditionalMeshTransforms {\n\t\tint bone_index;\n\t\tTransform3D transform;\n\t\tTransform3D user_transform;\n\n\t\tBoneModelAdditionalMeshTransforms() {\n\t\t\tbone_index = 0;\n\t\t}\n\t};\n\nprivate:\n\tint _entity_type;\n\tint _model_index;\n\tNodePath _animation_player_path;\n\tNodePath _animation_tree_path;\n\n\tAnimationPlayer *_animation_player;\n\tAnimationTree *_animation_tree;\n\n\tVector<AttachPointNode> _attach_point_nodes;\n\n\tVector<BoneModelAdditionalMeshTransforms> _bone_model_additional_mesh_transforms;\n\n\tbool _model_dirty;\n\tVector<Ref<ModelVisual> > _model_visuals;\n\tVector<Vector<Ref<SkeletonModelEntry> > > _entries;\n};\n\n#endif\n"
  },
  {
    "path": "skeleton/entity_skeleton_data.cpp",
    "content": ""
  },
  {
    "path": "skeleton/entity_skeleton_data.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_SKELETON_DATA_H\n#define ENTITY_SKELETON_DATA_H\n\n#include \"core/version.h\"\n\n#include \"core/io/resource.h\"\n#include \"core/string/ustring.h\"\n\n\nclass EntitySkeletonData : public Resource {\n\tGDCLASS(EntitySkeletonData, Resource);\n\npublic:\nprotected:\n\tstatic void _bind_methods();\n\n\tenum {\n\t\tMAX_ENTRIES = 20\n\t};\n\n\tstruct ESDataEntry {\n\t\tRef<CharacterSkeletonVisualEntry> entry;\n\t\tVector3 offset;\n\t\tVector3 rotation;\n\t\tVector3 scale;\n\t};\n\nprivate:\n\tESDataEntry _entries[MAX_ENTRIES];\n};\n\n#endif\n"
  },
  {
    "path": "skeleton/skeleton_model_entry.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"skeleton_model_entry.h\"\n\nint SkeletonModelEntry::get_count() const {\n\treturn _count;\n}\nvoid SkeletonModelEntry::set_count(const int value) {\n\t_count = value;\n}\n\nint SkeletonModelEntry::get_priority() const {\n\treturn _priority;\n}\nvoid SkeletonModelEntry::set_priority(const int value) {\n\t_priority = value;\n}\n\nColor SkeletonModelEntry::get_color() const {\n\treturn _color;\n}\nvoid SkeletonModelEntry::set_color(const Color value) {\n\t_color = value;\n}\n\nRef<ModelVisualEntry> SkeletonModelEntry::get_entry() {\n\treturn _entry;\n}\nvoid SkeletonModelEntry::set_entry(Ref<ModelVisualEntry> entry) {\n\t_entry = entry;\n}\n\nSkeletonModelEntry::SkeletonModelEntry() {\n\t_count = 1;\n\t_priority = 0;\n\t_color = Color(1, 1, 1, 1);\n}\n\nSkeletonModelEntry::~SkeletonModelEntry() {\n\t_entry.unref();\n}\n\nvoid SkeletonModelEntry::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_count\"), &SkeletonModelEntry::get_count);\n\tClassDB::bind_method(D_METHOD(\"set_count\", \"value\"), &SkeletonModelEntry::set_count);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"count\"), \"set_count\", \"get_count\");\n\n\tClassDB::bind_method(D_METHOD(\"get_priority\"), &SkeletonModelEntry::get_priority);\n\tClassDB::bind_method(D_METHOD(\"set_priority\", \"value\"), &SkeletonModelEntry::set_priority);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"priority\"), \"set_priority\", \"get_priority\");\n\n\tClassDB::bind_method(D_METHOD(\"get_color\"), &SkeletonModelEntry::get_color);\n\tClassDB::bind_method(D_METHOD(\"set_color\", \"value\"), &SkeletonModelEntry::set_color);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"color\"), \"set_color\", \"get_color\");\n\n\tClassDB::bind_method(D_METHOD(\"get_entry\"), &SkeletonModelEntry::get_entry);\n\tClassDB::bind_method(D_METHOD(\"set_entry\", \"path\"), &SkeletonModelEntry::set_entry);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"entry\", PROPERTY_HINT_RESOURCE_TYPE, \"ModelVisualEntry\"), \"set_entry\", \"get_entry\");\n}\n"
  },
  {
    "path": "skeleton/skeleton_model_entry.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SKELETON_MODEL_ENTRY_H\n#define SKELETON_MODEL_ENTRY_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n\n\n#include \"../data/items/model_visual_entry.h\"\n\nclass SkeletonModelEntry : public RefCounted {\n\tGDCLASS(SkeletonModelEntry, RefCounted);\n\npublic:\n\tint get_count() const;\n\tvoid set_count(const int value);\n\n\tint get_priority() const;\n\tvoid set_priority(const int value);\n\n\tColor get_color() const;\n\tvoid set_color(const Color value);\n\n\tRef<ModelVisualEntry> get_entry();\n\tvoid set_entry(Ref<ModelVisualEntry> entry);\n\n\tSkeletonModelEntry();\n\t~SkeletonModelEntry();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _count;\n\tint _priority;\n\tColor _color;\n\tRef<ModelVisualEntry> _entry;\n};\n\n#endif\n"
  },
  {
    "path": "spawners/ess_entity_spawner.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"ess_entity_spawner.h\"\n\n#include \"../singletons/ess.h\"\n\n#include \"../utility/entity_create_info.h\"\n\n_FORCE_INLINE_ void ESSEntitySpawner::request_entity_spawn(Ref<EntityCreateInfo> info) {\n\tif (has_method(\"_request_entity_spawn\"))\n\t\tcall(\"_request_entity_spawn\", info);\n\n\temit_signal(\"on_entity_spawn\", info);\n}\n_FORCE_INLINE_ void ESSEntitySpawner::request_entity_spawn_deferred(Ref<EntityCreateInfo> info) {\n\tcall_deferred(\"request_entity_spawn\", info);\n}\n\nESSEntitySpawner::ESSEntitySpawner() {\n\tif (ESS::get_singleton()) {\n\t\tESS::get_singleton()->set_entity_spawner(this);\n\t}\n}\n\nESSEntitySpawner::~ESSEntitySpawner() {\n\tif (ESS::get_singleton() && ESS::get_singleton()->get_entity_spawner() == this) {\n\t\tESS::get_singleton()->set_entity_spawner(NULL);\n\t}\n}\n\nvoid ESSEntitySpawner::_bind_methods() {\n\t//GDVIRTUAL_BIND(\"_request_entity_spawn\", \"info\", \"EntityCreateInfo\");\n\tADD_SIGNAL(MethodInfo(\"on_entity_spawn\", PropertyInfo(Variant::OBJECT, \"info\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityCreateInfo\")));\n\n\tClassDB::bind_method(D_METHOD(\"request_entity_spawn\", \"info\"), &ESSEntitySpawner::request_entity_spawn);\n\tClassDB::bind_method(D_METHOD(\"request_entity_spawn_deferred\", \"info\"), &ESSEntitySpawner::request_entity_spawn_deferred);\n}\n"
  },
  {
    "path": "spawners/ess_entity_spawner.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ESS_ENTITY_SPAWNER_H\n#define ESS_ENTITY_SPAWNER_H\n\n#include \"scene/main/node.h\"\n\n#include \"scene/main/scene_tree.h\"\n\nclass EntityCreateInfo;\n\nclass ESSEntitySpawner : public Node {\n\tGDCLASS(ESSEntitySpawner, Node);\n\npublic:\n\tvoid request_entity_spawn(Ref<EntityCreateInfo> info);\n\tvoid request_entity_spawn_deferred(Ref<EntityCreateInfo> info);\n\n\tESSEntitySpawner();\n\t~ESSEntitySpawner();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n};\n\n#endif\n"
  },
  {
    "path": "spell_enums.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"spell_enums.h\"\n\nconst String SpellEnums::BINDING_STRING_SPELL_TYPES = \"Melee,Holy,Shadow,Nature,Fire,Frost,Lightning,Chaos\";\nconst String SpellEnums::BINDING_STRING_SPELL_CATEGORY = \"Normal,Alchemy,Cooking,Engineering,Crafting,Hidden,Development\";\nconst String SpellEnums::BINDING_STRING_TRIGGER_EVENTS = \"None,S On Before Damage,S On Damage Receive,S On Hit,S On Damage Dealt,S Aura Remove,S Aura Dispell,S On Before Aura Applied,S On After Aura Applied,C On Aura Added,C On Aura Removed,C On Aura Refreshed\";\nconst String SpellEnums::BINDING_STRING_DAMAGE_TYPES = \"Melee,Holy,Shadow,Nature,Fire,Frost,Lightning,Chaos\";\nconst String SpellEnums::BINDING_STRING_AURA_TYPES = \"None,Magic,Poison,Physical,Curse,Bleed,Talent,Skill\";\nconst String SpellEnums::BINDING_STRING_AURA_FLAG_TYPES = \"Magic,Poison,Physical,Curse,Bleed,Talent,Skill\";\nconst String SpellEnums::BINDING_STRING_COLLIDER_TYPE = \"None,Sphere,Box\";\nconst String SpellEnums::BINDING_STRING_TARGET_TYPE = \"None,Node,Bone ID,Coords\";\nconst String SpellEnums::BINDING_STRING_TRIGGER_TYPE = \"None,Percent,PPM\";\nconst String SpellEnums::BINDING_STRING_TRIGGER_NOTIFICATION_TYPE = \"Aura,Damage,Heal,Cast,Death,Cooldown Added,Cooldown Removed,Category CooldownAdded,Category CooldownRemoved,GCD Started,GCD Removed,XP Gained,Class Levelup,Character Levelup,Entity Resource Added,Entity Resource Removed,Aura Custom,Damage Custom,Heal Custom,Cast Custom,Custom\";\n\nconst String SpellEnums::BINDING_STRING_NOTIFICATION_AURAS = \"Before Applied,After Applied,Applied,Added,Removed,Refreshed\";\nconst String SpellEnums::BINDING_STRING_NOTIFICATION_DAMAGES = \"Before Hit,Hit,Before Damage,Receive,Dealt Damage,Damage Dealt,Damage\";\nconst String SpellEnums::BINDING_STRING_NOTIFICATION_HEALS = \"Heal Hit,Before Heal,Receive,Dealt Heal,Heal Dealt\";\nconst String SpellEnums::BINDING_STRING_NOTIFICATION_CASTS = \"Before,Before Cast Target,Finished Target,Finished,Started,Failed,Success,Interrupted,Delayed\";\n"
  },
  {
    "path": "spell_enums.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef SPELL_ENUMS_H\n#define SPELL_ENUMS_H\n\n#include \"core/version.h\"\n\n#include \"core/object/object.h\"\n#include \"core/object/class_db.h\"\n\n\nclass SpellEnums : public Object {\n\tGDCLASS(SpellEnums, Object);\n\npublic:\n\tstatic const String BINDING_STRING_SPELL_TYPES;\n\tstatic const String BINDING_STRING_SPELL_CATEGORY;\n\tstatic const String BINDING_STRING_TRIGGER_EVENTS;\n\tstatic const String BINDING_STRING_DAMAGE_TYPES;\n\tstatic const String BINDING_STRING_AURA_TYPES;\n\tstatic const String BINDING_STRING_AURA_FLAG_TYPES;\n\tstatic const String BINDING_STRING_COLLIDER_TYPE;\n\tstatic const String BINDING_STRING_TARGET_TYPE;\n\tstatic const String BINDING_STRING_TRIGGER_TYPE;\n\tstatic const String BINDING_STRING_TRIGGER_NOTIFICATION_TYPE;\n\n\tstatic const String BINDING_STRING_NOTIFICATION_AURAS;\n\tstatic const String BINDING_STRING_NOTIFICATION_DAMAGES;\n\tstatic const String BINDING_STRING_NOTIFICATION_HEALS;\n\tstatic const String BINDING_STRING_NOTIFICATION_CASTS;\n\n\tenum DamageType {\n\t\tDAMAGE_TYPE_NONE = 0,\n\t\tDAMAGE_TYPE_MELEE = 1 << 0,\n\t\tDAMAGE_TYPE_HOLY = 1 << 1,\n\t\tDAMAGE_TYPE_SHADOW = 1 << 2,\n\t\tDAMAGE_TYPE_NATURE = 1 << 3,\n\t\tDAMAGE_TYPE_FIRE = 1 << 4,\n\t\tDAMAGE_TYPE_FROST = 1 << 5,\n\t\tDAMAGE_TYPE_LIGHTNING = 1 << 6,\n\t\tDAMAGE_TYPE_CHAOS = 1 << 7,\n\t};\n\n\tenum SpellCategory {\n\t\tSPELL_CATEGORY_NORMAL = 0,\n\t\tSPELL_CATEGORY_ALCHEMY = 1,\n\t\tSPELL_CATEGORY_COOKING = 2,\n\t\tSPELL_CATEGORY_ENGINEERING = 3,\n\t\tSPELL_CATEGORY_CRAFTING = 4,\n\t\tSPELL_CATEGORY_HIDDEN = 5,\n\t\tSPELL_CATEGORY_DEVELOPMENT = 6,\n\t};\n\n\tenum SpellType {\n\t\tSPELL_TYPE_NONE = 0,\n\t\tSPELL_TYPE_MELEE = 1 << 0,\n\t\tSPELL_TYPE_HOLY = 1 << 1,\n\t\tSPELL_TYPE_SHADOW = 1 << 2,\n\t\tSPELL_TYPE_NATURE = 1 << 3,\n\t\tSPELL_TYPE_FIRE = 1 << 4,\n\t\tSPELL_TYPE_FROST = 1 << 5,\n\t\tSPELL_TYPE_LIGHTNING = 1 << 6,\n\t\tSPELL_TYPE_CHAOS = 1 << 7,\n\t};\n\n\tenum AuraType {\n\t\tAURA_TYPE_NONE = 0,\n\t\tAURA_TYPE_MAGIC = 1 << 0,\n\t\tAURA_TYPE_POISON = 1 << 1,\n\t\tAURA_TYPE_PHYSICAL = 1 << 2,\n\t\tAURA_TYPE_CURSE = 1 << 3,\n\t\tAURA_TYPE_BLEED = 1 << 4,\n\t\tAURA_TYPE_TALENT = 1 << 5,\n\t\tAURA_TYPE_SKILL = 1 << 6,\n\t};\n\n\tenum ColliderType {\n\t\tCOLLIDER_TYPE_NONE = 0,\n\t\tCOLLIDER_TYPE_SPHERE,\n\t\tCOLLIDER_TYPE_BOX\n\t};\n\n\tenum TargetType {\n\t\tTARGET_TYPE_NONE = 0,\n\t\tTARGET_TYPE_NODE,\n\t\tTARGET_TYPE_BONE_ID,\n\t\tTARGET_TYPE_COORDS,\n\t};\n\n\tenum TriggerType {\n\t\tTRIGGER_TYPE_NONE = 0,\n\t\tTRIGGER_TYPE_PERCENT,\n\t\tTRIGGER_TYPE_PPM,\n\t};\n\n\tenum TriggerNotificationType {\n\t\tTRIGGER_NOTIFICATION_TYPE_AURA = 0,\n\t\tTRIGGER_NOTIFICATION_TYPE_DAMAGE,\n\t\tTRIGGER_NOTIFICATION_TYPE_HEAL,\n\t\tTRIGGER_NOTIFICATION_TYPE_CAST,\n\t\tTRIGGER_NOTIFICATION_TYPE_DEATH,\n\t\tTRIGGER_NOTIFICATION_TYPE_COOLDOWN_ADDED,\n\t\tTRIGGER_NOTIFICATION_TYPE_COOLDOWN_REMOVED,\n\t\tTRIGGER_NOTIFICATION_TYPE_CATEGORY_COOLDOWN_ADDED,\n\t\tTRIGGER_NOTIFICATION_TYPE_CATEGORY_COOLDOWN_REMOVED,\n\t\tTRIGGER_NOTIFICATION_TYPE_GCD_STARTED,\n\t\tTRIGGER_NOTIFICATION_TYPE_GCD_FINISHED,\n\t\tTRIGGER_NOTIFICATION_TYPE_XP_GAINED,\n\t\tTRIGGER_NOTIFICATION_TYPE_CLASS_LEVELUP,\n\t\tTRIGGER_NOTIFICATION_TYPE_CHARACTER_LEVELUP,\n\t\tTRIGGER_NOTIFICATION_TYPE_ENTITY_RESOURCE_ADDED,\n\t\tTRIGGER_NOTIFICATION_TYPE_ENTITY_RESOURCE_REMOVED,\n\t\tTRIGGER_NOTIFICATION_TYPE_AURA_CUSTOM,\n\t\tTRIGGER_NOTIFICATION_TYPE_DAMAGE_CUSTOM,\n\t\tTRIGGER_NOTIFICATION_TYPE_HEAL_CUSTOM,\n\t\tTRIGGER_NOTIFICATION_TYPE_CAST_CUSTOM,\n\t\tTRIGGER_NOTIFICATION_TYPE_CUSTOM,\n\t};\n\n\tenum {\n\t\tNOTIFICATION_AURA_BEFORE_APPLIED = 0,\n\t\tNOTIFICATION_AURA_AFTER_APPLIED,\n\t\tNOTIFICATION_AURA_APPLIED,\n\t\tNOTIFICATION_AURA_ADDED,\n\t\tNOTIFICATION_AURA_REMOVED,\n\t\tNOTIFICATION_AURA_REFRESHED,\n\t};\n\n\tenum {\n\t\tNOTIFICATION_DAMAGE_BEFORE_HIT = 0,\n\t\tNOTIFICATION_DAMAGE_HIT,\n\t\tNOTIFICATION_DAMAGE_BEFORE_DAMAGE,\n\t\tNOTIFICATION_DAMAGE_RECEIVE,\n\t\tNOTIFICATION_DAMAGE_DEALT_DAMAGE,\n\t\tNOTIFICATION_DAMAGE_DAMAGE_DEALT,\n\t\tNOTIFICATION_DAMAGE_DAMAGE,\n\t};\n\n\tenum {\n\t\tNOTIFICATION_HEAL_BEFORE_HIT = 0,\n\t\tNOTIFICATION_HEAL_BEFORE_HEAL,\n\t\tNOTIFICATION_HEAL_RECEIVE,\n\t\tNOTIFICATION_HEAL_DEALT_HEAL,\n\t\tNOTIFICATION_HEAL_HEAL_DEALT,\n\t};\n\n\tenum {\n\t\tNOTIFICATION_CAST_BEFORE = 0,\n\t\tNOTIFICATION_CAST_BEFORE_CAST_TARGET,\n\t\tNOTIFICATION_CAST_FINISHED_TARGET,\n\t\tNOTIFICATION_CAST_FINISHED,\n\t\tNOTIFICATION_CAST_STARTED,\n\t\tNOTIFICATION_CAST_FAILED,\n\t\tNOTIFICATION_CAST_SUCCESS,\n\t\tNOTIFICATION_CAST_INTERRUPTED,\n\t\tNOTIFICATION_CAST_DELAYED,\n\t};\n\n\tSpellEnums() {}\n\nprotected:\n\tstatic void _bind_methods() {\n\t\tBIND_ENUM_CONSTANT(DAMAGE_TYPE_NONE);\n\t\tBIND_ENUM_CONSTANT(DAMAGE_TYPE_MELEE);\n\t\tBIND_ENUM_CONSTANT(DAMAGE_TYPE_HOLY);\n\t\tBIND_ENUM_CONSTANT(DAMAGE_TYPE_SHADOW);\n\t\tBIND_ENUM_CONSTANT(DAMAGE_TYPE_NATURE);\n\t\tBIND_ENUM_CONSTANT(DAMAGE_TYPE_FIRE);\n\t\tBIND_ENUM_CONSTANT(DAMAGE_TYPE_FROST);\n\t\tBIND_ENUM_CONSTANT(DAMAGE_TYPE_LIGHTNING);\n\t\tBIND_ENUM_CONSTANT(DAMAGE_TYPE_CHAOS);\n\n\t\tBIND_ENUM_CONSTANT(SPELL_CATEGORY_NORMAL);\n\t\tBIND_ENUM_CONSTANT(SPELL_CATEGORY_ALCHEMY);\n\t\tBIND_ENUM_CONSTANT(SPELL_CATEGORY_COOKING);\n\t\tBIND_ENUM_CONSTANT(SPELL_CATEGORY_ENGINEERING);\n\t\tBIND_ENUM_CONSTANT(SPELL_CATEGORY_CRAFTING);\n\t\tBIND_ENUM_CONSTANT(SPELL_CATEGORY_HIDDEN);\n\t\tBIND_ENUM_CONSTANT(SPELL_CATEGORY_DEVELOPMENT);\n\n\t\tBIND_ENUM_CONSTANT(SPELL_TYPE_NONE);\n\t\tBIND_ENUM_CONSTANT(SPELL_TYPE_MELEE);\n\t\tBIND_ENUM_CONSTANT(SPELL_TYPE_HOLY);\n\t\tBIND_ENUM_CONSTANT(SPELL_TYPE_SHADOW);\n\t\tBIND_ENUM_CONSTANT(SPELL_TYPE_NATURE);\n\t\tBIND_ENUM_CONSTANT(SPELL_TYPE_FIRE);\n\t\tBIND_ENUM_CONSTANT(SPELL_TYPE_FROST);\n\t\tBIND_ENUM_CONSTANT(SPELL_TYPE_LIGHTNING);\n\t\tBIND_ENUM_CONSTANT(SPELL_TYPE_CHAOS);\n\n\t\tBIND_ENUM_CONSTANT(AURA_TYPE_NONE);\n\t\tBIND_ENUM_CONSTANT(AURA_TYPE_MAGIC);\n\t\tBIND_ENUM_CONSTANT(AURA_TYPE_POISON);\n\t\tBIND_ENUM_CONSTANT(AURA_TYPE_PHYSICAL);\n\t\tBIND_ENUM_CONSTANT(AURA_TYPE_CURSE);\n\t\tBIND_ENUM_CONSTANT(AURA_TYPE_BLEED);\n\t\tBIND_ENUM_CONSTANT(AURA_TYPE_TALENT);\n\t\tBIND_ENUM_CONSTANT(AURA_TYPE_SKILL);\n\n\t\tBIND_ENUM_CONSTANT(COLLIDER_TYPE_NONE);\n\t\tBIND_ENUM_CONSTANT(COLLIDER_TYPE_SPHERE);\n\t\tBIND_ENUM_CONSTANT(COLLIDER_TYPE_BOX);\n\n\t\tBIND_ENUM_CONSTANT(TARGET_TYPE_NONE);\n\t\tBIND_ENUM_CONSTANT(TARGET_TYPE_NODE);\n\t\tBIND_ENUM_CONSTANT(TARGET_TYPE_BONE_ID);\n\t\tBIND_ENUM_CONSTANT(TARGET_TYPE_COORDS);\n\n\t\tBIND_ENUM_CONSTANT(TRIGGER_TYPE_NONE);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_TYPE_PERCENT);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_TYPE_PPM);\n\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_AURA);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_DAMAGE);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_HEAL);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_CAST);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_DEATH);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_COOLDOWN_ADDED);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_COOLDOWN_REMOVED);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_CATEGORY_COOLDOWN_ADDED);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_CATEGORY_COOLDOWN_REMOVED);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_GCD_STARTED);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_GCD_FINISHED);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_XP_GAINED);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_CLASS_LEVELUP);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_CHARACTER_LEVELUP);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_ENTITY_RESOURCE_ADDED);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_ENTITY_RESOURCE_REMOVED);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_AURA_CUSTOM);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_DAMAGE_CUSTOM);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_HEAL_CUSTOM);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_CAST_CUSTOM);\n\t\tBIND_ENUM_CONSTANT(TRIGGER_NOTIFICATION_TYPE_CUSTOM);\n\n\t\tBIND_CONSTANT(NOTIFICATION_AURA_BEFORE_APPLIED);\n\t\tBIND_CONSTANT(NOTIFICATION_AURA_AFTER_APPLIED);\n\t\tBIND_CONSTANT(NOTIFICATION_AURA_APPLIED);\n\t\tBIND_CONSTANT(NOTIFICATION_AURA_ADDED);\n\t\tBIND_CONSTANT(NOTIFICATION_AURA_REMOVED);\n\t\tBIND_CONSTANT(NOTIFICATION_AURA_REFRESHED);\n\n\t\tBIND_CONSTANT(NOTIFICATION_DAMAGE_BEFORE_HIT);\n\t\tBIND_CONSTANT(NOTIFICATION_DAMAGE_HIT);\n\t\tBIND_CONSTANT(NOTIFICATION_DAMAGE_BEFORE_DAMAGE);\n\t\tBIND_CONSTANT(NOTIFICATION_DAMAGE_RECEIVE);\n\t\tBIND_CONSTANT(NOTIFICATION_DAMAGE_DEALT_DAMAGE);\n\t\tBIND_CONSTANT(NOTIFICATION_DAMAGE_DAMAGE_DEALT);\n\n\t\tBIND_CONSTANT(NOTIFICATION_HEAL_BEFORE_HIT);\n\t\tBIND_CONSTANT(NOTIFICATION_HEAL_BEFORE_HEAL);\n\t\tBIND_CONSTANT(NOTIFICATION_HEAL_RECEIVE);\n\t\tBIND_CONSTANT(NOTIFICATION_HEAL_DEALT_HEAL);\n\t\tBIND_CONSTANT(NOTIFICATION_HEAL_HEAL_DEALT);\n\n\t\tBIND_CONSTANT(NOTIFICATION_CAST_BEFORE);\n\t\tBIND_CONSTANT(NOTIFICATION_CAST_BEFORE_CAST_TARGET);\n\t\tBIND_CONSTANT(NOTIFICATION_CAST_FINISHED_TARGET);\n\t\tBIND_CONSTANT(NOTIFICATION_CAST_FINISHED);\n\t\tBIND_CONSTANT(NOTIFICATION_CAST_STARTED);\n\t\tBIND_CONSTANT(NOTIFICATION_CAST_FAILED);\n\t\tBIND_CONSTANT(NOTIFICATION_CAST_SUCCESS);\n\t\tBIND_CONSTANT(NOTIFICATION_CAST_INTERRUPTED);\n\t\tBIND_CONSTANT(NOTIFICATION_CAST_DELAYED);\n\t}\n};\n\nVARIANT_ENUM_CAST(SpellEnums::SpellType);\nVARIANT_ENUM_CAST(SpellEnums::SpellCategory);\nVARIANT_ENUM_CAST(SpellEnums::DamageType);\nVARIANT_ENUM_CAST(SpellEnums::AuraType);\nVARIANT_ENUM_CAST(SpellEnums::ColliderType);\nVARIANT_ENUM_CAST(SpellEnums::TargetType);\nVARIANT_ENUM_CAST(SpellEnums::TriggerNotificationType);\nVARIANT_ENUM_CAST(SpellEnums::TriggerType);\n\n#endif\n"
  },
  {
    "path": "utility/entity_create_info.cpp",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#include \"entity_create_info.h\"\n\n#include \"core/version.h\"\n\n#include \"../data/species/species_instance.h\"\n#include \"../entities/data/entity_data.h\"\n#include \"../entities/entity.h\"\n\nint EntityCreateInfo::get_guid() const {\n\treturn _guid;\n}\nvoid EntityCreateInfo::set_guid(const int value) {\n\t_guid = value;\n}\n\nbool EntityCreateInfo::get_networked() const {\n\treturn _networked;\n}\nvoid EntityCreateInfo::set_networked(const bool value) {\n\t_networked = value;\n}\n\nint EntityCreateInfo::get_class_id() const {\n\treturn _class_id;\n}\nvoid EntityCreateInfo::set_class_id(const int value) {\n\t_class_id = value;\n}\n\nint EntityCreateInfo::get_entity_player_type() {\n\treturn _entity_player_type;\n}\nvoid EntityCreateInfo::set_entity_player_type(int value) {\n\t_entity_player_type = value;\n}\n\nint EntityCreateInfo::get_network_owner() const {\n\treturn _network_owner;\n}\nvoid EntityCreateInfo::set_network_owner(const int value) {\n\t_network_owner = value;\n}\n\nEntityEnums::EntityController EntityCreateInfo::get_entity_controller() const {\n\treturn _entity_controller;\n}\nvoid EntityCreateInfo::set_entity_controller(const EntityEnums::EntityController value) {\n\t_entity_controller = value;\n}\n\nString EntityCreateInfo::get_entity_name() const {\n\treturn _entity_name;\n}\nvoid EntityCreateInfo::set_entity_name(const String &value) {\n\t_entity_name = value;\n}\n\nString EntityCreateInfo::get_node_name() const {\n\treturn _node_name;\n}\nvoid EntityCreateInfo::set_node_name(const String &value) {\n\t_node_name = value;\n}\n\nint EntityCreateInfo::get_level() const {\n\treturn _level;\n}\nvoid EntityCreateInfo::set_level(const int value) {\n\t_level = value;\n}\n\nint EntityCreateInfo::get_xp() const {\n\treturn _xp;\n}\nvoid EntityCreateInfo::set_xp(const int value) {\n\t_xp = value;\n}\n\nTransform3D EntityCreateInfo::get_transform() const {\n\treturn _transform;\n}\nvoid EntityCreateInfo::set_transform(const Transform3D &value) {\n\t_transform = value;\n}\n\nTransform2D EntityCreateInfo::get_transform2d() const {\n\treturn _transform2d;\n}\nvoid EntityCreateInfo::set_transform2d(const Transform2D &value) {\n\t_transform2d = value;\n}\n\nRef<EntityData> EntityCreateInfo::get_entity_data() const {\n\treturn _entity_data;\n}\nvoid EntityCreateInfo::set_entity_data(const Ref<EntityData> &value) {\n\t_entity_data = value;\n}\n\nRef<SpeciesInstance> EntityCreateInfo::get_species_instance() {\n\treturn _species_instance;\n}\nvoid EntityCreateInfo::set_species_instance(const Ref<SpeciesInstance> &value) {\n\t_species_instance = value;\n}\n\nDictionary EntityCreateInfo::get_serialized_data() {\n\treturn _serialized_data;\n}\nvoid EntityCreateInfo::set_serialized_data(const Dictionary &value) {\n\t_serialized_data = value;\n}\n\nNodePath EntityCreateInfo::get_parent_path() const {\n\treturn _parent_path;\n}\nvoid EntityCreateInfo::set_parent_path(const NodePath &value) {\n\t_parent_path = value;\n}\n\nEntity *EntityCreateInfo::get_created_entity() {\n\treturn _created_entity;\n}\n\nvoid EntityCreateInfo::set_created_entity(Node *value) {\n\tif (!value) {\n\t\treturn;\n\t}\n\n\tEntity *e = cast_to<Entity>(value);\n\n\tif (!e) {\n\t\treturn;\n\t}\n\n\t_created_entity = e;\n}\n\nDictionary EntityCreateInfo::to_dict() {\n\treturn call(\"_to_dict\");\n}\nvoid EntityCreateInfo::from_dict(const Dictionary &dict) {\n\tcall(\"_from_dict\", dict);\n}\n\nDictionary EntityCreateInfo::_to_dict() {\n\tDictionary dict;\n\n\tdict[\"guid\"] = _guid;\n\tdict[\"networked\"] = _networked;\n\tdict[\"class_id\"] = _class_id;\n\tdict[\"entity_player_type\"] = _entity_player_type;\n\tdict[\"network_owner\"] = _network_owner;\n\tdict[\"entity_controller\"] = _entity_controller;\n\tdict[\"entity_name\"] = _entity_name;\n\tdict[\"level\"] = _level;\n\tdict[\"xp\"] = _xp;\n\n\tdict[\"transform\"] = _transform;\n\tdict[\"transform2d\"] = _transform2d;\n\n\tif (_species_instance.is_valid())\n\t\tdict[\"species_instance\"] = _species_instance->to_dict();\n\n\tdict[\"serialized_data\"] = _serialized_data;\n\tdict[\"parent_path\"] = _parent_path;\n\n\treturn dict;\n}\nvoid EntityCreateInfo::_from_dict(const Dictionary &dict) {\n\tERR_FAIL_COND(dict.is_empty());\n\n\n\t_guid = dict.get(\"guid\", 0);\n\t_networked = dict.get(\"networked\", false);\n\t_class_id = dict.get(\"class_id\", 0);\n\t_entity_player_type = dict.get(\"entity_player_type\", 0);\n\t_network_owner = dict.get(\"network_owner\", 0);\n\t_entity_controller = static_cast<EntityEnums::EntityController>(static_cast<int>(dict.get(\"entity_controller\", 0)));\n\t_entity_name = dict.get(\"entity_name\", \"\");\n\t_level = dict.get(\"level\", 0);\n\t_xp = dict.get(\"xp\", 0);\n\t_transform = dict.get(\"transform\", Transform3D());\n\t_transform2d = dict.get(\"transform2d\", Transform2D());\n\t_species_instance = dict.get(\"species_instance\", Ref<SpeciesInstance>());\n\t_serialized_data = dict.get(\"serialized_data\", Dictionary());\n\t_parent_path = dict.get(\"parent_path\", \"\");\n}\n\nEntityCreateInfo::EntityCreateInfo() {\n\t_guid = 0;\n\t_networked = false;\n\t_class_id = 0;\n\t_entity_player_type = 0;\n\t_network_owner = 0;\n\t_entity_controller = EntityEnums::ENITIY_CONTROLLER_NONE;\n\t_level = 0;\n\t_xp = 0;\n\t_created_entity = NULL;\n}\n\nEntityCreateInfo::~EntityCreateInfo() {\n\t_entity_data.unref();\n\t_species_instance.unref();\n}\n\nvoid EntityCreateInfo::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"get_guid\"), &EntityCreateInfo::get_guid);\n\tClassDB::bind_method(D_METHOD(\"set_guid\", \"value\"), &EntityCreateInfo::set_guid);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"guid\"), \"set_guid\", \"get_guid\");\n\n\tClassDB::bind_method(D_METHOD(\"get_networked\"), &EntityCreateInfo::get_networked);\n\tClassDB::bind_method(D_METHOD(\"set_networked\", \"value\"), &EntityCreateInfo::set_networked);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"networked\"), \"set_networked\", \"get_networked\");\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_controller\"), &EntityCreateInfo::get_entity_controller);\n\tClassDB::bind_method(D_METHOD(\"set_entity_controller\", \"value\"), &EntityCreateInfo::set_entity_controller);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"entity_controller\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_CONTOLLER), \"set_entity_controller\", \"get_entity_controller\");\n\n\tClassDB::bind_method(D_METHOD(\"get_class_id\"), &EntityCreateInfo::get_class_id);\n\tClassDB::bind_method(D_METHOD(\"set_class_id\", \"value\"), &EntityCreateInfo::set_class_id);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"class_id\", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_CONTOLLER), \"set_class_id\", \"get_class_id\");\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_player_type\"), &EntityCreateInfo::get_entity_player_type);\n\tClassDB::bind_method(D_METHOD(\"set_entity_player_type\", \"value\"), &EntityCreateInfo::set_entity_player_type);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"entity_player_type\"), \"set_entity_player_type\", \"get_entity_player_type\");\n\n\tClassDB::bind_method(D_METHOD(\"get_network_owner\"), &EntityCreateInfo::get_network_owner);\n\tClassDB::bind_method(D_METHOD(\"set_network_owner\", \"value\"), &EntityCreateInfo::set_network_owner);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"network_owner\"), \"set_network_owner\", \"get_network_owner\");\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_name\"), &EntityCreateInfo::get_entity_name);\n\tClassDB::bind_method(D_METHOD(\"set_entity_name\", \"value\"), &EntityCreateInfo::set_entity_name);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"player_name\"), \"set_entity_name\", \"get_entity_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_node_name\"), &EntityCreateInfo::get_node_name);\n\tClassDB::bind_method(D_METHOD(\"set_node_name\", \"value\"), &EntityCreateInfo::set_node_name);\n\tADD_PROPERTY(PropertyInfo(Variant::STRING, \"node_name\"), \"set_node_name\", \"get_node_name\");\n\n\tClassDB::bind_method(D_METHOD(\"get_level\"), &EntityCreateInfo::get_level);\n\tClassDB::bind_method(D_METHOD(\"set_level\", \"value\"), &EntityCreateInfo::set_level);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"level\"), \"set_level\", \"get_level\");\n\n\tClassDB::bind_method(D_METHOD(\"get_xp\"), &EntityCreateInfo::get_xp);\n\tClassDB::bind_method(D_METHOD(\"set_xp\", \"value\"), &EntityCreateInfo::set_xp);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"xp\"), \"set_xp\", \"get_xp\");\n\n\tClassDB::bind_method(D_METHOD(\"get_transform\"), &EntityCreateInfo::get_transform);\n\tClassDB::bind_method(D_METHOD(\"set_transform\", \"value\"), &EntityCreateInfo::set_transform);\n\tADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, \"transform\"), \"set_transform\", \"get_transform\");\n\n\tClassDB::bind_method(D_METHOD(\"get_transform2d\"), &EntityCreateInfo::get_transform2d);\n\tClassDB::bind_method(D_METHOD(\"set_transform2d\", \"value\"), &EntityCreateInfo::set_transform2d);\n\tADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, \"transform2d\"), \"set_transform2d\", \"get_transform2d\");\n\n\tClassDB::bind_method(D_METHOD(\"get_entity_data\"), &EntityCreateInfo::get_entity_data);\n\tClassDB::bind_method(D_METHOD(\"set_entity_data\", \"value\"), &EntityCreateInfo::set_entity_data);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"entity_data\", PROPERTY_HINT_RESOURCE_TYPE, \"EntityData\"), \"set_entity_data\", \"get_entity_data\");\n\n\tClassDB::bind_method(D_METHOD(\"get_species_instance\"), &EntityCreateInfo::get_species_instance);\n\tClassDB::bind_method(D_METHOD(\"set_species_instance\", \"value\"), &EntityCreateInfo::set_species_instance);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"species_instance\", PROPERTY_HINT_RESOURCE_TYPE, \"SpeciesInstance\"), \"set_species_instance\", \"get_species_instance\");\n\n\tClassDB::bind_method(D_METHOD(\"get_serialized_data\"), &EntityCreateInfo::get_serialized_data);\n\tClassDB::bind_method(D_METHOD(\"set_serialized_data\", \"value\"), &EntityCreateInfo::set_serialized_data);\n\tADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, \"serialized_data\"), \"set_serialized_data\", \"get_serialized_data\");\n\n\tClassDB::bind_method(D_METHOD(\"get_parent_path\"), &EntityCreateInfo::get_parent_path);\n\tClassDB::bind_method(D_METHOD(\"set_parent_path\", \"value\"), &EntityCreateInfo::set_parent_path);\n\tADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, \"parent_path\"), \"set_parent_path\", \"get_parent_path\");\n\n\tClassDB::bind_method(D_METHOD(\"get_created_entity\"), &EntityCreateInfo::get_created_entity);\n\tClassDB::bind_method(D_METHOD(\"set_created_entity\", \"value\"), &EntityCreateInfo::set_created_entity);\n\tADD_PROPERTY(PropertyInfo(Variant::OBJECT, \"created_entity\", PROPERTY_HINT_RESOURCE_TYPE, \"Entity\"), \"set_created_entity\", \"get_created_entity\");\n\n\t//Serialization\n\t//GDVIRTUAL_BIND(\"_from_dict\", \"dict\");\n\t//GDVIRTUAL_BIND(\"_to_dict\");\n\n\tClassDB::bind_method(D_METHOD(\"from_dict\", \"dict\"), &EntityCreateInfo::from_dict);\n\tClassDB::bind_method(D_METHOD(\"to_dict\"), &EntityCreateInfo::to_dict);\n\n\tClassDB::bind_method(D_METHOD(\"_from_dict\", \"dict\"), &EntityCreateInfo::_from_dict);\n\tClassDB::bind_method(D_METHOD(\"_to_dict\"), &EntityCreateInfo::_to_dict);\n}\n"
  },
  {
    "path": "utility/entity_create_info.h",
    "content": "/*\nCopyright (c) 2019-2022 Péter Magyar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n#ifndef ENTITY_CREATE_INFO_H\n#define ENTITY_CREATE_INFO_H\n\n#include \"core/version.h\"\n\n#include \"core/object/ref_counted.h\"\n#include \"core/string/ustring.h\"\n\n\n#include \"../entity_enums.h\"\n\nclass EntityData;\nclass SpeciesInstance;\nclass Entity;\nclass Node;\n\nclass EntityCreateInfo : public RefCounted {\n\tGDCLASS(EntityCreateInfo, RefCounted);\n\npublic:\n\tint get_guid() const;\n\tvoid set_guid(const int value);\n\n\tbool get_networked() const;\n\tvoid set_networked(const bool value);\n\n\tint get_class_id() const;\n\tvoid set_class_id(const int value);\n\n\tint get_entity_player_type();\n\tvoid set_entity_player_type(int value);\n\n\tint get_network_owner() const;\n\tvoid set_network_owner(const int value);\n\n\tEntityEnums::EntityController get_entity_controller() const;\n\tvoid set_entity_controller(const EntityEnums::EntityController value);\n\n\tString get_entity_name() const;\n\tvoid set_entity_name(const String &value);\n\n\tString get_node_name() const;\n\tvoid set_node_name(const String &value);\n\n\tint get_level() const;\n\tvoid set_level(const int value);\n\n\tint get_xp() const;\n\tvoid set_xp(const int value);\n\n\tTransform3D get_transform() const;\n\tvoid set_transform(const Transform3D &value);\n\n\tTransform2D get_transform2d() const;\n\tvoid set_transform2d(const Transform2D &value);\n\n\tRef<EntityData> get_entity_data() const;\n\tvoid set_entity_data(const Ref<EntityData> &value);\n\n\tRef<SpeciesInstance> get_species_instance();\n\tvoid set_species_instance(const Ref<SpeciesInstance> &value);\n\n\tDictionary get_serialized_data();\n\tvoid set_serialized_data(const Dictionary &value);\n\n\tNodePath get_parent_path() const;\n\tvoid set_parent_path(const NodePath &value);\n\n\tEntity *get_created_entity();\n\tvoid set_created_entity(Node *value);\n\n\tDictionary to_dict();\n\tvoid from_dict(const Dictionary &dict);\n\n\tDictionary _to_dict();\n\tvoid _from_dict(const Dictionary &dict);\n\n\tEntityCreateInfo();\n\t~EntityCreateInfo();\n\nprotected:\n\tstatic void _bind_methods();\n\nprivate:\n\tint _guid;\n\tbool _networked;\n\tint _class_id;\n\tint _entity_player_type;\n\tint _network_owner;\n\tEntityEnums::EntityController _entity_controller;\n\tString _entity_name;\n\tString _node_name;\n\tint _level;\n\tint _xp;\n\n\tTransform3D _transform;\n\tTransform2D _transform2d;\n\n\tRef<EntityData> _entity_data;\n\tRef<SpeciesInstance> _species_instance;\n\tDictionary _serialized_data;\n\tNodePath _parent_path;\n\n\tEntity *_created_entity;\n};\n\n#endif\n"
  }
]