AddUserStatic
Add StaticItem to list and returns its index (can be used for RemoveUserStatic)
Adding user static item to shard data, it will be used in pathfing & step calculation absolutely same, as normal shard static.
For example, if some area blocked with dynamic object, like fences - you will know this only when approaching to area, when few fences object info coming (not all of them, only in vincinity area!). Patrfinder will try to find new route, will change the way…and again few fences coming, and so and so on. To avoid time loosing, you can add all this fences like a user static, and it will be taken in consideration in pathfing right from the beginning.
Related functions: RemoveUserStatic, ClearUserStatics
NB: Important: User statics adding not to char, but to shard data class, thats why it will be applied not only to char, but to all chars, who using same Shard files.
NB: User statics are NOT cleaning when disconnected.
StaticItem : TStaticItem record with figure params. WorldNum : Byte - number of world to use (Present world number can be obtained by WorldNum). At the moment, 6 world available (Felucca=0, Trammel=1, Ilshenar=2, Malas=3, Tokuno=4, Tel Mur=5).
function AddUserStatic(const StaticItem : TStaticItem; WorldNum : Byte) : Integer;
Types:
TStaticItem = record
Tile : Word;
X : Word;
Y : Word;
Z : ShortInt;
Color : Word;
end;
DWS\Pascal example:
```objectpascal
PROGRAM Test;
var
temp11 : TStaticItem;
begin
temp11.x := 500;
temp11.y := 200;
temp11.z := 0;
temp11.Tile := $822;
temp11.Color := 0;
AddUserStatic(temp11, AddUserStatic());
end.
def AddUserStaticItem(StaticItem, WorldNum): uint