| | | @@ -0,0 +1,1518 @@ |
| 1 | + | /* |
| 2 | + | * Copyright (c) 2010-2017 OTClient <https://github.com/edubart/otclient> |
| 3 | + | * |
| 4 | + | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | + | * of this software and associated documentation files (the "Software"), to deal |
| 6 | + | * in the Software without restriction, including without limitation the rights |
| 7 | + | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 8 | + | * copies of the Software, and to permit persons to whom the Software is |
| 9 | + | * furnished to do so, subject to the following conditions: |
| 10 | + | * |
| 11 | + | * The above copyright notice and this permission notice shall be included in |
| 12 | + | * all copies or substantial portions of the Software. |
| 13 | + | * |
| 14 | + | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 | + | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | + | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 17 | + | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 | + | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 19 | + | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 20 | + | * THE SOFTWARE. |
| 21 | + | */ |
| 22 | + | |
| 23 | + | #include "animatedtext.h" |
| 24 | + | #include "client.h" |
| 25 | + | #include "container.h" |
| 26 | + | #include "creature.h" |
| 27 | + | #include "effect.h" |
| 28 | + | #include "game.h" |
| 29 | + | #include "healthbars.h" |
| 30 | + | #include "houses.h" |
| 31 | + | #include "item.h" |
| 32 | + | #include "localplayer.h" |
| 33 | + | #include "luavaluecasts_client.h" |
| 34 | + | #include "map.h" |
| 35 | + | #include "minimap.h" |
| 36 | + | #include "missile.h" |
| 37 | + | #include "outfit.h" |
| 38 | + | #include "player.h" |
| 39 | + | #include "protocolgame.h" |
| 40 | + | #include "spritemanager.h" |
| 41 | + | #include "statictext.h" |
| 42 | + | #include "thingtypemanager.h" |
| 43 | + | #include "tile.h" |
| 44 | + | #include "towns.h" |
| 45 | + | #include "uicreature.h" |
| 46 | + | #include "uigraph.h" |
| 47 | + | #include "uiitem.h" |
| 48 | + | #include "uimap.h" |
| 49 | + | #include "uimapanchorlayout.h" |
| 50 | + | #include "uiminimap.h" |
| 51 | + | #include "uiprogressrect.h" |
| 52 | + | #include "uisprite.h" |
| 53 | + | |
| 54 | + | #include <framework/luaengine/luainterface.h> |
| 55 | + | |
| 56 | + | void Client::registerLuaFunctions() { |
| 57 | + | g_lua.registerSingletonClass("g_things"); |
| 58 | + | g_lua.bindSingletonFunction("g_things", "loadDat", &ThingTypeManager::loadDat, |
| 59 | + | &g_things); |
| 60 | + | #ifdef WITH_ENCRYPTION |
| 61 | + | g_lua.bindSingletonFunction("g_things", "saveDat", &ThingTypeManager::saveDat, |
| 62 | + | &g_things); |
| 63 | + | g_lua.bindSingletonFunction("g_things", "dumpTextures", |
| 64 | + | &ThingTypeManager::dumpTextures, &g_things); |
| 65 | + | g_lua.bindSingletonFunction("g_things", "replaceTextures", |
| 66 | + | &ThingTypeManager::replaceTextures, &g_things); |
| 67 | + | #endif |
| 68 | + | g_lua.bindSingletonFunction("g_things", "loadOtb", &ThingTypeManager::loadOtb, |
| 69 | + | &g_things); |
| 70 | + | g_lua.bindSingletonFunction("g_things", "loadXml", &ThingTypeManager::loadXml, |
| 71 | + | &g_things); |
| 72 | + | g_lua.bindSingletonFunction("g_things", "loadOtml", |
| 73 | + | &ThingTypeManager::loadOtml, &g_things); |
| 74 | + | g_lua.bindSingletonFunction("g_things", "isDatLoaded", |
| 75 | + | &ThingTypeManager::isDatLoaded, &g_things); |
| 76 | + | g_lua.bindSingletonFunction("g_things", "isOtbLoaded", |
| 77 | + | &ThingTypeManager::isOtbLoaded, &g_things); |
| 78 | + | g_lua.bindSingletonFunction("g_things", "getDatSignature", |
| 79 | + | &ThingTypeManager::getDatSignature, &g_things); |
| 80 | + | g_lua.bindSingletonFunction("g_things", "getContentRevision", |
| 81 | + | &ThingTypeManager::getContentRevision, &g_things); |
| 82 | + | g_lua.bindSingletonFunction("g_things", "getThingType", |
| 83 | + | &ThingTypeManager::getThingType, &g_things); |
| 84 | + | g_lua.bindSingletonFunction("g_things", "getItemType", |
| 85 | + | &ThingTypeManager::getItemType, &g_things); |
| 86 | + | g_lua.bindSingletonFunction("g_things", "getThingTypes", |
| 87 | + | &ThingTypeManager::getThingTypes, &g_things); |
| 88 | + | g_lua.bindSingletonFunction("g_things", "findItemTypeByClientId", |
| 89 | + | &ThingTypeManager::findItemTypeByClientId, |
| 90 | + | &g_things); |
| 91 | + | g_lua.bindSingletonFunction("g_things", "findItemTypeByName", |
| 92 | + | &ThingTypeManager::findItemTypeByName, &g_things); |
| 93 | + | g_lua.bindSingletonFunction("g_things", "findItemTypesByName", |
| 94 | + | &ThingTypeManager::findItemTypesByName, |
| 95 | + | &g_things); |
| 96 | + | g_lua.bindSingletonFunction("g_things", "findItemTypesByString", |
| 97 | + | &ThingTypeManager::findItemTypesByString, |
| 98 | + | &g_things); |
| 99 | + | g_lua.bindSingletonFunction("g_things", "findItemTypeByCategory", |
| 100 | + | &ThingTypeManager::findItemTypeByCategory, |
| 101 | + | &g_things); |
| 102 | + | g_lua.bindSingletonFunction("g_things", "findThingTypeByAttr", |
| 103 | + | &ThingTypeManager::findThingTypeByAttr, |
| 104 | + | &g_things); |
| 105 | + | g_lua.bindSingletonFunction("g_things", "getMarketCategories", |
| 106 | + | &ThingTypeManager::getMarketCategories, |
| 107 | + | &g_things); |
| 108 | + | |
| 109 | + | g_lua.registerSingletonClass("g_houses"); |
| 110 | + | g_lua.bindSingletonFunction("g_houses", "clear", &HouseManager::clear, |
| 111 | + | &g_houses); |
| 112 | + | g_lua.bindSingletonFunction("g_houses", "load", &HouseManager::load, |
| 113 | + | &g_houses); |
| 114 | + | g_lua.bindSingletonFunction("g_houses", "save", &HouseManager::save, |
| 115 | + | &g_houses); |
| 116 | + | g_lua.bindSingletonFunction("g_houses", "getHouse", &HouseManager::getHouse, |
| 117 | + | &g_houses); |
| 118 | + | g_lua.bindSingletonFunction("g_houses", "getHouseByName", |
| 119 | + | &HouseManager::getHouseByName, &g_houses); |
| 120 | + | g_lua.bindSingletonFunction("g_houses", "addHouse", &HouseManager::addHouse, |
| 121 | + | &g_houses); |
| 122 | + | g_lua.bindSingletonFunction("g_houses", "removeHouse", |
| 123 | + | &HouseManager::removeHouse, &g_houses); |
| 124 | + | g_lua.bindSingletonFunction("g_houses", "getHouseList", |
| 125 | + | &HouseManager::getHouseList, &g_houses); |
| 126 | + | g_lua.bindSingletonFunction("g_houses", "filterHouses", |
| 127 | + | &HouseManager::filterHouses, &g_houses); |
| 128 | + | g_lua.bindSingletonFunction("g_houses", "sort", &HouseManager::sort, |
| 129 | + | &g_houses); |
| 130 | + | |
| 131 | + | g_lua.registerSingletonClass("g_towns"); |
| 132 | + | g_lua.bindSingletonFunction("g_towns", "getTown", &TownManager::getTown, |
| 133 | + | &g_towns); |
| 134 | + | g_lua.bindSingletonFunction("g_towns", "getTownByName", |
| 135 | + | &TownManager::getTownByName, &g_towns); |
| 136 | + | g_lua.bindSingletonFunction("g_towns", "addTown", &TownManager::addTown, |
| 137 | + | &g_towns); |
| 138 | + | g_lua.bindSingletonFunction("g_towns", "removeTown", &TownManager::removeTown, |
| 139 | + | &g_towns); |
| 140 | + | g_lua.bindSingletonFunction("g_towns", "getTowns", &TownManager::getTowns, |
| 141 | + | &g_towns); |
| 142 | + | g_lua.bindSingletonFunction("g_towns", "sort", &TownManager::sort, &g_towns); |
| 143 | + | |
| 144 | + | g_lua.registerSingletonClass("g_sprites"); |
| 145 | + | g_lua.bindSingletonFunction("g_sprites", "loadSpr", &SpriteManager::loadSpr, |
| 146 | + | &g_sprites); |
| 147 | + | #ifdef WITH_ENCRYPTION |
| 148 | + | g_lua.bindSingletonFunction("g_sprites", "saveSpr", &SpriteManager::saveSpr, |
| 149 | + | &g_sprites); |
| 150 | + | g_lua.bindSingletonFunction("g_sprites", "saveSpr64", |
| 151 | + | &SpriteManager::saveSpr64, &g_sprites); |
| 152 | + | g_lua.bindSingletonFunction("g_sprites", "dumpSprites", |
| 153 | + | &SpriteManager::dumpSprites, &g_sprites); |
| 154 | + | g_lua.bindSingletonFunction("g_sprites", "encryptSprites", |
| 155 | + | &SpriteManager::encryptSprites, &g_sprites); |
| 156 | + | #endif |
| 157 | + | g_lua.bindSingletonFunction("g_sprites", "unload", &SpriteManager::unload, |
| 158 | + | &g_sprites); |
| 159 | + | g_lua.bindSingletonFunction("g_sprites", "isLoaded", &SpriteManager::isLoaded, |
| 160 | + | &g_sprites); |
| 161 | + | g_lua.bindSingletonFunction("g_sprites", "getSprSignature", |
| 162 | + | &SpriteManager::getSignature, &g_sprites); |
| 163 | + | g_lua.bindSingletonFunction("g_sprites", "getSpritesCount", |
| 164 | + | &SpriteManager::getSpritesCount, &g_sprites); |
| 165 | + | |
| 166 | + | g_lua.registerSingletonClass("g_map"); |
| 167 | + | g_lua.bindSingletonFunction("g_map", "isLookPossible", &Map::isLookPossible, |
| 168 | + | &g_map); |
| 169 | + | g_lua.bindSingletonFunction("g_map", "isCovered", &Map::isCovered, &g_map); |
| 170 | + | g_lua.bindSingletonFunction("g_map", "isCompletelyCovered", |
| 171 | + | &Map::isCompletelyCovered, &g_map); |
| 172 | + | g_lua.bindSingletonFunction("g_map", "addThing", &Map::addThing, &g_map); |
| 173 | + | g_lua.bindSingletonFunction("g_map", "getThing", &Map::getThing, &g_map); |
| 174 | + | g_lua.bindSingletonFunction("g_map", "removeThingByPos", |
| 175 | + | &Map::removeThingByPos, &g_map); |
| 176 | + | g_lua.bindSingletonFunction("g_map", "removeThing", &Map::removeThing, |
| 177 | + | &g_map); |
| 178 | + | g_lua.bindSingletonFunction("g_map", "colorizeThing", &Map::colorizeThing, |
| 179 | + | &g_map); |
| 180 | + | g_lua.bindSingletonFunction("g_map", "removeThingColor", |
| 181 | + | &Map::removeThingColor, &g_map); |
| 182 | + | g_lua.bindSingletonFunction("g_map", "clean", &Map::clean, &g_map); |
| 183 | + | g_lua.bindSingletonFunction("g_map", "cleanTile", &Map::cleanTile, &g_map); |
| 184 | + | g_lua.bindSingletonFunction("g_map", "cleanTexts", &Map::cleanTexts, &g_map); |
| 185 | + | g_lua.bindSingletonFunction("g_map", "getTile", &Map::getTile, &g_map); |
| 186 | + | g_lua.bindSingletonFunction("g_map", "getOrCreateTile", &Map::getOrCreateTile, |
| 187 | + | &g_map); |
| 188 | + | g_lua.bindSingletonFunction("g_map", "getTiles", &Map::getTiles, &g_map); |
| 189 | + | g_lua.bindSingletonFunction("g_map", "setCentralPosition", |
| 190 | + | &Map::setCentralPosition, &g_map); |
| 191 | + | g_lua.bindSingletonFunction("g_map", "getCentralPosition", |
| 192 | + | &Map::getCentralPosition, &g_map); |
| 193 | + | g_lua.bindSingletonFunction("g_map", "getCreatureById", &Map::getCreatureById, |
| 194 | + | &g_map); |
| 195 | + | g_lua.bindSingletonFunction("g_map", "removeCreatureById", |
| 196 | + | &Map::removeCreatureById, &g_map); |
| 197 | + | g_lua.bindSingletonFunction("g_map", "getSpectators", &Map::getSpectators, |
| 198 | + | &g_map); |
| 199 | + | g_lua.bindSingletonFunction("g_map", "getSpectatorsInRange", |
| 200 | + | &Map::getSpectatorsInRange, &g_map); |
| 201 | + | g_lua.bindSingletonFunction("g_map", "getSpectatorsInRangeEx", |
| 202 | + | &Map::getSpectatorsInRangeEx, &g_map); |
| 203 | + | g_lua.bindSingletonFunction("g_map", "getSpectatorsByPattern", |
| 204 | + | &Map::getSpectatorsByPattern, &g_map); |
| 205 | + | g_lua.bindSingletonFunction("g_map", "findPath", &Map::findPath, &g_map); |
| 206 | + | g_lua.bindSingletonFunction("g_map", "loadOtbm", &Map::loadOtbm, &g_map); |
| 207 | + | g_lua.bindSingletonFunction("g_map", "saveOtbm", &Map::saveOtbm, &g_map); |
| 208 | + | g_lua.bindSingletonFunction("g_map", "loadOtcm", &Map::loadOtcm, &g_map); |
| 209 | + | g_lua.bindSingletonFunction("g_map", "saveOtcm", &Map::saveOtcm, &g_map); |
| 210 | + | g_lua.bindSingletonFunction("g_map", "getHouseFile", &Map::getHouseFile, |
| 211 | + | &g_map); |
| 212 | + | g_lua.bindSingletonFunction("g_map", "setHouseFile", &Map::setHouseFile, |
| 213 | + | &g_map); |
| 214 | + | g_lua.bindSingletonFunction("g_map", "getSpawnFile", &Map::getSpawnFile, |
| 215 | + | &g_map); |
| 216 | + | g_lua.bindSingletonFunction("g_map", "setSpawnFile", &Map::setSpawnFile, |
| 217 | + | &g_map); |
| 218 | + | g_lua.bindSingletonFunction("g_map", "createTile", &Map::createTile, &g_map); |
| 219 | + | g_lua.bindSingletonFunction("g_map", "setWidth", &Map::setWidth, &g_map); |
| 220 | + | g_lua.bindSingletonFunction("g_map", "setHeight", &Map::setHeight, &g_map); |
| 221 | + | g_lua.bindSingletonFunction("g_map", "getSize", &Map::getSize, &g_map); |
| 222 | + | g_lua.bindSingletonFunction("g_map", "setDescription", &Map::setDescription, |
| 223 | + | &g_map); |
| 224 | + | g_lua.bindSingletonFunction("g_map", "getDescriptions", &Map::getDescriptions, |
| 225 | + | &g_map); |
| 226 | + | g_lua.bindSingletonFunction("g_map", "clearDescriptions", |
| 227 | + | &Map::clearDescriptions, &g_map); |
| 228 | + | g_lua.bindSingletonFunction("g_map", "setShowZone", &Map::setShowZone, |
| 229 | + | &g_map); |
| 230 | + | g_lua.bindSingletonFunction("g_map", "setShowZones", &Map::setShowZones, |
| 231 | + | &g_map); |
| 232 | + | g_lua.bindSingletonFunction("g_map", "setZoneColor", &Map::setZoneColor, |
| 233 | + | &g_map); |
| 234 | + | g_lua.bindSingletonFunction("g_map", "setZoneOpacity", &Map::setZoneOpacity, |
| 235 | + | &g_map); |
| 236 | + | g_lua.bindSingletonFunction("g_map", "getZoneOpacity", &Map::getZoneOpacity, |
| 237 | + | &g_map); |
| 238 | + | g_lua.bindSingletonFunction("g_map", "getZoneColor", &Map::getZoneColor, |
| 239 | + | &g_map); |
| 240 | + | g_lua.bindSingletonFunction("g_map", "showZones", &Map::showZones, &g_map); |
| 241 | + | g_lua.bindSingletonFunction("g_map", "showZone", &Map::showZone, &g_map); |
| 242 | + | g_lua.bindSingletonFunction("g_map", "setForceShowAnimations", |
| 243 | + | &Map::setForceShowAnimations, &g_map); |
| 244 | + | g_lua.bindSingletonFunction("g_map", "isForcingAnimations", |
| 245 | + | &Map::isForcingAnimations, &g_map); |
| 246 | + | g_lua.bindSingletonFunction("g_map", "isShowingAnimations", |
| 247 | + | &Map::isShowingAnimations, &g_map); |
| 248 | + | g_lua.bindSingletonFunction("g_map", "setShowAnimations", |
| 249 | + | &Map::setShowAnimations, &g_map); |
| 250 | + | g_lua.bindSingletonFunction("g_map", "findItemsById", &Map::findItemsById, |
| 251 | + | &g_map); |
| 252 | + | g_lua.bindSingletonFunction("g_map", "getAwareRange", |
| 253 | + | &Map::getAwareRangeAsSize, &g_map); |
| 254 | + | g_lua.bindSingletonFunction("g_map", "findEveryPath", &Map::findEveryPath, |
| 255 | + | &g_map); |
| 256 | + | g_lua.bindSingletonFunction("g_map", "getMinimapColor", &Map::getMinimapColor, |
| 257 | + | &g_map); |
| 258 | + | g_lua.bindSingletonFunction("g_map", "isPatchable", &Map::isPatchable, |
| 259 | + | &g_map); |
| 260 | + | g_lua.bindSingletonFunction("g_map", "isWalkable", &Map::isWalkable, &g_map); |
| 261 | + | g_lua.bindSingletonFunction("g_map", "checkSightLine", &Map::checkSightLine, |
| 262 | + | &g_map); |
| 263 | + | g_lua.bindSingletonFunction("g_map", "isSightClear", &Map::isSightClear, |
| 264 | + | &g_map); |
| 265 | + | |
| 266 | + | g_lua.registerSingletonClass("g_minimap"); |
| 267 | + | g_lua.bindSingletonFunction("g_minimap", "clean", &Minimap::clean, |
| 268 | + | &g_minimap); |
| 269 | + | g_lua.bindSingletonFunction("g_minimap", "loadImage", &Minimap::loadImage, |
| 270 | + | &g_minimap); |
| 271 | + | g_lua.bindSingletonFunction("g_minimap", "saveImage", &Minimap::saveImage, |
| 272 | + | &g_minimap); |
| 273 | + | g_lua.bindSingletonFunction("g_minimap", "loadOtmm", &Minimap::loadOtmm, |
| 274 | + | &g_minimap); |
| 275 | + | g_lua.bindSingletonFunction("g_minimap", "saveOtmm", &Minimap::saveOtmm, |
| 276 | + | &g_minimap); |
| 277 | + | |
| 278 | + | g_lua.registerSingletonClass("g_creatures"); |
| 279 | + | g_lua.bindSingletonFunction("g_creatures", "getCreatures", |
| 280 | + | &CreatureManager::getCreatures, &g_creatures); |
| 281 | + | g_lua.bindSingletonFunction("g_creatures", "getCreatureByName", |
| 282 | + | &CreatureManager::getCreatureByName, |
| 283 | + | &g_creatures); |
| 284 | + | g_lua.bindSingletonFunction("g_creatures", "getCreatureByLook", |
| 285 | + | &CreatureManager::getCreatureByLook, |
| 286 | + | &g_creatures); |
| 287 | + | g_lua.bindSingletonFunction("g_creatures", "getSpawn", |
| 288 | + | &CreatureManager::getSpawn, &g_creatures); |
| 289 | + | g_lua.bindSingletonFunction("g_creatures", "getSpawnForPlacePos", |
| 290 | + | &CreatureManager::getSpawnForPlacePos, |
| 291 | + | &g_creatures); |
| 292 | + | g_lua.bindSingletonFunction("g_creatures", "addSpawn", |
| 293 | + | &CreatureManager::addSpawn, &g_creatures); |
| 294 | + | g_lua.bindSingletonFunction("g_creatures", "loadMonsters", |
| 295 | + | &CreatureManager::loadMonsters, &g_creatures); |
| 296 | + | g_lua.bindSingletonFunction("g_creatures", "loadNpcs", |
| 297 | + | &CreatureManager::loadNpcs, &g_creatures); |
| 298 | + | g_lua.bindSingletonFunction("g_creatures", "loadSingleCreature", |
| 299 | + | &CreatureManager::loadSingleCreature, |
| 300 | + | &g_creatures); |
| 301 | + | g_lua.bindSingletonFunction("g_creatures", "loadSpawns", |
| 302 | + | &CreatureManager::loadSpawns, &g_creatures); |
| 303 | + | g_lua.bindSingletonFunction("g_creatures", "saveSpawns", |
| 304 | + | &CreatureManager::saveSpawns, &g_creatures); |
| 305 | + | g_lua.bindSingletonFunction("g_creatures", "isLoaded", |
| 306 | + | &CreatureManager::isLoaded, &g_creatures); |
| 307 | + | g_lua.bindSingletonFunction("g_creatures", "isSpawnLoaded", |
| 308 | + | &CreatureManager::isSpawnLoaded, &g_creatures); |
| 309 | + | g_lua.bindSingletonFunction("g_creatures", "clear", &CreatureManager::clear, |
| 310 | + | &g_creatures); |
| 311 | + | g_lua.bindSingletonFunction("g_creatures", "clearSpawns", |
| 312 | + | &CreatureManager::clearSpawns, &g_creatures); |
| 313 | + | g_lua.bindSingletonFunction("g_creatures", "getSpawns", |
| 314 | + | &CreatureManager::getSpawns, &g_creatures); |
| 315 | + | g_lua.bindSingletonFunction("g_creatures", "deleteSpawn", |
| 316 | + | &CreatureManager::deleteSpawn, &g_creatures); |
| 317 | + | |
| 318 | + | g_lua.registerSingletonClass("g_game"); |
| 319 | + | g_lua.bindSingletonFunction("g_game", "loginWorld", &Game::loginWorld, |
| 320 | + | &g_game); |
| 321 | + | g_lua.bindSingletonFunction("g_game", "playRecord", &Game::playRecord, |
| 322 | + | &g_game); |
| 323 | + | g_lua.bindSingletonFunction("g_game", "cancelLogin", &Game::cancelLogin, |
| 324 | + | &g_game); |
| 325 | + | g_lua.bindSingletonFunction("g_game", "forceLogout", &Game::forceLogout, |
| 326 | + | &g_game); |
| 327 | + | g_lua.bindSingletonFunction("g_game", "safeLogout", &Game::safeLogout, |
| 328 | + | &g_game); |
| 329 | + | g_lua.bindSingletonFunction("g_game", "walk", &Game::walk, &g_game); |
| 330 | + | g_lua.bindSingletonFunction("g_game", "autoWalk", &Game::autoWalk, &g_game); |
| 331 | + | g_lua.bindSingletonFunction("g_game", "turn", &Game::turn, &g_game); |
| 332 | + | g_lua.bindSingletonFunction("g_game", "stop", &Game::stop, &g_game); |
| 333 | + | g_lua.bindSingletonFunction("g_game", "look", &Game::look, &g_game); |
| 334 | + | g_lua.bindSingletonFunction("g_game", "move", &Game::move, &g_game); |
| 335 | + | g_lua.bindSingletonFunction("g_game", "moveRaw", &Game::moveRaw, &g_game); |
| 336 | + | g_lua.bindSingletonFunction("g_game", "moveToParentContainer", |
| 337 | + | &Game::moveToParentContainer, &g_game); |
| 338 | + | g_lua.bindSingletonFunction("g_game", "rotate", &Game::rotate, &g_game); |
| 339 | + | g_lua.bindSingletonFunction("g_game", "wrap", &Game::wrap, &g_game); |
| 340 | + | g_lua.bindSingletonFunction("g_game", "use", &Game::use, &g_game); |
| 341 | + | g_lua.bindSingletonFunction("g_game", "useWith", &Game::useWith, &g_game); |
| 342 | + | g_lua.bindSingletonFunction("g_game", "useInventoryItem", |
| 343 | + | &Game::useInventoryItem, &g_game); |
| 344 | + | g_lua.bindSingletonFunction("g_game", "useInventoryItemWith", |
| 345 | + | &Game::useInventoryItemWith, &g_game); |
| 346 | + | g_lua.bindSingletonFunction("g_game", "findItemInContainers", |
| 347 | + | &Game::findItemInContainers, &g_game); |
| 348 | + | g_lua.bindSingletonFunction("g_game", "open", &Game::open, &g_game); |
| 349 | + | g_lua.bindSingletonFunction("g_game", "openParent", &Game::openParent, |
| 350 | + | &g_game); |
| 351 | + | g_lua.bindSingletonFunction("g_game", "close", &Game::close, &g_game); |
| 352 | + | g_lua.bindSingletonFunction("g_game", "refreshContainer", |
| 353 | + | &Game::refreshContainer, &g_game); |
| 354 | + | g_lua.bindSingletonFunction("g_game", "attack", &Game::attack, &g_game); |
| 355 | + | g_lua.bindSingletonFunction("g_game", "cancelAttack", &Game::cancelAttack, |
| 356 | + | &g_game); |
| 357 | + | g_lua.bindSingletonFunction("g_game", "follow", &Game::follow, &g_game); |
| 358 | + | g_lua.bindSingletonFunction("g_game", "cancelFollow", &Game::cancelFollow, |
| 359 | + | &g_game); |
| 360 | + | g_lua.bindSingletonFunction("g_game", "cancelAttackAndFollow", |
| 361 | + | &Game::cancelAttackAndFollow, &g_game); |
| 362 | + | g_lua.bindSingletonFunction("g_game", "talk", &Game::talk, &g_game); |
| 363 | + | g_lua.bindSingletonFunction("g_game", "talkChannel", &Game::talkChannel, |
| 364 | + | &g_game); |
| 365 | + | g_lua.bindSingletonFunction("g_game", "talkPrivate", &Game::talkPrivate, |
| 366 | + | &g_game); |
| 367 | + | g_lua.bindSingletonFunction("g_game", "openPrivateChannel", |
| 368 | + | &Game::openPrivateChannel, &g_game); |
| 369 | + | g_lua.bindSingletonFunction("g_game", "requestChannels", |
| 370 | + | &Game::requestChannels, &g_game); |
| 371 | + | g_lua.bindSingletonFunction("g_game", "joinChannel", &Game::joinChannel, |
| 372 | + | &g_game); |
| 373 | + | g_lua.bindSingletonFunction("g_game", "leaveChannel", &Game::leaveChannel, |
| 374 | + | &g_game); |
| 375 | + | g_lua.bindSingletonFunction("g_game", "closeNpcChannel", |
| 376 | + | &Game::closeNpcChannel, &g_game); |
| 377 | + | g_lua.bindSingletonFunction("g_game", "openOwnChannel", &Game::openOwnChannel, |
| 378 | + | &g_game); |
| 379 | + | g_lua.bindSingletonFunction("g_game", "inviteToOwnChannel", |
| 380 | + | &Game::inviteToOwnChannel, &g_game); |
| 381 | + | g_lua.bindSingletonFunction("g_game", "excludeFromOwnChannel", |
| 382 | + | &Game::excludeFromOwnChannel, &g_game); |
| 383 | + | g_lua.bindSingletonFunction("g_game", "partyInvite", &Game::partyInvite, |
| 384 | + | &g_game); |
| 385 | + | g_lua.bindSingletonFunction("g_game", "partyJoin", &Game::partyJoin, &g_game); |
| 386 | + | g_lua.bindSingletonFunction("g_game", "partyRevokeInvitation", |
| 387 | + | &Game::partyRevokeInvitation, &g_game); |
| 388 | + | g_lua.bindSingletonFunction("g_game", "partyPassLeadership", |
| 389 | + | &Game::partyPassLeadership, &g_game); |
| 390 | + | g_lua.bindSingletonFunction("g_game", "partyLeave", &Game::partyLeave, |
| 391 | + | &g_game); |
| 392 | + | g_lua.bindSingletonFunction("g_game", "partyShareExperience", |
| 393 | + | &Game::partyShareExperience, &g_game); |
| 394 | + | g_lua.bindSingletonFunction("g_game", "requestOutfit", &Game::requestOutfit, |
| 395 | + | &g_game); |
| 396 | + | g_lua.bindSingletonFunction("g_game", "changeOutfit", &Game::changeOutfit, |
| 397 | + | &g_game); |
| 398 | + | g_lua.bindSingletonFunction("g_game", "addVip", &Game::addVip, &g_game); |
| 399 | + | g_lua.bindSingletonFunction("g_game", "removeVip", &Game::removeVip, &g_game); |
| 400 | + | g_lua.bindSingletonFunction("g_game", "editVip", &Game::editVip, &g_game); |
| 401 | + | g_lua.bindSingletonFunction("g_game", "setChaseMode", &Game::setChaseMode, |
| 402 | + | &g_game); |
| 403 | + | g_lua.bindSingletonFunction("g_game", "setFightMode", &Game::setFightMode, |
| 404 | + | &g_game); |
| 405 | + | g_lua.bindSingletonFunction("g_game", "setPVPMode", &Game::setPVPMode, |
| 406 | + | &g_game); |
| 407 | + | g_lua.bindSingletonFunction("g_game", "setSafeFight", &Game::setSafeFight, |
| 408 | + | &g_game); |
| 409 | + | g_lua.bindSingletonFunction("g_game", "getChaseMode", &Game::getChaseMode, |
| 410 | + | &g_game); |
| 411 | + | g_lua.bindSingletonFunction("g_game", "getFightMode", &Game::getFightMode, |
| 412 | + | &g_game); |
| 413 | + | g_lua.bindSingletonFunction("g_game", "getPVPMode", &Game::getPVPMode, |
| 414 | + | &g_game); |
| 415 | + | g_lua.bindSingletonFunction("g_game", "getUnjustifiedPoints", |
| 416 | + | &Game::getUnjustifiedPoints, &g_game); |
| 417 | + | g_lua.bindSingletonFunction("g_game", "getOpenPvpSituations", |
| 418 | + | &Game::getOpenPvpSituations, &g_game); |
| 419 | + | g_lua.bindSingletonFunction("g_game", "isSafeFight", &Game::isSafeFight, |
| 420 | + | &g_game); |
| 421 | + | g_lua.bindSingletonFunction("g_game", "inspectNpcTrade", |
| 422 | + | &Game::inspectNpcTrade, &g_game); |
| 423 | + | g_lua.bindSingletonFunction("g_game", "buyItem", &Game::buyItem, &g_game); |
| 424 | + | g_lua.bindSingletonFunction("g_game", "sellItem", &Game::sellItem, &g_game); |
| 425 | + | g_lua.bindSingletonFunction("g_game", "closeNpcTrade", &Game::closeNpcTrade, |
| 426 | + | &g_game); |
| 427 | + | g_lua.bindSingletonFunction("g_game", "requestTrade", &Game::requestTrade, |
| 428 | + | &g_game); |
| 429 | + | g_lua.bindSingletonFunction("g_game", "inspectTrade", &Game::inspectTrade, |
| 430 | + | &g_game); |
| 431 | + | g_lua.bindSingletonFunction("g_game", "acceptTrade", &Game::acceptTrade, |
| 432 | + | &g_game); |
| 433 | + | g_lua.bindSingletonFunction("g_game", "rejectTrade", &Game::rejectTrade, |
| 434 | + | &g_game); |
| 435 | + | g_lua.bindSingletonFunction("g_game", "openRuleViolation", |
| 436 | + | &Game::openRuleViolation, &g_game); |
| 437 | + | g_lua.bindSingletonFunction("g_game", "closeRuleViolation", |
| 438 | + | &Game::closeRuleViolation, &g_game); |
| 439 | + | g_lua.bindSingletonFunction("g_game", "cancelRuleViolation", |
| 440 | + | &Game::cancelRuleViolation, &g_game); |
| 441 | + | g_lua.bindSingletonFunction("g_game", "reportBug", &Game::reportBug, &g_game); |
| 442 | + | g_lua.bindSingletonFunction("g_game", "reportRuleViolation", |
| 443 | + | &Game::reportRuleViolation, &g_game); |
| 444 | + | g_lua.bindSingletonFunction("g_game", "debugReport", &Game::debugReport, |
| 445 | + | &g_game); |
| 446 | + | g_lua.bindSingletonFunction("g_game", "editText", &Game::editText, &g_game); |
| 447 | + | g_lua.bindSingletonFunction("g_game", "editList", &Game::editList, &g_game); |
| 448 | + | g_lua.bindSingletonFunction("g_game", "requestQuestLog", |
| 449 | + | &Game::requestQuestLog, &g_game); |
| 450 | + | g_lua.bindSingletonFunction("g_game", "requestQuestLine", |
| 451 | + | &Game::requestQuestLine, &g_game); |
| 452 | + | g_lua.bindSingletonFunction("g_game", "equipItem", &Game::equipItem, &g_game); |
| 453 | + | g_lua.bindSingletonFunction("g_game", "equipItemId", &Game::equipItemId, |
| 454 | + | &g_game); |
| 455 | + | g_lua.bindSingletonFunction("g_game", "mount", &Game::mount, &g_game); |
| 456 | + | g_lua.bindSingletonFunction("g_game", "setOutfitExtensions", |
| 457 | + | &Game::setOutfitExtensions, &g_game); |
| 458 | + | g_lua.bindSingletonFunction("g_game", "requestItemInfo", |
| 459 | + | &Game::requestItemInfo, &g_game); |
| 460 | + | g_lua.bindSingletonFunction("g_game", "ping", &Game::ping, &g_game); |
| 461 | + | g_lua.bindSingletonFunction("g_game", "setPingDelay", &Game::setPingDelay, |
| 462 | + | &g_game); |
| 463 | + | g_lua.bindSingletonFunction("g_game", "changeMapAwareRange", |
| 464 | + | &Game::changeMapAwareRange, &g_game); |
| 465 | + | g_lua.bindSingletonFunction("g_game", "canPerformGameAction", |
| 466 | + | &Game::canPerformGameAction, &g_game); |
| 467 | + | g_lua.bindSingletonFunction("g_game", "canReportBugs", &Game::canReportBugs, |
| 468 | + | &g_game); |
| 469 | + | g_lua.bindSingletonFunction("g_game", "checkBotProtection", |
| 470 | + | &Game::checkBotProtection, &g_game); |
| 471 | + | g_lua.bindSingletonFunction("g_game", "isOnline", &Game::isOnline, &g_game); |
| 472 | + | g_lua.bindSingletonFunction("g_game", "isLogging", &Game::isLogging, &g_game); |
| 473 | + | g_lua.bindSingletonFunction("g_game", "isDead", &Game::isDead, &g_game); |
| 474 | + | g_lua.bindSingletonFunction("g_game", "isAttacking", &Game::isAttacking, |
| 475 | + | &g_game); |
| 476 | + | g_lua.bindSingletonFunction("g_game", "isFollowing", &Game::isFollowing, |
| 477 | + | &g_game); |
| 478 | + | g_lua.bindSingletonFunction("g_game", "isConnectionOk", &Game::isConnectionOk, |
| 479 | + | &g_game); |
| 480 | + | g_lua.bindSingletonFunction("g_game", "getPing", &Game::getPing, &g_game); |
| 481 | + | g_lua.bindSingletonFunction("g_game", "getContainer", &Game::getContainer, |
| 482 | + | &g_game); |
| 483 | + | g_lua.bindSingletonFunction("g_game", "getContainers", &Game::getContainers, |
| 484 | + | &g_game); |
| 485 | + | g_lua.bindSingletonFunction("g_game", "getVips", &Game::getVips, &g_game); |
| 486 | + | g_lua.bindSingletonFunction("g_game", "getAttackingCreature", |
| 487 | + | &Game::getAttackingCreature, &g_game); |
| 488 | + | g_lua.bindSingletonFunction("g_game", "getFollowingCreature", |
| 489 | + | &Game::getFollowingCreature, &g_game); |
| 490 | + | g_lua.bindSingletonFunction("g_game", "getServerBeat", &Game::getServerBeat, |
| 491 | + | &g_game); |
| 492 | + | g_lua.bindSingletonFunction("g_game", "getLocalPlayer", &Game::getLocalPlayer, |
| 493 | + | &g_game); |
| 494 | + | g_lua.bindSingletonFunction("g_game", "getProtocolGame", |
| 495 | + | &Game::getProtocolGame, &g_game); |
| 496 | + | g_lua.bindSingletonFunction("g_game", "getProtocolVersion", |
| 497 | + | &Game::getProtocolVersion, &g_game); |
| 498 | + | g_lua.bindSingletonFunction("g_game", "setProtocolVersion", |
| 499 | + | &Game::setProtocolVersion, &g_game); |
| 500 | + | g_lua.bindSingletonFunction("g_game", "getCustomProtocolVersion", |
| 501 | + | &Game::getCustomProtocolVersion, &g_game); |
| 502 | + | g_lua.bindSingletonFunction("g_game", "setCustomProtocolVersion", |
| 503 | + | &Game::setCustomProtocolVersion, &g_game); |
| 504 | + | g_lua.bindSingletonFunction("g_game", "getClientVersion", |
| 505 | + | &Game::getClientVersion, &g_game); |
| 506 | + | g_lua.bindSingletonFunction("g_game", "setClientVersion", |
| 507 | + | &Game::setClientVersion, &g_game); |
| 508 | + | g_lua.bindSingletonFunction("g_game", "setCustomOs", &Game::setCustomOs, |
| 509 | + | &g_game); |
| 510 | + | g_lua.bindSingletonFunction("g_game", "getOs", &Game::getOs, &g_game); |
| 511 | + | g_lua.bindSingletonFunction("g_game", "getCharacterName", |
| 512 | + | &Game::getCharacterName, &g_game); |
| 513 | + | g_lua.bindSingletonFunction("g_game", "getWorldName", &Game::getWorldName, |
| 514 | + | &g_game); |
| 515 | + | g_lua.bindSingletonFunction("g_game", "getGMActions", &Game::getGMActions, |
| 516 | + | &g_game); |
| 517 | + | g_lua.bindSingletonFunction("g_game", "getFeature", &Game::getFeature, |
| 518 | + | &g_game); |
| 519 | + | g_lua.bindSingletonFunction("g_game", "setFeature", &Game::setFeature, |
| 520 | + | &g_game); |
| 521 | + | g_lua.bindSingletonFunction("g_game", "enableFeature", &Game::enableFeature, |
| 522 | + | &g_game); |
| 523 | + | g_lua.bindSingletonFunction("g_game", "disableFeature", &Game::disableFeature, |
| 524 | + | &g_game); |
| 525 | + | g_lua.bindSingletonFunction("g_game", "resetFeatures", &Game::resetFeatures, |
| 526 | + | &g_game); |
| 527 | + | g_lua.bindSingletonFunction("g_game", "isGM", &Game::isGM, &g_game); |
| 528 | + | g_lua.bindSingletonFunction("g_game", "answerModalDialog", |
| 529 | + | &Game::answerModalDialog, &g_game); |
| 530 | + | g_lua.bindSingletonFunction("g_game", "browseField", &Game::browseField, |
| 531 | + | &g_game); |
| 532 | + | g_lua.bindSingletonFunction("g_game", "seekInContainer", |
| 533 | + | &Game::seekInContainer, &g_game); |
| 534 | + | g_lua.bindSingletonFunction("g_game", "getLastWalkDir", &Game::getLastWalkDir, |
| 535 | + | &g_game); |
| 536 | + | g_lua.bindSingletonFunction("g_game", "buyStoreOffer", &Game::buyStoreOffer, |
| 537 | + | &g_game); |
| 538 | + | g_lua.bindSingletonFunction("g_game", "requestTransactionHistory", |
| 539 | + | &Game::requestTransactionHistory, &g_game); |
| 540 | + | g_lua.bindSingletonFunction("g_game", "requestStoreOffers", |
| 541 | + | &Game::requestStoreOffers, &g_game); |
| 542 | + | g_lua.bindSingletonFunction("g_game", "openStore", &Game::openStore, &g_game); |
| 543 | + | g_lua.bindSingletonFunction("g_game", "transferCoins", &Game::transferCoins, |
| 544 | + | &g_game); |
| 545 | + | g_lua.bindSingletonFunction("g_game", "openTransactionHistory", |
| 546 | + | &Game::openTransactionHistory, &g_game); |
| 547 | + | g_lua.bindSingletonFunction("g_game", "preyAction", &Game::preyAction, |
| 548 | + | &g_game); |
| 549 | + | g_lua.bindSingletonFunction("g_game", "preyRequest", &Game::preyRequest, |
| 550 | + | &g_game); |
| 551 | + | g_lua.bindSingletonFunction("g_game", "applyImbuement", &Game::applyImbuement, |
| 552 | + | &g_game); |
| 553 | + | g_lua.bindSingletonFunction("g_game", "clearImbuement", &Game::clearImbuement, |
| 554 | + | &g_game); |
| 555 | + | g_lua.bindSingletonFunction("g_game", "closeImbuingWindow", |
| 556 | + | &Game::closeImbuingWindow, &g_game); |
| 557 | + | g_lua.bindSingletonFunction("g_game", "setTibiaCoins", &Game::setTibiaCoins, |
| 558 | + | &g_game); |
| 559 | + | g_lua.bindSingletonFunction("g_game", "getTibiaCoins", &Game::getTibiaCoins, |
| 560 | + | &g_game); |
| 561 | + | g_lua.bindSingletonFunction("g_game", "getTransferableTibiaCoins", |
| 562 | + | &Game::getTransferableTibiaCoins, &g_game); |
| 563 | + | |
| 564 | + | g_lua.bindSingletonFunction("g_game", "getMaxPreWalkingSteps", |
| 565 | + | &Game::getMaxPreWalkingSteps, &g_game); |
| 566 | + | g_lua.bindSingletonFunction("g_game", "setMaxPreWalkingSteps", |
| 567 | + | &Game::setMaxPreWalkingSteps, &g_game); |
| 568 | + | g_lua.bindSingletonFunction("g_game", "ignoreServerDirection", |
| 569 | + | &Game::ignoreServerDirection, &g_game); |
| 570 | + | g_lua.bindSingletonFunction("g_game", "showRealDirection", |
| 571 | + | &Game::showRealDirection, &g_game); |
| 572 | + | g_lua.bindSingletonFunction("g_game", "enableTileThingLuaCallback", |
| 573 | + | &Game::enableTileThingLuaCallback, &g_game); |
| 574 | + | g_lua.bindSingletonFunction("g_game", "isTileThingLuaCallbackEnabled", |
| 575 | + | &Game::isTileThingLuaCallbackEnabled, &g_game); |
| 576 | + | g_lua.bindSingletonFunction("g_game", "getRecivedPacketsCount", |
| 577 | + | &Game::getRecivedPacketsCount, &g_game); |
| 578 | + | g_lua.bindSingletonFunction("g_game", "getRecivedPacketsSize", |
| 579 | + | &Game::getRecivedPacketsSize, &g_game); |
| 580 | + | |
| 581 | + | g_lua.registerSingletonClass("g_healthBars"); |
| 582 | + | g_lua.bindSingletonFunction("g_healthBars", "addHealthBackground", |
| 583 | + | &HealthBars::addHealthBackground, &g_healthBars); |
| 584 | + | g_lua.bindSingletonFunction("g_healthBars", "addManaBackground", |
| 585 | + | &HealthBars::addManaBackground, &g_healthBars); |
| 586 | + | g_lua.bindSingletonFunction("g_healthBars", "getHealthBarPath", |
| 587 | + | &HealthBars::getHealthBarPath, &g_healthBars); |
| 588 | + | g_lua.bindSingletonFunction("g_healthBars", "getManaBarPath", |
| 589 | + | &HealthBars::getManaBarPath, &g_healthBars); |
| 590 | + | g_lua.bindSingletonFunction("g_healthBars", "getHealthBarOffset", |
| 591 | + | &HealthBars::getHealthBarOffset, &g_healthBars); |
| 592 | + | g_lua.bindSingletonFunction("g_healthBars", "getManaBarOffset", |
| 593 | + | &HealthBars::getManaBarOffset, &g_healthBars); |
| 594 | + | g_lua.bindSingletonFunction("g_healthBars", "getHealthBarOffsetBar", |
| 595 | + | &HealthBars::getHealthBarOffsetBar, |
| 596 | + | &g_healthBars); |
| 597 | + | g_lua.bindSingletonFunction("g_healthBars", "getManaBarOffsetBar", |
| 598 | + | &HealthBars::getManaBarOffsetBar, &g_healthBars); |
| 599 | + | g_lua.bindSingletonFunction("g_healthBars", "getHealthBarHeight", |
| 600 | + | &HealthBars::getHealthBarHeight, &g_healthBars); |
| 601 | + | g_lua.bindSingletonFunction("g_healthBars", "getManaBarHeight", |
| 602 | + | &HealthBars::getManaBarHeight, &g_healthBars); |
| 603 | + | |
| 604 | + | g_lua.bindGlobalFunction("getOutfitColor", Outfit::getColor); |
| 605 | + | g_lua.bindGlobalFunction("getAngleFromPos", Position::getAngleFromPositions); |
| 606 | + | g_lua.bindGlobalFunction("getDirectionFromPos", |
| 607 | + | Position::getDirectionFromPositions); |
| 608 | + | |
| 609 | + | g_lua.registerClass<ProtocolGame, Protocol>(); |
| 610 | + | g_lua.bindClassStaticFunction<ProtocolGame>( |
| 611 | + | "create", [] { return ProtocolGamePtr(new ProtocolGame); }); |
| 612 | + | g_lua.bindClassMemberFunction<ProtocolGame>("login", &ProtocolGame::login); |
| 613 | + | g_lua.bindClassMemberFunction<ProtocolGame>( |
| 614 | + | "sendExtendedOpcode", &ProtocolGame::sendExtendedOpcode); |
| 615 | + | g_lua.bindClassMemberFunction<ProtocolGame>("addPosition", |
| 616 | + | &ProtocolGame::addPosition); |
| 617 | + | g_lua.bindClassMemberFunction<ProtocolGame>("setMapDescription", |
| 618 | + | &ProtocolGame::setMapDescription); |
| 619 | + | g_lua.bindClassMemberFunction<ProtocolGame>( |
| 620 | + | "setFloorDescription", &ProtocolGame::setFloorDescription); |
| 621 | + | g_lua.bindClassMemberFunction<ProtocolGame>( |
| 622 | + | "setTileDescription", &ProtocolGame::setTileDescription); |
| 623 | + | g_lua.bindClassMemberFunction<ProtocolGame>("getOutfit", |
| 624 | + | &ProtocolGame::getOutfit); |
| 625 | + | g_lua.bindClassMemberFunction<ProtocolGame>("getThing", |
| 626 | + | &ProtocolGame::getThing); |
| 627 | + | g_lua.bindClassMemberFunction<ProtocolGame>("getCreature", |
| 628 | + | &ProtocolGame::getCreature); |
| 629 | + | g_lua.bindClassMemberFunction<ProtocolGame>("getItem", |
| 630 | + | &ProtocolGame::getItem); |
| 631 | + | g_lua.bindClassMemberFunction<ProtocolGame>("getPosition", |
| 632 | + | &ProtocolGame::getPosition); |
| 633 | + | |
| 634 | + | g_lua.registerClass<Container>(); |
| 635 | + | g_lua.bindClassMemberFunction<Container>("getItem", &Container::getItem); |
| 636 | + | g_lua.bindClassMemberFunction<Container>("getItems", &Container::getItems); |
| 637 | + | g_lua.bindClassMemberFunction<Container>("getItemsCount", |
| 638 | + | &Container::getItemsCount); |
| 639 | + | g_lua.bindClassMemberFunction<Container>("getSlotPosition", |
| 640 | + | &Container::getSlotPosition); |
| 641 | + | g_lua.bindClassMemberFunction<Container>("getName", &Container::getName); |
| 642 | + | g_lua.bindClassMemberFunction<Container>("getId", &Container::getId); |
| 643 | + | g_lua.bindClassMemberFunction<Container>("getCapacity", |
| 644 | + | &Container::getCapacity); |
| 645 | + | g_lua.bindClassMemberFunction<Container>("getContainerItem", |
| 646 | + | &Container::getContainerItem); |
| 647 | + | g_lua.bindClassMemberFunction<Container>("hasParent", &Container::hasParent); |
| 648 | + | g_lua.bindClassMemberFunction<Container>("isClosed", &Container::isClosed); |
| 649 | + | g_lua.bindClassMemberFunction<Container>("isUnlocked", |
| 650 | + | &Container::isUnlocked); |
| 651 | + | g_lua.bindClassMemberFunction<Container>("hasPages", &Container::hasPages); |
| 652 | + | g_lua.bindClassMemberFunction<Container>("getSize", &Container::getSize); |
| 653 | + | g_lua.bindClassMemberFunction<Container>("getFirstIndex", |
| 654 | + | &Container::getFirstIndex); |
| 655 | + | |
| 656 | + | g_lua.registerClass<Thing>(); |
| 657 | + | g_lua.bindClassMemberFunction<Thing>("setId", &Thing::setId); |
| 658 | + | g_lua.bindClassMemberFunction<Thing>("setPosition", &Thing::setPosition); |
| 659 | + | g_lua.bindClassMemberFunction<Thing>("getId", &Thing::getId); |
| 660 | + | g_lua.bindClassMemberFunction<Thing>("getPosition", &Thing::getPosition); |
| 661 | + | g_lua.bindClassMemberFunction<Thing>("getStackPriority", |
| 662 | + | &Thing::getStackPriority); |
| 663 | + | g_lua.bindClassMemberFunction<Thing>("getStackPos", &Thing::getStackPos); |
| 664 | + | g_lua.bindClassMemberFunction<Thing>("getAnimationPhases", |
| 665 | + | &Thing::getAnimationPhases); |
| 666 | + | g_lua.bindClassMemberFunction<Thing>("getTile", &Thing::getTile); |
| 667 | + | g_lua.bindClassMemberFunction<Thing>("setMarked", &Thing::setMarked); |
| 668 | + | g_lua.bindClassMemberFunction<Thing>("isItem", &Thing::isItem); |
| 669 | + | g_lua.bindClassMemberFunction<Thing>("isMonster", &Thing::isMonster); |
| 670 | + | g_lua.bindClassMemberFunction<Thing>("isNpc", &Thing::isNpc); |
| 671 | + | g_lua.bindClassMemberFunction<Thing>("isCreature", &Thing::isCreature); |
| 672 | + | g_lua.bindClassMemberFunction<Thing>("isEffect", &Thing::isEffect); |
| 673 | + | g_lua.bindClassMemberFunction<Thing>("isMissile", &Thing::isMissile); |
| 674 | + | g_lua.bindClassMemberFunction<Thing>("isPlayer", &Thing::isPlayer); |
| 675 | + | g_lua.bindClassMemberFunction<Thing>("isLocalPlayer", &Thing::isLocalPlayer); |
| 676 | + | g_lua.bindClassMemberFunction<Thing>("isAnimatedText", |
| 677 | + | &Thing::isAnimatedText); |
| 678 | + | g_lua.bindClassMemberFunction<Thing>("isStaticText", &Thing::isStaticText); |
| 679 | + | g_lua.bindClassMemberFunction<Thing>("isGround", &Thing::isGround); |
| 680 | + | g_lua.bindClassMemberFunction<Thing>("isGroundBorder", |
| 681 | + | &Thing::isGroundBorder); |
| 682 | + | g_lua.bindClassMemberFunction<Thing>("isOnBottom", &Thing::isOnBottom); |
| 683 | + | g_lua.bindClassMemberFunction<Thing>("isOnTop", &Thing::isOnTop); |
| 684 | + | g_lua.bindClassMemberFunction<Thing>("isContainer", &Thing::isContainer); |
| 685 | + | g_lua.bindClassMemberFunction<Thing>("isForceUse", &Thing::isForceUse); |
| 686 | + | g_lua.bindClassMemberFunction<Thing>("isMultiUse", &Thing::isMultiUse); |
| 687 | + | g_lua.bindClassMemberFunction<Thing>("isRotateable", &Thing::isRotateable); |
| 688 | + | g_lua.bindClassMemberFunction<Thing>("isNotMoveable", &Thing::isNotMoveable); |
| 689 | + | g_lua.bindClassMemberFunction<Thing>("isPickupable", &Thing::isPickupable); |
| 690 | + | g_lua.bindClassMemberFunction<Thing>("isIgnoreLook", &Thing::isIgnoreLook); |
| 691 | + | g_lua.bindClassMemberFunction<Thing>("isStackable", &Thing::isStackable); |
| 692 | + | g_lua.bindClassMemberFunction<Thing>("isHookSouth", &Thing::isHookSouth); |
| 693 | + | g_lua.bindClassMemberFunction<Thing>("isTranslucent", &Thing::isTranslucent); |
| 694 | + | g_lua.bindClassMemberFunction<Thing>("isFullGround", &Thing::isFullGround); |
| 695 | + | g_lua.bindClassMemberFunction<Thing>("isMarketable", &Thing::isMarketable); |
| 696 | + | g_lua.bindClassMemberFunction<Thing>("getMarketData", &Thing::getMarketData); |
| 697 | + | g_lua.bindClassMemberFunction<Thing>("isUsable", &Thing::isUsable); |
| 698 | + | g_lua.bindClassMemberFunction<Thing>("isWrapable", &Thing::isWrapable); |
| 699 | + | g_lua.bindClassMemberFunction<Thing>("isUnwrapable", &Thing::isUnwrapable); |
| 700 | + | g_lua.bindClassMemberFunction<Thing>("isTopEffect", &Thing::isTopEffect); |
| 701 | + | g_lua.bindClassMemberFunction<Thing>("isLyingCorpse", &Thing::isLyingCorpse); |
| 702 | + | g_lua.bindClassMemberFunction<Thing>("getParentContainer", |
| 703 | + | &Thing::getParentContainer); |
| 704 | + | g_lua.bindClassMemberFunction<Thing>("hide", &Thing::hide); |
| 705 | + | g_lua.bindClassMemberFunction<Thing>("show", &Thing::show); |
| 706 | + | g_lua.bindClassMemberFunction<Thing>("setHidden", &Thing::setHidden); |
| 707 | + | g_lua.bindClassMemberFunction<Thing>("isHidden", &Thing::isHidden); |
| 708 | + | |
| 709 | + | g_lua.registerClass<House>(); |
| 710 | + | g_lua.bindClassStaticFunction<House>("create", |
| 711 | + | [] { return HousePtr(new House); }); |
| 712 | + | g_lua.bindClassMemberFunction<House>("setId", &House::setId); |
| 713 | + | g_lua.bindClassMemberFunction<House>("getId", &House::getId); |
| 714 | + | g_lua.bindClassMemberFunction<House>("setName", &House::setName); |
| 715 | + | g_lua.bindClassMemberFunction<House>("getName", &House::getName); |
| 716 | + | g_lua.bindClassMemberFunction<House>("setTownId", &House::setTownId); |
| 717 | + | g_lua.bindClassMemberFunction<House>("getTownId", &House::getTownId); |
| 718 | + | g_lua.bindClassMemberFunction<House>("setTile", &House::setTile); |
| 719 | + | g_lua.bindClassMemberFunction<House>("getTile", &House::getTile); |
| 720 | + | g_lua.bindClassMemberFunction<House>("setEntry", &House::setEntry); |
| 721 | + | g_lua.bindClassMemberFunction<House>("getEntry", &House::getEntry); |
| 722 | + | g_lua.bindClassMemberFunction<House>("addDoor", &House::addDoor); |
| 723 | + | g_lua.bindClassMemberFunction<House>("removeDoor", &House::removeDoor); |
| 724 | + | g_lua.bindClassMemberFunction<House>("removeDoorById", |
| 725 | + | &House::removeDoorById); |
| 726 | + | g_lua.bindClassMemberFunction<House>("setSize", &House::setSize); |
| 727 | + | g_lua.bindClassMemberFunction<House>("getSize", &House::getSize); |
| 728 | + | g_lua.bindClassMemberFunction<House>("setRent", &House::setRent); |
| 729 | + | g_lua.bindClassMemberFunction<House>("getRent", &House::getRent); |
| 730 | + | |
| 731 | + | g_lua.registerClass<Spawn>(); |
| 732 | + | g_lua.bindClassStaticFunction<Spawn>("create", |
| 733 | + | [] { return SpawnPtr(new Spawn); }); |
| 734 | + | g_lua.bindClassMemberFunction<Spawn>("setRadius", &Spawn::setRadius); |
| 735 | + | g_lua.bindClassMemberFunction<Spawn>("getRadius", &Spawn::getRadius); |
| 736 | + | g_lua.bindClassMemberFunction<Spawn>("setCenterPos", &Spawn::setCenterPos); |
| 737 | + | g_lua.bindClassMemberFunction<Spawn>("getCenterPos", &Spawn::getCenterPos); |
| 738 | + | g_lua.bindClassMemberFunction<Spawn>("addCreature", &Spawn::addCreature); |
| 739 | + | g_lua.bindClassMemberFunction<Spawn>("removeCreature", |
| 740 | + | &Spawn::removeCreature); |
| 741 | + | g_lua.bindClassMemberFunction<Spawn>("getCreatures", &Spawn::getCreatures); |
| 742 | + | |
| 743 | + | g_lua.registerClass<Town>(); |
| 744 | + | g_lua.bindClassStaticFunction<Town>("create", |
| 745 | + | [] { return TownPtr(new Town); }); |
| 746 | + | g_lua.bindClassMemberFunction<Town>("setId", &Town::setId); |
| 747 | + | g_lua.bindClassMemberFunction<Town>("setName", &Town::setName); |
| 748 | + | g_lua.bindClassMemberFunction<Town>("setPos", &Town::setPos); |
| 749 | + | g_lua.bindClassMemberFunction<Town>("setTemplePos", |
| 750 | + | &Town::setPos); // alternative method |
| 751 | + | g_lua.bindClassMemberFunction<Town>("getId", &Town::getId); |
| 752 | + | g_lua.bindClassMemberFunction<Town>("getName", &Town::getName); |
| 753 | + | g_lua.bindClassMemberFunction<Town>("getPos", &Town::getPos); |
| 754 | + | g_lua.bindClassMemberFunction<Town>("getTemplePos", |
| 755 | + | &Town::getPos); // alternative method |
| 756 | + | |
| 757 | + | g_lua.registerClass<CreatureType>(); |
| 758 | + | g_lua.bindClassStaticFunction<CreatureType>( |
| 759 | + | "create", [] { return CreatureTypePtr(new CreatureType); }); |
| 760 | + | g_lua.bindClassMemberFunction<CreatureType>("setName", |
| 761 | + | &CreatureType::setName); |
| 762 | + | g_lua.bindClassMemberFunction<CreatureType>("setOutfit", |
| 763 | + | &CreatureType::setOutfit); |
| 764 | + | g_lua.bindClassMemberFunction<CreatureType>("setSpawnTime", |
| 765 | + | &CreatureType::setSpawnTime); |
| 766 | + | g_lua.bindClassMemberFunction<CreatureType>("getName", |
| 767 | + | &CreatureType::getName); |
| 768 | + | g_lua.bindClassMemberFunction<CreatureType>("getOutfit", |
| 769 | + | &CreatureType::getOutfit); |
| 770 | + | g_lua.bindClassMemberFunction<CreatureType>("getSpawnTime", |
| 771 | + | &CreatureType::getSpawnTime); |
| 772 | + | g_lua.bindClassMemberFunction<CreatureType>("cast", &CreatureType::cast); |
| 773 | + | |
| 774 | + | g_lua.registerClass<Creature, Thing>(); |
| 775 | + | g_lua.bindClassStaticFunction<Creature>( |
| 776 | + | "create", [] { return CreaturePtr(new Creature); }); |
| 777 | + | g_lua.bindClassMemberFunction<Creature>("getId", &Creature::getId); |
| 778 | + | g_lua.bindClassMemberFunction<Creature>("getName", &Creature::getName); |
| 779 | + | g_lua.bindClassMemberFunction<Creature>("setName", &Creature::setName); |
| 780 | + | g_lua.bindClassMemberFunction<Creature>("setManaPercent", |
| 781 | + | &LocalPlayer::setManaPercent); |
| 782 | + | g_lua.bindClassMemberFunction<Creature>("getManaPercent", |
| 783 | + | &LocalPlayer::getManaPercent); |
| 784 | + | g_lua.bindClassMemberFunction<Creature>("setHealthPercent", |
| 785 | + | &Creature::setHealthPercent); |
| 786 | + | g_lua.bindClassMemberFunction<Creature>("getHealthPercent", |
| 787 | + | &Creature::getHealthPercent); |
| 788 | + | g_lua.bindClassMemberFunction<Creature>("getSpeed", &Creature::getSpeed); |
| 789 | + | g_lua.bindClassMemberFunction<Creature>("setSpeed", &Creature::setSpeed); |
| 790 | + | g_lua.bindClassMemberFunction<Creature>("getBaseSpeed", |
| 791 | + | &Creature::getBaseSpeed); |
| 792 | + | g_lua.bindClassMemberFunction<Creature>("setBaseSpeed", |
| 793 | + | &Creature::setBaseSpeed); |
| 794 | + | g_lua.bindClassMemberFunction<Creature>("getSkull", &Creature::getSkull); |
| 795 | + | g_lua.bindClassMemberFunction<Creature>("getShield", &Creature::getShield); |
| 796 | + | g_lua.bindClassMemberFunction<Creature>("getEmblem", &Creature::getEmblem); |
| 797 | + | g_lua.bindClassMemberFunction<Creature>("setSkull", &Creature::setSkull); |
| 798 | + | g_lua.bindClassMemberFunction<Creature>("setShield", &Creature::setShield); |
| 799 | + | g_lua.bindClassMemberFunction<Creature>("setEmblem", &Creature::setEmblem); |
| 800 | + | g_lua.bindClassMemberFunction<Creature>("getType", &Creature::getType); |
| 801 | + | g_lua.bindClassMemberFunction<Creature>("getIcon", &Creature::getIcon); |
| 802 | + | g_lua.bindClassMemberFunction<Creature>("setOutfit", &Creature::setOutfit); |
| 803 | + | g_lua.bindClassMemberFunction<Creature>("getOutfit", &Creature::getOutfit); |
| 804 | + | g_lua.bindClassMemberFunction<Creature>("setOutfitColor", |
| 805 | + | &Creature::setOutfitColor); |
| 806 | + | g_lua.bindClassMemberFunction<Creature>("getDirection", |
| 807 | + | &Creature::getDirection); |
| 808 | + | g_lua.bindClassMemberFunction<Creature>("getWalkDirection", |
| 809 | + | &Creature::getWalkDirection); |
| 810 | + | g_lua.bindClassMemberFunction<Creature>("getStepDuration", |
| 811 | + | &Creature::getStepDuration); |
| 812 | + | g_lua.bindClassMemberFunction<Creature>("getStepProgress", |
| 813 | + | &Creature::getStepProgress); |
| 814 | + | g_lua.bindClassMemberFunction<Creature>("getWalkTicksElapsed", |
| 815 | + | &Creature::getWalkTicksElapsed); |
| 816 | + | g_lua.bindClassMemberFunction<Creature>("getStepTicksLeft", |
| 817 | + | &Creature::getStepTicksLeft); |
| 818 | + | g_lua.bindClassMemberFunction<Creature>("setDirection", |
| 819 | + | &Creature::setDirection); |
| 820 | + | g_lua.bindClassMemberFunction<Creature>("setSkullTexture", |
| 821 | + | &Creature::setSkullTexture); |
| 822 | + | g_lua.bindClassMemberFunction<Creature>("setShieldTexture", |
| 823 | + | &Creature::setShieldTexture); |
| 824 | + | g_lua.bindClassMemberFunction<Creature>("setEmblemTexture", |
| 825 | + | &Creature::setEmblemTexture); |
| 826 | + | g_lua.bindClassMemberFunction<Creature>("setTypeTexture", |
| 827 | + | &Creature::setTypeTexture); |
| 828 | + | g_lua.bindClassMemberFunction<Creature>("setIconTexture", |
| 829 | + | &Creature::setIconTexture); |
| 830 | + | g_lua.bindClassMemberFunction<Creature>("showStaticSquare", |
| 831 | + | &Creature::showStaticSquare); |
| 832 | + | g_lua.bindClassMemberFunction<Creature>("hideStaticSquare", |
| 833 | + | &Creature::hideStaticSquare); |
| 834 | + | g_lua.bindClassMemberFunction<Creature>("isWalking", &Creature::isWalking); |
| 835 | + | g_lua.bindClassMemberFunction<Creature>("isInvisible", |
| 836 | + | &Creature::isInvisible); |
| 837 | + | g_lua.bindClassMemberFunction<Creature>("isDead", &Creature::isDead); |
| 838 | + | g_lua.bindClassMemberFunction<Creature>("isRemoved", &Creature::isRemoved); |
| 839 | + | g_lua.bindClassMemberFunction<Creature>("canBeSeen", &Creature::canBeSeen); |
| 840 | + | g_lua.bindClassMemberFunction<Creature>("canShoot", &Creature::canShoot); |
| 841 | + | g_lua.bindClassMemberFunction<Creature>("jump", &Creature::jump); |
| 842 | + | g_lua.bindClassMemberFunction<Creature>("setWingsOffset", |
| 843 | + | &Creature::setWingsOffset); |
| 844 | + | g_lua.bindClassMemberFunction<Creature>("getWingsOffset", |
| 845 | + | &Creature::getWingsOffset); |
| 846 | + | g_lua.bindClassMemberFunction<Creature>("getWings", &Creature::getWings); |
| 847 | + | g_lua.bindClassMemberFunction<Creature>("getPrewalkingPosition", |
| 848 | + | &Creature::getPrewalkingPosition); |
| 849 | + | g_lua.bindClassMemberFunction<Creature>("setInformationColor", |
| 850 | + | &Creature::setInformationColor); |
| 851 | + | g_lua.bindClassMemberFunction<Creature>("resetInformationColor", |
| 852 | + | &Creature::resetInformationColor); |
| 853 | + | g_lua.bindClassMemberFunction<Creature>("setInformationOffset", |
| 854 | + | &Creature::setInformationOffset); |
| 855 | + | g_lua.bindClassMemberFunction<Creature>("getInformationOffset", |
| 856 | + | &Creature::getInformationOffset); |
| 857 | + | g_lua.bindClassMemberFunction<Creature>("setText", &Creature::setText); |
| 858 | + | g_lua.bindClassMemberFunction<Creature>("getText", &Creature::getText); |
| 859 | + | g_lua.bindClassMemberFunction<Creature>("clearText", &Creature::clearText); |
| 860 | + | g_lua.bindClassMemberFunction<Creature>("setTitle", &Creature::setTitle); |
| 861 | + | g_lua.bindClassMemberFunction<Creature>("clearTitle", &Creature::clearTitle); |
| 862 | + | g_lua.bindClassMemberFunction<Creature>("getTitle", &Creature::getTitle); |
| 863 | + | g_lua.bindClassMemberFunction<Creature>("isTimedSquareVisible", |
| 864 | + | &Creature::isTimedSquareVisible); |
| 865 | + | g_lua.bindClassMemberFunction<Creature>("getTimedSquareColor", |
| 866 | + | &Creature::getTimedSquareColor); |
| 867 | + | g_lua.bindClassMemberFunction<Creature>("isStaticSquareVisible", |
| 868 | + | &Creature::isStaticSquareVisible); |
| 869 | + | g_lua.bindClassMemberFunction<Creature>("getStaticSquareColor", |
| 870 | + | &Creature::getStaticSquareColor); |
| 871 | + | |
| 872 | + | // widgets |
| 873 | + | g_lua.bindClassMemberFunction<Creature>("addTopWidget", |
| 874 | + | &Creature::addTopWidget); |
| 875 | + | g_lua.bindClassMemberFunction<Creature>("addBottomWidget", |
| 876 | + | &Creature::addBottomWidget); |
| 877 | + | g_lua.bindClassMemberFunction<Creature>("addDirectionalWidget", |
| 878 | + | &Creature::addDirectionalWidget); |
| 879 | + | g_lua.bindClassMemberFunction<Creature>("removeTopWidget", |
| 880 | + | &Creature::removeTopWidget); |
| 881 | + | g_lua.bindClassMemberFunction<Creature>("removeBottomWidget", |
| 882 | + | &Creature::removeBottomWidget); |
| 883 | + | g_lua.bindClassMemberFunction<Creature>("removeDirectionalWidget", |
| 884 | + | &Creature::removeDirectionalWidget); |
| 885 | + | g_lua.bindClassMemberFunction<Creature>("getTopWidgets", |
| 886 | + | &Creature::getTopWidgets); |
| 887 | + | g_lua.bindClassMemberFunction<Creature>("getBottomWidgets", |
| 888 | + | &Creature::getBottomWidgets); |
| 889 | + | g_lua.bindClassMemberFunction<Creature>("getDirectionalWdigets", |
| 890 | + | &Creature::getDirectionalWdigets); |
| 891 | + | g_lua.bindClassMemberFunction<Creature>("clearWidgets", |
| 892 | + | &Creature::clearWidgets); |
| 893 | + | g_lua.bindClassMemberFunction<Creature>("clearTopWidgets", |
| 894 | + | &Creature::clearTopWidgets); |
| 895 | + | g_lua.bindClassMemberFunction<Creature>("clearBottomWidgets", |
| 896 | + | &Creature::clearBottomWidgets); |
| 897 | + | g_lua.bindClassMemberFunction<Creature>("clearDirectionalWidgets", |
| 898 | + | &Creature::clearDirectionalWidgets); |
| 899 | + | |
| 900 | + | // progress bar |
| 901 | + | g_lua.bindClassMemberFunction<Creature>("setProgressBar", |
| 902 | + | &Creature::setProgressBar); |
| 903 | + | g_lua.bindClassMemberFunction<Creature>("getProgressBarPercent", |
| 904 | + | &Creature::getProgressBarPercent); |
| 905 | + | |
| 906 | + | g_lua.registerClass<ItemType>(); |
| 907 | + | g_lua.bindClassMemberFunction<ItemType>("getServerId", |
| 908 | + | &ItemType::getServerId); |
| 909 | + | g_lua.bindClassMemberFunction<ItemType>("getClientId", |
| 910 | + | &ItemType::getClientId); |
| 911 | + | g_lua.bindClassMemberFunction<ItemType>("isWritable", &ItemType::isWritable); |
| 912 | + | |
| 913 | + | g_lua.registerClass<ThingType>(); |
| 914 | + | g_lua.bindClassStaticFunction<ThingType>( |
| 915 | + | "create", [] { return ThingTypePtr(new ThingType); }); |
| 916 | + | g_lua.bindClassMemberFunction<ThingType>("getId", &ThingType::getId); |
| 917 | + | g_lua.bindClassMemberFunction<ThingType>("getClothSlot", |
| 918 | + | &ThingType::getClothSlot); |
| 919 | + | g_lua.bindClassMemberFunction<ThingType>("getCategory", |
| 920 | + | &ThingType::getCategory); |
| 921 | + | g_lua.bindClassMemberFunction<ThingType>("getSize", &ThingType::getSize); |
| 922 | + | g_lua.bindClassMemberFunction<ThingType>("getWidth", &ThingType::getWidth); |
| 923 | + | g_lua.bindClassMemberFunction<ThingType>("getHeight", &ThingType::getHeight); |
| 924 | + | g_lua.bindClassMemberFunction<ThingType>("getDisplacement", |
| 925 | + | &ThingType::getDisplacement); |
| 926 | + | g_lua.bindClassMemberFunction<ThingType>("getDisplacementX", |
| 927 | + | &ThingType::getDisplacementX); |
| 928 | + | g_lua.bindClassMemberFunction<ThingType>("getDisplacementY", |
| 929 | + | &ThingType::getDisplacementY); |
| 930 | + | g_lua.bindClassMemberFunction<ThingType>("getExactSize", |
| 931 | + | &ThingType::getExactSize); |
| 932 | + | g_lua.bindClassMemberFunction<ThingType>("getRealSize", |
| 933 | + | &ThingType::getRealSize); |
| 934 | + | g_lua.bindClassMemberFunction<ThingType>("getLayers", &ThingType::getLayers); |
| 935 | + | g_lua.bindClassMemberFunction<ThingType>("getNumPatternX", |
| 936 | + | &ThingType::getNumPatternX); |
| 937 | + | g_lua.bindClassMemberFunction<ThingType>("getNumPatternY", |
| 938 | + | &ThingType::getNumPatternY); |
| 939 | + | g_lua.bindClassMemberFunction<ThingType>("getNumPatternZ", |
| 940 | + | &ThingType::getNumPatternZ); |
| 941 | + | g_lua.bindClassMemberFunction<ThingType>("getAnimationPhases", |
| 942 | + | &ThingType::getAnimationPhases); |
| 943 | + | g_lua.bindClassMemberFunction<ThingType>("getGroundSpeed", |
| 944 | + | &ThingType::getGroundSpeed); |
| 945 | + | g_lua.bindClassMemberFunction<ThingType>("getMaxTextLength", |
| 946 | + | &ThingType::getMaxTextLength); |
| 947 | + | g_lua.bindClassMemberFunction<ThingType>("getLight", &ThingType::getLight); |
| 948 | + | g_lua.bindClassMemberFunction<ThingType>("getMinimapColor", |
| 949 | + | &ThingType::getMinimapColor); |
| 950 | + | g_lua.bindClassMemberFunction<ThingType>("getLensHelp", |
| 951 | + | &ThingType::getLensHelp); |
| 952 | + | g_lua.bindClassMemberFunction<ThingType>("getClothSlot", |
| 953 | + | &ThingType::getClothSlot); |
| 954 | + | g_lua.bindClassMemberFunction<ThingType>("getElevation", |
| 955 | + | &ThingType::getElevation); |
| 956 | + | g_lua.bindClassMemberFunction<ThingType>("isGround", &ThingType::isGround); |
| 957 | + | g_lua.bindClassMemberFunction<ThingType>("isGroundBorder", |
| 958 | + | &ThingType::isGroundBorder); |
| 959 | + | g_lua.bindClassMemberFunction<ThingType>("isOnBottom", |
| 960 | + | &ThingType::isOnBottom); |
| 961 | + | g_lua.bindClassMemberFunction<ThingType>("isOnTop", &ThingType::isOnTop); |
| 962 | + | g_lua.bindClassMemberFunction<ThingType>("isContainer", |
| 963 | + | &ThingType::isContainer); |
| 964 | + | g_lua.bindClassMemberFunction<ThingType>("isStackable", |
| 965 | + | &ThingType::isStackable); |
| 966 | + | g_lua.bindClassMemberFunction<ThingType>("isForceUse", |
| 967 | + | &ThingType::isForceUse); |
| 968 | + | g_lua.bindClassMemberFunction<ThingType>("isMultiUse", |
| 969 | + | &ThingType::isMultiUse); |
| 970 | + | g_lua.bindClassMemberFunction<ThingType>("isWritable", |
| 971 | + | &ThingType::isWritable); |
| 972 | + | g_lua.bindClassMemberFunction<ThingType>("isChargeable", |
| 973 | + | &ThingType::isChargeable); |
| 974 | + | g_lua.bindClassMemberFunction<ThingType>("isWritableOnce", |
| 975 | + | &ThingType::isWritableOnce); |
| 976 | + | g_lua.bindClassMemberFunction<ThingType>("isFluidContainer", |
| 977 | + | &ThingType::isFluidContainer); |
| 978 | + | g_lua.bindClassMemberFunction<ThingType>("isSplash", &ThingType::isSplash); |
| 979 | + | g_lua.bindClassMemberFunction<ThingType>("isNotWalkable", |
| 980 | + | &ThingType::isNotWalkable); |
| 981 | + | g_lua.bindClassMemberFunction<ThingType>("isNotMoveable", |
| 982 | + | &ThingType::isNotMoveable); |
| 983 | + | g_lua.bindClassMemberFunction<ThingType>("blockProjectile", |
| 984 | + | &ThingType::blockProjectile); |
| 985 | + | g_lua.bindClassMemberFunction<ThingType>("isNotPathable", |
| 986 | + | &ThingType::isNotPathable); |
| 987 | + | g_lua.bindClassMemberFunction<ThingType>("setPathable", |
| 988 | + | &ThingType::setPathable); |
| 989 | + | g_lua.bindClassMemberFunction<ThingType>("isPickupable", |
| 990 | + | &ThingType::isPickupable); |
| 991 | + | g_lua.bindClassMemberFunction<ThingType>("isHangable", |
| 992 | + | &ThingType::isHangable); |
| 993 | + | g_lua.bindClassMemberFunction<ThingType>("isHookSouth", |
| 994 | + | &ThingType::isHookSouth); |
| 995 | + | g_lua.bindClassMemberFunction<ThingType>("isHookEast", |
| 996 | + | &ThingType::isHookEast); |
| 997 | + | g_lua.bindClassMemberFunction<ThingType>("isRotateable", |
| 998 | + | &ThingType::isRotateable); |
| 999 | + | g_lua.bindClassMemberFunction<ThingType>("hasLight", &ThingType::hasLight); |
| 1000 | + | g_lua.bindClassMemberFunction<ThingType>("isDontHide", |
| 1001 | + | &ThingType::isDontHide); |
| 1002 | + | g_lua.bindClassMemberFunction<ThingType>("isTranslucent", |
| 1003 | + | &ThingType::isTranslucent); |
| 1004 | + | g_lua.bindClassMemberFunction<ThingType>("hasDisplacement", |
| 1005 | + | &ThingType::hasDisplacement); |
| 1006 | + | g_lua.bindClassMemberFunction<ThingType>("hasElevation", |
| 1007 | + | &ThingType::hasElevation); |
| 1008 | + | g_lua.bindClassMemberFunction<ThingType>("isLyingCorpse", |
| 1009 | + | &ThingType::isLyingCorpse); |
| 1010 | + | g_lua.bindClassMemberFunction<ThingType>("isAnimateAlways", |
| 1011 | + | &ThingType::isAnimateAlways); |
| 1012 | + | g_lua.bindClassMemberFunction<ThingType>("hasMiniMapColor", |
| 1013 | + | &ThingType::hasMiniMapColor); |
| 1014 | + | g_lua.bindClassMemberFunction<ThingType>("hasLensHelp", |
| 1015 | + | &ThingType::hasLensHelp); |
| 1016 | + | g_lua.bindClassMemberFunction<ThingType>("isFullGround", |
| 1017 | + | &ThingType::isFullGround); |
| 1018 | + | g_lua.bindClassMemberFunction<ThingType>("isIgnoreLook", |
| 1019 | + | &ThingType::isIgnoreLook); |
| 1020 | + | g_lua.bindClassMemberFunction<ThingType>("isCloth", &ThingType::isCloth); |
| 1021 | + | g_lua.bindClassMemberFunction<ThingType>("isMarketable", |
| 1022 | + | &ThingType::isMarketable); |
| 1023 | + | g_lua.bindClassMemberFunction<ThingType>("getMarketData", |
| 1024 | + | &ThingType::getMarketData); |
| 1025 | + | g_lua.bindClassMemberFunction<ThingType>("isUsable", &ThingType::isUsable); |
| 1026 | + | g_lua.bindClassMemberFunction<ThingType>("isWrapable", |
| 1027 | + | &ThingType::isWrapable); |
| 1028 | + | g_lua.bindClassMemberFunction<ThingType>("isUnwrapable", |
| 1029 | + | &ThingType::isUnwrapable); |
| 1030 | + | g_lua.bindClassMemberFunction<ThingType>("isTopEffect", |
| 1031 | + | &ThingType::isTopEffect); |
| 1032 | + | g_lua.bindClassMemberFunction<ThingType>("getSprites", |
| 1033 | + | &ThingType::getSprites); |
| 1034 | + | g_lua.bindClassMemberFunction<ThingType>("hasAttribute", &ThingType::hasAttr); |
| 1035 | + | g_lua.bindClassMemberFunction<ThingType>("exportImage", |
| 1036 | + | &ThingType::exportImage); |
| 1037 | + | |
| 1038 | + | g_lua.registerClass<Item, Thing>(); |
| 1039 | + | g_lua.bindClassStaticFunction<Item>("create", &Item::create); |
| 1040 | + | g_lua.bindClassStaticFunction<Item>("createOtb", &Item::createFromOtb); |
| 1041 | + | g_lua.bindClassMemberFunction<Item>("clone", &Item::clone); |
| 1042 | + | g_lua.bindClassMemberFunction<Item>("getContainerItems", |
| 1043 | + | &Item::getContainerItems); |
| 1044 | + | g_lua.bindClassMemberFunction<Item>("getContainerItem", |
| 1045 | + | &Item::getContainerItem); |
| 1046 | + | g_lua.bindClassMemberFunction<Item>("addContainerItem", |
| 1047 | + | &Item::addContainerItem); |
| 1048 | + | g_lua.bindClassMemberFunction<Item>("addContainerItemIndexed", |
| 1049 | + | &Item::addContainerItemIndexed); |
| 1050 | + | g_lua.bindClassMemberFunction<Item>("removeContainerItem", |
| 1051 | + | &Item::removeContainerItem); |
| 1052 | + | g_lua.bindClassMemberFunction<Item>("clearContainerItems", |
| 1053 | + | &Item::clearContainerItems); |
| 1054 | + | g_lua.bindClassMemberFunction<Item>("getContainerItem", |
| 1055 | + | &Item::getContainerItem); |
| 1056 | + | g_lua.bindClassMemberFunction<Item>("setCount", &Item::setCount); |
| 1057 | + | g_lua.bindClassMemberFunction<Item>("getCount", &Item::getCount); |
| 1058 | + | g_lua.bindClassMemberFunction<Item>("getSubType", &Item::getSubType); |
| 1059 | + | g_lua.bindClassMemberFunction<Item>("getCountOrSubType", |
| 1060 | + | &Item::getCountOrSubType); |
| 1061 | + | g_lua.bindClassMemberFunction<Item>("getId", &Item::getId); |
| 1062 | + | g_lua.bindClassMemberFunction<Item>("getServerId", &Item::getServerId); |
| 1063 | + | g_lua.bindClassMemberFunction<Item>("getName", &Item::getName); |
| 1064 | + | g_lua.bindClassMemberFunction<Item>("getDescription", &Item::getDescription); |
| 1065 | + | g_lua.bindClassMemberFunction<Item>("getText", &Item::getText); |
| 1066 | + | g_lua.bindClassMemberFunction<Item>("setDescription", &Item::setDescription); |
| 1067 | + | g_lua.bindClassMemberFunction<Item>("setText", &Item::setText); |
| 1068 | + | g_lua.bindClassMemberFunction<Item>("getUniqueId", &Item::getUniqueId); |
| 1069 | + | g_lua.bindClassMemberFunction<Item>("getActionId", &Item::getActionId); |
| 1070 | + | g_lua.bindClassMemberFunction<Item>("setUniqueId", &Item::setUniqueId); |
| 1071 | + | g_lua.bindClassMemberFunction<Item>("setActionId", &Item::setActionId); |
| 1072 | + | g_lua.bindClassMemberFunction<Item>("getTeleportDestination", |
| 1073 | + | &Item::getTeleportDestination); |
| 1074 | + | g_lua.bindClassMemberFunction<Item>("setTeleportDestination", |
| 1075 | + | &Item::setTeleportDestination); |
| 1076 | + | g_lua.bindClassMemberFunction<Item>("isStackable", &Item::isStackable); |
| 1077 | + | g_lua.bindClassMemberFunction<Item>("isMarketable", &Item::isMarketable); |
| 1078 | + | g_lua.bindClassMemberFunction<Item>("isFluidContainer", |
| 1079 | + | &Item::isFluidContainer); |
| 1080 | + | g_lua.bindClassMemberFunction<Item>("getMarketData", &Item::getMarketData); |
| 1081 | + | g_lua.bindClassMemberFunction<Item>("getClothSlot", &Item::getClothSlot); |
| 1082 | + | g_lua.bindClassMemberFunction<Item>("getTooltip", &Item::getTooltip); |
| 1083 | + | g_lua.bindClassMemberFunction<Item>("setTooltip", &Item::setTooltip); |
| 1084 | + | g_lua.bindClassMemberFunction<Item>("getQuickLootFlags", |
| 1085 | + | &Item::getQuickLootFlags); |
| 1086 | + | g_lua.bindClassMemberFunction<Item>("setQuickLootFlags", |
| 1087 | + | &Item::setQuickLootFlags); |
| 1088 | + | g_lua.bindClassMemberFunction<Item>("setShader", &Item::setShader); |
| 1089 | + | g_lua.bindClassMemberFunction<Item>("getShader", &Item::getShader); |
| 1090 | + | g_lua.bindClassMemberFunction<Item>("setCustomAttribute", |
| 1091 | + | &Item::setCustomAttribute); |
| 1092 | + | g_lua.bindClassMemberFunction<Item>("getCustomAttribute", |
| 1093 | + | &Item::getCustomAttribute); |
| 1094 | + | |
| 1095 | + | g_lua.registerClass<Effect, Thing>(); |
| 1096 | + | g_lua.bindClassStaticFunction<Effect>("create", |
| 1097 | + | [] { return EffectPtr(new Effect); }); |
| 1098 | + | g_lua.bindClassMemberFunction<Effect>("setId", &Effect::setId); |
| 1099 | + | |
| 1100 | + | g_lua.registerClass<Missile, Thing>(); |
| 1101 | + | g_lua.bindClassStaticFunction<Missile>( |
| 1102 | + | "create", [] { return MissilePtr(new Missile); }); |
| 1103 | + | g_lua.bindClassMemberFunction<Missile>("setId", &Missile::setId); |
| 1104 | + | g_lua.bindClassMemberFunction<Missile>("getId", &Missile::getId); |
| 1105 | + | g_lua.bindClassMemberFunction<Missile>("getSource", &Missile::getSource); |
| 1106 | + | g_lua.bindClassMemberFunction<Missile>("getDestination", |
| 1107 | + | &Missile::getDestination); |
| 1108 | + | g_lua.bindClassMemberFunction<Missile>("setPath", &Missile::setPath); |
| 1109 | + | |
| 1110 | + | g_lua.registerClass<StaticText, Thing>(); |
| 1111 | + | g_lua.bindClassStaticFunction<StaticText>( |
| 1112 | + | "create", [] { return StaticTextPtr(new StaticText); }); |
| 1113 | + | g_lua.bindClassMemberFunction<StaticText>("addMessage", |
| 1114 | + | &StaticText::addMessage); |
| 1115 | + | g_lua.bindClassMemberFunction<StaticText>("addColoredMessage", |
| 1116 | + | &StaticText::addColoredMessage); |
| 1117 | + | g_lua.bindClassMemberFunction<StaticText>("setText", &StaticText::setText); |
| 1118 | + | g_lua.bindClassMemberFunction<StaticText>("setFont", &StaticText::setFont); |
| 1119 | + | g_lua.bindClassMemberFunction<StaticText>("setColor", &StaticText::setColor); |
| 1120 | + | g_lua.bindClassMemberFunction<StaticText>("getColor", &StaticText::getColor); |
| 1121 | + | g_lua.bindClassMemberFunction<StaticText>("getText", &StaticText::getText); |
| 1122 | + | |
| 1123 | + | g_lua.registerClass<AnimatedText, Thing>(); |
| 1124 | + | g_lua.bindClassMemberFunction<AnimatedText>("getText", |
| 1125 | + | &AnimatedText::getText); |
| 1126 | + | g_lua.bindClassMemberFunction<AnimatedText>("getOffset", |
| 1127 | + | &AnimatedText::getOffset); |
| 1128 | + | g_lua.bindClassMemberFunction<AnimatedText>("getColor", |
| 1129 | + | &AnimatedText::getColor); |
| 1130 | + | g_lua.bindClassMemberFunction<AnimatedText>("setText", |
| 1131 | + | &AnimatedText::setText); |
| 1132 | + | g_lua.bindClassMemberFunction<AnimatedText>("setColor", |
| 1133 | + | &AnimatedText::setColor); |
| 1134 | + | g_lua.bindClassMemberFunction<AnimatedText>("setFont", |
| 1135 | + | &AnimatedText::setFont); |
| 1136 | + | |
| 1137 | + | g_lua.registerClass<Player, Creature>(); |
| 1138 | + | g_lua.registerClass<Npc, Creature>(); |
| 1139 | + | g_lua.registerClass<Monster, Creature>(); |
| 1140 | + | |
| 1141 | + | g_lua.registerClass<LocalPlayer, Player>(); |
| 1142 | + | g_lua.bindClassMemberFunction<LocalPlayer>("unlockWalk", |
| 1143 | + | &LocalPlayer::unlockWalk); |
| 1144 | + | g_lua.bindClassMemberFunction<LocalPlayer>("lockWalk", |
| 1145 | + | &LocalPlayer::lockWalk); |
| 1146 | + | g_lua.bindClassMemberFunction<LocalPlayer>("isWalkLocked", |
| 1147 | + | &LocalPlayer::isWalkLocked); |
| 1148 | + | g_lua.bindClassMemberFunction<LocalPlayer>("canWalk", &LocalPlayer::canWalk); |
| 1149 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setStates", |
| 1150 | + | &LocalPlayer::setStates); |
| 1151 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setSkill", |
| 1152 | + | &LocalPlayer::setSkill); |
| 1153 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setBaseSkill", |
| 1154 | + | &LocalPlayer::setBaseSkill); |
| 1155 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setHealth", |
| 1156 | + | &LocalPlayer::setHealth); |
| 1157 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setTotalCapacity", |
| 1158 | + | &LocalPlayer::setTotalCapacity); |
| 1159 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setFreeCapacity", |
| 1160 | + | &LocalPlayer::setFreeCapacity); |
| 1161 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setExperience", |
| 1162 | + | &LocalPlayer::setExperience); |
| 1163 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setLevel", |
| 1164 | + | &LocalPlayer::setLevel); |
| 1165 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setMana", &LocalPlayer::setMana); |
| 1166 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setMagicLevel", |
| 1167 | + | &LocalPlayer::setMagicLevel); |
| 1168 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setSoul", &LocalPlayer::setSoul); |
| 1169 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setStamina", |
| 1170 | + | &LocalPlayer::setStamina); |
| 1171 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setKnown", |
| 1172 | + | &LocalPlayer::setKnown); |
| 1173 | + | g_lua.bindClassMemberFunction<LocalPlayer>("setInventoryItem", |
| 1174 | + | &LocalPlayer::setInventoryItem); |
| 1175 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getStates", |
| 1176 | + | &LocalPlayer::getStates); |
| 1177 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getSkillLevel", |
| 1178 | + | &LocalPlayer::getSkillLevel); |
| 1179 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getSkillBaseLevel", |
| 1180 | + | &LocalPlayer::getSkillBaseLevel); |
| 1181 | + | g_lua.bindClassMemberFunction<LocalPlayer>( |
| 1182 | + | "getSkillLevelPercent", &LocalPlayer::getSkillLevelPercent); |
| 1183 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getHealth", |
| 1184 | + | &LocalPlayer::getHealth); |
| 1185 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getMaxHealth", |
| 1186 | + | &LocalPlayer::getMaxHealth); |
| 1187 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getFreeCapacity", |
| 1188 | + | &LocalPlayer::getFreeCapacity); |
| 1189 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getExperience", |
| 1190 | + | &LocalPlayer::getExperience); |
| 1191 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getLevel", |
| 1192 | + | &LocalPlayer::getLevel); |
| 1193 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getLevelPercent", |
| 1194 | + | &LocalPlayer::getLevelPercent); |
| 1195 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getMana", &LocalPlayer::getMana); |
| 1196 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getMaxMana", |
| 1197 | + | &LocalPlayer::getMaxMana); |
| 1198 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getMagicLevel", |
| 1199 | + | &LocalPlayer::getMagicLevel); |
| 1200 | + | g_lua.bindClassMemberFunction<LocalPlayer>( |
| 1201 | + | "getMagicLevelPercent", &LocalPlayer::getMagicLevelPercent); |
| 1202 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getSoul", &LocalPlayer::getSoul); |
| 1203 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getStamina", |
| 1204 | + | &LocalPlayer::getStamina); |
| 1205 | + | g_lua.bindClassMemberFunction<LocalPlayer>( |
| 1206 | + | "getOfflineTrainingTime", &LocalPlayer::getOfflineTrainingTime); |
| 1207 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getRegenerationTime", |
| 1208 | + | &LocalPlayer::getRegenerationTime); |
| 1209 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getBaseMagicLevel", |
| 1210 | + | &LocalPlayer::getBaseMagicLevel); |
| 1211 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getTotalCapacity", |
| 1212 | + | &LocalPlayer::getTotalCapacity); |
| 1213 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getInventoryItem", |
| 1214 | + | &LocalPlayer::getInventoryItem); |
| 1215 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getVocation", |
| 1216 | + | &LocalPlayer::getVocation); |
| 1217 | + | g_lua.bindClassMemberFunction<LocalPlayer>("getBlessings", |
| 1218 | + | &LocalPlayer::getBlessings); |
| 1219 | + | g_lua.bindClassMemberFunction<LocalPlayer>("isPremium", |
| 1220 | + | &LocalPlayer::isPremium); |
| 1221 | + | g_lua.bindClassMemberFunction<LocalPlayer>("isKnown", &LocalPlayer::isKnown); |
| 1222 | + | g_lua.bindClassMemberFunction<LocalPlayer>("isPreWalking", |
| 1223 | + | &LocalPlayer::isPreWalking); |
| 1224 | + | g_lua.bindClassMemberFunction<LocalPlayer>("hasSight", |
| 1225 | + | &LocalPlayer::hasSight); |
| 1226 | + | g_lua.bindClassMemberFunction<LocalPlayer>("isAutoWalking", |
| 1227 | + | &LocalPlayer::isAutoWalking); |
| 1228 | + | g_lua.bindClassMemberFunction<LocalPlayer>("isServerWalking", |
| 1229 | + | &LocalPlayer::isServerWalking); |
| 1230 | + | g_lua.bindClassMemberFunction<LocalPlayer>("stopAutoWalk", |
| 1231 | + | &LocalPlayer::stopAutoWalk); |
| 1232 | + | g_lua.bindClassMemberFunction<LocalPlayer>("autoWalk", |
| 1233 | + | &LocalPlayer::autoWalk); |
| 1234 | + | g_lua.bindClassMemberFunction<LocalPlayer>("preWalk", &LocalPlayer::preWalk); |
| 1235 | + | g_lua.bindClassMemberFunction<LocalPlayer>("dumpWalkMatrix", |
| 1236 | + | &LocalPlayer::dumpWalkMatrix); |
| 1237 | + | g_lua.bindClassMemberFunction<LocalPlayer>("startServerWalking", |
| 1238 | + | &LocalPlayer::startServerWalking); |
| 1239 | + | g_lua.bindClassMemberFunction<LocalPlayer>("finishServerWalking", |
| 1240 | + | &LocalPlayer::finishServerWalking); |
| 1241 | + | |
| 1242 | + | g_lua.registerClass<Tile>(); |
| 1243 | + | g_lua.bindClassMemberFunction<Tile>("clean", &Tile::clean); |
| 1244 | + | g_lua.bindClassMemberFunction<Tile>("addThing", &Tile::addThing); |
| 1245 | + | g_lua.bindClassMemberFunction<Tile>("getThing", &Tile::getThing); |
| 1246 | + | g_lua.bindClassMemberFunction<Tile>("getThings", &Tile::getThings); |
| 1247 | + | g_lua.bindClassMemberFunction<Tile>("getEffect", &Tile::getEffect); |
| 1248 | + | g_lua.bindClassMemberFunction<Tile>("getEffects", &Tile::getEffects); |
| 1249 | + | g_lua.bindClassMemberFunction<Tile>("getItems", &Tile::getItems); |
| 1250 | + | g_lua.bindClassMemberFunction<Tile>("getThingStackPos", |
| 1251 | + | &Tile::getThingStackPos); |
| 1252 | + | g_lua.bindClassMemberFunction<Tile>("getThingCount", &Tile::getThingCount); |
| 1253 | + | g_lua.bindClassMemberFunction<Tile>("getTopThing", &Tile::getTopThing); |
| 1254 | + | g_lua.bindClassMemberFunction<Tile>("removeThing", &Tile::removeThing); |
| 1255 | + | g_lua.bindClassMemberFunction<Tile>("getTopLookThing", |
| 1256 | + | &Tile::getTopLookThing); |
| 1257 | + | g_lua.bindClassMemberFunction<Tile>("getTopLookThingEx", |
| 1258 | + | &Tile::getTopLookThingEx); |
| 1259 | + | g_lua.bindClassMemberFunction<Tile>("getTopUseThing", &Tile::getTopUseThing); |
| 1260 | + | g_lua.bindClassMemberFunction<Tile>("getTopCreature", &Tile::getTopCreature); |
| 1261 | + | g_lua.bindClassMemberFunction<Tile>("getTopCreatureEx", |
| 1262 | + | &Tile::getTopCreatureEx); |
| 1263 | + | g_lua.bindClassMemberFunction<Tile>("getTopMoveThing", |
| 1264 | + | &Tile::getTopMoveThing); |
| 1265 | + | g_lua.bindClassMemberFunction<Tile>("getTopMultiUseThing", |
| 1266 | + | &Tile::getTopMultiUseThing); |
| 1267 | + | g_lua.bindClassMemberFunction<Tile>("getTopMultiUseThingEx", |
| 1268 | + | &Tile::getTopMultiUseThingEx); |
| 1269 | + | g_lua.bindClassMemberFunction<Tile>("getPosition", &Tile::getPosition); |
| 1270 | + | g_lua.bindClassMemberFunction<Tile>("getDrawElevation", |
| 1271 | + | &Tile::getDrawElevation); |
| 1272 | + | g_lua.bindClassMemberFunction<Tile>("getCreatures", &Tile::getCreatures); |
| 1273 | + | g_lua.bindClassMemberFunction<Tile>("getGround", &Tile::getGround); |
| 1274 | + | g_lua.bindClassMemberFunction<Tile>("isWalkable", &Tile::isWalkable); |
| 1275 | + | g_lua.bindClassMemberFunction<Tile>("isHouseTile", &Tile::isHouseTile); |
| 1276 | + | g_lua.bindClassMemberFunction<Tile>("isFullGround", &Tile::isFullGround); |
| 1277 | + | g_lua.bindClassMemberFunction<Tile>("isFullyOpaque", &Tile::isFullyOpaque); |
| 1278 | + | g_lua.bindClassMemberFunction<Tile>("isLookPossible", &Tile::isLookPossible); |
| 1279 | + | g_lua.bindClassMemberFunction<Tile>("isBlockingProjectile", |
| 1280 | + | &Tile::isBlockingProjectile); |
| 1281 | + | g_lua.bindClassMemberFunction<Tile>("hasCreature", &Tile::hasCreature); |
| 1282 | + | g_lua.bindClassMemberFunction<Tile>("hasBlockingCreature", |
| 1283 | + | &Tile::hasBlockingCreature); |
| 1284 | + | g_lua.bindClassMemberFunction<Tile>("isEmpty", &Tile::isEmpty); |
| 1285 | + | g_lua.bindClassMemberFunction<Tile>("isClickable", &Tile::isClickable); |
| 1286 | + | g_lua.bindClassMemberFunction<Tile>("isPathable", &Tile::isPathable); |
| 1287 | + | g_lua.bindClassMemberFunction<Tile>("overwriteMinimapColor", |
| 1288 | + | &Tile::overwriteMinimapColor); |
| 1289 | + | g_lua.bindClassMemberFunction<Tile>("select", &Tile::select); |
| 1290 | + | g_lua.bindClassMemberFunction<Tile>("unselect", &Tile::unselect); |
| 1291 | + | g_lua.bindClassMemberFunction<Tile>("isSelected", &Tile::isSelected); |
| 1292 | + | g_lua.bindClassMemberFunction<Tile>("remFlag", &Tile::remFlag); |
| 1293 | + | g_lua.bindClassMemberFunction<Tile>("setFlag", &Tile::setFlag); |
| 1294 | + | g_lua.bindClassMemberFunction<Tile>("setFlags", &Tile::setFlags); |
| 1295 | + | g_lua.bindClassMemberFunction<Tile>("getFlags", &Tile::getFlags); |
| 1296 | + | g_lua.bindClassMemberFunction<Tile>("hasFlag", &Tile::hasFlag); |
| 1297 | + | g_lua.bindClassMemberFunction<Tile>("getElevation", &Tile::getElevation); |
| 1298 | + | g_lua.bindClassMemberFunction<Tile>("hasElevation", &Tile::hasElevation); |
| 1299 | + | g_lua.bindClassMemberFunction<Tile>("isBlocking", &Tile::isBlocking); |
| 1300 | + | g_lua.bindClassMemberFunction<Tile>("canShoot", &Tile::canShoot); |
| 1301 | + | g_lua.bindClassMemberFunction<Tile>("setWidget", &Tile::setWidget); |
| 1302 | + | g_lua.bindClassMemberFunction<Tile>("getWidget", &Tile::getWidget); |
| 1303 | + | g_lua.bindClassMemberFunction<Tile>("removeWidget", &Tile::removeWidget); |
| 1304 | + | // for bot |
| 1305 | + | g_lua.bindClassMemberFunction<Tile>("setText", &Tile::setText); |
| 1306 | + | g_lua.bindClassMemberFunction<Tile>("getText", &Tile::getText); |
| 1307 | + | g_lua.bindClassMemberFunction<Tile>("setTimer", &Tile::setTimer); |
| 1308 | + | g_lua.bindClassMemberFunction<Tile>("getTimer", &Tile::getTimer); |
| 1309 | + | g_lua.bindClassMemberFunction<Tile>("setFill", &Tile::setFill); |
| 1310 | + | |
| 1311 | + | g_lua.registerClass<UIItem, UIWidget>(); |
| 1312 | + | g_lua.bindClassStaticFunction<UIItem>("create", |
| 1313 | + | [] { return UIItemPtr(new UIItem); }); |
| 1314 | + | g_lua.bindClassMemberFunction<UIItem>("setItemId", &UIItem::setItemId); |
| 1315 | + | g_lua.bindClassMemberFunction<UIItem>("setItemCount", &UIItem::setItemCount); |
| 1316 | + | g_lua.bindClassMemberFunction<UIItem>("setItemSubType", |
| 1317 | + | &UIItem::setItemSubType); |
| 1318 | + | g_lua.bindClassMemberFunction<UIItem>("setItemVisible", |
| 1319 | + | &UIItem::setItemVisible); |
| 1320 | + | g_lua.bindClassMemberFunction<UIItem>("setItem", &UIItem::setItem); |
| 1321 | + | g_lua.bindClassMemberFunction<UIItem>("setVirtual", &UIItem::setVirtual); |
| 1322 | + | g_lua.bindClassMemberFunction<UIItem>("setShowCount", &UIItem::setShowCount); |
| 1323 | + | g_lua.bindClassMemberFunction<UIItem>("setItemShader", |
| 1324 | + | &UIItem::setItemShader); |
| 1325 | + | g_lua.bindClassMemberFunction<UIItem>("clearItem", &UIItem::clearItem); |
| 1326 | + | g_lua.bindClassMemberFunction<UIItem>("getItemId", &UIItem::getItemId); |
| 1327 | + | g_lua.bindClassMemberFunction<UIItem>("getItemCount", &UIItem::getItemCount); |
| 1328 | + | g_lua.bindClassMemberFunction<UIItem>("getItemSubType", |
| 1329 | + | &UIItem::getItemSubType); |
| 1330 | + | g_lua.bindClassMemberFunction<UIItem>("getItemCountOrSubType", |
| 1331 | + | &UIItem::getItemCountOrSubType); |
| 1332 | + | g_lua.bindClassMemberFunction<UIItem>("getItem", &UIItem::getItem); |
| 1333 | + | g_lua.bindClassMemberFunction<UIItem>("isVirtual", &UIItem::isVirtual); |
| 1334 | + | g_lua.bindClassMemberFunction<UIItem>("isItemVisible", |
| 1335 | + | &UIItem::isItemVisible); |
| 1336 | + | |
| 1337 | + | g_lua.registerClass<UISprite, UIWidget>(); |
| 1338 | + | g_lua.bindClassStaticFunction<UISprite>( |
| 1339 | + | "create", [] { return UISpritePtr(new UISprite); }); |
| 1340 | + | g_lua.bindClassMemberFunction<UISprite>("setSpriteId", |
| 1341 | + | &UISprite::setSpriteId); |
| 1342 | + | g_lua.bindClassMemberFunction<UISprite>("clearSprite", |
| 1343 | + | &UISprite::clearSprite); |
| 1344 | + | g_lua.bindClassMemberFunction<UISprite>("getSpriteId", |
| 1345 | + | &UISprite::getSpriteId); |
| 1346 | + | g_lua.bindClassMemberFunction<UISprite>("setSpriteColor", |
| 1347 | + | &UISprite::setSpriteColor); |
| 1348 | + | g_lua.bindClassMemberFunction<UISprite>("hasSprite", &UISprite::hasSprite); |
| 1349 | + | |
| 1350 | + | g_lua.registerClass<UICreature, UIWidget>(); |
| 1351 | + | g_lua.bindClassStaticFunction<UICreature>( |
| 1352 | + | "create", [] { return UICreaturePtr(new UICreature); }); |
| 1353 | + | g_lua.bindClassMemberFunction<UICreature>("setCreature", |
| 1354 | + | &UICreature::setCreature); |
| 1355 | + | g_lua.bindClassMemberFunction<UICreature>("setOutfit", |
| 1356 | + | &UICreature::setOutfit); |
| 1357 | + | g_lua.bindClassMemberFunction<UICreature>("setFixedCreatureSize", |
| 1358 | + | &UICreature::setFixedCreatureSize); |
| 1359 | + | g_lua.bindClassMemberFunction<UICreature>("getCreature", |
| 1360 | + | &UICreature::getCreature); |
| 1361 | + | g_lua.bindClassMemberFunction<UICreature>("getOutfit", |
| 1362 | + | &UICreature::getOutfit); |
| 1363 | + | g_lua.bindClassMemberFunction<UICreature>("isFixedCreatureSize", |
| 1364 | + | &UICreature::isFixedCreatureSize); |
| 1365 | + | g_lua.bindClassMemberFunction<UICreature>("setAutoRotating", |
| 1366 | + | &UICreature::setAutoRotating); |
| 1367 | + | g_lua.bindClassMemberFunction<UICreature>("setDirection", |
| 1368 | + | &UICreature::setDirection); |
| 1369 | + | g_lua.bindClassMemberFunction<UICreature>("getDirection", |
| 1370 | + | &UICreature::getDirection); |
| 1371 | + | g_lua.bindClassMemberFunction<UICreature>("setScale", &UICreature::setScale); |
| 1372 | + | g_lua.bindClassMemberFunction<UICreature>("getScale", &UICreature::getScale); |
| 1373 | + | g_lua.bindClassMemberFunction<UICreature>("setAnimate", |
| 1374 | + | &UICreature::setAnimate); |
| 1375 | + | g_lua.bindClassMemberFunction<UICreature>("isAnimating", |
| 1376 | + | &UICreature::isAnimating); |
| 1377 | + | g_lua.bindClassMemberFunction<UICreature>("setCenter", |
| 1378 | + | &UICreature::setCenter); |
| 1379 | + | g_lua.bindClassMemberFunction<UICreature>("setOldScaling", |
| 1380 | + | &UICreature::setOldScaling); |
| 1381 | + | |
| 1382 | + | g_lua.registerClass<UIMap, UIWidget>(); |
| 1383 | + | g_lua.bindClassStaticFunction<UIMap>("create", |
| 1384 | + | [] { return UIMapPtr(new UIMap); }); |
| 1385 | + | g_lua.bindClassMemberFunction<UIMap>("drawSelf", &UIMap::drawSelf); |
| 1386 | + | g_lua.bindClassMemberFunction<UIMap>("movePixels", &UIMap::movePixels); |
| 1387 | + | g_lua.bindClassMemberFunction<UIMap>("setZoom", &UIMap::setZoom); |
| 1388 | + | g_lua.bindClassMemberFunction<UIMap>("zoomIn", &UIMap::zoomIn); |
| 1389 | + | g_lua.bindClassMemberFunction<UIMap>("zoomOut", &UIMap::zoomOut); |
| 1390 | + | g_lua.bindClassMemberFunction<UIMap>("followCreature", |
| 1391 | + | &UIMap::followCreature); |
| 1392 | + | g_lua.bindClassMemberFunction<UIMap>("setCameraPosition", |
| 1393 | + | &UIMap::setCameraPosition); |
| 1394 | + | g_lua.bindClassMemberFunction<UIMap>("setMaxZoomIn", &UIMap::setMaxZoomIn); |
| 1395 | + | g_lua.bindClassMemberFunction<UIMap>("setMaxZoomOut", &UIMap::setMaxZoomOut); |
| 1396 | + | g_lua.bindClassMemberFunction<UIMap>("setMultifloor", &UIMap::setMultifloor); |
| 1397 | + | g_lua.bindClassMemberFunction<UIMap>("lockVisibleFloor", |
| 1398 | + | &UIMap::lockVisibleFloor); |
| 1399 | + | g_lua.bindClassMemberFunction<UIMap>("unlockVisibleFloor", |
| 1400 | + | &UIMap::unlockVisibleFloor); |
| 1401 | + | g_lua.bindClassMemberFunction<UIMap>("setVisibleDimension", |
| 1402 | + | &UIMap::setVisibleDimension); |
| 1403 | + | g_lua.bindClassMemberFunction<UIMap>("setDrawFlags", &UIMap::setDrawFlags); |
| 1404 | + | g_lua.bindClassMemberFunction<UIMap>("setDrawTexts", &UIMap::setDrawTexts); |
| 1405 | + | g_lua.bindClassMemberFunction<UIMap>("setDrawNames", &UIMap::setDrawNames); |
| 1406 | + | g_lua.bindClassMemberFunction<UIMap>("setDrawHealthBars", |
| 1407 | + | &UIMap::setDrawHealthBars); |
| 1408 | + | g_lua.bindClassMemberFunction<UIMap>("setDrawHealthBarsOnTop", |
| 1409 | + | &UIMap::setDrawHealthBarsOnTop); |
| 1410 | + | g_lua.bindClassMemberFunction<UIMap>("setDrawLights", &UIMap::setDrawLights); |
| 1411 | + | g_lua.bindClassMemberFunction<UIMap>("setDrawManaBar", |
| 1412 | + | &UIMap::setDrawManaBar); |
| 1413 | + | g_lua.bindClassMemberFunction<UIMap>("setDrawPlayerBars", |
| 1414 | + | &UIMap::setDrawPlayerBars); |
| 1415 | + | g_lua.bindClassMemberFunction<UIMap>("setAnimated", &UIMap::setAnimated); |
| 1416 | + | g_lua.bindClassMemberFunction<UIMap>("setKeepAspectRatio", |
| 1417 | + | &UIMap::setKeepAspectRatio); |
| 1418 | + | g_lua.bindClassMemberFunction<UIMap>("setMinimumAmbientLight", |
| 1419 | + | &UIMap::setMinimumAmbientLight); |
| 1420 | + | g_lua.bindClassMemberFunction<UIMap>("setLimitVisibleRange", |
| 1421 | + | &UIMap::setLimitVisibleRange); |
| 1422 | + | g_lua.bindClassMemberFunction<UIMap>("setFloorFading", |
| 1423 | + | &UIMap::setFloorFading); |
| 1424 | + | g_lua.bindClassMemberFunction<UIMap>("setCrosshair", &UIMap::setCrosshair); |
| 1425 | + | g_lua.bindClassMemberFunction<UIMap>("setShader", &UIMap::setShader); |
| 1426 | + | g_lua.bindClassMemberFunction<UIMap>("isMultifloor", &UIMap::isMultifloor); |
| 1427 | + | g_lua.bindClassMemberFunction<UIMap>("isDrawingTexts", |
| 1428 | + | &UIMap::isDrawingTexts); |
| 1429 | + | g_lua.bindClassMemberFunction<UIMap>("isDrawingNames", |
| 1430 | + | &UIMap::isDrawingNames); |
| 1431 | + | g_lua.bindClassMemberFunction<UIMap>("isDrawingHealthBars", |
| 1432 | + | &UIMap::isDrawingHealthBars); |
| 1433 | + | g_lua.bindClassMemberFunction<UIMap>("isDrawingHealthBarsOnTop", |
| 1434 | + | &UIMap::isDrawingHealthBarsOnTop); |
| 1435 | + | g_lua.bindClassMemberFunction<UIMap>("isDrawingLights", |
| 1436 | + | &UIMap::isDrawingLights); |
| 1437 | + | g_lua.bindClassMemberFunction<UIMap>("isDrawingManaBar", |
| 1438 | + | &UIMap::isDrawingManaBar); |
| 1439 | + | g_lua.bindClassMemberFunction<UIMap>("isLimitVisibleRangeEnabled", |
| 1440 | + | &UIMap::isLimitVisibleRangeEnabled); |
| 1441 | + | g_lua.bindClassMemberFunction<UIMap>("isAnimating", &UIMap::isAnimating); |
| 1442 | + | g_lua.bindClassMemberFunction<UIMap>("isKeepAspectRatioEnabled", |
| 1443 | + | &UIMap::isKeepAspectRatioEnabled); |
| 1444 | + | g_lua.bindClassMemberFunction<UIMap>("getVisibleDimension", |
| 1445 | + | &UIMap::getVisibleDimension); |
| 1446 | + | g_lua.bindClassMemberFunction<UIMap>("getFollowingCreature", |
| 1447 | + | &UIMap::getFollowingCreature); |
| 1448 | + | g_lua.bindClassMemberFunction<UIMap>("getDrawFlags", &UIMap::getDrawFlags); |
| 1449 | + | g_lua.bindClassMemberFunction<UIMap>("getCameraPosition", |
| 1450 | + | &UIMap::getCameraPosition); |
| 1451 | + | g_lua.bindClassMemberFunction<UIMap>("getPosition", &UIMap::getPosition); |
| 1452 | + | g_lua.bindClassMemberFunction<UIMap>("getPositionOffset", |
| 1453 | + | &UIMap::getPositionOffset); |
| 1454 | + | g_lua.bindClassMemberFunction<UIMap>("getTile", &UIMap::getTile); |
| 1455 | + | g_lua.bindClassMemberFunction<UIMap>("getMaxZoomIn", &UIMap::getMaxZoomIn); |
| 1456 | + | g_lua.bindClassMemberFunction<UIMap>("getMaxZoomOut", &UIMap::getMaxZoomOut); |
| 1457 | + | g_lua.bindClassMemberFunction<UIMap>("getZoom", &UIMap::getZoom); |
| 1458 | + | g_lua.bindClassMemberFunction<UIMap>("getMinimumAmbientLight", |
| 1459 | + | &UIMap::getMinimumAmbientLight); |
| 1460 | + | g_lua.bindClassMemberFunction<UIMap>("getShader", &UIMap::getShader); |
| 1461 | + | |
| 1462 | + | g_lua.registerClass<UIMinimap, UIWidget>(); |
| 1463 | + | g_lua.bindClassStaticFunction<UIMinimap>( |
| 1464 | + | "create", [] { return UIMinimapPtr(new UIMinimap); }); |
| 1465 | + | g_lua.bindClassMemberFunction<UIMinimap>("zoomIn", &UIMinimap::zoomIn); |
| 1466 | + | g_lua.bindClassMemberFunction<UIMinimap>("zoomOut", &UIMinimap::zoomOut); |
| 1467 | + | g_lua.bindClassMemberFunction<UIMinimap>("setZoom", &UIMinimap::setZoom); |
| 1468 | + | g_lua.bindClassMemberFunction<UIMinimap>("setMixZoom", |
| 1469 | + | &UIMinimap::setMinZoom); |
| 1470 | + | g_lua.bindClassMemberFunction<UIMinimap>("setMaxZoom", |
| 1471 | + | &UIMinimap::setMaxZoom); |
| 1472 | + | g_lua.bindClassMemberFunction<UIMinimap>("setCameraPosition", |
| 1473 | + | &UIMinimap::setCameraPosition); |
| 1474 | + | g_lua.bindClassMemberFunction<UIMinimap>("floorUp", &UIMinimap::floorUp); |
| 1475 | + | g_lua.bindClassMemberFunction<UIMinimap>("floorDown", &UIMinimap::floorDown); |
| 1476 | + | g_lua.bindClassMemberFunction<UIMinimap>("getTilePoint", |
| 1477 | + | &UIMinimap::getTilePoint); |
| 1478 | + | g_lua.bindClassMemberFunction<UIMinimap>("getTilePosition", |
| 1479 | + | &UIMinimap::getTilePosition); |
| 1480 | + | g_lua.bindClassMemberFunction<UIMinimap>("getTileRect", |
| 1481 | + | &UIMinimap::getTileRect); |
| 1482 | + | g_lua.bindClassMemberFunction<UIMinimap>("getCameraPosition", |
| 1483 | + | &UIMinimap::getCameraPosition); |
| 1484 | + | g_lua.bindClassMemberFunction<UIMinimap>("getMinZoom", |
| 1485 | + | &UIMinimap::getMinZoom); |
| 1486 | + | g_lua.bindClassMemberFunction<UIMinimap>("getMaxZoom", |
| 1487 | + | &UIMinimap::getMaxZoom); |
| 1488 | + | g_lua.bindClassMemberFunction<UIMinimap>("getZoom", &UIMinimap::getZoom); |
| 1489 | + | g_lua.bindClassMemberFunction<UIMinimap>("getScale", &UIMinimap::getScale); |
| 1490 | + | g_lua.bindClassMemberFunction<UIMinimap>("anchorPosition", |
| 1491 | + | &UIMinimap::anchorPosition); |
| 1492 | + | g_lua.bindClassMemberFunction<UIMinimap>("fillPosition", |
| 1493 | + | &UIMinimap::fillPosition); |
| 1494 | + | g_lua.bindClassMemberFunction<UIMinimap>("centerInPosition", |
| 1495 | + | &UIMinimap::centerInPosition); |
| 1496 | + | |
| 1497 | + | g_lua.registerClass<UIProgressRect, UIWidget>(); |
| 1498 | + | g_lua.bindClassStaticFunction<UIProgressRect>( |
| 1499 | + | "create", [] { return UIProgressRectPtr(new UIProgressRect); }); |
| 1500 | + | g_lua.bindClassMemberFunction<UIProgressRect>("setPercent", |
| 1501 | + | &UIProgressRect::setPercent); |
| 1502 | + | g_lua.bindClassMemberFunction<UIProgressRect>("getPercent", |
| 1503 | + | &UIProgressRect::getPercent); |
| 1504 | + | |
| 1505 | + | g_lua.registerClass<UIGraph, UIWidget>(); |
| 1506 | + | g_lua.bindClassStaticFunction<UIGraph>( |
| 1507 | + | "create", [] { return UIGraphPtr(new UIGraph); }); |
| 1508 | + | g_lua.bindClassMemberFunction<UIGraph>("addValue", &UIGraph::addValue); |
| 1509 | + | g_lua.bindClassMemberFunction<UIGraph>("clear", &UIGraph::clear); |
| 1510 | + | g_lua.bindClassMemberFunction<UIGraph>("setLineWidth", |
| 1511 | + | &UIGraph::setLineWidth); |
| 1512 | + | g_lua.bindClassMemberFunction<UIGraph>("setCapacity", &UIGraph::setCapacity); |
| 1513 | + | g_lua.bindClassMemberFunction<UIGraph>("setTitle", &UIGraph::setTitle); |
| 1514 | + | g_lua.bindClassMemberFunction<UIGraph>("setShowLabels", |
| 1515 | + | &UIGraph::setShowLabels); |
| 1516 | + | |
| 1517 | + | g_lua.registerClass<UIMapAnchorLayout, UIAnchorLayout>(); |
| 1518 | + | } |