Otclient  14/8/2020
luafunctions.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2020 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 "client.h"
24 #include "luavaluecasts.h"
25 #include "game.h"
26 #include "tile.h"
27 #include "houses.h"
28 #include "towns.h"
29 #include "container.h"
30 #include "item.h"
31 #include "effect.h"
32 #include "missile.h"
33 #include "statictext.h"
34 #include "animatedtext.h"
35 #include "creature.h"
36 #include "player.h"
37 #include "localplayer.h"
38 #include "map.h"
39 #include "minimap.h"
40 #include "thingtypemanager.h"
41 #include "spritemanager.h"
42 #include "shadermanager.h"
43 #include "protocolgame.h"
44 #include "uiitem.h"
45 #include "uicreature.h"
46 #include "uimap.h"
47 #include "uiminimap.h"
48 #include "uimapanchorlayout.h"
49 #include "uiprogressrect.h"
50 #include "uisprite.h"
51 #include "outfit.h"
52 
54 
56 {
57  g_lua.registerSingletonClass("g_things");
65  g_lua.bindSingletonFunction("g_things", "getDatSignature", &ThingTypeManager::getDatSignature, &g_things);
66  g_lua.bindSingletonFunction("g_things", "getContentRevision", &ThingTypeManager::getContentRevision, &g_things);
70  g_lua.bindSingletonFunction("g_things", "findItemTypeByClientId", &ThingTypeManager::findItemTypeByClientId, &g_things);
71  g_lua.bindSingletonFunction("g_things", "findItemTypeByName", &ThingTypeManager::findItemTypeByName, &g_things);
72  g_lua.bindSingletonFunction("g_things", "findItemTypesByName", &ThingTypeManager::findItemTypesByName, &g_things);
73  g_lua.bindSingletonFunction("g_things", "findItemTypesByString", &ThingTypeManager::findItemTypesByString, &g_things);
74  g_lua.bindSingletonFunction("g_things", "findItemTypeByCategory", &ThingTypeManager::findItemTypeByCategory, &g_things);
75  g_lua.bindSingletonFunction("g_things", "findThingTypeByAttr", &ThingTypeManager::findThingTypeByAttr, &g_things);
76 
77  g_lua.registerSingletonClass("g_houses");
81  g_lua.bindSingletonFunction("g_houses", "getHouse", &HouseManager::getHouse, &g_houses);
82  g_lua.bindSingletonFunction("g_houses", "getHouseByName", &HouseManager::getHouseByName, &g_houses);
83  g_lua.bindSingletonFunction("g_houses", "addHouse", &HouseManager::addHouse, &g_houses);
84  g_lua.bindSingletonFunction("g_houses", "removeHouse", &HouseManager::removeHouse, &g_houses);
85  g_lua.bindSingletonFunction("g_houses", "getHouseList", &HouseManager::getHouseList, &g_houses);
86  g_lua.bindSingletonFunction("g_houses", "filterHouses", &HouseManager::filterHouses, &g_houses);
88 
89  g_lua.registerSingletonClass("g_towns");
90  g_lua.bindSingletonFunction("g_towns", "getTown", &TownManager::getTown, &g_towns);
91  g_lua.bindSingletonFunction("g_towns", "getTownByName",&TownManager::getTownByName,&g_towns);
92  g_lua.bindSingletonFunction("g_towns", "addTown", &TownManager::addTown, &g_towns);
93  g_lua.bindSingletonFunction("g_towns", "removeTown", &TownManager::removeTown, &g_towns);
94  g_lua.bindSingletonFunction("g_towns", "getTowns", &TownManager::getTowns, &g_towns);
96 
97  g_lua.registerSingletonClass("g_sprites");
98  g_lua.bindSingletonFunction("g_sprites", "loadSpr", &SpriteManager::loadSpr, &g_sprites);
99  g_lua.bindSingletonFunction("g_sprites", "saveSpr", &SpriteManager::saveSpr, &g_sprites);
100  g_lua.bindSingletonFunction("g_sprites", "unload", &SpriteManager::unload, &g_sprites);
101  g_lua.bindSingletonFunction("g_sprites", "isLoaded", &SpriteManager::isLoaded, &g_sprites);
102  g_lua.bindSingletonFunction("g_sprites", "getSprSignature", &SpriteManager::getSignature, &g_sprites);
103  g_lua.bindSingletonFunction("g_sprites", "getSpritesCount", &SpriteManager::getSpritesCount, &g_sprites);
104 
105  g_lua.registerSingletonClass("g_map");
106  g_lua.bindSingletonFunction("g_map", "isLookPossible", &Map::isLookPossible, &g_map);
107  g_lua.bindSingletonFunction("g_map", "isCovered", &Map::isCovered, &g_map);
108  g_lua.bindSingletonFunction("g_map", "isCompletelyCovered", &Map::isCompletelyCovered, &g_map);
109  g_lua.bindSingletonFunction("g_map", "addThing", &Map::addThing, &g_map);
110  g_lua.bindSingletonFunction("g_map", "getThing", &Map::getThing, &g_map);
111  g_lua.bindSingletonFunction("g_map", "removeThingByPos", &Map::removeThingByPos, &g_map);
112  g_lua.bindSingletonFunction("g_map", "removeThing", &Map::removeThing, &g_map);
113  g_lua.bindSingletonFunction("g_map", "colorizeThing", &Map::colorizeThing, &g_map);
114  g_lua.bindSingletonFunction("g_map", "removeThingColor", &Map::removeThingColor, &g_map);
115  g_lua.bindSingletonFunction("g_map", "clean", &Map::clean, &g_map);
116  g_lua.bindSingletonFunction("g_map", "cleanTile", &Map::cleanTile, &g_map);
117  g_lua.bindSingletonFunction("g_map", "cleanTexts", &Map::cleanTexts, &g_map);
118  g_lua.bindSingletonFunction("g_map", "getTile", &Map::getTile, &g_map);
119  g_lua.bindSingletonFunction("g_map", "getTiles", &Map::getTiles, &g_map);
120  g_lua.bindSingletonFunction("g_map", "setCentralPosition", &Map::setCentralPosition, &g_map);
121  g_lua.bindSingletonFunction("g_map", "getCentralPosition", &Map::getCentralPosition, &g_map);
122  g_lua.bindSingletonFunction("g_map", "getCreatureById", &Map::getCreatureById, &g_map);
123  g_lua.bindSingletonFunction("g_map", "removeCreatureById", &Map::removeCreatureById, &g_map);
124  g_lua.bindSingletonFunction("g_map", "getSpectators", &Map::getSpectators, &g_map);
125  g_lua.bindSingletonFunction("g_map", "findPath", &Map::findPath, &g_map);
126  g_lua.bindSingletonFunction("g_map", "loadOtbm", &Map::loadOtbm, &g_map);
127  g_lua.bindSingletonFunction("g_map", "saveOtbm", &Map::saveOtbm, &g_map);
128  g_lua.bindSingletonFunction("g_map", "loadOtcm", &Map::loadOtcm, &g_map);
129  g_lua.bindSingletonFunction("g_map", "saveOtcm", &Map::saveOtcm, &g_map);
130  g_lua.bindSingletonFunction("g_map", "getHouseFile", &Map::getHouseFile, &g_map);
131  g_lua.bindSingletonFunction("g_map", "setHouseFile", &Map::setHouseFile, &g_map);
132  g_lua.bindSingletonFunction("g_map", "getSpawnFile", &Map::getSpawnFile, &g_map);
133  g_lua.bindSingletonFunction("g_map", "setSpawnFile", &Map::setSpawnFile, &g_map);
134  g_lua.bindSingletonFunction("g_map", "createTile", &Map::createTile, &g_map);
135  g_lua.bindSingletonFunction("g_map", "setWidth", &Map::setWidth, &g_map);
136  g_lua.bindSingletonFunction("g_map", "setHeight", &Map::setHeight, &g_map);
137  g_lua.bindSingletonFunction("g_map", "getSize", &Map::getSize, &g_map);
138  g_lua.bindSingletonFunction("g_map", "setDescription", &Map::setDescription, &g_map);
139  g_lua.bindSingletonFunction("g_map", "getDescriptions", &Map::getDescriptions, &g_map);
140  g_lua.bindSingletonFunction("g_map", "clearDescriptions", &Map::clearDescriptions, &g_map);
141  g_lua.bindSingletonFunction("g_map", "setShowZone", &Map::setShowZone, &g_map);
142  g_lua.bindSingletonFunction("g_map", "setShowZones", &Map::setShowZones, &g_map);
143  g_lua.bindSingletonFunction("g_map", "setZoneColor", &Map::setZoneColor, &g_map);
144  g_lua.bindSingletonFunction("g_map", "setZoneOpacity", &Map::setZoneOpacity, &g_map);
145  g_lua.bindSingletonFunction("g_map", "getZoneOpacity", &Map::getZoneOpacity, &g_map);
146  g_lua.bindSingletonFunction("g_map", "getZoneColor", &Map::getZoneColor, &g_map);
147  g_lua.bindSingletonFunction("g_map", "showZones", &Map::showZones, &g_map);
148  g_lua.bindSingletonFunction("g_map", "showZone", &Map::showZone, &g_map);
149  g_lua.bindSingletonFunction("g_map", "setForceShowAnimations", &Map::setForceShowAnimations, &g_map);
150  g_lua.bindSingletonFunction("g_map", "isForcingAnimations", &Map::isForcingAnimations, &g_map);
151  g_lua.bindSingletonFunction("g_map", "isShowingAnimations", &Map::isShowingAnimations, &g_map);
152  g_lua.bindSingletonFunction("g_map", "setShowAnimations", &Map::setShowAnimations, &g_map);
153  g_lua.bindSingletonFunction("g_map", "beginGhostMode", &Map::beginGhostMode, &g_map);
154  g_lua.bindSingletonFunction("g_map", "endGhostMode", &Map::endGhostMode, &g_map);
155  g_lua.bindSingletonFunction("g_map", "findItemsById", &Map::findItemsById, &g_map);
156 
157  g_lua.registerSingletonClass("g_minimap");
158  g_lua.bindSingletonFunction("g_minimap", "clean", &Minimap::clean, &g_minimap);
159  g_lua.bindSingletonFunction("g_minimap", "loadImage", &Minimap::loadImage, &g_minimap);
160  g_lua.bindSingletonFunction("g_minimap", "saveImage", &Minimap::saveImage, &g_minimap);
161  g_lua.bindSingletonFunction("g_minimap", "loadOtmm", &Minimap::loadOtmm, &g_minimap);
162  g_lua.bindSingletonFunction("g_minimap", "saveOtmm", &Minimap::saveOtmm, &g_minimap);
163 
164  g_lua.registerSingletonClass("g_creatures");
165  g_lua.bindSingletonFunction("g_creatures", "getCreatures", &CreatureManager::getCreatures, &g_creatures);
166  g_lua.bindSingletonFunction("g_creatures", "getCreatureByName", &CreatureManager::getCreatureByName, &g_creatures);
167  g_lua.bindSingletonFunction("g_creatures", "getCreatureByLook", &CreatureManager::getCreatureByLook, &g_creatures);
168  g_lua.bindSingletonFunction("g_creatures", "getSpawn", &CreatureManager::getSpawn, &g_creatures);
169  g_lua.bindSingletonFunction("g_creatures", "getSpawnForPlacePos", &CreatureManager::getSpawnForPlacePos, &g_creatures);
170  g_lua.bindSingletonFunction("g_creatures", "addSpawn", &CreatureManager::addSpawn, &g_creatures);
171  g_lua.bindSingletonFunction("g_creatures", "loadMonsters", &CreatureManager::loadMonsters, &g_creatures);
172  g_lua.bindSingletonFunction("g_creatures", "loadNpcs", &CreatureManager::loadNpcs, &g_creatures);
173  g_lua.bindSingletonFunction("g_creatures", "loadSingleCreature", &CreatureManager::loadSingleCreature, &g_creatures);
174  g_lua.bindSingletonFunction("g_creatures", "loadSpawns", &CreatureManager::loadSpawns, &g_creatures);
175  g_lua.bindSingletonFunction("g_creatures", "saveSpawns", &CreatureManager::saveSpawns, &g_creatures);
176  g_lua.bindSingletonFunction("g_creatures", "isLoaded", &CreatureManager::isLoaded, &g_creatures);
177  g_lua.bindSingletonFunction("g_creatures", "isSpawnLoaded", &CreatureManager::isSpawnLoaded, &g_creatures);
179  g_lua.bindSingletonFunction("g_creatures", "clearSpawns", &CreatureManager::clearSpawns, &g_creatures);
180  g_lua.bindSingletonFunction("g_creatures", "getSpawns", &CreatureManager::getSpawns, &g_creatures);
181  g_lua.bindSingletonFunction("g_creatures", "deleteSpawn", &CreatureManager::deleteSpawn, &g_creatures);
182 
183  g_lua.registerSingletonClass("g_game");
184  g_lua.bindSingletonFunction("g_game", "loginWorld", &Game::loginWorld, &g_game);
185  g_lua.bindSingletonFunction("g_game", "cancelLogin", &Game::cancelLogin, &g_game);
186  g_lua.bindSingletonFunction("g_game", "forceLogout", &Game::forceLogout, &g_game);
187  g_lua.bindSingletonFunction("g_game", "safeLogout", &Game::safeLogout, &g_game);
188  g_lua.bindSingletonFunction("g_game", "walk", &Game::walk, &g_game);
189  g_lua.bindSingletonFunction("g_game", "dashWalk", &Game::dashWalk, &g_game);
190  g_lua.bindSingletonFunction("g_game", "autoWalk", &Game::autoWalk, &g_game);
191  g_lua.bindSingletonFunction("g_game", "forceWalk", &Game::forceWalk, &g_game);
192  g_lua.bindSingletonFunction("g_game", "turn", &Game::turn, &g_game);
193  g_lua.bindSingletonFunction("g_game", "stop", &Game::stop, &g_game);
194  g_lua.bindSingletonFunction("g_game", "look", &Game::look, &g_game);
195  g_lua.bindSingletonFunction("g_game", "move", &Game::move, &g_game);
196  g_lua.bindSingletonFunction("g_game", "moveToParentContainer", &Game::moveToParentContainer, &g_game);
197  g_lua.bindSingletonFunction("g_game", "rotate", &Game::rotate, &g_game);
198  g_lua.bindSingletonFunction("g_game", "use", &Game::use, &g_game);
199  g_lua.bindSingletonFunction("g_game", "useWith", &Game::useWith, &g_game);
200  g_lua.bindSingletonFunction("g_game", "useInventoryItem", &Game::useInventoryItem, &g_game);
201  g_lua.bindSingletonFunction("g_game", "useInventoryItemWith", &Game::useInventoryItemWith, &g_game);
202  g_lua.bindSingletonFunction("g_game", "findItemInContainers", &Game::findItemInContainers, &g_game);
203  g_lua.bindSingletonFunction("g_game", "open", &Game::open, &g_game);
204  g_lua.bindSingletonFunction("g_game", "openParent", &Game::openParent, &g_game);
205  g_lua.bindSingletonFunction("g_game", "close", &Game::close, &g_game);
206  g_lua.bindSingletonFunction("g_game", "refreshContainer", &Game::refreshContainer, &g_game);
207  g_lua.bindSingletonFunction("g_game", "attack", &Game::attack, &g_game);
208  g_lua.bindSingletonFunction("g_game", "cancelAttack", &Game::cancelAttack, &g_game);
209  g_lua.bindSingletonFunction("g_game", "follow", &Game::follow, &g_game);
210  g_lua.bindSingletonFunction("g_game", "cancelFollow", &Game::cancelFollow, &g_game);
211  g_lua.bindSingletonFunction("g_game", "cancelAttackAndFollow", &Game::cancelAttackAndFollow, &g_game);
212  g_lua.bindSingletonFunction("g_game", "talk", &Game::talk, &g_game);
213  g_lua.bindSingletonFunction("g_game", "talkChannel", &Game::talkChannel, &g_game);
214  g_lua.bindSingletonFunction("g_game", "talkPrivate", &Game::talkPrivate, &g_game);
215  g_lua.bindSingletonFunction("g_game", "openPrivateChannel", &Game::openPrivateChannel, &g_game);
216  g_lua.bindSingletonFunction("g_game", "requestChannels", &Game::requestChannels, &g_game);
217  g_lua.bindSingletonFunction("g_game", "joinChannel", &Game::joinChannel, &g_game);
218  g_lua.bindSingletonFunction("g_game", "leaveChannel", &Game::leaveChannel, &g_game);
219  g_lua.bindSingletonFunction("g_game", "closeNpcChannel", &Game::closeNpcChannel, &g_game);
220  g_lua.bindSingletonFunction("g_game", "openOwnChannel", &Game::openOwnChannel, &g_game);
221  g_lua.bindSingletonFunction("g_game", "inviteToOwnChannel", &Game::inviteToOwnChannel, &g_game);
222  g_lua.bindSingletonFunction("g_game", "excludeFromOwnChannel", &Game::excludeFromOwnChannel, &g_game);
223  g_lua.bindSingletonFunction("g_game", "partyInvite", &Game::partyInvite, &g_game);
224  g_lua.bindSingletonFunction("g_game", "partyJoin", &Game::partyJoin, &g_game);
225  g_lua.bindSingletonFunction("g_game", "partyRevokeInvitation", &Game::partyRevokeInvitation, &g_game);
226  g_lua.bindSingletonFunction("g_game", "partyPassLeadership", &Game::partyPassLeadership, &g_game);
227  g_lua.bindSingletonFunction("g_game", "partyLeave", &Game::partyLeave, &g_game);
228  g_lua.bindSingletonFunction("g_game", "partyShareExperience", &Game::partyShareExperience, &g_game);
229  g_lua.bindSingletonFunction("g_game", "requestOutfit", &Game::requestOutfit, &g_game);
230  g_lua.bindSingletonFunction("g_game", "changeOutfit", &Game::changeOutfit, &g_game);
231  g_lua.bindSingletonFunction("g_game", "addVip", &Game::addVip, &g_game);
232  g_lua.bindSingletonFunction("g_game", "removeVip", &Game::removeVip, &g_game);
233  g_lua.bindSingletonFunction("g_game", "editVip", &Game::editVip, &g_game);
234  g_lua.bindSingletonFunction("g_game", "setChaseMode", &Game::setChaseMode, &g_game);
235  g_lua.bindSingletonFunction("g_game", "setFightMode", &Game::setFightMode, &g_game);
236  g_lua.bindSingletonFunction("g_game", "setPVPMode", &Game::setPVPMode, &g_game);
237  g_lua.bindSingletonFunction("g_game", "setSafeFight", &Game::setSafeFight, &g_game);
238  g_lua.bindSingletonFunction("g_game", "getChaseMode", &Game::getChaseMode, &g_game);
239  g_lua.bindSingletonFunction("g_game", "getFightMode", &Game::getFightMode, &g_game);
240  g_lua.bindSingletonFunction("g_game", "getPVPMode", &Game::getPVPMode, &g_game);
241  g_lua.bindSingletonFunction("g_game", "getUnjustifiedPoints", &Game::getUnjustifiedPoints, &g_game);
242  g_lua.bindSingletonFunction("g_game", "getOpenPvpSituations", &Game::getOpenPvpSituations, &g_game);
243  g_lua.bindSingletonFunction("g_game", "isSafeFight", &Game::isSafeFight, &g_game);
244  g_lua.bindSingletonFunction("g_game", "inspectNpcTrade", &Game::inspectNpcTrade, &g_game);
245  g_lua.bindSingletonFunction("g_game", "buyItem", &Game::buyItem, &g_game);
246  g_lua.bindSingletonFunction("g_game", "sellItem", &Game::sellItem, &g_game);
247  g_lua.bindSingletonFunction("g_game", "closeNpcTrade", &Game::closeNpcTrade, &g_game);
248  g_lua.bindSingletonFunction("g_game", "requestTrade", &Game::requestTrade, &g_game);
249  g_lua.bindSingletonFunction("g_game", "inspectTrade", &Game::inspectTrade, &g_game);
250  g_lua.bindSingletonFunction("g_game", "acceptTrade", &Game::acceptTrade, &g_game);
251  g_lua.bindSingletonFunction("g_game", "rejectTrade", &Game::rejectTrade, &g_game);
252  g_lua.bindSingletonFunction("g_game", "openRuleViolation", &Game::openRuleViolation, &g_game);
253  g_lua.bindSingletonFunction("g_game", "closeRuleViolation", &Game::closeRuleViolation, &g_game);
254  g_lua.bindSingletonFunction("g_game", "cancelRuleViolation", &Game::cancelRuleViolation, &g_game);
255  g_lua.bindSingletonFunction("g_game", "reportBug", &Game::reportBug, &g_game);
256  g_lua.bindSingletonFunction("g_game", "reportRuleViolation", &Game::reportRuleViolation, &g_game);
257  g_lua.bindSingletonFunction("g_game", "debugReport", &Game::debugReport, &g_game);
258  g_lua.bindSingletonFunction("g_game", "editText", &Game::editText, &g_game);
259  g_lua.bindSingletonFunction("g_game", "editList", &Game::editList, &g_game);
260  g_lua.bindSingletonFunction("g_game", "requestQuestLog", &Game::requestQuestLog, &g_game);
261  g_lua.bindSingletonFunction("g_game", "requestQuestLine", &Game::requestQuestLine, &g_game);
262  g_lua.bindSingletonFunction("g_game", "equipItem", &Game::equipItem, &g_game);
263  g_lua.bindSingletonFunction("g_game", "mount", &Game::mount, &g_game);
264  g_lua.bindSingletonFunction("g_game", "requestItemInfo", &Game::requestItemInfo, &g_game);
265  g_lua.bindSingletonFunction("g_game", "ping", &Game::ping, &g_game);
266  g_lua.bindSingletonFunction("g_game", "setPingDelay", &Game::setPingDelay, &g_game);
267  g_lua.bindSingletonFunction("g_game", "changeMapAwareRange", &Game::changeMapAwareRange, &g_game);
268  g_lua.bindSingletonFunction("g_game", "canPerformGameAction", &Game::canPerformGameAction, &g_game);
269  g_lua.bindSingletonFunction("g_game", "canReportBugs", &Game::canReportBugs, &g_game);
270  g_lua.bindSingletonFunction("g_game", "checkBotProtection", &Game::checkBotProtection, &g_game);
271  g_lua.bindSingletonFunction("g_game", "isOnline", &Game::isOnline, &g_game);
272  g_lua.bindSingletonFunction("g_game", "isLogging", &Game::isLogging, &g_game);
273  g_lua.bindSingletonFunction("g_game", "isDead", &Game::isDead, &g_game);
274  g_lua.bindSingletonFunction("g_game", "isAttacking", &Game::isAttacking, &g_game);
275  g_lua.bindSingletonFunction("g_game", "isFollowing", &Game::isFollowing, &g_game);
276  g_lua.bindSingletonFunction("g_game", "isConnectionOk", &Game::isConnectionOk, &g_game);
277  g_lua.bindSingletonFunction("g_game", "getPing", &Game::getPing, &g_game);
278  g_lua.bindSingletonFunction("g_game", "getContainer", &Game::getContainer, &g_game);
279  g_lua.bindSingletonFunction("g_game", "getContainers", &Game::getContainers, &g_game);
280  g_lua.bindSingletonFunction("g_game", "getVips", &Game::getVips, &g_game);
281  g_lua.bindSingletonFunction("g_game", "getAttackingCreature", &Game::getAttackingCreature, &g_game);
282  g_lua.bindSingletonFunction("g_game", "getFollowingCreature", &Game::getFollowingCreature, &g_game);
283  g_lua.bindSingletonFunction("g_game", "getServerBeat", &Game::getServerBeat, &g_game);
284  g_lua.bindSingletonFunction("g_game", "getLocalPlayer", &Game::getLocalPlayer, &g_game);
285  g_lua.bindSingletonFunction("g_game", "getProtocolGame", &Game::getProtocolGame, &g_game);
286  g_lua.bindSingletonFunction("g_game", "getProtocolVersion", &Game::getProtocolVersion, &g_game);
287  g_lua.bindSingletonFunction("g_game", "setProtocolVersion", &Game::setProtocolVersion, &g_game);
288  g_lua.bindSingletonFunction("g_game", "getClientVersion", &Game::getClientVersion, &g_game);
289  g_lua.bindSingletonFunction("g_game", "setClientVersion", &Game::setClientVersion, &g_game);
290  g_lua.bindSingletonFunction("g_game", "setCustomOs", &Game::setCustomOs, &g_game);
291  g_lua.bindSingletonFunction("g_game", "getOs", &Game::getOs, &g_game);
292  g_lua.bindSingletonFunction("g_game", "getCharacterName", &Game::getCharacterName, &g_game);
293  g_lua.bindSingletonFunction("g_game", "getWorldName", &Game::getWorldName, &g_game);
294  g_lua.bindSingletonFunction("g_game", "getGMActions", &Game::getGMActions, &g_game);
295  g_lua.bindSingletonFunction("g_game", "getFeature", &Game::getFeature, &g_game);
296  g_lua.bindSingletonFunction("g_game", "setFeature", &Game::setFeature, &g_game);
297  g_lua.bindSingletonFunction("g_game", "enableFeature", &Game::enableFeature, &g_game);
298  g_lua.bindSingletonFunction("g_game", "disableFeature", &Game::disableFeature, &g_game);
299  g_lua.bindSingletonFunction("g_game", "isGM", &Game::isGM, &g_game);
300  g_lua.bindSingletonFunction("g_game", "answerModalDialog", &Game::answerModalDialog, &g_game);
301  g_lua.bindSingletonFunction("g_game", "browseField", &Game::browseField, &g_game);
302  g_lua.bindSingletonFunction("g_game", "seekInContainer", &Game::seekInContainer, &g_game);
303  g_lua.bindSingletonFunction("g_game", "getLastWalkDir", &Game::getLastWalkDir, &g_game);
304  g_lua.bindSingletonFunction("g_game", "buyStoreOffer", &Game::buyStoreOffer, &g_game);
305  g_lua.bindSingletonFunction("g_game", "requestTransactionHistory", &Game::requestTransactionHistory, &g_game);
306  g_lua.bindSingletonFunction("g_game", "requestStoreOffers", &Game::requestStoreOffers, &g_game);
307  g_lua.bindSingletonFunction("g_game", "openStore", &Game::openStore, &g_game);
308  g_lua.bindSingletonFunction("g_game", "transferCoins", &Game::transferCoins, &g_game);
309  g_lua.bindSingletonFunction("g_game", "openTransactionHistory", &Game::openTransactionHistory, &g_game);
310 
311  g_lua.registerSingletonClass("g_shaders");
312  g_lua.bindSingletonFunction("g_shaders", "createShader", &ShaderManager::createShader, &g_shaders);
313  g_lua.bindSingletonFunction("g_shaders", "createFragmentShader", &ShaderManager::createFragmentShader, &g_shaders);
314  g_lua.bindSingletonFunction("g_shaders", "createFragmentShaderFromCode", &ShaderManager::createFragmentShaderFromCode, &g_shaders);
315  g_lua.bindSingletonFunction("g_shaders", "createItemShader", &ShaderManager::createItemShader, &g_shaders);
316  g_lua.bindSingletonFunction("g_shaders", "createMapShader", &ShaderManager::createMapShader, &g_shaders);
317  g_lua.bindSingletonFunction("g_shaders", "getDefaultItemShader", &ShaderManager::getDefaultItemShader, &g_shaders);
318  g_lua.bindSingletonFunction("g_shaders", "getDefaultMapShader", &ShaderManager::getDefaultMapShader, &g_shaders);
319  g_lua.bindSingletonFunction("g_shaders", "getShader", &ShaderManager::getShader, &g_shaders);
320 
321  g_lua.bindGlobalFunction("getOutfitColor", Outfit::getColor);
324 
338 
354 
397 
399  g_lua.bindClassStaticFunction<House>("create", []{ return HousePtr(new House); });
417 
419  g_lua.bindClassStaticFunction<Spawn>("create", []{ return SpawnPtr(new Spawn); });
427 
429  g_lua.bindClassStaticFunction<Town>("create", []{ return TownPtr(new Town); });
433  g_lua.bindClassMemberFunction<Town>("setTemplePos", &Town::setPos); // alternative method
437  g_lua.bindClassMemberFunction<Town>("getTemplePos", &Town::getPos); // alternative method
438 
448 
450  g_lua.bindClassStaticFunction<Creature>("create", []{ return CreaturePtr(new Creature); });
483 
488 
490  g_lua.bindClassStaticFunction<ThingType>("create", []{ return ThingTypePtr(new ThingType); });
558 
566  g_lua.bindClassMemberFunction<Item>("addContainerItemIndexed", &Item::addContainerItemIndexed);
584  g_lua.bindClassMemberFunction<Item>("getTeleportDestination", &Item::getTeleportDestination);
585  g_lua.bindClassMemberFunction<Item>("setTeleportDestination", &Item::setTeleportDestination);
591 
593  g_lua.bindClassStaticFunction<Effect>("create", []{ return EffectPtr(new Effect); });
595 
597  g_lua.bindClassStaticFunction<Missile>("create", []{ return MissilePtr(new Missile); });
599 
601  g_lua.bindClassStaticFunction<StaticText>("create", []{ return StaticTextPtr(new StaticText); });
607 
609 
613 
662 
700 
702  g_lua.bindClassStaticFunction<UIItem>("create", []{ return UIItemPtr(new UIItem); });
716 
718  g_lua.bindClassStaticFunction<UISprite>("create", []{ return UISpritePtr(new UISprite); });
724 
726  g_lua.bindClassStaticFunction<UICreature>("create", []{ return UICreaturePtr(new UICreature); } );
732 
734  g_lua.bindClassStaticFunction<UIMap>("create", []{ return UIMapPtr(new UIMap); });
769  g_lua.bindClassMemberFunction<UIMap>("isLimitVisibleRangeEnabled", &UIMap::isLimitVisibleRangeEnabled);
784 
786  g_lua.bindClassStaticFunction<UIMinimap>("create", []{ return UIMinimapPtr(new UIMinimap); });
806 
811 
813 }
Thing::isTranslucent
bool isTranslucent()
Definition: thing.h:109
UIMinimap::zoomIn
bool zoomIn()
Definition: uiminimap.h:36
Game::openRuleViolation
void openRuleViolation(const std::string &reporter)
Definition: game.cpp:1311
Spawn::getCenterPos
Position getCenterPos()
Definition: creatures.h:62
Thing::isFullGround
bool isFullGround()
Definition: thing.h:116
Thing::isWrapable
bool isWrapable()
Definition: thing.h:121
Thing::isMissile
virtual bool isMissile()
Definition: thing.h:53
Creature::isInvisible
bool isInvisible()
Definition: creature.h:123
LocalPlayer::setHealth
void setHealth(double health, double maxHealth)
Definition: localplayer.cpp:364
ThingTypeManager::getDatSignature
uint32 getDatSignature()
Definition: thingtypemanager.h:66
ShaderManager::createItemShader
PainterShaderProgramPtr createItemShader(const std::string &name, const std::string &file)
Definition: shadermanager.cpp:107
Outfit::getColor
static Color getColor(int color)
Definition: outfit.cpp:33
thingtypemanager.h
Creature::getShield
uint8 getShield()
Definition: creature.h:90
UIMap::setDrawHealthBars
void setDrawHealthBars(bool enable)
Definition: uimap.h:58
ThingType::isWritable
bool isWritable()
Definition: thingtype.h:172
LocalPlayer::getMagicLevelPercent
double getMagicLevelPercent()
Definition: localplayer.h:82
ThingTypeManager::loadDat
bool loadDat(std::string file)
Definition: thingtypemanager.cpp:100
Game::editList
void editList(uint id, int doorId, const std::string &text)
Definition: game.cpp:1304
TownPtr
stdext::shared_object_ptr< Town > TownPtr
Definition: declarations.h:76
Game::look
void look(const ThingPtr &thing, bool isBattleList=false)
Definition: game.cpp:787
Game::loginWorld
void loginWorld(const std::string &account, const std::string &password, const std::string &worldName, const std::string &worldHost, int worldPort, const std::string &characterName, const std::string &authenticatorToken, const std::string &sessionKey)
Definition: game.cpp:531
Game::cancelRuleViolation
void cancelRuleViolation()
Definition: game.cpp:1325
ThingType::isHookEast
bool isHookEast()
Definition: thingtype.h:184
Game::getGMActions
std::vector< uint8 > getGMActions()
Definition: game.h:347
ThingType::isWritableOnce
bool isWritableOnce()
Definition: thingtype.h:174
CreatureManager::getCreatureByLook
const CreatureTypePtr & getCreatureByLook(int look)
Definition: creatures.cpp:356
UIMapAnchorLayout
Definition: uimapanchorlayout.h:42
Game::close
void close(const ContainerPtr &container)
Definition: game.cpp:921
UIMap::unlockVisibleFloor
void unlockVisibleFloor()
Definition: uimap.h:51
ThingType::getHeight
int getHeight()
Definition: thingtype.h:143
Game::rejectTrade
void rejectTrade()
Definition: game.cpp:1290
Game::getPing
int getPing()
Definition: game.h:331
Tile::getTopMultiUseThing
ThingPtr getTopMultiUseThing()
Definition: tile.cpp:445
Game::safeLogout
void safeLogout()
Definition: game.cpp:569
Game::leaveChannel
void leaveChannel(int channelId)
Definition: game.cpp:1043
Game::getFollowingCreature
CreaturePtr getFollowingCreature()
Definition: game.h:336
ThingTypeManager::findItemTypesByString
ItemTypeList findItemTypesByString(std::string name)
Definition: thingtypemanager.cpp:368
UIWidget
Definition: uiwidget.h:47
Thing::isOnBottom
bool isOnBottom()
Definition: thing.h:87
LocalPlayer::getMagicLevel
double getMagicLevel()
Definition: localplayer.h:81
LocalPlayer::getBaseMagicLevel
double getBaseMagicLevel()
Definition: localplayer.h:83
Spawn::getRadius
int32 getRadius()
Definition: creatures.h:59
g_map
Map g_map
Definition: map.cpp:36
Creature::getId
uint32 getId()
Definition: creature.h:81
UIMap::zoomOut
bool zoomOut()
Definition: uimap.cpp:99
LocalPlayer::canWalk
bool canWalk(Otc::Direction direction)
Definition: localplayer.cpp:65
CreatureType
Definition: creatures.h:79
CreatureManager::clearSpawns
void clearSpawns()
Definition: creatures.cpp:175
Game::mount
void mount(bool mount)
Definition: game.cpp:1372
Creature::setEmblemTexture
void setEmblemTexture(const std::string &filename)
Definition: creature.cpp:786
Tile::isClickable
bool isClickable()
Definition: tile.cpp:535
Container::getContainerItem
ItemPtr getContainerItem()
Definition: container.h:44
Game::browseField
void browseField(const Position &position)
Definition: game.cpp:1393
Item::getId
uint32 getId()
Definition: item.h:97
LocalPlayer::setMana
void setMana(double mana, double maxMana)
Definition: localplayer.cpp:425
StaticText::getColor
Color getColor()
Definition: statictext.h:52
Thing::getTile
const TilePtr & getTile()
Definition: thing.cpp:62
ThingType::getMinimapColor
int getMinimapColor()
Definition: thingtype.h:160
ThingType::isHookSouth
bool isHookSouth()
Definition: thingtype.h:183
LuaInterface::bindClassStaticFunction
void bindClassStaticFunction(const std::string &functionName, const F &function)
Definition: luainterface.h:376
ThingType::isUsable
bool isUsable()
Definition: thingtype.h:199
Thing::isIgnoreLook
bool isIgnoreLook()
Definition: thing.h:117
UIMap::setKeepAspectRatio
void setKeepAspectRatio(bool enable)
Definition: uimap.cpp:122
Minimap::loadOtmm
bool loadOtmm(const std::string &fileName)
Definition: minimap.cpp:306
Thing::setId
virtual void setId(uint32)
Definition: thing.h:41
Thing::getMarketData
MarketData getMarketData()
Definition: thing.h:124
UIItem::getItemId
int getItemId()
Definition: uiitem.h:44
Game::closeRuleViolation
void closeRuleViolation(const std::string &reporter)
Definition: game.cpp:1318
LocalPlayer::isKnown
bool isKnown()
Definition: localplayer.h:93
CreatureManager::getCreatureByName
const CreatureTypePtr & getCreatureByName(std::string name)
Definition: creatures.cpp:343
UIMap::getMapShader
PainterShaderProgramPtr getMapShader()
Definition: uimap.h:89
Game::inspectNpcTrade
void inspectNpcTrade(const ItemPtr &item)
Definition: game.cpp:1241
UIMinimap::getTilePosition
Position getTilePosition(const Point &mousePos)
Definition: uiminimap.cpp:110
Game::isAttacking
bool isAttacking()
Definition: game.h:327
LocalPlayer::getStamina
double getStamina()
Definition: localplayer.h:85
UIMap::setMaxZoomIn
void setMaxZoomIn(int maxZoomIn)
Definition: uimap.h:47
UIMap
Definition: uimap.h:32
Tile::getThings
std::vector< ThingPtr > getThings()
Definition: tile.h:92
UIMap::zoomIn
bool zoomIn()
Definition: uimap.cpp:85
StaticText::setText
void setText(const std::string &text)
Definition: statictext.cpp:57
LocalPlayer::getFreeCapacity
double getFreeCapacity()
Definition: localplayer.h:74
Game::setPingDelay
void setPingDelay(int delay)
Definition: game.h:301
ThingType::isSplash
bool isSplash()
Definition: thingtype.h:176
Thing::isContainer
bool isContainer()
Definition: thing.h:89
Game::inviteToOwnChannel
void inviteToOwnChannel(const std::string &name)
Definition: game.cpp:1064
TownManager::removeTown
void removeTown(uint32 townId)
Definition: towns.cpp:45
CreatureManager::getCreatures
const std::vector< CreatureTypePtr > & getCreatures()
Definition: creatures.h:133
ProtocolGame
Definition: protocolgame.h:31
Creature::getEmblem
uint8 getEmblem()
Definition: creature.h:91
ItemType::isWritable
bool isWritable()
Definition: itemtype.h:153
EffectPtr
stdext::shared_object_ptr< Effect > EffectPtr
Definition: declarations.h:68
UIMinimap::fillPosition
void fillPosition(const UIWidgetPtr &anchoredWidget, const Position &hookedPosition)
Definition: uiminimap.cpp:122
Thing::isNotMoveable
bool isNotMoveable()
Definition: thing.h:99
Effect
Definition: effect.h:31
ThingType::getElevation
int getElevation()
Definition: thingtype.h:155
uimapanchorlayout.h
Game::setClientVersion
void setClientVersion(int version)
Definition: game.cpp:1514
UIMapPtr
stdext::shared_object_ptr< UIMap > UIMapPtr
Definition: declarations.h:112
LocalPlayer::lockWalk
void lockWalk(int millis=250)
Definition: localplayer.cpp:60
Game::setProtocolVersion
void setProtocolVersion(int version)
Definition: game.cpp:1496
House::getTownId
uint32 getTownId()
Definition: houses.h:58
Thing::isHookSouth
bool isHookSouth()
Definition: thing.h:104
LocalPlayer::isPremium
bool isPremium()
Definition: localplayer.h:97
Game::isFollowing
bool isFollowing()
Definition: game.h:328
UIMap::setAutoViewMode
void setAutoViewMode(bool enable)
Definition: uimap.h:54
LocalPlayer
Definition: localplayer.h:29
Container::getCapacity
int getCapacity()
Definition: container.h:43
ProtocolGame::setMapDescription
void setMapDescription(const InputMessagePtr &msg, int x, int y, int z, int width, int height)
Definition: protocolgameparse.cpp:2044
LocalPlayer::getVocation
int getVocation()
Definition: localplayer.h:71
UIMap::setViewMode
void setViewMode(MapView::ViewMode viewMode)
Definition: uimap.h:53
ThingTypeManager::findItemTypeByName
const ItemTypePtr & findItemTypeByName(std::string name)
Definition: thingtypemanager.cpp:351
Game::requestItemInfo
void requestItemInfo(const ItemPtr &item, int index)
Definition: game.cpp:1379
ThingTypeManager::loadOtml
bool loadOtml(std::string file)
Definition: thingtypemanager.cpp:139
Map::cleanTexts
void cleanTexts()
Definition: map.cpp:101
Tile::isWalkable
bool isWalkable(bool ignoreCreatures=false)
Definition: tile.cpp:475
UIMinimap::getScale
float getScale()
Definition: uiminimap.h:54
ThingType::getSize
Size getSize()
Definition: thingtype.h:141
Thing::isRotateable
bool isRotateable()
Definition: thing.h:106
uisprite.h
Tile::getTopLookThing
ThingPtr getTopLookThing()
Definition: tile.cpp:358
UICreature::setFixedCreatureSize
void setFixedCreatureSize(bool fixed)
Definition: uicreature.h:36
Game::move
void move(const ThingPtr &thing, const Position &toPos, int count)
Definition: game.cpp:798
UIItem
Definition: uiitem.h:30
Map::setDescription
void setDescription(const std::string &desc)
Definition: map.h:158
Tile::addThing
void addThing(const ThingPtr &thing, int stackPos)
Definition: tile.cpp:166
HouseManager::sort
void sort()
Definition: houses.cpp:205
Creature::setSkullTexture
void setSkullTexture(const std::string &filename)
Definition: creature.cpp:766
Game::stop
void stop()
Definition: game.cpp:776
UIMinimap::setZoom
bool setZoom(int zoom)
Definition: uiminimap.cpp:51
Tile::getTopCreature
CreaturePtr getTopCreature()
Definition: tile.cpp:389
Creature::setDirection
void setDirection(Otc::Direction direction)
Definition: creature.cpp:659
luavaluecasts.h
Game::setFeature
void setFeature(Otc::GameFeature feature, bool enabled)
Definition: game.h:309
LocalPlayer::getStates
int getStates()
Definition: localplayer.h:67
Creature::isWalking
bool isWalking()
Definition: creature.h:121
ThingType::getMaxTextLength
int getMaxTextLength()
Definition: thingtype.h:158
Creature
Definition: creature.h:37
House::setName
void setName(const std::string &name)
Definition: houses.h:51
Game::getContainers
std::map< int, ContainerPtr > getContainers()
Definition: game.h:333
Tile::getItems
std::vector< ItemPtr > getItems()
Definition: tile.cpp:302
LocalPlayer::setLevel
void setLevel(double level, double levelPercent)
Definition: localplayer.cpp:413
Tile::hasFlag
bool hasFlag(uint32 flag)
Definition: tile.h:119
Map::loadOtbm
void loadOtbm(const std::string &fileName)
Definition: mapio.cpp:35
Map::isShowingAnimations
bool isShowingAnimations()
Definition: map.cpp:418
ThingTypeManager::isDatLoaded
bool isDatLoaded()
Definition: thingtypemanager.h:71
Map::setHouseFile
void setHouseFile(const std::string &file)
Definition: map.h:156
UIMinimap::getTileRect
Rect getTileRect(const Position &pos)
Definition: uiminimap.cpp:105
Tile::getDrawElevation
int getDrawElevation()
Definition: tile.h:88
UIMinimap::getMaxZoom
int getMaxZoom()
Definition: uiminimap.h:52
Map::saveOtbm
void saveOtbm(const std::string &fileName)
Definition: mapio.cpp:231
Map::setShowZone
void setShowZone(tileflags_t zone, bool show)
Definition: map.cpp:374
ProtocolGame::getOutfit
Outfit getOutfit(const InputMessagePtr &msg)
Definition: protocolgameparse.cpp:2104
Tile::clean
void clean()
Definition: tile.cpp:148
Tile::getGround
ItemPtr getGround()
Definition: tile.cpp:324
Game::cancelFollow
void cancelFollow()
Definition: game.h:196
UIMap::getFollowingCreature
CreaturePtr getFollowingCreature()
Definition: uimap.h:81
MissilePtr
stdext::shared_object_ptr< Missile > MissilePtr
Definition: declarations.h:69
UIMap::isAutoViewModeEnabled
bool isAutoViewModeEnabled()
Definition: uimap.h:69
Map::clean
void clean()
Definition: map.cpp:72
UIItem::getItem
ItemPtr getItem()
Definition: uiitem.h:47
Game::openParent
void openParent(const ContainerPtr &container)
Definition: game.cpp:913
Town::setPos
void setPos(const Position &pos)
Definition: towns.h:37
CreatureType::getName
std::string getName()
Definition: creatures.h:89
UIMinimap::setMaxZoom
void setMaxZoom(int maxZoom)
Definition: uiminimap.h:41
Creature::setIconTexture
void setIconTexture(const std::string &filename)
Definition: creature.cpp:796
LocalPlayer::autoWalk
bool autoWalk(const Position &destination)
Definition: localplayer.cpp:167
Game::forceLogout
void forceLogout()
Definition: game.cpp:560
ProtocolGame::getThing
ThingPtr getThing(const InputMessagePtr &msg)
Definition: protocolgameparse.cpp:2160
StaticText::addMessage
bool addMessage(const std::string &name, Otc::MessageMode mode, const std::string &text)
Definition: statictext.cpp:62
ShaderManager::createMapShader
PainterShaderProgramPtr createMapShader(const std::string &name, const std::string &file)
Definition: shadermanager.cpp:115
ThingType::isMultiUse
bool isMultiUse()
Definition: thingtype.h:171
Map::getThing
ThingPtr getThing(const Position &pos, int stackPos)
Definition: map.cpp:170
UIMinimap::floorDown
bool floorDown()
Definition: uiminimap.cpp:91
Item::getContainerItem
ItemPtr getContainerItem(int slot)
Definition: item.h:140
Map::loadOtcm
bool loadOtcm(const std::string &fileName)
Definition: mapio.cpp:397
Thing::isUnwrapable
bool isUnwrapable()
Definition: thing.h:122
Map::getHouseFile
std::string getHouseFile()
Definition: map.h:164
Game::setPVPMode
void setPVPMode(Otc::PVPModes pvpMode)
Definition: game.cpp:1203
LocalPlayer::setKnown
void setKnown(bool known)
Definition: localplayer.h:57
StaticText
Definition: statictext.h:31
luainterface.h
Item::clearContainerItems
void clearContainerItems()
Definition: item.h:144
UIAnchorLayout
Definition: uianchorlayout.h:62
ProtocolGame::addPosition
void addPosition(const OutputMessagePtr &msg, const Position &position)
Definition: protocolgamesend.cpp:951
UIProgressRect::getPercent
float getPercent()
Definition: uiprogressrect.h:37
Game::openPrivateChannel
void openPrivateChannel(const std::string &receiver)
Definition: game.cpp:1022
LocalPlayer::getSkillBaseLevel
int getSkillBaseLevel(Otc::Skill skill)
Definition: localplayer.h:69
Tile::getPosition
const Position & getPosition()
Definition: tile.h:87
Thing::getAnimationPhases
int getAnimationPhases()
Definition: thing.h:76
Thing::isOnTop
bool isOnTop()
Definition: thing.h:88
Map::cleanTile
void cleanTile(const Position &pos)
Definition: map.cpp:350
Game::getClientVersion
int getClientVersion()
Definition: game.h:316
Game::setFightMode
void setFightMode(Otc::FightModes fightMode)
Definition: game.cpp:1181
Map::isCompletelyCovered
bool isCompletelyCovered(const Position &pos, int firstFloor=0)
Definition: map.cpp:634
Game::turn
void turn(Otc::Direction direction)
Definition: game.cpp:753
Game::useInventoryItem
void useInventoryItem(int itemId)
Definition: game.cpp:846
Creature::canBeSeen
bool canBeSeen()
Definition: creature.h:125
ThingType::hasLight
bool hasLight()
Definition: thingtype.h:186
Game::useWith
void useWith(const ItemPtr &item, const ThingPtr &toThing)
Definition: game.cpp:856
ShaderManager::createFragmentShaderFromCode
PainterShaderProgramPtr createFragmentShaderFromCode(const std::string &name, const std::string &code)
Definition: shadermanager.cpp:86
Map::getTile
const TilePtr & getTile(const Position &pos)
Definition: map.cpp:310
Game::requestOutfit
void requestOutfit()
Definition: game.cpp:1120
Item::setText
void setText(std::string txt)
Definition: item.h:120
LocalPlayer::getMana
double getMana()
Definition: localplayer.h:79
Thing::isLyingCorpse
bool isLyingCorpse()
Definition: thing.h:112
Game::setCustomOs
void setCustomOs(int os)
Definition: game.h:318
UIMinimap::anchorPosition
void anchorPosition(const UIWidgetPtr &anchoredWidget, Fw::AnchorEdge anchoredEdge, const Position &hookedPosition, Fw::AnchorEdge hookedEdge)
Definition: uiminimap.cpp:115
Spawn::addCreature
void addCreature(const Position &placePos, const CreatureTypePtr &cType)
Definition: creatures.cpp:121
ThingTypeManager::getItemType
const ItemTypePtr & getItemType(uint16 id)
Definition: thingtypemanager.cpp:386
Proto::Creature
@ Creature
Definition: protocolcodes.h:40
CreatureType::setSpawnTime
void setSpawnTime(int32 spawnTime)
Definition: creatures.h:85
LocalPlayer::setInventoryItem
void setInventoryItem(Otc::InventorySlot inventory, const ItemPtr &item)
Definition: localplayer.cpp:479
Spawn::setCenterPos
void setCenterPos(const Position &pos)
Definition: creatures.h:61
LuaInterface::registerSingletonClass
void registerSingletonClass(const std::string &className)
Definition: luainterface.cpp:79
UIMap::isMultifloor
bool isMultifloor()
Definition: uimap.h:68
House::getName
std::string getName()
Definition: houses.h:52
UIMap::isLimitVisibleRangeEnabled
bool isLimitVisibleRangeEnabled()
Definition: uimap.h:77
ThingType::isLyingCorpse
bool isLyingCorpse()
Definition: thingtype.h:191
SpriteManager::getSignature
uint32 getSignature()
Definition: spritemanager.h:47
Game::equipItem
void equipItem(const ItemPtr &item)
Definition: game.cpp:1365
UIItem::setItem
void setItem(const ItemPtr &item)
Definition: uiitem.h:40
UIMap::setMapShader
void setMapShader(const PainterShaderProgramPtr &shader, float fadeout, float fadein)
Definition: uimap.h:63
Item::addContainerItemIndexed
void addContainerItemIndexed(const ItemPtr &i, int slot)
Definition: item.h:141
Map::endGhostMode
void endGhostMode()
Definition: map.cpp:437
ThingType::getWidth
int getWidth()
Definition: thingtype.h:142
ThingType::getLight
Light getLight()
Definition: thingtype.h:159
Game::getVips
std::map< int, Vip > getVips()
Definition: game.h:334
Game::cancelLogin
void cancelLogin()
Definition: game.cpp:551
g_game
Game g_game
Definition: game.cpp:37
Minimap::saveImage
void saveImage(const std::string &fileName, const Rect &mapRect)
Definition: minimap.cpp:301
Tile::getThing
ThingPtr getThing(int stackPos)
Definition: tile.cpp:264
Item::setUniqueId
void setUniqueId(uint16 uniqueId)
Definition: item.h:115
Game::isConnectionOk
bool isConnectionOk()
Definition: game.h:329
Spawn
Definition: creatures.h:52
Game::walk
bool walk(Otc::Direction direction, bool dash=false)
Definition: game.cpp:577
Item::getContainerItems
ItemVector getContainerItems()
Definition: item.h:139
Tile::getThingStackPos
int getThingStackPos(const ThingPtr &thing)
Definition: tile.cpp:284
ItemType::getClientId
uint16 getClientId()
Definition: itemtype.h:141
Thing::isPlayer
virtual bool isPlayer()
Definition: thing.h:57
LocalPlayer::hasSight
bool hasSight(const Position &pos)
Definition: localplayer.cpp:553
Game::partyInvite
void partyInvite(int creatureId)
Definition: game.cpp:1078
Tile::removeThing
bool removeThing(ThingPtr thing)
Definition: tile.cpp:234
Game::isLogging
bool isLogging()
Definition: game.h:325
CreatureManager::isSpawnLoaded
bool isSpawnLoaded()
Definition: creatures.h:131
CreaturePtr
stdext::shared_object_ptr< Creature > CreaturePtr
Definition: declarations.h:63
ThingType::getAnimationPhases
int getAnimationPhases()
Definition: thingtype.h:150
UISprite
Definition: uisprite.h:29
Game::findItemInContainers
ItemPtr findItemInContainers(uint itemId, int subType)
Definition: game.cpp:884
ThingType::getMarketData
MarketData getMarketData()
Definition: thingtype.h:163
UICreature::getCreature
CreaturePtr getCreature()
Definition: uicreature.h:39
CreatureManager::deleteSpawn
void deleteSpawn(const SpawnPtr &spawn)
Definition: creatures.cpp:410
ThingType::isOnTop
bool isOnTop()
Definition: thingtype.h:167
ThingType::isNotPathable
bool isNotPathable()
Definition: thingtype.h:180
ThingTypeManager::getThingTypes
const ThingTypeList & getThingTypes(ThingCategory category)
Definition: thingtypemanager.cpp:413
Thing::isFluidContainer
bool isFluidContainer()
Definition: thing.h:96
Thing
Definition: thing.h:33
ThingType::isOnBottom
bool isOnBottom()
Definition: thingtype.h:166
UISprite::setSpriteId
void setSpriteId(int id)
Definition: uisprite.cpp:58
Item::getUniqueId
uint16 getUniqueId()
Definition: item.h:112
Map::findPath
std::tuple< std::vector< Otc::Direction >, Otc::PathFindResult > findPath(const Position &start, const Position &goal, int maxComplexity, int flags=0)
Definition: map.cpp:715
ShaderManager::getDefaultMapShader
const PainterShaderProgramPtr & getDefaultMapShader()
Definition: shadermanager.h:51
ThingType::isTranslucent
bool isTranslucent()
Definition: thingtype.h:188
UIMinimap::setMinZoom
void setMinZoom(int minZoom)
Definition: uiminimap.h:40
g_creatures
CreatureManager g_creatures
Definition: creatures.cpp:30
creature.h
Game::ProtocolGame
friend class ProtocolGame
Definition: game.h:157
Game::disableFeature
void disableFeature(Otc::GameFeature feature)
Definition: game.h:308
UIMap::isKeepAspectRatioEnabled
bool isKeepAspectRatioEnabled()
Definition: uimap.h:76
Game::requestStoreOffers
void requestStoreOffers(const std::string &categoryName, int serviceType=0)
Definition: game.cpp:1421
UIMap::getCameraPosition
Position getCameraPosition()
Definition: uimap.h:83
uiitem.h
Protocol
Definition: protocol.h:34
Game::open
int open(const ItemPtr &item, const ContainerPtr &previousContainer)
Definition: game.cpp:898
UIProgressRect::setPercent
void setPercent(float percent)
Definition: uiprogressrect.cpp:85
Map::setZoneColor
void setZoneColor(tileflags_t zone, const Color &color)
Definition: map.cpp:390
Item::setDescription
void setDescription(std::string desc)
Definition: item.h:119
HouseManager::load
void load(const std::string &fileName)
Definition: houses.cpp:136
minimap.h
UIMinimap::getTilePoint
Point getTilePoint(const Position &pos)
Definition: uiminimap.cpp:100
Creature::getType
uint8 getType()
Definition: creature.h:92
UIMap::isDrawingHealthBars
bool isDrawingHealthBars()
Definition: uimap.h:72
House::addDoor
void addDoor(const ItemPtr &door)
Definition: houses.cpp:56
Game::partyShareExperience
void partyShareExperience(bool active)
Definition: game.cpp:1113
House::setTownId
void setTownId(uint32 tid)
Definition: houses.h:57
ThingType::isFluidContainer
bool isFluidContainer()
Definition: thingtype.h:175
LocalPlayer::getMaxHealth
double getMaxHealth()
Definition: localplayer.h:73
UIMap::movePixels
void movePixels(int x, int y)
Definition: uimap.cpp:73
Town::setId
void setId(uint32 tid)
Definition: towns.h:35
Spawn::setRadius
void setRadius(int32 r)
Definition: creatures.h:58
ThingTypeManager::getContentRevision
uint16 getContentRevision()
Definition: thingtypemanager.h:69
ThingType::hasAttr
bool hasAttr(ThingAttr attr)
Definition: thingtype.h:139
ThingType::getNumPatternX
int getNumPatternX()
Definition: thingtype.h:147
ThingTypeManager::loadXml
void loadXml(const std::string &file)
Definition: thingtypemanager.cpp:225
ThingType::hasLensHelp
bool hasLensHelp()
Definition: thingtype.h:194
Thing::isPickupable
bool isPickupable()
Definition: thing.h:102
UIMap::setCameraPosition
void setCameraPosition(const Position &pos)
Definition: uimap.h:46
ProtocolGame::getItem
ItemPtr getItem(const InputMessagePtr &msg, int id=0)
Definition: protocolgameparse.cpp:2352
Game::partyJoin
void partyJoin(int creatureId)
Definition: game.cpp:1085
UIWidget::getPosition
Point getPosition()
Definition: uiwidget.h:354
UICreature::setCreature
void setCreature(const CreaturePtr &creature)
Definition: uicreature.h:35
UISprite::hasSprite
bool hasSprite()
Definition: uisprite.h:44
Game::requestTrade
void requestTrade(const ItemPtr &item, const CreaturePtr &creature)
Definition: game.cpp:1269
LocalPlayer::unlockWalk
void unlockWalk()
Definition: localplayer.h:38
Map::removeThingColor
void removeThingColor(const ThingPtr &thing)
Definition: map.cpp:237
Game::getProtocolVersion
int getProtocolVersion()
Definition: game.h:313
Game::getAttackingCreature
CreaturePtr getAttackingCreature()
Definition: game.h:335
Item::getName
std::string getName()
Definition: item.cpp:65
UIMap::followCreature
void followCreature(const CreaturePtr &creature)
Definition: uimap.h:44
Game::requestQuestLine
void requestQuestLine(int questId)
Definition: game.cpp:1358
UIMap::setMinimumAmbientLight
void setMinimumAmbientLight(float intensity)
Definition: uimap.h:64
Item::getDescription
std::string getDescription()
Definition: item.h:118
LocalPlayer::getExperience
double getExperience()
Definition: localplayer.h:76
UIItem::clearItem
void clearItem()
Definition: uiitem.h:42
LocalPlayer::stopAutoWalk
void stopAutoWalk()
Definition: localplayer.cpp:230
Game::getServerBeat
int getServerBeat()
Definition: game.h:338
localplayer.h
ThingType::getId
uint16 getId()
Definition: thingtype.h:136
Item::getTeleportDestination
Position getTeleportDestination()
Definition: item.h:122
LuaInterface::bindClassMemberFunction
void bindClassMemberFunction(const std::string &functionName, F FC::*function)
Definition: luainterface.h:385
Creature::setOutfitColor
void setOutfitColor(const Color &color, int duration)
Definition: creature.cpp:683
TownManager::sort
void sort()
Definition: towns.cpp:76
UICreaturePtr
stdext::shared_object_ptr< UICreature > UICreaturePtr
Definition: declarations.h:110
UIItem::isItemVisible
bool isItemVisible()
Definition: uiitem.h:49
Item::setTeleportDestination
void setTeleportDestination(const Position &pos)
Definition: item.h:123
LocalPlayer::setMagicLevel
void setMagicLevel(double magicLevel, double magicLevelPercent)
Definition: localplayer.cpp:437
Monster
Definition: creature.h:217
CreatureManager::saveSpawns
void saveSpawns(const std::string &fileName)
Definition: creatures.cpp:261
towns.h
TownManager::getTownByName
const TownPtr & getTownByName(std::string name)
Definition: towns.cpp:61
LocalPlayer::setStates
void setStates(int states)
Definition: localplayer.cpp:321
Map::findItemsById
std::map< Position, ItemPtr > findItemsById(uint16 clientId, uint32 max)
Definition: map.cpp:442
Game::buyItem
void buyItem(const ItemPtr &item, int amount, bool ignoreCapacity, bool buyWithBackpack)
Definition: game.cpp:1248
ThingType::isRotateable
bool isRotateable()
Definition: thingtype.h:185
HouseManager::getHouse
HousePtr getHouse(uint32 houseId)
Definition: houses.cpp:123
Town::getId
uint32 getId()
Definition: towns.h:39
Creature::getName
std::string getName()
Definition: creature.h:82
UIItem::setItemVisible
void setItemVisible(bool visible)
Definition: uiitem.h:39
Game::requestQuestLog
void requestQuestLog()
Definition: game.cpp:1351
ThingType::isDontHide
bool isDontHide()
Definition: thingtype.h:187
Item::removeContainerItem
void removeContainerItem(int slot)
Definition: item.h:143
ShaderManager::getDefaultItemShader
const PainterShaderProgramPtr & getDefaultItemShader()
Definition: shadermanager.h:50
ThingType::blockProjectile
bool blockProjectile()
Definition: thingtype.h:179
g_sprites
SpriteManager g_sprites
Definition: spritemanager.cpp:29
Tile::getFlags
uint32 getFlags()
Definition: tile.h:120
Map::setShowAnimations
void setShowAnimations(bool show)
Definition: map.cpp:423
Creature::getIcon
uint8 getIcon()
Definition: creature.h:93
Creature::getBaseSpeed
double getBaseSpeed()
Definition: creature.h:88
CreatureType::cast
CreaturePtr cast()
Definition: creatures.cpp:155
Game::use
void use(const ThingPtr &thing)
Definition: game.cpp:832
ThingType::getSprites
std::vector< int > getSprites()
Definition: thingtype.h:204
houses.h
Thing::isGroundBorder
bool isGroundBorder()
Definition: thing.h:86
Creature::setTypeTexture
void setTypeTexture(const std::string &filename)
Definition: creature.cpp:791
ShaderManager::getShader
PainterShaderProgramPtr getShader(const std::string &name)
Definition: shadermanager.cpp:139
spritemanager.h
House::getRent
uint32 getRent()
Definition: houses.h:64
UIMap::isAnimating
bool isAnimating()
Definition: uimap.h:75
Npc
Definition: creature.h:210
Game::isOnline
bool isOnline()
Definition: game.h:324
LocalPlayer::setExperience
void setExperience(double experience)
Definition: localplayer.cpp:403
Thing::isCreature
virtual bool isCreature()
Definition: thing.h:54
g_lua
LuaInterface g_lua
Definition: luainterface.cpp:31
Game::answerModalDialog
void answerModalDialog(uint32 dialog, int button, int choice)
Definition: game.cpp:1386
Game::getCharacterName
std::string getCharacterName()
Definition: game.h:345
Game::canReportBugs
bool canReportBugs()
Definition: game.h:340
Tile::getCreatures
std::vector< CreaturePtr > getCreatures()
Definition: tile.cpp:314
House::setTile
void setTile(const TilePtr &tile)
Definition: houses.cpp:41
ThingType::getGroundSpeed
int getGroundSpeed()
Definition: thingtype.h:157
container.h
Game::closeNpcChannel
void closeNpcChannel()
Definition: game.cpp:1050
Minimap::clean
void clean()
Definition: minimap.cpp:95
LocalPlayer::setSoul
void setSoul(double soul)
Definition: localplayer.cpp:459
SpriteManager::getSpritesCount
int getSpritesCount()
Definition: spritemanager.h:48
Container::getItem
ItemPtr getItem(int slot)
Definition: container.cpp:40
Map::getTiles
const TileList getTiles(int floor=-1)
Definition: map.cpp:320
House::setRent
void setRent(uint32 r)
Definition: houses.h:63
Game::setChaseMode
void setChaseMode(Otc::ChaseModes chaseMode)
Definition: game.cpp:1170
LocalPlayer::isServerWalking
bool isServerWalking()
Definition: localplayer.h:96
Map::addThing
void addThing(const ThingPtr &thing, const Position &pos, int stackPos=-1)
Definition: map.cpp:107
ThingType::isTopEffect
bool isTopEffect()
Definition: thingtype.h:202
UIMinimap::getMinZoom
int getMinZoom()
Definition: uiminimap.h:51
Game::inspectTrade
void inspectTrade(bool counterOffer, int index)
Definition: game.cpp:1276
CreatureManager::getSpawns
std::vector< SpawnPtr > getSpawns()
Definition: creatures.cpp:418
g_shaders
ShaderManager g_shaders
Definition: shadermanager.cpp:29
Game::follow
void follow(CreaturePtr creature)
Definition: game.cpp:960
Thing::isLocalPlayer
virtual bool isLocalPlayer()
Definition: thing.h:58
UIMinimap::getZoom
int getZoom()
Definition: uiminimap.h:53
Tile::getThingCount
int getThingCount()
Definition: tile.h:96
Game::acceptTrade
void acceptTrade()
Definition: game.cpp:1283
UIMap::setMultifloor
void setMultifloor(bool enable)
Definition: uimap.h:49
Tile::getTopUseThing
ThingPtr getTopUseThing()
Definition: tile.cpp:371
Creature::jump
void jump(int height, int duration)
Definition: creature.cpp:374
uicreature.h
CreatureManager::loadNpcs
void loadNpcs(const std::string &folder)
Definition: creatures.cpp:210
Item::createFromOtb
static ItemPtr createFromOtb(int id)
Definition: item.cpp:58
Thing::isMarketable
bool isMarketable()
Definition: thing.h:119
UIMap::isDrawingLights
bool isDrawingLights()
Definition: uimap.h:73
Tile::isSelected
bool isSelected()
Definition: tile.h:128
missile.h
CreatureTypePtr
stdext::shared_object_ptr< CreatureType > CreatureTypePtr
Definition: declarations.h:77
ItemType::getServerId
uint16 getServerId()
Definition: itemtype.h:138
Game::talkPrivate
void talkPrivate(Otc::MessageMode mode, const std::string &receiver, const std::string &message)
Definition: game.cpp:1015
Map::colorizeThing
void colorizeThing(const ThingPtr &thing, const Color &color)
Definition: map.cpp:219
ThingTypeManager::isOtbLoaded
bool isOtbLoaded()
Definition: thingtypemanager.h:73
HouseManager::addHouse
void addHouse(const HousePtr &house)
Definition: houses.cpp:110
Item::getActionId
uint16 getActionId()
Definition: item.h:113
UIItemPtr
stdext::shared_object_ptr< UIItem > UIItemPtr
Definition: declarations.h:107
ProtocolGame::getCreature
CreaturePtr getCreature(const InputMessagePtr &msg, int type=0)
Definition: protocolgameparse.cpp:2203
ThingTypeManager::findItemTypeByClientId
const ItemTypePtr & findItemTypeByClientId(uint16 id)
Definition: thingtypemanager.cpp:340
Map::createTile
const TilePtr & createTile(const Position &pos)
Definition: map.cpp:265
Tile::setFlag
void setFlag(uint32 flag)
Definition: tile.h:117
Map::saveOtcm
void saveOtcm(const std::string &fileName)
Definition: mapio.cpp:474
House::setId
void setId(uint32 hId)
Definition: houses.h:54
Container
Definition: container.h:32
Creature::getSpeed
uint16 getSpeed()
Definition: creature.h:87
HousePtr
stdext::shared_object_ptr< House > HousePtr
Definition: declarations.h:75
Item::getServerId
uint16 getServerId()
Definition: item.h:99
Item::setActionId
void setActionId(uint16 actionId)
Definition: item.h:114
ShaderManager::createFragmentShader
PainterShaderProgramPtr createFragmentShader(const std::string &name, std::string file)
Definition: shadermanager.cpp:63
ThingTypeManager::findItemTypeByCategory
ItemTypeList findItemTypeByCategory(ItemCategory category)
Definition: thingtypemanager.cpp:404
Item::setCount
void setCount(int count)
Definition: item.h:90
Tile::isFullGround
bool isFullGround()
Definition: tile.cpp:503
Map::setZoneOpacity
void setZoneOpacity(float opacity)
Definition: map.h:196
Container::getSize
int getSize()
Definition: container.h:50
Position::getDirectionFromPositions
static Otc::Direction getDirectionFromPositions(const Position &fromPos, const Position &toPos)
Definition: position.h:152
UIMap::isDrawingNames
bool isDrawingNames()
Definition: uimap.h:71
SpriteManager::saveSpr
void saveSpr(std::string fileName)
Definition: spritemanager.cpp:66
UIMinimap::centerInPosition
void centerInPosition(const UIWidgetPtr &anchoredWidget, const Position &hookedPosition)
Definition: uiminimap.cpp:129
Container::isUnlocked
bool isUnlocked()
Definition: container.h:48
Game::forceWalk
void forceWalk(Otc::Direction direction)
Definition: game.cpp:716
CreatureType::setOutfit
void setOutfit(const Outfit &o)
Definition: creatures.h:91
TownManager::getTown
const TownPtr & getTown(uint32 townId)
Definition: towns.cpp:52
UIItem::setVirtual
void setVirtual(bool virt)
Definition: uiitem.h:41
UIMap::getTile
TilePtr getTile(const Point &mousePos)
Definition: uimap.cpp:139
Map::setWidth
void setWidth(uint16 w)
Definition: map.h:161
CreatureType::getSpawnTime
int32 getSpawnTime()
Definition: creatures.h:86
map.h
ThingType::isWrapable
bool isWrapable()
Definition: thingtype.h:200
Creature::getSkull
uint8 getSkull()
Definition: creature.h:89
ThingType::getDisplacement
Point getDisplacement()
Definition: thingtype.h:152
Creature::getOutfit
Outfit getOutfit()
Definition: creature.h:85
ThingType::isForceUse
bool isForceUse()
Definition: thingtype.h:170
UIMap::getMinimumAmbientLight
float getMinimumAmbientLight()
Definition: uimap.h:90
ThingTypeManager::getThingType
const ThingTypePtr & getThingType(uint16 id, ThingCategory category)
Definition: thingtypemanager.cpp:377
LuaInterface::registerClass
void registerClass(const std::string &className, const std::string &baseClass="LuaObject")
Definition: luainterface.cpp:87
Game::getFeature
bool getFeature(Otc::GameFeature feature)
Definition: game.h:310
LocalPlayer::getHealth
double getHealth()
Definition: localplayer.h:72
Thing::isMonster
virtual bool isMonster()
Definition: thing.h:56
Item::clone
ItemPtr clone()
Definition: item.cpp:266
ItemType
Definition: itemtype.h:130
ThingType::isAnimateAlways
bool isAnimateAlways()
Definition: thingtype.h:192
LocalPlayer::isAutoWalking
bool isAutoWalking()
Definition: localplayer.h:95
Map::removeCreatureById
void removeCreatureById(uint32 id)
Definition: map.cpp:479
ProtocolGame::setTileDescription
int setTileDescription(const InputMessagePtr &msg, Position position)
Definition: protocolgameparse.cpp:2080
Effect::setId
void setId(uint32 id)
Definition: effect.cpp:83
House::removeDoorById
void removeDoorById(uint32 doorId)
Definition: houses.cpp:63
Game::talkChannel
void talkChannel(Otc::MessageMode mode, int channelId, const std::string &message)
Definition: game.cpp:1008
Creature::setShieldTexture
void setShieldTexture(const std::string &filename, bool blink)
Definition: creature.cpp:771
Tile::setFlags
void setFlags(uint32 flags)
Definition: tile.h:118
ThingType::hasMiniMapColor
bool hasMiniMapColor()
Definition: thingtype.h:193
Game::openOwnChannel
void openOwnChannel()
Definition: game.cpp:1057
Map::setHeight
void setHeight(uint16 h)
Definition: map.h:162
Container::hasPages
bool hasPages()
Definition: container.h:49
ThingType::isFullGround
bool isFullGround()
Definition: thingtype.h:195
ThingType
Definition: thingtype.h:123
Game::dashWalk
bool dashWalk(Otc::Direction direction)
Definition: game.cpp:673
Creature::getDirection
Otc::Direction getDirection()
Definition: creature.h:84
Position::getAngleFromPositions
static double getAngleFromPositions(const Position &fromPos, const Position &toPos)
Definition: position.h:134
ProtocolGame::getPosition
Position getPosition(const InputMessagePtr &msg)
Definition: protocolgameparse.cpp:2394
Item::getSubType
int getSubType()
Definition: item.cpp:240
Creature::getWalkTicksElapsed
ticks_t getWalkTicksElapsed()
Definition: creature.h:102
UIMinimapPtr
stdext::shared_object_ptr< UIMinimap > UIMinimapPtr
Definition: declarations.h:113
uimap.h
ThingTypePtr
stdext::shared_object_ptr< ThingType > ThingTypePtr
Definition: declarations.h:73
UIMap::setDrawFlags
void setDrawFlags(Otc::DrawFlags drawFlags)
Definition: uimap.h:55
UIMap::setZoom
bool setZoom(int zoom)
Definition: uimap.cpp:78
Thing::getId
virtual uint32 getId()
Definition: thing.h:44
UISprite::clearSprite
void clearSprite()
Definition: uisprite.h:37
ThingType::getLensHelp
int getLensHelp()
Definition: thingtype.h:161
LuaInterface::bindGlobalFunction
void bindGlobalFunction(const std::string &functionName, const F &function)
Definition: luainterface.h:421
ThingType::isStackable
bool isStackable()
Definition: thingtype.h:169
Game::openStore
void openStore(int serviceType=0, const std::string &category="")
Definition: game.cpp:1428
UIItem::setItemSubType
void setItemSubType(int subType)
Definition: uiitem.h:38
Game::getLastWalkDir
Otc::Direction getLastWalkDir()
Definition: game.h:349
Spawn::getCreatures
std::vector< CreatureTypePtr > getCreatures()
Definition: creatures.cpp:147
HouseManager::getHouseByName
HousePtr getHouseByName(std::string name)
Definition: houses.cpp:129
Item::getText
std::string getText()
Definition: item.h:117
ThingType::isPickupable
bool isPickupable()
Definition: thingtype.h:181
UIMap::setDrawLights
void setDrawLights(bool enable)
Definition: uimap.h:59
House::getSize
uint32 getSize()
Definition: houses.h:61
Thing::getClothSlot
int getClothSlot()
Definition: thing.h:83
UIItem::getItemSubType
int getItemSubType()
Definition: uiitem.h:46
Game::editVip
void editVip(int playerId, const std::string &description, int iconId, bool notifyLogin)
Definition: game.cpp:1153
Town
Definition: towns.h:29
HouseManager::filterHouses
HouseList filterHouses(uint32 townId)
Definition: houses.cpp:190
Item::create
static ItemPtr create(int id)
Definition: item.cpp:51
Game::sellItem
void sellItem(const ItemPtr &item, int amount, bool ignoreEquipped)
Definition: game.cpp:1255
House::getEntry
Position getEntry()
Definition: houses.h:67
Creature::showStaticSquare
void showStaticSquare(const Color &color)
Definition: creature.h:78
Container::getFirstIndex
int getFirstIndex()
Definition: container.h:51
Thing::isAnimatedText
virtual bool isAnimatedText()
Definition: thing.h:59
UICreature
Definition: uicreature.h:30
UIMap::getMaxZoomOut
int getMaxZoomOut()
Definition: uimap.h:87
UIProgressRectPtr
stdext::shared_object_ptr< UIProgressRect > UIProgressRectPtr
Definition: declarations.h:114
Tile::isFullyOpaque
bool isFullyOpaque()
Definition: tile.cpp:511
House
Definition: houses.h:41
UIMap::getZoom
int getZoom()
Definition: uimap.h:88
Map::getZoneColor
Color getZoneColor(tileflags_t flag)
Definition: map.cpp:396
UIMap::isDrawingTexts
bool isDrawingTexts()
Definition: uimap.h:70
Thing::getStackPos
int getStackPos()
Definition: thing.cpp:76
ThingType::isChargeable
bool isChargeable()
Definition: thingtype.h:173
outfit.h
Game::excludeFromOwnChannel
void excludeFromOwnChannel(const std::string &name)
Definition: game.cpp:1071
Tile::unselect
void unselect()
Definition: tile.h:127
CreatureManager::loadSpawns
void loadSpawns(const std::string &fileName)
Definition: creatures.cpp:224
TownManager::getTowns
TownList getTowns()
Definition: towns.h:60
CreatureManager::isLoaded
bool isLoaded()
Definition: creatures.h:130
ProtocolGame::sendExtendedOpcode
void sendExtendedOpcode(uint8 opcode, const std::string &buffer)
Definition: protocolgamesend.cpp:38
Item
Definition: item.h:76
Game::closeNpcTrade
void closeNpcTrade()
Definition: game.cpp:1262
Container::getName
std::string getName()
Definition: container.h:45
player.h
CreatureManager::getSpawnForPlacePos
SpawnPtr getSpawnForPlacePos(const Position &pos)
Definition: creatures.cpp:379
CreatureType::getOutfit
Outfit getOutfit()
Definition: creatures.h:92
Tile::remFlag
void remFlag(uint32 flag)
Definition: tile.h:116
Thing::isTopEffect
bool isTopEffect()
Definition: thing.h:123
UIMap::setDrawNames
void setDrawNames(bool enable)
Definition: uimap.h:57
House::getTile
TilePtr getTile(const Position &pos)
Definition: houses.cpp:48
Game::getFightMode
Otc::FightModes getFightMode()
Definition: game.h:237
ThingType::isNotWalkable
bool isNotWalkable()
Definition: thingtype.h:177
Tile::isHouseTile
bool isHouseTile()
Definition: tile.h:124
ThingType::isContainer
bool isContainer()
Definition: thingtype.h:168
CreatureManager::clear
void clear()
Definition: creatures.h:110
LocalPlayer::getMaxMana
double getMaxMana()
Definition: localplayer.h:80
Container::getId
int getId()
Definition: container.h:42
LocalPlayer::getSoul
double getSoul()
Definition: localplayer.h:84
Map::getSize
Size getSize()
Definition: map.h:166
g_towns
TownManager g_towns
Definition: towns.cpp:25
UIMap::setAnimated
void setAnimated(bool enable)
Definition: uimap.h:61
Tile::getTopThing
ThingPtr getTopThing()
Definition: tile.cpp:292
LocalPlayer::setTotalCapacity
void setTotalCapacity(double totalCapacity)
Definition: localplayer.cpp:393
Creature::getHealthPercent
uint8 getHealthPercent()
Definition: creature.h:83
Game::refreshContainer
void refreshContainer(const ContainerPtr &container)
Definition: game.cpp:929
LocalPlayer::getRegenerationTime
double getRegenerationTime()
Definition: localplayer.h:86
CreatureType::setName
void setName(const std::string &name)
Definition: creatures.h:88
CreatureManager::loadMonsters
void loadMonsters(const std::string &file)
Definition: creatures.cpp:182
Map::getSpectators
std::vector< CreaturePtr > getSpectators(const Position &centerPos, bool multiFloor)
Definition: map.cpp:574
Game::enableFeature
void enableFeature(Otc::GameFeature feature)
Definition: game.h:307
Map::setSpawnFile
void setSpawnFile(const std::string &file)
Definition: map.h:157
SpawnPtr
stdext::shared_object_ptr< Spawn > SpawnPtr
Definition: declarations.h:78
Container::getSlotPosition
Position getSlotPosition(int slot)
Definition: container.h:41
Game::partyRevokeInvitation
void partyRevokeInvitation(int creatureId)
Definition: game.cpp:1092
Game::talk
void talk(const std::string &message)
Definition: game.cpp:1001
UIMap::setDrawManaBar
void setDrawManaBar(bool enable)
Definition: uimap.h:60
ThingType::getClothSlot
int getClothSlot()
Definition: thingtype.h:162
Game::isGM
bool isGM()
Definition: game.h:348
Game::changeMapAwareRange
void changeMapAwareRange(int xrange, int yrange)
Definition: game.cpp:1464
Map::getSpawnFile
std::string getSpawnFile()
Definition: map.h:165
Game::transferCoins
void transferCoins(const std::string &recipient, int amount)
Definition: game.cpp:1435
Creature::isDead
bool isDead()
Definition: creature.h:124
LocalPlayer::getOfflineTrainingTime
double getOfflineTrainingTime()
Definition: localplayer.h:87
effect.h
Game::isSafeFight
bool isSafeFight()
Definition: game.h:238
Game::partyLeave
void partyLeave()
Definition: game.cpp:1106
LocalPlayer::isPreWalking
bool isPreWalking()
Definition: localplayer.h:94
ThingTypeManager::loadOtb
void loadOtb(const std::string &file)
Definition: thingtypemanager.cpp:174
Missile
Definition: missile.h:31
Map::showZones
bool showZones()
Definition: map.h:201
Game::getPVPMode
Otc::PVPModes getPVPMode()
Definition: game.h:239
Game::getUnjustifiedPoints
UnjustifiedPoints getUnjustifiedPoints()
Definition: game.h:243
LocalPlayer::getBlessings
int getBlessings()
Definition: localplayer.h:90
Game::getProtocolGame
ProtocolGamePtr getProtocolGame()
Definition: game.h:344
ThingType::isGround
bool isGround()
Definition: thingtype.h:164
UIMinimap::getCameraPosition
Position getCameraPosition()
Definition: uiminimap.h:50
ThingType::isHangable
bool isHangable()
Definition: thingtype.h:182
uiprogressrect.h
Tile::hasCreature
bool hasCreature()
Definition: tile.cpp:577
SpriteManager::isLoaded
bool isLoaded()
Definition: spritemanager.h:51
Thing::getStackPriority
int getStackPriority()
Definition: thing.cpp:46
Map::isForcingAnimations
bool isForcingAnimations()
Definition: map.cpp:413
LocalPlayer::setStamina
void setStamina(double stamina)
Definition: localplayer.cpp:469
Game::setSafeFight
void setSafeFight(bool on)
Definition: game.cpp:1192
ThingType::hasDisplacement
bool hasDisplacement()
Definition: thingtype.h:189
ThingType::isMarketable
bool isMarketable()
Definition: thingtype.h:198
Game::getLocalPlayer
LocalPlayerPtr getLocalPlayer()
Definition: game.h:343
Map::isLookPossible
bool isLookPossible(const Position &pos)
Definition: map.cpp:615
g_minimap
Minimap g_minimap
Definition: minimap.cpp:36
ThingType::isNotMoveable
bool isNotMoveable()
Definition: thingtype.h:178
Tile
Definition: tile.h:56
Game::buyStoreOffer
void buyStoreOffer(int offerId, int productType, const std::string &name="")
Definition: game.cpp:1407
ThingType::isCloth
bool isCloth()
Definition: thingtype.h:197
UISpritePtr
stdext::shared_object_ptr< UISprite > UISpritePtr
Definition: declarations.h:111
Map::removeThingByPos
bool removeThingByPos(const Position &pos, int stackPos)
Definition: map.cpp:212
Tile::isPathable
bool isPathable()
Definition: tile.cpp:495
Creature::isRemoved
bool isRemoved()
Definition: creature.h:122
AnimatedText
Definition: animatedtext.h:32
Map::getDescriptions
std::vector< std::string > getDescriptions()
Definition: map.h:167
CreatureManager::getSpawn
SpawnPtr getSpawn(const Position &centerPos)
Definition: creatures.cpp:370
Game::requestChannels
void requestChannels()
Definition: game.cpp:1029
Game::getOs
int getOs()
Definition: game.cpp:1739
StaticTextPtr
stdext::shared_object_ptr< StaticText > StaticTextPtr
Definition: declarations.h:71
LocalPlayer::getInventoryItem
ItemPtr getInventoryItem(Otc::InventorySlot inventory)
Definition: localplayer.h:89
UIItem::setItemCount
void setItemCount(int count)
Definition: uiitem.h:37
UISprite::setSpriteColor
void setSpriteColor(Color color)
Definition: uisprite.h:39
Creature::getStepDuration
int getStepDuration(bool ignoreDiagonal=false, Otc::Direction dir=Otc::InvalidDirection)
Definition: creature.cpp:855
Game::cancelAttack
void cancelAttack()
Definition: game.h:194
Thing::isNpc
virtual bool isNpc()
Definition: thing.h:55
Game::openTransactionHistory
void openTransactionHistory(int entriesPerPage)
Definition: game.cpp:1442
UIProgressRect
Definition: uiprogressrect.h:30
Game::reportBug
void reportBug(const std::string &comment)
Definition: game.cpp:1332
ThingTypeManager::findThingTypeByAttr
ThingTypeList findThingTypeByAttr(ThingAttr attr, ThingCategory category)
Definition: thingtypemanager.cpp:395
Container::getItemsCount
int getItemsCount()
Definition: container.h:40
UIMap::getVisibleDimension
Size getVisibleDimension()
Definition: uimap.h:79
game.h
UICreature::isFixedCreatureSize
bool isFixedCreatureSize()
Definition: uicreature.h:40
CreatureManager::loadSingleCreature
void loadSingleCreature(const std::string &file)
Definition: creatures.cpp:205
Thing::isForceUse
bool isForceUse()
Definition: thing.h:91
ThingType::hasElevation
bool hasElevation()
Definition: thingtype.h:190
Game::changeOutfit
void changeOutfit(const Outfit &outfit)
Definition: game.cpp:1127
UIMap::drawSelf
void drawSelf(Fw::DrawPane drawPane)
Definition: uimap.cpp:50
UIMap::isDrawingManaBar
bool isDrawingManaBar()
Definition: uimap.h:74
Thing::isStaticText
virtual bool isStaticText()
Definition: thing.h:60
HouseManager::getHouseList
HouseList getHouseList()
Definition: houses.h:101
Thing::getParentContainer
ContainerPtr getParentContainer()
Definition: thing.cpp:67
ThingType::isGroundBorder
bool isGroundBorder()
Definition: thingtype.h:165
House::setSize
void setSize(uint32 s)
Definition: houses.h:60
ThingType::setPathable
void setPathable(bool var)
Definition: thingtype.cpp:568
Thing::setPosition
void setPosition(const Position &position)
Definition: thing.cpp:36
Map::beginGhostMode
void beginGhostMode(float opacity)
Definition: map.cpp:432
LocalPlayer::getSkillLevelPercent
int getSkillLevelPercent(Otc::Skill skill)
Definition: localplayer.h:70
UIMap::setAddLightMethod
void setAddLightMethod(bool add)
Definition: uimap.h:66
Minimap::saveOtmm
void saveOtmm(const std::string &fileName)
Definition: minimap.cpp:369
UIMinimap::setCameraPosition
void setCameraPosition(const Position &pos)
Definition: uiminimap.cpp:73
Game::removeVip
void removeVip(int playerId)
Definition: game.cpp:1141
UIItem::getItemCount
int getItemCount()
Definition: uiitem.h:45
Game::getChaseMode
Otc::ChaseModes getChaseMode()
Definition: game.h:236
ShaderManager::createShader
PainterShaderProgramPtr createShader(const std::string &name)
Definition: shadermanager.cpp:51
House::setEntry
void setEntry(const Position &p)
Definition: houses.h:66
Map::setShowZones
void setShowZones(bool show)
Definition: map.cpp:382
Map::getZoneOpacity
float getZoneOpacity()
Definition: map.h:198
LocalPlayer::getLevelPercent
double getLevelPercent()
Definition: localplayer.h:78
Town::getPos
Position getPos()
Definition: towns.h:41
UIMap::setLimitVisibleRange
void setLimitVisibleRange(bool limitVisibleRange)
Definition: uimap.h:65
Creature::hideStaticSquare
void hideStaticSquare()
Definition: creature.h:79
Game::getContainer
ContainerPtr getContainer(int index)
Definition: game.h:332
protocolgame.h
uiminimap.h
LuaInterface::bindSingletonFunction
void bindSingletonFunction(const std::string &functionName, F C::*function, C *instance)
Definition: luainterface.h:366
Thing::isItem
virtual bool isItem()
Definition: thing.h:51
Map::setCentralPosition
void setCentralPosition(const Position &centralPosition)
Definition: map.cpp:534
Game::getWorldName
std::string getWorldName()
Definition: game.h:346
Thing::isGround
bool isGround()
Definition: thing.h:85
UIMinimap::zoomOut
bool zoomOut()
Definition: uiminimap.h:37
statictext.h
TownManager::addTown
void addTown(const TownPtr &town)
Definition: towns.cpp:39
Client::registerLuaFunctions
void registerLuaFunctions()
Definition: luafunctions.cpp:55
ThingTypeManager::findItemTypesByName
ItemTypeList findItemTypesByName(std::string name)
Definition: thingtypemanager.cpp:359
HouseManager::clear
void clear()
Definition: houses.h:100
StaticText::setFont
void setFont(const std::string &fontName)
Definition: statictext.cpp:52
House::getId
uint32 getId()
Definition: houses.h:55
UIMap::setVisibleDimension
void setVisibleDimension(const Size &visibleDimension)
Definition: uimap.cpp:113
Thing::getPosition
Position getPosition()
Definition: thing.h:45
Game::canPerformGameAction
bool canPerformGameAction()
Definition: game.cpp:1484
ThingType::getCategory
ThingCategory getCategory()
Definition: thingtype.h:137
UICreature::setOutfit
void setOutfit(const Outfit &outfit)
Definition: uicreature.cpp:41
HouseManager::removeHouse
void removeHouse(uint32 houseId)
Definition: houses.cpp:116
Item::getCount
int getCount()
Definition: item.cpp:249
Game::cancelAttackAndFollow
void cancelAttackAndFollow()
Definition: game.cpp:984
Item::addContainerItem
void addContainerItem(const ItemPtr &i)
Definition: item.h:142
UISprite::getSpriteId
int getSpriteId()
Definition: uisprite.h:36
ThingType::exportImage
void exportImage(std::string fileName)
Definition: thingtype.cpp:326
Map::getCreatureById
CreaturePtr getCreatureById(uint32 id)
Definition: map.cpp:471
SpriteManager::loadSpr
bool loadSpr(std::string file)
Definition: spritemanager.cpp:42
ThingType::getDisplacementX
int getDisplacementX()
Definition: thingtype.h:153
Tile::overwriteMinimapColor
void overwriteMinimapColor(uint8 color)
Definition: tile.h:114
Game::seekInContainer
void seekInContainer(int cid, int index)
Definition: game.cpp:1400
ThingTypeManager::saveDat
void saveDat(std::string fileName)
Definition: thingtypemanager.cpp:66
ThingType::isIgnoreLook
bool isIgnoreLook()
Definition: thingtype.h:196
tile.h
Tile::select
void select()
Definition: tile.h:126
Map::getCentralPosition
Position getCentralPosition()
Definition: map.h:236
animatedtext.h
UIMinimap::floorUp
bool floorUp()
Definition: uiminimap.cpp:82
UIMap::getViewMode
MapView::ViewMode getViewMode()
Definition: uimap.h:80
LocalPlayer::getLevel
double getLevel()
Definition: localplayer.h:77
SpriteManager::unload
void unload()
Definition: spritemanager.cpp:120
LocalPlayer::setFreeCapacity
void setFreeCapacity(double freeCapacity)
Definition: localplayer.cpp:383
UIMap::setMaxZoomOut
void setMaxZoomOut(int maxZoomOut)
Definition: uimap.h:48
Tile::getTopMoveThing
ThingPtr getTopMoveThing()
Definition: tile.cpp:423
Town::getName
std::string getName()
Definition: towns.h:40
Creature::setOutfit
void setOutfit(const Outfit &outfit)
Definition: creature.cpp:665
Creature::getStepTicksLeft
float getStepTicksLeft()
Definition: creature.h:101
Container::isClosed
bool isClosed()
Definition: container.h:47
UIItem::setItemId
void setItemId(int id)
Definition: uiitem.cpp:76
Game::joinChannel
void joinChannel(int channelId)
Definition: game.cpp:1036
ProtocolGame::login
void login(const std::string &accountName, const std::string &accountPassword, const std::string &host, uint16 port, const std::string &characterName, const std::string &authenticatorToken, const std::string &sessionKey)
Definition: protocolgame.cpp:29
Tile::isEmpty
bool isEmpty()
Definition: tile.cpp:551
Game::isDead
bool isDead()
Definition: game.h:326
Thing::isMultiUse
bool isMultiUse()
Definition: thing.h:92
ProtocolGamePtr
stdext::shared_object_ptr< ProtocolGame > ProtocolGamePtr
Definition: declarations.h:94
ThingType::getLayers
int getLayers()
Definition: thingtype.h:146
UIMinimap
Definition: uiminimap.h:29
Game::requestTransactionHistory
void requestTransactionHistory(int page, int entriesPerPage)
Definition: game.cpp:1414
Game::rotate
void rotate(const ThingPtr &thing)
Definition: game.cpp:824
Spawn::removeCreature
void removeCreature(const Position &pos)
Definition: creatures.cpp:137
Game::editText
void editText(uint id, const std::string &text)
Definition: game.cpp:1297
ThingType::getDisplacementY
int getDisplacementY()
Definition: thingtype.h:154
Thing::isUsable
bool isUsable()
Definition: thing.h:120
Thing::isEffect
virtual bool isEffect()
Definition: thing.h:52
Proto::StaticText
@ StaticText
Definition: protocolcodes.h:37
Map::showZone
bool showZone(tileflags_t zone)
Definition: map.h:202
Container::getItems
std::deque< ItemPtr > getItems()
Definition: container.h:39
CreatureManager::addSpawn
SpawnPtr addSpawn(const Position &centerPos, int radius)
Definition: creatures.cpp:392
Game::checkBotProtection
bool checkBotProtection()
Definition: game.cpp:1471
Game::moveToParentContainer
void moveToParentContainer(const ThingPtr &thing, int count)
Definition: game.cpp:815
Game::attack
void attack(CreaturePtr creature)
Definition: game.cpp:936
ThingType::getNumPatternZ
int getNumPatternZ()
Definition: thingtype.h:149
g_things
ThingTypeManager g_things
Definition: thingtypemanager.cpp:38
Game::reportRuleViolation
void reportRuleViolation(const std::string &target, int reason, int action, const std::string &comment, const std::string &statement, int statementId, bool ipBanishment)
Definition: game.cpp:1339
Map::removeThing
bool removeThing(const ThingPtr &thing)
Definition: map.cpp:177
Game::ping
void ping()
Definition: game.cpp:1449
ThingType::getExactSize
int getExactSize(int layer=0, int xPattern=0, int yPattern=0, int zPattern=0, int animationPhase=0)
Definition: thingtype.cpp:557
Game::useInventoryItemWith
void useInventoryItemWith(int itemId, const ThingPtr &toThing)
Definition: game.cpp:871
Thing::isStackable
bool isStackable()
Definition: thing.h:90
g_houses
HouseManager g_houses
Definition: houses.cpp:27
LocalPlayer::getTotalCapacity
double getTotalCapacity()
Definition: localplayer.h:75
client.h
Game::debugReport
void debugReport(const std::string &a, const std::string &b, const std::string &c, const std::string &d)
Definition: game.cpp:1346
Creature::getStepProgress
float getStepProgress()
Definition: creature.h:100
Game::autoWalk
void autoWalk(std::vector< Otc::Direction > dirs)
Definition: game.cpp:678
House::removeDoor
void removeDoor(const ItemPtr &door)
Definition: houses.h:70
Player
Definition: player.h:29
LocalPlayer::getSkillLevel
int getSkillLevel(Otc::Skill skill)
Definition: localplayer.h:68
UIMap::getMaxZoomIn
int getMaxZoomIn()
Definition: uimap.h:86
Game::addVip
void addVip(const std::string &name)
Definition: game.cpp:1134
ThingType::isUnwrapable
bool isUnwrapable()
Definition: thingtype.h:201
StaticText::setColor
void setColor(const Color &color)
Definition: statictext.h:51
UIMap::getDrawFlags
Otc::DrawFlags getDrawFlags()
Definition: uimap.h:82
UIMap::lockVisibleFloor
void lockVisibleFloor(int floor)
Definition: uimap.h:50
Missile::setId
void setId(uint32 id)
Definition: missile.cpp:84
shadermanager.h
Minimap::loadImage
bool loadImage(const std::string &fileName, const Position &topLeft, float colorFactor)
Definition: minimap.cpp:225
HouseManager::save
void save(const std::string &fileName)
Definition: houses.cpp:165
Map::clearDescriptions
void clearDescriptions()
Definition: map.h:160
Town::setName
void setName(const std::string &name)
Definition: towns.h:36
Container::hasParent
bool hasParent()
Definition: container.h:46
Game::partyPassLeadership
void partyPassLeadership(int creatureId)
Definition: game.cpp:1099
Map::setForceShowAnimations
void setForceShowAnimations(bool force)
Definition: map.cpp:404
Game::getOpenPvpSituations
int getOpenPvpSituations()
Definition: game.h:245
UIItem::isVirtual
bool isVirtual()
Definition: uiitem.h:48
Map::isCovered
bool isCovered(const Position &pos, int firstFloor=0)
Definition: map.cpp:621
Tile::isLookPossible
bool isLookPossible()
Definition: tile.cpp:527
ThingType::getRealSize
int getRealSize()
Definition: thingtype.h:145
UIMap::setDrawTexts
void setDrawTexts(bool enable)
Definition: uimap.h:56
ProtocolGame::setFloorDescription
int setFloorDescription(const InputMessagePtr &msg, int x, int y, int z, int width, int height, int offset, int skip)
Definition: protocolgameparse.cpp:2064
ThingType::getNumPatternY
int getNumPatternY()
Definition: thingtype.h:148
LocalPlayer::setSkill
void setSkill(Otc::Skill skill, int level, int levelPercent)
Definition: localplayer.cpp:331
item.h