Noticias:

SMF - Just Installed!

Menú principal

Source Add SmithItem

Publicado por Dakosmu, Mayo 07, 2023, 06:34 AM

Tema anterior - Siguiente tema

Dakosmu

Source Add SmithItem

Controller.cpp
LRESULT Controller::Mouse(int Code, WPARAM wParam, LPARAM lParam)
{
if( GetForegroundWindow() != pGameWindow )
{
return CallNextHookEx(gController.MouseHook, Code, wParam, lParam);
}
// ----
MOUSEHOOKSTRUCTEX * Mouse = (MOUSEHOOKSTRUCTEX*)lParam;

switch(wParam)
{
case WM_LBUTTONUP:
case WM_LBUTTONDOWN:
{
if (GetForegroundWindow() == *(HWND*)(MAIN_WINDOW))
{
gController.ProcInterface(wParam);
if (gNewInterface.EventAllWindow(wParam, Mouse) == true)
{
return 1;
}
}

gCustomRanking.EventRankingNext(wParam);
gCustomRanking.EventRankingBack(wParam);
gInterface.EventVipWindow_Main(wParam);
gCustomRanking.EventVipWindow_Close(wParam);
gCustomCommandInfo.EventCommandWindow_Close(wParam);
gCustomCommandInfo.CommandNext(wParam);
gCustomCommandInfo.CommandPrev(wParam);
gCustomEventTime.EventEventTimeWindow_Close(wParam);
gCustomEventTime.EventNext(wParam);
gCustomEventTime.EventPrev(wParam);
gInterface.EventDrawMenu_Open(wParam);
gInterface.EventDrawMenu_Close(wParam);
gInterface.EventDrawMenu_Op1(wParam);
gInterface.EventDrawMenu_Op2(wParam);
gInterface.EventDrawMenu_Op3(wParam);
gInterface.EventDrawMenu_Op4(wParam);
gInterface.EventDrawMenu_Op5(wParam);
gInterface.EventDrawMenu_Op6(wParam);
gInterface.EventDrawMenu_Op20(wParam);
gInterface.EventConfirm_CANCEL(wParam);
gInterface.EventConfirm_OK(wParam);
gCRuudShop.RuudShopEventButton(wParam);
gCSCharacterS13.SelectCharButton(wParam);
EventMuOffhelper(wParam);
gInterface.EventSmithItem_Main(wParam); edit here

if(gCRuudShop.RuudRender.Open)
{
if ( pCheckMouseOver(gCRuudShop.RuudRender.x, gCRuudShop.RuudRender.y + 10, gCRuudShop.RuudRender.w, 40.0f) == 1 )
{
gCRuudShop.RuudRender.Cursor.x = (double)*(DWORD*)0x879340C - gCRuudShop.RuudRender.x;
gCRuudShop.RuudRender.Cursor.y = (double)*(DWORD*)0x8793410 - gCRuudShop.RuudRender.y;
if(wParam == WM_LBUTTONDOWN)
{
gCRuudShop.RuudRender.Move = 1;
}
else
{
gCRuudShop.RuudRender.Move = 0;
}
}
else
{
gCRuudShop.RuudRender.Move = 0;
}
}
else if(gProtect.m_MainInfo.CustomInterfaceType == 1)
{
gInterface.EventNewInterface97_All(wParam);
}
else if(gProtect.m_MainInfo.CustomInterfaceType == 2)
{
gInterface.EventNewInterface_All(wParam);
}
gCMacroUIEx.Button(wParam);
gOffTrade.EventOffTradeWindow_Main(wParam);
gOffTrade.EventCloseTradeWindow_Main(wParam);
}

break;
case WM_MOUSEMOVE:

gCRuudShop.MoveWindows(&gCRuudShop.RuudRender,
((double)*(DWORD*)0x879340C) - gCRuudShop.RuudRender.Cursor.x,
((double)*(DWORD*)0x8793410) - gCRuudShop.RuudRender.Cursor.y);

if(GetForegroundWindow() == *(HWND*)(0x00E8C578))
{
gCamera.Move(Mouse);
}
break;
case WM_MBUTTONDOWN:
if(GetForegroundWindow() == *(HWND*)(0x00E8C578))
{
gCamera.SetIsMove(1);
gCamera.SetCursorX(Mouse->pt.x);
gCamera.SetCursorY(Mouse->pt.y);
}
break;
case WM_MBUTTONUP:
if(GetForegroundWindow() == *(HWND*)(0x00E8C578))
{
gCamera.SetIsMove(0);
}
break;
case WM_MOUSEWHEEL:
if(GetForegroundWindow() == *(HWND*)(0x00E8C578))
{
gCamera.Zoom(Mouse);
}
break;
}
// ----
return CallNextHookEx(gController.MouseHook, Code, wParam, lParam);
}

