| Prev | Next |
POT creates some kind of enviroment within which all OTServ world information is loaded. You can create your loacal instances of some resources but they are completly independent. To make something accessible globaly you need to load it within global POT scope.
Sometimes it is required to create such instances before executing some operations like for example to read player's vocation name, or hes/her items information.
POT class contains methods to load all kind of resources globaly:
You can see some examples of global resources loading in tutorial about creating complete framework enviroment.
While resources are loaded you can get them everywhere in the code by calling to POT global instance. To get resource handle you can use one of following methods:
If you are not sure about working enviroment, to make sure that resource which you need is loaded you should use one of following methods before getting it:
Attempt to get not-loaded resource will cause E_OTS_NotLoaded exception to be thrown.
| Prev | Up | Next |
| data/ directory resources | data/ directory resources | Cache drivers |