V-ItemClass.asm
资源名称:VeMU.rar [点击查看]
上传用户:santakups8
上传日期:2021-03-23
资源大小:544k
文件大小:9k
源码类别:
模拟服务器
开发平台:
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 FelipeYa馿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
- ; ITEM CLASS !
- ;////////////////////////////////////////////////////////////////////////////////////
- V_CItem_FillStruct Proto :Dword, :Dword, :Dword, :Dword, :Dword, :Dword, :Dword, :Dword
- V_CItem_RetnpStruct Proto :Dword, :Dword
- V_CItem_GetRealItemID Proto :Dword, :Dword
- V_CItem_GetItemLevel Proto :Dword, :Dword
- V_CItem_GetItemDurability Proto :Dword, :Dword
- V_CItem_IsItemValid Proto :Dword, :Dword
- V_CItem_GetSize Proto :Dword, :Dword
- ;-----------------------------------------------------------------
- ; Structure that contain most of the item options
- ;-----------------------------------------------------------------
- ItemStruct Struct
- Item_Number Word ?
- Item_Serial Byte ?
- Item_Width Byte ?
- Item_Height Byte ?
- Item_Type Byte ?
- Item_Index Byte ?
- Item_Level Byte ?
- Item_Slot Byte ?
- Item_Class Byte ?
- Item_TwoHand Byte ?
- Item_AttackSpeed Byte ?
- Item_WalkSpeed Byte ?
- Item_DamageMin Word ?
- Item_DamageMax Word ?
- Item_SuccesfulBlocking Byte ?
- Item_Defense Byte ?
- Item_MagicDefense Byte ?
- Item_Speed Byte ?
- Item_DamageMinOrigin Word ?
- Item_DefenseOrigin Word ?
- Item_MagicPower Word ?
- Item_Durability Real4 ?
- Item_DurabilitySmall Dword ?
- Item_BaseDurability Real4 ?
- Item_SpecialNum Byte 5 Dup(?)
- Item_Special Byte 8 Dup(?)
- Item_SpecialValue Byte 8 Dup(?)
- Item_ReqStr Word ?
- Item_ReqDex Word ?
- Item_ReqEner Word ?
- Item_ReqVit Word ?
- Item_ReqLevel Word ?
- Item_ReqLeaderShip Word ?
- Item_LeaderShip Word ?
- Item_ReqClass Byte 6 Dup(?) ;Summoner support
- Item_Resistance Byte 7 Dup(?)
- Item_Value DWord ? ;Dont know what for but is used
- Item_SellMoney DWord ?
- Item_BuyMoney DWord ?
- Item_PShopValue DWord ?
- Item_Exist Dword ?
- Item_OldSellMoney DWord ?
- Item_OldBuyMoney DWord ?
- Item_Option1 Byte ?
- Item_Option2 Byte ?
- Item_Option3 Byte ?
- Item_NewOption Byte ?
- Item_DurabilityState Real4 4 Dup(?) ;Last 4 bytes seems to be unused for now
- Item_CurrentDurabilityState Real4 ?
- Item_SkillChange Byte ?
- Item_QuestItem Byte ?
- Item_SetOption Byte ?
- Item_SetAddStat Byte ?
- Item_IsValidItem Byte ?
- Item_SkillResistance Byte 7 Dup(?)
- Item_IsLoadPetItemInfo DWord ?
- Item_PetItemLevel DWord ?
- Item_PetItemExp DWord ?
- Item_JewelOfHarmonyOption Byte ?
- Item_JewelOfHarmonyStr Word ?
- Item_JewelOfHarmonyDex Word ?
- Item_Option380 Byte ?
- ItemStruct EndS
- ;////////////////////////////////////////////////////////////////////////////////////
- ; ITEM SCRIPT CLASS
- ; From here below, its the ItemScript Class
- ;
- ;////////////////////////////////////////////////////////////////////////////////////
- ;;---------------------------------------
- ;;The limit of index for each type
- ;;Example Sword Type have 31 index limit
- ;;---------------------------------------
- ; REMOVED FROM NOW
- ;ITEM_INDEX_FOR_TYPES Struct
- ; vSword Byte 31 ;Max limit of index for this type of item
- ; vAxes Byte 8 ;Max limit of index for this type of item
- ; vMaces Byte 15 ;Max limit of index for this type of item
- ; vSpears Byte 10 ;Max limit of index for this type of item
- ; vBows Byte 22 ;Max limit of index for this type of item
- ; vStaffs Byte 22 ;Max limit of index for this type of item
- ; vShields Byte 16 ;Max limit of index for this type of item
- ; vHelms Byte 44 ;Max limit of index for this type of item
- ; vArmors Byte 44 ;Max limit of index for this type of item
- ; vPants Byte 44 ;Max limit of index for this type of item
- ; vGloves Byte 44 ;Max limit of index for this type of item
- ; vBoots Byte 44 ;Max limit of index for this type of item
- ; vAccessories Byte 43 ;Max limit of index for this type of item
- ; vMiscellaneous Byte 65 ;Max limit of index for this type of item
- ; vSpecials Byte 98 ;Max limit of index for this type of item
- ; vScrolls Byte 7 ;Max limit of index for this type of item
- ;ITEM_INDEX_FOR_TYPES EndS
- ;----------------------------------
- ; DONT EDIT THIS ORDER
- ;----------------------------------
- ITEM_UNIVERSAL_VARIABLES struct
- ItemSlot Dword ?
- vWidth Byte ?
- vHeight Byte ?
- Serial Byte ?
- SkillType Dword ?
- OptionFlag Byte ?
- DropFlag Byte ?
- ITEM_UNIVERSAL_VARIABLES EndS
- ;----------------------------------
- ; DONT EDIT THIS ORDER
- ;----------------------------------
- ITEM_DAMAGE_VARIABLES Struct
- DamageMin Byte ?
- DamageMax Byte ?
- AttackSpeed Byte ?
- MagicPower Dword ?
- ITEM_DAMAGE_VARIABLES EndS
- ;----------------------------------
- ; DONT EDIT THIS ORDER
- ;----------------------------------
- ITEM_REQUIREMENTS_VARIABLES Struct
- ReqLevel Word ?
- ReqStrenght Word ?
- ReqDex Word ?
- ReqEnergy Word ?
- ReqVitality Word ?
- ReqLeaderShip Dword ?
- ITEM_REQUIREMENTS_VARIABLES EndS
- ;----------------------------------
- ; DONT EDIT THIS ORDER
- ;----------------------------------
- ITEM_DEFENSE_VARIABLES Struct
- Resistance Byte 7 Dup(?)
- SuccesfulBlocking Byte ?
- Defense Byte ?
- MagicDefense Byte ?
- Durability Byte ?
- DefenceDurability Byte ?
- MagicDurability Byte ?
- ResistanceType Byte ?
- ITEM_DEFENSE_VARIABLES EndS
- ;----------------------------------
- ; DONT EDIT THIS ORDER
- ;----------------------------------
- ITEM_SPECIAL_VARIABLES Struct
- Level Byte ?
- SetAttribute Byte ?
- Speed Byte ?
- WalkSpeed Byte ?
- TwoHand Byte ?
- ItemValue Word ? ;Dont know what for
- BuyMoney Dword ?
- SellMoney Dword ?
- RepairMoney Real4 ?
- AllRepairMoney Real4 ?
- ;QuestItem Byte ?
- ITEM_SPECIAL_VARIABLES EndS
- ;----------------------------------
- ; DONT EDIT THIS ORDER
- ;----------------------------------
- ITEM_CLASS_VARIABLES Struct
- ReqClass Byte 6 Dup(?) ;Summoner support
- ITEM_CLASS_VARIABLES EndS
- ;----------------------------------------
- ; ITEM_ATTRIBUTE STRUCT !
- ; Main struct for V_CItem_LoadItemScript
- ;----------------------------------------
- ITEM_ATTRIBUTE_STRUCT struct
- ItemType Byte ?
- ItemIndex Byte ?
- ItemName CHAR 32 Dup(?)
- UniversalVars ITEM_UNIVERSAL_VARIABLES <?>
- SpecialVars ITEM_SPECIAL_VARIABLES <?>
- DamageVars ITEM_DAMAGE_VARIABLES <?>
- DefenseVars ITEM_DEFENSE_VARIABLES <?>
- ReqVars ITEM_REQUIREMENTS_VARIABLES <?>
- ClassVars ITEM_CLASS_VARIABLES <?>
- ITEM_ATTRIBUTE_STRUCT EndS
- ;////////////////////////////////////////////////////////////////////////////////////
- ; ITEM DATA DEFINITIONS !
- ; From here below, its constants and data definitions
- ; For all kind of Item procedures
- ;////////////////////////////////////////////////////////////////////////////////////
- .Const
- TRADEINV_SIZE equ 32
- WAREHOUSE_SIZE equ 120
- INVENTORY_SIZE equ 108
- MAX_ITEM_TYPES equ 20
- MAX_ITEM_INDEX equ 200
- MAX_ITEMS equ MAX_ITEM_TYPES * MAX_ITEM_INDEX
- .Data?
- pObjItemAttributes DB MAX_ITEMS * SizeOf ITEM_ATTRIBUTE_STRUCT Dup(?) ;This is how WZ should do it
- pTempTradeInv DB (MAX_OBJ_ID - START_OBJ_PLAYERID) * SizeOf ItemStruct * TRADEINV_SIZE Dup(?)
- pTempWareHouse DB (MAX_OBJ_ID - START_OBJ_PLAYERID) * SizeOf ItemStruct * WAREHOUSE_SIZE Dup(?)
- ;pTempInventory DB (MAX_OBJ_ID - START_OBJ_PLAYERID) * SizeOf ItemStruct * INVENTORY_SIZE Dup(?) ;REMOVE IT HAVE NO REAL USAGE
- pInventory1 DB (MAX_OBJ_ID - START_OBJ_PLAYERID) * SizeOf ItemStruct * INVENTORY_SIZE Dup(?)
- pInventory2 DB (MAX_OBJ_ID - START_OBJ_PLAYERID) * SizeOf ItemStruct * INVENTORY_SIZE Dup(?)
- .Data
- TotalItemsLoaded DD ?