feat(port): enable in-game world rendering and complete UI compat layer for XIXIANGFENG 5th district
This commit is contained in:
@@ -724,6 +724,7 @@ void initItem()
|
||||
PyModule_AddIntConstant(poModule, "EQUIPMENT_UNIQUE1", c_Equipment_Unique1);
|
||||
PyModule_AddIntConstant(poModule, "EQUIPMENT_UNIQUE2", c_Equipment_Unique2);
|
||||
PyModule_AddIntConstant(poModule, "EQUIPMENT_ARROW", c_Equipment_Arrow);
|
||||
PyModule_AddIntConstant(poModule, "EQUIPMENT_SHIELD", c_Equipment_Shield);
|
||||
|
||||
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||
PyModule_AddIntConstant(poModule, "EQUIPMENT_RING1", c_Equipment_Ring1);
|
||||
|
||||
@@ -2523,6 +2523,67 @@ PyObject * playerAutoHuntLocalize(PyObject* poSelf, PyObject* poArgs)
|
||||
return Py_BuildValue("s", &kVecText[0]);
|
||||
}
|
||||
|
||||
// 喜相逢五区 auto bot & comb window & mob info exports
|
||||
PyObject * playerGetAutoSlotIndex(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
int iSlot = 0;
|
||||
PyTuple_GetInteger(poArgs, 0, &iSlot);
|
||||
return Py_BuildValue("i", 0);
|
||||
}
|
||||
PyObject * playerSetAutoSkillSlotIndex(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerAutoAttackOnOff(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerAutoStartOnOff(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerCheckEquipmentItem(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerClearAutoDropItems(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerClearAutoPickItems(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerClearAutoUseItems(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerDelAutoDropItems(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerDelAutoPickItems(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerLoadAutoConfig(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerSaveConfigInini(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerSetAutoDropItems(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerSetAutoPickItems(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerUpdateAutoBufferMap(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerUpdateAutoDropItems(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerUpdateAutoPickItems(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerUpdateAutoUseItems(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerUpdateCheckBoxStatus(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
PyObject * playerIsShaman(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
DWORD dwRace = CPythonPlayer::Instance().GetRace();
|
||||
return Py_BuildValue("i", (dwRace == 3 || dwRace == 7) ? 1 : 0);
|
||||
}
|
||||
|
||||
PyObject * playerCanAttachToCombItemSlot(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerCanAttachToCombMediumSlot(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetConbWindowSlotByAttachedInvenSlot(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetInvenSlotAttachedToConbWindowSlot(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerSetItemCombinationWindowActivedItemSlot(PyObject* poSelf, PyObject* poArgs) { return Py_BuildNone(); }
|
||||
|
||||
PyObject * playerGetDragonCoin(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetDragonMark(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetItemShopOfflineLink(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("s", ""); }
|
||||
PyObject * playerGetGradeByVID(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetLevelByVID(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 1); }
|
||||
PyObject * playerGetRaceNumByVID(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetVnumByVID(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetResist(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetMobGoldMax(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetMobGoldMin(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetMobRegenCycle(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetMobRegenPercent(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetMobsByName(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("[]"); }
|
||||
PyObject * playerGetMonsterDX(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetMonsterDamage(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("(ii)", 0, 0); }
|
||||
PyObject * playerGetMonsterDamageMultiply(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("f", 1.0f); }
|
||||
PyObject * playerGetMonsterExp(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetMonsterLevel(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 1); }
|
||||
PyObject * playerGetMonsterMaxHP(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 100); }
|
||||
PyObject * playerGetMonsterName(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("s", ""); }
|
||||
PyObject * playerGetMonsterRaceFlag(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerGetMonsterST(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
PyObject * playerIsMonsterStone(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", 0); }
|
||||
|
||||
void initPlayer()
|
||||
{
|
||||
static PyMethodDef s_methods[] =
|
||||
@@ -2720,6 +2781,58 @@ void initPlayer()
|
||||
{ "FeatureLocaleToUTF8", playerFeatureLocaleToUTF8, METH_VARARGS },
|
||||
{ "AutoHuntLocalize", playerAutoHuntLocalize, METH_VARARGS },
|
||||
|
||||
// 喜相逢五区 auto bot & comb & mob methods
|
||||
{ "GetAutoSlotIndex", playerGetAutoSlotIndex, METH_VARARGS },
|
||||
{ "SetAutoSkillSlotIndex", playerSetAutoSkillSlotIndex, METH_VARARGS },
|
||||
{ "AutoAttackOnOff", playerAutoAttackOnOff, METH_VARARGS },
|
||||
{ "AutoStartOnOff", playerAutoStartOnOff, METH_VARARGS },
|
||||
{ "CheckEquipmentItem", playerCheckEquipmentItem, METH_VARARGS },
|
||||
{ "ClearAutoDropItems", playerClearAutoDropItems, METH_VARARGS },
|
||||
{ "ClearAutoPickItems", playerClearAutoPickItems, METH_VARARGS },
|
||||
{ "ClearAutoUseItems", playerClearAutoUseItems, METH_VARARGS },
|
||||
{ "DelAutoDropItems", playerDelAutoDropItems, METH_VARARGS },
|
||||
{ "DelAutoPickItems", playerDelAutoPickItems, METH_VARARGS },
|
||||
{ "LoadAutoConfig", playerLoadAutoConfig, METH_VARARGS },
|
||||
{ "SaveConfigInini", playerSaveConfigInini, METH_VARARGS },
|
||||
{ "SetAutoDropItems", playerSetAutoDropItems, METH_VARARGS },
|
||||
{ "SetAutoPickItems", playerSetAutoPickItems, METH_VARARGS },
|
||||
{ "UpdateAutoBufferMap", playerUpdateAutoBufferMap, METH_VARARGS },
|
||||
{ "UpdateAutoDropItems", playerUpdateAutoDropItems, METH_VARARGS },
|
||||
{ "UpdateAutoPickItems", playerUpdateAutoPickItems, METH_VARARGS },
|
||||
{ "UpdateAutoUseItems", playerUpdateAutoUseItems, METH_VARARGS },
|
||||
{ "UpdateCheckBoxStatus", playerUpdateCheckBoxStatus, METH_VARARGS },
|
||||
{ "IsShaman", playerIsShaman, METH_VARARGS },
|
||||
|
||||
{ "CanAttachToCombItemSlot", playerCanAttachToCombItemSlot, METH_VARARGS },
|
||||
{ "CanAttachToCombMediumSlot", playerCanAttachToCombMediumSlot, METH_VARARGS },
|
||||
{ "GetConbWindowSlotByAttachedInvenSlot", playerGetConbWindowSlotByAttachedInvenSlot, METH_VARARGS },
|
||||
{ "GetInvenSlotAttachedToConbWindowSlot", playerGetInvenSlotAttachedToConbWindowSlot, METH_VARARGS },
|
||||
{ "SetItemCombinationWindowActivedItemSlot", playerSetItemCombinationWindowActivedItemSlot, METH_VARARGS },
|
||||
|
||||
{ "GetDragonCoin", playerGetDragonCoin, METH_VARARGS },
|
||||
{ "GetDragonMark", playerGetDragonMark, METH_VARARGS },
|
||||
{ "GetItemShopOfflineLink", playerGetItemShopOfflineLink, METH_VARARGS },
|
||||
{ "GetGradeByVID", playerGetGradeByVID, METH_VARARGS },
|
||||
{ "GetLevelByVID", playerGetLevelByVID, METH_VARARGS },
|
||||
{ "GetRaceNumByVID", playerGetRaceNumByVID, METH_VARARGS },
|
||||
{ "GetVnumByVID", playerGetVnumByVID, METH_VARARGS },
|
||||
{ "GetResist", playerGetResist, METH_VARARGS },
|
||||
{ "GetMobGoldMax", playerGetMobGoldMax, METH_VARARGS },
|
||||
{ "GetMobGoldMin", playerGetMobGoldMin, METH_VARARGS },
|
||||
{ "GetMobRegenCycle", playerGetMobRegenCycle, METH_VARARGS },
|
||||
{ "GetMobRegenPercent", playerGetMobRegenPercent, METH_VARARGS },
|
||||
{ "GetMobsByName", playerGetMobsByName, METH_VARARGS },
|
||||
{ "GetMonsterDX", playerGetMonsterDX, METH_VARARGS },
|
||||
{ "GetMonsterDamage", playerGetMonsterDamage, METH_VARARGS },
|
||||
{ "GetMonsterDamageMultiply", playerGetMonsterDamageMultiply, METH_VARARGS },
|
||||
{ "GetMonsterExp", playerGetMonsterExp, METH_VARARGS },
|
||||
{ "GetMonsterLevel", playerGetMonsterLevel, METH_VARARGS },
|
||||
{ "GetMonsterMaxHP", playerGetMonsterMaxHP, METH_VARARGS },
|
||||
{ "GetMonsterName", playerGetMonsterName, METH_VARARGS },
|
||||
{ "GetMonsterRaceFlag", playerGetMonsterRaceFlag, METH_VARARGS },
|
||||
{ "GetMonsterST", playerGetMonsterST, METH_VARARGS },
|
||||
{ "IsMonsterStone", playerIsMonsterStone, METH_VARARGS },
|
||||
|
||||
{ NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
@@ -2851,6 +2964,43 @@ void initPlayer()
|
||||
PyModule_AddIntConstant(poModule, "SLOT_TYPE_COSTUME_INVENTORY", SLOT_TYPE_COSTUME_INVENTORY);
|
||||
#endif
|
||||
PyModule_AddIntConstant(poModule, "SLOT_TYPE_SWITCHBOT", SLOT_TYPE_SWITCHBOT); // PORT: AVA2 switchbot
|
||||
PyModule_AddIntConstant(poModule, "SLOT_TYPE_AUTO", 30);
|
||||
PyModule_AddIntConstant(poModule, "AUTO_SKILL_SLOT_MAX", 6);
|
||||
|
||||
PyModule_AddIntConstant(poModule, "ATTRIBUTE_SLOT_NORM_NUM", 5);
|
||||
PyModule_AddIntConstant(poModule, "ATTRIBUTE_SLOT_NORM_END", 5);
|
||||
PyModule_AddIntConstant(poModule, "ATTRIBUTE_SLOT_RARE_START", 5);
|
||||
PyModule_AddIntConstant(poModule, "ATTRIBUTE_SLOT_RARE_END", 7);
|
||||
|
||||
PyModule_AddIntConstant(poModule, "COMB_WND_SLOT_BASE", 0);
|
||||
PyModule_AddIntConstant(poModule, "COMB_WND_SLOT_MATERIAL", 1);
|
||||
PyModule_AddIntConstant(poModule, "COMB_WND_SLOT_RESULT", 2);
|
||||
PyModule_AddIntConstant(poModule, "COMB_WND_SLOT_MEDIUM", 3);
|
||||
PyModule_AddIntConstant(poModule, "COMB_WND_SLOT_MAX", 4);
|
||||
|
||||
PyModule_AddIntConstant(poModule, "PAWN", 0);
|
||||
PyModule_AddIntConstant(poModule, "S_PAWN", 1);
|
||||
PyModule_AddIntConstant(poModule, "KNIGHT", 2);
|
||||
PyModule_AddIntConstant(poModule, "S_KNIGHT", 3);
|
||||
PyModule_AddIntConstant(poModule, "BOSS", 4);
|
||||
PyModule_AddIntConstant(poModule, "KING", 5);
|
||||
|
||||
PyModule_AddIntConstant(poModule, "MOB_RESIST_SWORD", 0);
|
||||
PyModule_AddIntConstant(poModule, "MOB_RESIST_TWOHAND", 1);
|
||||
PyModule_AddIntConstant(poModule, "MOB_RESIST_DAGGER", 2);
|
||||
PyModule_AddIntConstant(poModule, "MOB_RESIST_BOW", 4);
|
||||
PyModule_AddIntConstant(poModule, "MOB_RESIST_BELL", 5);
|
||||
PyModule_AddIntConstant(poModule, "MOB_RESIST_FAN", 6);
|
||||
|
||||
PyModule_AddIntConstant(poModule, "RACE_FLAG_ATT_FIRE", 1 << 11);
|
||||
PyModule_AddIntConstant(poModule, "RACE_FLAG_ATT_ICE", 1 << 12);
|
||||
PyModule_AddIntConstant(poModule, "RACE_FLAG_ATT_ELEC", 1 << 13);
|
||||
PyModule_AddIntConstant(poModule, "RACE_FLAG_ATT_WIND", 1 << 14);
|
||||
PyModule_AddIntConstant(poModule, "RACE_FLAG_ATT_EARTH", 1 << 15);
|
||||
PyModule_AddIntConstant(poModule, "RACE_FLAG_ATT_DARK", 1 << 16);
|
||||
|
||||
PyModule_AddIntConstant(poModule, "ITEM_CHEQUE", 80003);
|
||||
PyModule_AddIntConstant(poModule, "ITEM_SLOT_COUNT", c_ItemSlot_Count);
|
||||
|
||||
PyModule_AddIntConstant(poModule, "ON_TOP_WND_NONE", 0);
|
||||
PyModule_AddIntConstant(poModule, "ON_TOP_WND_SHOP", 1);
|
||||
|
||||
Reference in New Issue
Block a user