public bool readFromBuff(ref NetInputBuffer buff) { buff.ReadByte(ref m_nndex); m_ItemID.readFromBuff(ref buff); buff.ReadUint(ref m_ItemTableIndex); buff.ReadByte(ref m_Count); return true; }
public override bool readFromBuff(ref NetInputBuffer buff) { buff.ReadByte(ref m_EquipPoint); buff.ReadByte(ref m_BagIndex); buff.ReadUint(ref m_ItemTableIndex); m_ItemId.readFromBuff(ref buff); buff.ReadByte(ref m_Result); return(true); }
public bool readFromBuff(ref NetInputBuffer buff) { m_ItemGUID.readFromBuff(ref buff); buff.ReadUint(ref m_ItemIndex); buff.ReadByte(ref m_RulerID); buff.ReadByte(ref m_nsBind); buff.Read(ref m_Param, ItemDefine.MAX_ITEM_PARAM * sizeof(int)); if (GetCreatorVar()) { buff.Read(ref m_Creator, ItemDefine.MAX_ITEM_CREATOR_NAME); } if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_EQUIP) { if (m_Equip == null) { m_Equip = new EQUIP_INFO(); } buff.ReadByte(ref m_Equip.m_CurDurPoint); buff.ReadByte(ref m_Equip.m_CurSoulType); short damage = 0; buff.ReadShort(ref damage); m_Equip.m_CurDamagePoint = (ushort)damage; buff.ReadByte(ref m_Equip.m_MaxDurPoint); buff.ReadUint(ref m_Equip.m_BasePrice); buff.ReadByte(ref m_Equip.m_EquipPoint); buff.ReadByte(ref m_Equip.m_AttrCount); buff.ReadShort(ref m_Equip.m_SetNum); buff.ReadByte(ref m_Equip.m_MaxNum); if (m_Equip.m_AttrCount > GAMEDEFINE.MAX_ITEM_ATTR) { m_Equip.m_AttrCount = GAMEDEFINE.MAX_ITEM_ATTR; } for (int j = 0; j < m_Equip.m_AttrCount; j++) { m_Equip.m_pAttr[j].readFromBuff(ref buff); } buff.ReadByte(ref m_Equip.m_StoneCount); if (m_Equip.m_StoneCount > GAMEDEFINE.MAX_ITEM_GEM) { m_Equip.m_StoneCount = GAMEDEFINE.MAX_ITEM_GEM; } //镶嵌系统修改,必须接收MAX_ITEM_GEM个 [2011-9-28] by: cfp+ for (int j = 0; j < GAMEDEFINE.MAX_ITEM_GEM; j++) { m_Equip.m_pGemInfo[j].readFromBuff(ref buff); } buff.ReadByte(ref m_Equip.m_NeedLevel); buff.ReadByte(ref m_Equip.m_GemMax); buff.ReadByte(ref m_Equip.m_nDangCi); buff.ReadInt(ref m_Equip.m_nNextDangCiItemSN); buff.ReadByte(ref m_Equip.m_FaileTimes); buff.ReadByte(ref m_Equip.m_EquipEnhanceLevel); } else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_GEM) { if (m_Gem == null) { m_Gem = new GEM_INFO(); } m_Gem.readFromBuff(ref buff); } else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_COMITEM) { if (m_Medic == null) { m_Medic = new MEDIC_INFO(); } m_Medic.readFromBuff(ref buff); } else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_MATERIAL) { if (m_Medic == null) { m_Medic = new MEDIC_INFO(); } m_Medic.readFromBuff(ref buff); } else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_TASKITEM) { if (m_Medic == null) { m_Medic = new MEDIC_INFO(); } m_Medic.readFromBuff(ref buff); } else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_STOREMAP) { //iStream.Read((CHAR*)(GetStoreMapData()),sizeof(STORE_MAP_INFO)); } else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_TALISMAN) { if (m_Talisman == null) { m_Talisman = new TALISMAN_INFO(); } m_Talisman.readFromBuff(ref buff); } else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_SYMBOLITEM) { if (m_Charm == null) { m_Charm = new CHARM_INFO(); } m_Charm.readFromBuff(ref buff); } return(true); }