Interfaz.cpp
oid Interface::Work()
{
//-- Advance Status Custom Low Interfaces
if(gProtect.m_MainInfo.CustomInterfaceType == 0 || gProtect.m_MainInfo.CustomInterfaceType == 1 || gProtect.m_MainInfo.CustomInterfaceType == 2 || gProtect.m_MainInfo.CustomInterfaceType == 4)
{
if(gProtect.m_MainInfo.DisableAdvance == 0)
{
g_StatsAdvance.DrawInfo();
}
}
//--

//--Bar MiniMap
if(gProtect.m_MainInfo.CustomInterfaceType == 0 || gProtect.m_MainInfo.CustomInterfaceType == 1 || gProtect.m_MainInfo.CustomInterfaceType == 2 || gProtect.m_MainInfo.CustomInterfaceType == 3 || gProtect.m_MainInfo.CustomInterfaceType == 4)
{
if( gRenderMap.DataMap.ModelID != -1 && MiniMap )
{
gInterface.MiniMapMini();
}
}
//--
//--Bar Pet
if(gProtect.m_MainInfo.CustomInterfaceType == 0 || gProtect.m_MainInfo.CustomInterfaceType == 1 || gProtect.m_MainInfo.CustomInterfaceType == 2 || gProtect.m_MainInfo.CustomInterfaceType == 3 || gProtect.m_MainInfo.CustomInterfaceType == 4)
{
if ( *(DWORD *)(*(DWORD *)0x7BC4F04 + 676) != 0 || *(DWORD *)(*(DWORD *)0x7BC4F04 + 556) != 65535)
{
gCRenderEx700.BarPetMuun();
}
}
//--
gObjUser.Refresh();

jCRenderRuud.CheckOpen();

if(gObjUser.lpViewPlayer->WeaponFirstSlot >= ITEM2(4,0) && gObjUser.lpViewPlayer->WeaponFirstSlot <= ITEM2(4,255)
||gObjUser.lpViewPlayer->WeaponSecondSlot >= ITEM2(4,0) && gObjUser.lpViewPlayer->WeaponSecondSlot <= ITEM2(4,255))
{
gInterface.PetY = 38.0f;

}
else
{
gInterface.PetY = 26.0f;
}

if(gObjUser.lpViewPlayer->PetSlot!= -1)
{
gInterface.PetX = 61.0f;
}else
{
gInterface.PetX = 0;
}

if(gProtect.m_MainInfo.CustomInterfaceType == 1 || gProtect.m_MainInfo.CustomInterfaceType == 2)
{ gInterface.DrawInterfaceDragonLS3();
gInterface.DrawInterfaceDragonRS3();
}

gInterface.DrawMiniMap();

gInterface.DrawTimeUI();

gCustomRanking.DrawRankPanelWindow();

gCustomEventTime.DrawEventTimePanelWindow();

ReconnectMainProc();

gInterface.DrawVipWindow();

gInterface.DrawMenu();

gInterface.DrawMenuOpen();

gCustomCommandInfo.DrawCommandWindow();

gInterface.DrawConfirmOpen();

g_ExWinQuestSystem.DrawMiniInfo();

gNewInterface.Work();

gAchievements.Draw();
g_ExWinQuestSystem.Draw();
gGrandResetSystem.draw_grand_reset_system();
gResetSystem.draw_reset_system();
[b]gInterface.DrawSmithItem(); [/b]
gInterface.DrawChangingClassWindow();
gInterface.DrawWarehouseWindow();
gInterface.DrawStatsAddWindow();

gInterface.DrawPartySettingsWindow();
gInterface.DrawPartySearchWindow();

gInterface.WindowsKG();

void Interface::DrawSmithItem()
{
if( !this->Data[eSMITH_MAIN].OnShow )
{
return;
}

if(gInterface.CheckWindow(ObjWindow::CashShop)
|| gInterface.CheckWindow(ObjWindow::FullMap)
|| gInterface.CheckWindow(ObjWindow::SkillTree)
|| gInterface.CheckWindow(ObjWindow::Inventory)
|| gInterface.CheckWindow(ObjWindow::Guild)
|| gInterface.CheckWindow(ObjWindow::Party)
|| gInterface.CheckWindow(ObjWindow::Character)
|| gInterface.CheckWindow(ObjWindow::FastMenu)
|| gInterface.CheckWindow(ObjWindow::FriendList)
|| gInterface.CheckWindow(ObjWindow::GensInfo)
|| gInterface.CheckWindow(ObjWindow::MuHelper)
|| gInterface.CheckWindow(ObjWindow::Quest)
|| gInterface.CheckWindow(ObjWindow::CommandWindow))
{
this->Data[eSMITH_MAIN].OnShow = false;
gInterface.Data[eSMITH_MAIN].Close();
return;
}
// ----
float MainWidth = 230.0f;
float MainHeight = 313.0f;
float StartY = 100.0f;
float StartBody = 100.0;
float StartX = (MAX_WIN_WIDTH / 2.0f) - (MainWidth / 2.0f);
float MainCenter = StartX + (MainWidth / 3.0f);
float ButtonX = MainCenter - (29.0f / 2.0f);
// ----
/* this->DrawGUI(eSMITH_MAIN, StartX, StartY - 78);
this->DrawGUI(eSMITH_TITLE, StartX, StartY - 80);
StartY = this->DrawRepeatGUI(eSMITH_FRAME, StartX, StartY - 13.0, 13);
this->DrawGUI(eSMITH_FOOTER, StartX, StartY + 80);
pDrawGUI(0x7A7B, StartX, 275, 5, 100); //
pDrawGUI(0x7A7B, StartX + 221, 276, 5, 100); //
this->DrawGUI(eSMITH_CLOSE, StartX + MainWidth - this->Data[eSMITH_CLOSE].Width, this->Data[eSMITH_TITLE].Height + this->Data[eSMITH_CLOSE].Height - 78);
this->DrawFormat(eGold, StartX + 95, 30,25, 5, "Smith Shop");
*/
this->DrawGUI(eSMITH_TITLE, StartX, StartY);
this->DrawGUI(eSMITH_FOOTER, StartX, StartY /*+ 80*/);
pDrawGUI(0x7A7B, StartX, 275, 5, 100);
pDrawGUI(0x7A7B, StartX + 221, 276, 5, 100);
gCentral.PrintDropBox(StartX, StartY - 78, MainWidth, MainHeight + 75, 0, 0);
this->DrawGUI(eSMITH_CLOSE, StartX + MainWidth - this->Data[eSMITH_CLOSE].Width, this->Data[eSMITH_TITLE].Height + this->Data[eSMITH_CLOSE].Height - 78);
this->DrawFormat(eGold, StartX + 95, 30,25, 5, "Smith Shop");
// ----
if( this->IsWorkZone(eSMITH_CLOSE) )
{
DWORD Color = eGray100;
// ----
if( this->Data[eSMITH_CLOSE].OnClick )
{
Color = eGray150;
}
// ----
this->DrawColoredGUI(eSMITH_CLOSE, this->Data[eSMITH_CLOSE].X, StartBody, Color);
this->DrawToolTip(this->Data[eSMITH_CLOSE].X + 5, StartBody + 25, "Close");
}
this->DrawFormat(eGold, StartX + 30, 50, 210, 1, "Group Item");
pDrawGUI(0x7C0D, StartX + 15, 70, 16, 15); //
pDrawGUI(0x7AA4, StartX + 73, 70, 16, 15); //
switch (gSmithItem.ItemType)
{
case 0:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Sword");
break;
case 1:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Axe");
break;
case 2:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Scepter");
break;
case 3:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Spear");
break;
case 4:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Bow");
break;
case 5:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Staff");
break;
case 6:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Shield");
break;
case 7:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Helm");
break;
case 8:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Armor");
break;
case 9:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Pant");
break;
case 10:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Glove");
break;
case 11:
this->DrawFormat(eGold, StartX + 40, 73,25, 5, "Boot");
break;
}
this->DrawFormat(eGold, StartX + 160, 50, 210, 1, "Item Time");
pDrawGUI(0x7C0D, StartX + 140, 70, 16, 15); //
pDrawGUI(0x7AA4, StartX + 193, 70, 16, 15); //
switch (gSmithItem.Days)
{
case 0:
this->DrawFormat(eGold, StartX + 163, 73,25, 5, "1 Days");
break;
case 1:
this->DrawFormat(eGold, StartX + 163, 73,25, 5, "7 Days");
break;
case 2:
this->DrawFormat(eGold, StartX + 163, 73,25, 5, "30 Days");
break;
}
pDrawGUI(0x79A2, StartX + 27, 100, 171, 23);
pDrawGUI(0x7BAA, StartX + 8, 103, 17, 18);
pDrawGUI(0x7BAB, StartX + 200, 103, 17, 18);
switch(gSmithItem.ItemType){
case 0:
DrawItem2(StartX + 40,20,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithSwordInfo[gSmithItem.ItemIndex].ItemName);
break;
case 1:
DrawItem2(StartX + 40,20,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithAxeInfo[gSmithItem.ItemIndex].ItemName);
break;
case 2:
DrawItem2(StartX + 40,20,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithMaceInfo[gSmithItem.ItemIndex].ItemName);
break;
case 3:
DrawItem2(StartX + 55,20,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithSpearInfo[gSmithItem.ItemIndex].ItemName);
break;
case 4:
DrawItem2(StartX + 65,20,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithBowInfo[gSmithItem.ItemIndex].ItemName);
break;
case 5:
DrawItem2(StartX + 55,20,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithStaffInfo[gSmithItem.ItemIndex].ItemName);
break;
case 6:
DrawItem2(StartX + 65,20,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithShieldInfo[gSmithItem.ItemIndex].ItemName);
break;
case 7:
DrawItem2(StartX + 65,10,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithHelmInfo[gSmithItem.ItemIndex].ItemName);
break;
case 8:
DrawItem2(StartX + 65,15,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithArmorInfo[gSmithItem.ItemIndex].ItemName);
break;
case 9:
DrawItem2(StartX + 65,5,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithPantInfo[gSmithItem.ItemIndex].ItemName);
break;
case 10:
DrawItem2(StartX + 65,5,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithGloveInfo[gSmithItem.ItemIndex].ItemName);
break;
case 11:
DrawItem2(StartX + 65,5,100,100,ITEM(gSmithItem.ItemType,gSmithItem.ItemIndex),gSmithItem.mLevel,gSmithItem.mExc,0,0);
this->DrawFormat(eGold, StartX + 35, 106,25, 5, "%s",gCustomSmith.m_SmithBootInfo[gSmithItem.ItemIndex].ItemName);
break;
}
this->DrawGUI(eSMITH_DIV, StartX, 130);
for( int i = 0; i < 10; i++ )
{
pDrawGUI(iOptionDot,StartX + 15,147 + (20 * i) + 9,10,10);
pDrawGUI(0x7B5E, StartX + 30, 160 + (20 * i) + 9, 82.0, 2.0);
pDrawGUI(0x7B5E, StartX + 30 + 82, 160 + (20 * i) + 9, 82.0, 2.0);
}
//Level
this->DrawFormat(eGold, StartX + 40, 155,15, 5, "Item Level");
pDrawGUI(0x7C0D, StartX + 140, 153, 16, 15); //
pDrawGUI(0x7AA4, StartX + 180, 153, 16, 15); //
this->DrawFormat(eGold, StartX + 155, 155,25, 5, "     %d",gSmithItem.mLevel);
//Skill
this->DrawFormat(eGold, StartX + 40, 175,15, 5, "Item Skill");
pDrawButton(iOptionCheck,StartX + 180,175,15,15,0,15);
if(gSmithItem.mSkill == 1)
{
pDrawButton(iOptionCheck,StartX + 180,175,15,15,0,0);
}
//Luck
this->DrawFormat(eGold, StartX + 40, 195,15, 5, "Lucky Option");
pDrawButton(iOptionCheck,StartX + 180,195,15,15,0,15);
if(gSmithItem.mLuck == 1)
{
pDrawButton(iOptionCheck,StartX + 180,195,15,15,0,0);
}
//Option(Life)
this->DrawFormat(eGold, StartX + 40, 215,15, 5, "Add Option");
pDrawGUI(0x7C0D, StartX + 140, 213, 16, 15); //
pDrawGUI(0x7AA4, StartX + 180, 213, 16, 15); //
this->DrawFormat(eGold, StartX +155, 215,25, 5, "     %d",gSmithItem.mOpt);
//
if(gSmithItem.ItemType <= 5)
{
this->DrawFormat(eGold, StartX +40, 235,15, 5, "Excellent Damange Rate");
pDrawButton(iOptionCheck,StartX + 180,235,15,15,0,15);
if(gSmithItem.ExcOption == 32)
{
pDrawButton(iOptionCheck,StartX + 180,235,15,15,0,0);
}
//
this->DrawFormat(eGold, StartX +40, 255,15, 5, "Increase Damage Level");
pDrawButton(iOptionCheck,StartX + 180,255,15,15,0,15);
if(gSmithItem.ExcOption1 == 16)
{
pDrawButton(iOptionCheck,StartX + 180,255,15,15,0,0);
}
//
this->DrawFormat(eGold, StartX +40, 275,15, 5, "Increase Damage");
pDrawButton(iOptionCheck,StartX + 180,275,15,15,0,15);

if(gSmithItem.ExcOption2 == 8)
{
pDrawButton(iOptionCheck,StartX + 180,275,15,15,0,0);
}
//
this->DrawFormat(eGold, StartX +40, 295,15, 5, "Increase Attacking(Wizard)Speed");
pDrawButton(iOptionCheck,StartX + 180,295,15,15,0,15);
if(gSmithItem.ExcOption3 == 4)
{
pDrawButton(iOptionCheck,StartX + 180,295,15,15,0,0);
}
//
this->DrawFormat(eGold, StartX +40, 315,15, 5, "Increase Life Hunting Monster");
pDrawButton(iOptionCheck,StartX + 180,315,15,15,0,15);
if(gSmithItem.ExcOption4 == 2)
{
pDrawButton(iOptionCheck,StartX + 180,315,15,15,0,0);
}
//
this->DrawFormat(eGold, StartX +40, 335,15, 5, "Increase Mana Hunting Monster");
pDrawButton(iOptionCheck,StartX + 180,335,15,15,0,15);
if(gSmithItem.ExcOption5 == 1)
{
pDrawButton(iOptionCheck,StartX + 180,335,15,15,0,0);
}
}
if(gSmithItem.ItemType >= 6)
{
this->DrawFormat(eGold, StartX +40, 235,15, 5, "Increase Max HP");
pDrawButton(iOptionCheck,StartX + 180,235,15,15,0,15);
if(gSmithItem.ExcOption == 32)
{
pDrawButton(iOptionCheck,StartX + 180,235,15,15,0,0);
}
//
this->DrawFormat(eGold, StartX +40, 255,15, 5, "Increase Max Mana");
pDrawButton(iOptionCheck,StartX + 180,255,15,15,0,15);
if(gSmithItem.ExcOption1 == 16){
pDrawButton(iOptionCheck,StartX + 180,255,15,15,0,0);
}
this->DrawFormat(eGold, StartX +40, 275,15, 5, "Damage Decrease");
pDrawButton(iOptionCheck,StartX + 180,275,15,15,0,15);
if(gSmithItem.ExcOption2 == 8){
pDrawButton(iOptionCheck,StartX + 180,275,15,15,0,0);
}
this->DrawFormat(eGold, StartX +40, 295,15, 5, "Reflect Damage");
pDrawButton(iOptionCheck,StartX + 180,295,15,15,0,15);
if(gSmithItem.ExcOption3 == 4){
pDrawButton(iOptionCheck,StartX + 180,295,15,15,0,0);
}
this->DrawFormat(eGold, StartX +40, 315,15, 5, "Defense Success Rate");
pDrawButton(iOptionCheck,StartX + 180,315,15,15,0,15);
if(gSmithItem.ExcOption4 == 2){
pDrawButton(iOptionCheck,StartX + 180,315,15,15,0,0);
}
this->DrawFormat(eGold, StartX +40, 335,15, 5, "Zen After Hunting Monsters");
pDrawButton(iOptionCheck,StartX + 180,335,15,15,0,15);
if(gSmithItem.ExcOption5 == 1){
pDrawButton(iOptionCheck,StartX + 180,335,15,15,0,0);
    }
}
this->DrawGUI(eSMITH_DIV, StartX, 370);
this->DrawGUI(eSMITH_BUY, StartX + 50, 375);
this->DrawFormat(eGold, StartX + 95, 380,15, 5, "Buy Item");
if( IsWorkZone(eSMITH_BUY) )
{
DWORD Color = eGray100;
if( this->Data[eSMITH_BUY].OnClick ){
Color = eGray150;
}
this->DrawColoredGUI(eSMITH_BUY, this->Data[eSMITH_BUY].X, this->Data[eSMITH_BUY].Y, Color);
}
if( gSmithItem.ItemType == 0)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithSwordInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithSwordInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithSwordInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
else if( gSmithItem.ItemType == 1)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithAxeInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithAxeInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithAxeInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
if( gSmithItem.ItemType == 2)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithMaceInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithMaceInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithMaceInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
if( gSmithItem.ItemType == 3)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithSpearInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithSpearInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithSpearInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
if( gSmithItem.ItemType == 4)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithBowInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithBowInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithBowInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
if( gSmithItem.ItemType == 5)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithStaffInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithStaffInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithStaffInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
if( gSmithItem.ItemType == 6)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithShieldInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithShieldInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithShieldInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
if( gSmithItem.ItemType == 7)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithHelmInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithHelmInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithHelmInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
if( gSmithItem.ItemType == 8)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithArmorInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithArmorInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithArmorInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
if( gSmithItem.ItemType == 9)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithPantInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithPantInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithPantInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
if( gSmithItem.ItemType == 10)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithGloveInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithGloveInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithGloveInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
if( gSmithItem.ItemType == 11)
{
switch(gSmithItem.Days)
{
case 0:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithBootInfo[gSmithItem.ItemIndex].Price1Days + gSmithItem.TotalPrice);
break;
case 1:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithBootInfo[gSmithItem.ItemIndex].Price7Days + gSmithItem.TotalPrice);
break;
case 2:
this->DrawFormat(eRed,StartX + 150, 106,15, 5,"Price %d", gCustomSmith.m_SmithBootInfo[gSmithItem.ItemIndex].Price30Days + gSmithItem.TotalPrice);
break;
}
}
}
void Interface::EventSmithItem_Main(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
if( !this->Data[eSMITH_MAIN].OnShow )
{
return;
}
if (this->IsWorkZone(eSMITH_SKILL))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_SKILL].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_SKILL].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_SKILL].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eSMITH_SKILL].EventTick = GetTickCount();
// ----
if (!this->Data[eSMITH_SKILL_1].OnShow)
{
this->Data[eSMITH_SKILL_1].OnShow = true;
gSmithItem.mSkill = 1;
gSmithItem.TotalPrice += gSmithItem.pSkill;
}
else {
this->Data[eSMITH_SKILL_1].OnShow = false;
gSmithItem.mSkill = 0;
gSmithItem.TotalPrice -= gSmithItem.pSkill;
}
}
else if (this->IsWorkZone(eSMITH_LUCK))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_LUCK].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_LUCK].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_LUCK].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eSMITH_LUCK].EventTick = GetTickCount();
// ----
if (!this->Data[eSMITH_LUCK_1].OnShow)
{
this->Data[eSMITH_LUCK_1].OnShow = true;
gSmithItem.mLuck = 1;
gSmithItem.TotalPrice += gSmithItem.pLuck;
}
else {
this->Data[eSMITH_LUCK_1].OnShow = false;
gSmithItem.mLuck = 0;
gSmithItem.TotalPrice -= gSmithItem.pLuck;
}
}
else if (this->IsWorkZone(eSMITH_EXC))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_EXC].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_EXC].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_EXC].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eSMITH_EXC].EventTick = GetTickCount();
// ----
if (!this->Data[eSMITH_EXC_1].OnShow)
{
this->Data[eSMITH_EXC_1].OnShow = true;
gSmithItem.ExcOption = 32;
gSmithItem.mExc += 1;
gSmithItem.TotalPrice += gSmithItem.pExc;
}
else {
this->Data[eSMITH_EXC_1].OnShow = false;
gSmithItem.ExcOption = 0;
gSmithItem.mExc -= 1;
gSmithItem.TotalPrice -= gSmithItem.pExc;
}
}
else if (this->IsWorkZone(eSMITH_EXC1))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_EXC1].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_EXC1].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_EXC1].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eSMITH_EXC1].EventTick = GetTickCount();
// ----
if (!this->Data[eSMITH_EXC1_1].OnShow)
{
this->Data[eSMITH_EXC1_1].OnShow = true;
gSmithItem.ExcOption1 = 16;
gSmithItem.mExc += 1;
gSmithItem.TotalPrice += gSmithItem.pExc1;
}
else {
this->Data[eSMITH_EXC1_1].OnShow = false;
gSmithItem.ExcOption1 = 0;
gSmithItem.mExc -= 1;
gSmithItem.TotalPrice -= gSmithItem.pExc1;
}
}
else if (this->IsWorkZone(eSMITH_EXC2))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_EXC2].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_EXC2].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_EXC2].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eSMITH_EXC2].EventTick = GetTickCount();
// ----
if (!this->Data[eSMITH_EXC2_1].OnShow)
{
this->Data[eSMITH_EXC2_1].OnShow = true;
gSmithItem.ExcOption2 = 8;
gSmithItem.mExc += 1;
gSmithItem.TotalPrice += gSmithItem.pExc2;
}
else {
this->Data[eSMITH_EXC2_1].OnShow = false;
gSmithItem.ExcOption2 = 0;
gSmithItem.mExc -= 1;
gSmithItem.TotalPrice -= gSmithItem.pExc2;
}
}
else if (this->IsWorkZone(eSMITH_EXC3))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_EXC3].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_EXC3].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_EXC3].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eSMITH_EXC3].EventTick = GetTickCount();
// ----
if (!this->Data[eSMITH_EXC3_1].OnShow)
{
this->Data[eSMITH_EXC3_1].OnShow = true;
gSmithItem.ExcOption3 = 4;
gSmithItem.mExc += 1;
gSmithItem.TotalPrice += gSmithItem.pExc3;
}
else {
this->Data[eSMITH_EXC3_1].OnShow = false;
gSmithItem.ExcOption3 = 0;
gSmithItem.mExc -= 1;
gSmithItem.TotalPrice -= gSmithItem.pExc3;
}
}
else if (this->IsWorkZone(eSMITH_EXC4))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_EXC4].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_EXC4].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_EXC4].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eSMITH_EXC4].EventTick = GetTickCount();
// ----
if (!this->Data[eSMITH_EXC4_1].OnShow)
{
this->Data[eSMITH_EXC4_1].OnShow = true;
gSmithItem.ExcOption4 = 2;
gSmithItem.mExc += 1;
gSmithItem.TotalPrice += gSmithItem.pExc4;
}
else {
this->Data[eSMITH_EXC4_1].OnShow = false;
gSmithItem.ExcOption4 = 0;
gSmithItem.mExc -= 1;
gSmithItem.TotalPrice -= gSmithItem.pExc4;
}
}
else if (this->IsWorkZone(eSMITH_EXC5))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_EXC5].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_EXC5].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_EXC5].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eSMITH_EXC5].EventTick = GetTickCount();
// ----
if (!this->Data[eSMITH_EXC5_1].OnShow)
{
this->Data[eSMITH_EXC5_1].OnShow = true;
gSmithItem.ExcOption5 = 1;
gSmithItem.mExc += 1;
gSmithItem.TotalPrice += gSmithItem.pExc5;
}
else {
this->Data[eSMITH_EXC5_1].OnShow = false;
gSmithItem.ExcOption5 = 0;
gSmithItem.mExc -= 1;
gSmithItem.TotalPrice -= gSmithItem.pExc5;
}
}
else if (this->IsWorkZone(eSMITH_LEVEL))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_LEVEL].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_LEVEL].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_LEVEL].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 100)
{
return;
}
// ----
this->Data[eSMITH_LEVEL].EventTick = GetTickCount();
if(gSmithItem.mLevel <= 0)
{return;}
else
{
gSmithItem.mLevel -= 1;
gSmithItem.TotalPrice -= gSmithItem.pLevel;
}
}
else if (this->IsWorkZone(eSMITH_LEVEL_1))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_LEVEL_1].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_LEVEL_1].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_LEVEL_1].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 100)
{
return;
}
// ----
this->Data[eSMITH_LEVEL_1].EventTick = GetTickCount();
if(gSmithItem.mLevel >= gSmithItem.MaxLevel)
{return;}
else
{
gSmithItem.mLevel += 1;
gSmithItem.TotalPrice += gSmithItem.pLevel;
}
}
else if (this->IsWorkZone(eSMITH_OPT))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_OPT].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_OPT].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_OPT].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 100)
{
return;
}
// ----
this->Data[eSMITH_OPT].EventTick = GetTickCount();
if(gSmithItem.mOpt <= 0)
{return;}
else
{
gSmithItem.mOpt -= 1;
gSmithItem.TotalPrice -= gSmithItem.pOpt;
}
}
else if (this->IsWorkZone(eSMITH_OPT_1))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_OPT_1].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_OPT_1].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_OPT_1].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 100)
{
return;
}
// ----
this->Data[eSMITH_OPT_1].EventTick = GetTickCount();
if(gSmithItem.mOpt >= gSmithItem.MaxOpt)
{return;}
else
{
gSmithItem.mOpt += 1;
gSmithItem.TotalPrice += gSmithItem.pOpt;
}
}
else if (this->IsWorkZone(eSMITH_ITEMTYPE))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_ITEMTYPE].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_ITEMTYPE].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_ITEMTYPE].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 100)
{
return;
}
// ----
this->Data[eSMITH_ITEMTYPE].EventTick = GetTickCount();
if(gSmithItem.ItemType <= 0)
{return;}
else
{
gSmithItem.ItemType -= 1;
gSmithItem.ItemIndex = 0;
}
}
else if (this->IsWorkZone(eSMITH_ITEMTYPE_1))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_ITEMTYPE_1].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_ITEMTYPE_1].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_ITEMTYPE_1].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 100)
{
return;
}
// ----
this->Data[eSMITH_ITEMTYPE_1].EventTick = GetTickCount();
if(gSmithItem.ItemType >= 11)
{return;}
else
{gSmithItem.ItemType += 1;
gSmithItem.ItemIndex = 0;}
}
else if (this->IsWorkZone(eSMITH_DAYS))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_DAYS].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_DAYS].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_DAYS].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 100)
{
return;
}
// ----
this->Data[eSMITH_DAYS].EventTick = GetTickCount();
if(gSmithItem.Days <= 0)
{return;}
else
{gSmithItem.Days -= 1;}
}
else if (this->IsWorkZone(eSMITH_DAYS_1))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_DAYS_1].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_DAYS_1].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_DAYS_1].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 100)
{
return;
}
// ----
this->Data[eSMITH_DAYS_1].EventTick = GetTickCount();
if(gSmithItem.Days >= 2)
{return;}
else
{gSmithItem.Days += 1;}
}
else if (this->IsWorkZone(eSMITH_ITEMINDEX))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_ITEMINDEX].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_ITEMINDEX].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_ITEMINDEX].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 100)
{
return;
}
// ----
this->Data[eSMITH_ITEMINDEX].EventTick = GetTickCount();

