feat: changes due to G2O 0.3.0.6

+ added function getPlayerUID
+ changed event onPlayerSpellCast
This commit is contained in:
AURUMVORXX
2024-12-23 17:48:17 +03:00
parent cbd432a1e7
commit 74ad2e6abc
8 changed files with 26 additions and 1 deletions

View File

@@ -284,12 +284,14 @@ SQInteger sq_onPlayerSpellCast(HSQUIRRELVM vm)
{
SQInteger playerid;
const SQChar* instance;
SQInteger spellLevel;
nonut::sqGetValue(vm, 2, &playerid);
if (sq_gettype(vm, 3) != OT_NULL)
nonut::sqGetValue(vm, 3, &instance);
nonut::sqGetValue(vm, 4, &spellLevel);
py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance);
py::dict kwargs = py::dict("playerid"_a=playerid, "instance"_a=instance, "spellLevel"_a=spellLevel);
callEvent("onPlayerSpellCast", kwargs);
return 0;

View File

@@ -133,6 +133,7 @@ int py_getPlayerSkillWeapon(int id, int skillId)
std::string py_getPlayerSpell(int id, int slotId) { return SERVERFUNC->getPlayerSpell(id, slotId); }
int py_getPlayerStrength(int id) { return SERVERFUNC->getPlayerStrength(id); }
int py_getPlayerTalent(int id, int talentId) { return SERVERFUNC->getPlayerTalent(id, talentId); }
std::string py_getPlayerUID(int id) { return SERVERFUNC->getPlayerUID(id); }
int py_getPlayerVirtualWorld(int id) { return SERVERFUNC->getPlayerVirtualWorld(id); }
py::dict py_getPlayerVisual(int id) { return SERVERFUNC->getPlayerVisual(id).data; }
int py_getPlayerWeaponMode(int id) { return SERVERFUNC->getPlayerWeaponMode(id); }

View File

@@ -88,6 +88,7 @@ int py_getPlayerSkillWeapon(int, int);
std::string py_getPlayerSpell(int, int);
int py_getPlayerStrength(int);
int py_getPlayerTalent(int, int);
std::string py_getPlayerUID(int);
int py_getPlayerVirtualWorld(int);
py::dict py_getPlayerVisual(int);
int py_getPlayerWeaponMode(int);

View File

@@ -86,6 +86,7 @@ namespace nonut
FUNCTION_CTOR(getPlayerSpell),
FUNCTION_CTOR(getPlayerStrength),
FUNCTION_CTOR(getPlayerTalent),
FUNCTION_CTOR(getPlayerUID),
FUNCTION_CTOR(getPlayerVirtualWorld),
FUNCTION_CTOR(getPlayerVisual),
FUNCTION_CTOR(getPlayerWeaponMode),

View File

@@ -99,6 +99,7 @@ namespace nonut
Function<String, Int, Int> getPlayerSpell;
Function<Int, Int> getPlayerStrength;
Function<Int, Int, Int> getPlayerTalent;
Function<String, Int> getPlayerUID;
Function<Int, Int> getPlayerVirtualWorld;
Function<SqDict, Int> getPlayerVisual;
Function<Int, Int> getPlayerWeaponMode;