He intentado durante varios días crear la función para equipar un elemento en el personaje en la temporada, pero aparece un error en la función cuando la reescribo y tiene crash el client.
Debajo de la función descompilada, probada y funcionando, mueve el itempero tiene crash.
char MoveItemTo(DWORD a2, void * a3, int a4)
{
int Window = 0;
int TargetSlot = -1;
int X = *(BYTE*)(pGetItemBMD(a3) + 568);
int Y = *(BYTE*)(pGetItemBMD(a3) + 569);
switch ( a4 )
{
case 1:
{
Window = WindowID(_Inventory);
TargetSlot = (*(int (__thiscall**)(int, DWORD, int))(*(DWORD*)Window + 112))(Window, X, Y);
if ( TargetSlot == -1 )
{
Window = WindowID(_ExtensionBag);
TargetSlot = (*(int (__thiscall **)(int, DWORD, int))(*(DWORD *)Window + 112))(Window, X, Y);
}
}
break;
case 9:
{
Window = WindowID(_Warehouse);
TargetSlot = (*(int(__thiscall**)(int, DWORD, int))(*(DWORD*)Window + 112))(Window, X, Y);
if ( TargetSlot == -1 )
{
Window = WindowID(_WarehouseExt);
TargetSlot = (*(int (__thiscall **)(int, DWORD, int))(*(DWORD*)Window + 112))(Window, X, Y);
}
}
break;
case 6:
Window = WindowID(_Trade);
TargetSlot = (*(int (__thiscall **)(int, DWORD, int))(*(DWORD*)Window + 112))(Window, X, Y);
break;
case 4:
Window = WindowID(_MixInventory1);
TargetSlot = (*(int (__thiscall **)(int, DWORD, int))(*(DWORD*)Window + 112))(Window, X, Y);
break;
case 5:
Window = WindowID(_MixInventory2);
TargetSlot = (*(int (__thiscall **)(int, DWORD, int))(*(DWORD *)Window + 112))(Window, X, Y);
break;
case 11:
Window = WindowID(_EventInventory);
TargetSlot = (*(int (__thiscall **)(int, DWORD, int))(*(DWORD *)Window + 112))(Window, X, Y);
break;
case 12:
Window = WindowID(_PetInventory);
TargetSlot = (*(int (__thiscall **)(int, DWORD, int))(*(DWORD *)Window + 112))(Window, X, Y);
break;
}
if ( TargetSlot != -1 && Window )
{
int SourceSlot = sub_9CA225(a2, (int)a3);
if ( sub_9CB0D1(a2, SourceSlot) )
{
sub_9CA557((void*)a2);
*(BYTE*)(WindowID(_Unknown1) + 137) = 1;
(*(void (__thiscall **)(int, int))(*(DWORD*)Window + 152))(Window, TargetSlot);
return 1;
}
}
return 0;
}
enum ObjWindowNew // -> Season 8.3
{
_Caution = 136,
_MainFrame = 140,
_Character = 144,
_Inventory = 148,
_ExtensionBag = 152,
_PersonalStore = 156,
_MixInventory1 = 160,
_MixSel = 164,
_MixGoblinSel = 168,
_MixStone = 172,
_MixInventory2 = 176,
_GensRanking = 180,
_GuildCreate = 184,
_GuildInfo = 188,
_GuildPosition = 192,
_InfoPopup = 196,
_PetInfoPopup = 200,
_Unknown1 = 204,
_QuickCommand = 208,
_Duel = 212,
_DuelWatch = 216,
_Trade = 220,
_PurchaseInv = 224,
_GoldArcher = 228,
_Unknown2 = 232,
_NpcDialogue = 236,
_NpcShop = 240,
_PetInfo = 244,
_Pentagram = 248,
_ArkaResult = 252,
_Warehouse = 256,
_WarehouseExt = 260,
_NpcChangeQuest = 264,
_NpcQuestProgress = 268,
_NpcGateKeeper = 272,
_SystemMenu = 276,
_Option = 280,
_SelectMenu = 284,
_MyQuestInfo = 288,
_ChatWindow = 292,
_MoveCommand = 296,
_HelpWindow = 300,
_EventMapHelper = 304,
_Trainer = 308,
_MapName = 312,
_Notice = 316,
_HeroPosition = 320,
_EnterBC = 324,
_EnterEmpireGuard = 328,
_CommandWindow = 332,
_ArkaBattleReg = 336,
_ArkaBattleProgr = 340,
_ArkaBattleNotice = 344,
_MonsterInfo = 348,
_PlayerInfo = 352,
_BuffFrame = 356,
_EquipDurInfo = 360,
_MacroMain = 364, //helper
_MacroSub = 368,
_Alarm = 372,
_MatchingSelect = 376,
_MatchingGuild = 380,
_MatchingParty = 384,
_Party = 388,
_ItemInfo = 392,
_SnsWindow = 396,
_SMatchMenu = 400,
_SMatchRank = 404,
_SMatchResult = 408,
_SearchPStore = 412,
_MiniGameRummy = 416,
_EventInventory = 420,
_EventInfo = 424,
_CTempleMatchMenu = 428,
_CTempleResult = 432,
_CTempleScore = 436,
_CTempleInfo = 440,
_ListOfMatches = 444,
_EventMapProgInfo = 448,
_EventMapRouCount = 452,
_ProgressFrame = 456,
_Navimap = 460,
_PetInventory = 464,
_EventMapTutorial = 468,
};
Podemos ayudarnos mutuamente para crear aquello que incluso sirvió para las nuevas seasons (S13 s14 s15)