if(gSmithItem.ItemIndex <= 0 )
{return;}

if (gSmithItem.ItemType == 0)
{
if(gSmithItem.ItemIndex == 31)
{
gSmithItem.ItemIndex -= 6;
}
else
gSmithItem.ItemIndex -= 1;
}
else if (gSmithItem.ItemType == 2)
{
if(gSmithItem.ItemIndex == 18)
{
gSmithItem.ItemIndex -= 2;
}
else
gSmithItem.ItemIndex -= 1;
}
else if(gSmithItem.ItemType == 4)
{
if(gSmithItem.ItemIndex == 8 ||
gSmithItem.ItemIndex == 16||
gSmithItem.ItemIndex == 24)
{
gSmithItem.ItemIndex -= 2;
}
else
gSmithItem.ItemIndex -= 1;
}
else if(gSmithItem.ItemType == 7)
{
if(gSmithItem.ItemIndex == 16 ||
gSmithItem.ItemIndex == 11 ||
gSmithItem.ItemIndex == 24 ||
gSmithItem.ItemIndex == 33 ||
gSmithItem.ItemIndex == 38)
{
gSmithItem.ItemIndex -= 2;
}
else
gSmithItem.ItemIndex -= 1;
}
else
{
gSmithItem.ItemIndex -= 1;
}
}
else if (this->IsWorkZone(eSMITH_ITEMINDEX_1))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_ITEMINDEX_1].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_ITEMINDEX_1].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_ITEMINDEX_1].OnClick = false;
pSetCursorFocus = true;
// ----
if (Delay < 100)
{
return;
}
// ----
this->Data[eSMITH_ITEMINDEX_1].EventTick = GetTickCount();
if (gSmithItem.ItemType == 0)
{
if(gSmithItem.ItemIndex >= 35)
return;

if(gSmithItem.ItemIndex == 25)
{
gSmithItem.ItemIndex += 6;
}
else
gSmithItem.ItemIndex += 1;
}
else if (gSmithItem.ItemType == 1)
{
if(gSmithItem.ItemIndex >= 8)
{
return;
}
else
gSmithItem.ItemIndex += 1;
}
else if (gSmithItem.ItemType == 2)
{
if(gSmithItem.ItemIndex >= 18)
{
return;
}
if(gSmithItem.ItemIndex == 16)
{
gSmithItem.ItemIndex += 2;
}
else
gSmithItem.ItemIndex += 1;
}
else if (gSmithItem.ItemType == 3)
{
if(gSmithItem.ItemIndex >= 11)
{
return;
}
else
gSmithItem.ItemIndex += 1;
}
else if(gSmithItem.ItemType == 4)
{
if(gSmithItem.ItemIndex >= 24)
{
return;
}
else if(gSmithItem.ItemIndex == 6 ||
gSmithItem.ItemIndex == 14 ||
gSmithItem.ItemIndex == 22)
{
gSmithItem.ItemIndex += 2;
}
else
gSmithItem.ItemIndex += 1;
}
else if (gSmithItem.ItemType == 5)
{
if(gSmithItem.ItemIndex >= 23)
{
return;
}
else
gSmithItem.ItemIndex += 1;
}
else if (gSmithItem.ItemType == 6)
{
if(gSmithItem.ItemIndex >= 16)
{
return;
}
else
gSmithItem.ItemIndex += 1;
}
else if(gSmithItem.ItemType == 7)
{
if(gSmithItem.ItemIndex >= 43)
return;

else if(gSmithItem.ItemIndex == 14 ||
gSmithItem.ItemIndex == 19 ||
gSmithItem.ItemIndex == 22 ||
gSmithItem.ItemIndex == 31 ||
gSmithItem.ItemIndex == 36)
{
gSmithItem.ItemIndex += 2;
}
else
gSmithItem.ItemIndex += 1;
}
else
{
if(gSmithItem.ItemIndex >= 43)
return;
gSmithItem.ItemIndex += 1;
}
}
else if (this->IsWorkZone(eSMITH_CLOSE))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_CLOSE].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_CLOSE].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_CLOSE].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eSMITH_CLOSE].EventTick = GetTickCount();
this->CloseSmithItemWindow();
}
else if (this->IsWorkZone(eSMITH_BUY))
{
DWORD Delay = (CurrentTick - this->Data[eSMITH_BUY].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eSMITH_BUY].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eSMITH_BUY].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eSMITH_BUY].EventTick = GetTickCount();
if(gSmithItem.ItemType >= 7)
{
gSmithItem.mSkill = 0;
}
SDHP_BUYSVSHOP pMsg;
pMsg.h.set(0xFB, 0x08, sizeof(pMsg));
pMsg.ItemType = gSmithItem.ItemType;
pMsg.ItemIndex = gSmithItem.ItemIndex;
pMsg.Days = gSmithItem.Days;
pMsg.mLevel = gSmithItem.mLevel;
pMsg.mSkill = gSmithItem.mSkill;
pMsg.mLuck = gSmithItem.mLuck;
pMsg.mOpt = gSmithItem.mOpt;
pMsg.ExcOption = gSmithItem.ExcOption;
pMsg.ExcOption1 = gSmithItem.ExcOption1;
pMsg.ExcOption2 = gSmithItem.ExcOption2;
pMsg.ExcOption3 = gSmithItem.ExcOption3;
pMsg.ExcOption4 = gSmithItem.ExcOption4;
pMsg.ExcOption5 = gSmithItem.ExcOption5;
pMsg.mExc = gSmithItem.mExc;
DataSend((BYTE*)&pMsg, pMsg.h.size);
this->CloseSmithItemWindow();
}
}

