V-ShopActions.asm
资源名称:VeMU.rar [点击查看]
上传用户:santakups8
上传日期:2021-03-23
资源大小:544k
文件大小:3k
源码类别:
模拟服务器
开发平台:
Asm
- ;EasyCodeName=Module1,1
- ;-----------------------------------------------------------------------------------
- ; VeMU
- ; Its a package that allows the user to set his own server of the game
- ; "MuOnline", this is not an emulator since i am not "emulating"
- ; what the actual games does, i am "creating" a method for set a Server
- ; of this Game.
- ;
- ; Copyright (C) 2010 Felipe Ya馿z
- ;
- ; This program is free software: you can redistribute it and/or modify
- ; it under the terms of the GNU General Public License as published by
- ; the Free Software Foundation, either version 3 of the License, or
- ; (at your option) any later version.
- ;
- ; This program is distributed in the hope that it will be useful,
- ; but WITHOUT ANY WARRANTY; without even the implied warranty of
- ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ; GNU General Public License for more details.
- ;
- ; You should have received a copy of the GNU General Public License
- ; along with this program. If not, see http://www.gnu.org/licenses/.
- ;-----------------------------------------------------------------------------------
- ;-----------------------------------------------------------------------------------
- ; -----------------
- ; Coded /
- ; By /
- ; -={FeN$x)=-
- ; / Felipe Y.
- ; /
- ; -----------------
- ; Programming Lang: ASM
- ; Country: Chile
- ; My respect for all those who lost their lifes
- ; In the earthquake of my country...
- ; Let god take their spirits home...
- ;-----------------------------------------------------------------------------------
- ;////////////////////////////////////////////////////////////////////////////////////
- ; VALKYRIE PROJECT
- ; SHOP ACTIONS !
- ;////////////////////////////////////////////////////////////////////////////////////
- .Const
- .Data?
- .Data
- .Code
- V_CShop_SetItem Proc uses edx ItemType:Dword, ItemIndex:Dword, ItemLevel:Dword, ItemDur:Dword, ItemLuck:Dword, ItemSkill:Dword, ItemJOL:Dword
- local BoxWidht:Dword
- local BoxHeight:Dword
- local ItemW:Dword ;Width
- local ItemH:Dword ;Height
- local MyStruct:Dword
- assume edx:ptr ItemStruct
- ;-------------------------------
- ;Clean locals
- ;-------------------------------
- And BoxWidht, 0
- And BoxHeight, 0
- mov MyStruct, edx
- invoke V_CItem_IsItemValid, ItemType, ItemIndex
- .If (eax == 0)
- jmp @End
- .Endif
- invoke V_CItem_GetSize, ItemType, ItemIndex
- .If (eax == -1)
- xor eax, eax
- jmp @End
- .ElseIf (eax < 0) && (edx < 0)
- RGB 255, 64, 64 ;Red Collor
- Mov Edx, Eax
- Invoke vprint, $CTA0("CShopLoad:] ERROR ON WHILE LOADING ITEM [%d] [%d] INVALID SIZE"), Edx, 2, ItemType, ItemIndex
- xor eax, eax
- jmp @End
- .Endif
- mov ItemW, eax
- mov ItemH, edx
- mov edx, MyStruct
- mov eax, ItemLevel
- mov [edx].Item_Level, Al
- .If (ItemDur == 0)
- mov ItemDur, 255 ;Durability 255 for avoid bug
- .Endif
- fild ItemDur
- fstp [edx].Item_Durability
- invoke V_CItem_FillStruct, ItemType, ItemIndex, ItemLuck, ItemSkill, ItemJOL, 0, 0, 0
- @End:
- Ret
- V_CShop_SetItem EndP