Protocolo.cpp
case 0xFB:
switch (((lpMsg[0] == 0xC1) ? lpMsg[3] : lpMsg[4]))
{
case 0x01:
gResetSystem.set_data((RESET_ANS_USERDATA*)lpMsg);
return 1;
case 0x02:
gResetSystem.get_reset_result();
return 1;
case 0x03:
gGrandResetSystem.set_data((GR_ANS_USERDATA*)lpMsg);
return 1;
case 0x04:
gGrandResetSystem.get_reset_result();
return 1;
case 0x06:
gPartySearchSettings.GCPartySettingsRecv((PMSG_PARTYSETTINGS_RECV*)lpMsg);
return 1;
case 0x0C:
gAchievements.GCPlayerData((PMSG_GC_ACH_PLAYER_DATA*)lpMsg);
return 1;
case 0x0D:
gAchievements.GCCalculatorPower((PMSG_GC_ACH_POWER*)lpMsg);
return 1;
case 0x0F:
gAchievements.GCConfigData((PMSG_GC_ACH_SETTINGS_DATA*)lpMsg);
return 1;
case 0x07:
gServerInfo.RecvServerInfo((PMSG_SERVER_INFO_RECV*)lpMsg);
return 1;

case 0x08:
gChangeClass.RecvData((PMSG_CHANGECLASS_DATA*)lpMsg);
break;

case 0x10:
g_ExWinQuestSystem.GC_MiniInfoRecvEx((GC_ExWinMiniInfoEx*)lpMsg); //0xFD, 0x13
return 1;
case 0x11:
g_ExWinQuestSystem.GC_Start((GC_ExWinStart*)lpMsg); //0xFD, 0x14
return 1;
case 0x12:
g_ExWinQuestSystem.GC_RecvMain((GC_MainPacket*)lpMsg); //0xFF, 0x0C
return 1;
case 0x13:
g_ExWinQuestSystem.GC_MiniInfoRecv((GC_ExWinMiniInfo*)lpMsg); //0xFF, 0x0D
return 1;
case 0x14:
ResetSystem::reset_message_recv(reinterpret_cast(lpMsg));
return 1;
case 0x16:
GCWarehouseInterfaceOpenRecv((PMSG_WAREHOUSEINTERFACE_RECV*)lpMsg);
return 1;
case 0x19:
    gSmithItem.GetInfo((SDHP_SENDSVSHOP*)lpMsg);
break;
}
break;














Bon Dia

🡱 🡳