//克隆详细信息 public void ClonetExtraInfo(CObject_Item_Equip pItemSource) { if (m_pExtraDefine != null) { m_pExtraDefine = new EXTRA_DEFINE(); } EXTRA_DEFINE pNewExtraDefine = pItemSource.GetExtraInfo(); m_pExtraDefine.m_CurDurPoint = pNewExtraDefine.m_CurDurPoint; m_pExtraDefine.m_MaxDurPoint = pNewExtraDefine.m_MaxDurPoint; m_pExtraDefine.m_nLevelNeed = pNewExtraDefine.m_nLevelNeed; // m_pExtraDefine.m_nFrogLevel = pItemInfo.GetEquipData().m_Level; m_pExtraDefine.m_nRepairFailureTimes = pNewExtraDefine.m_nRepairFailureTimes; m_pExtraDefine.m_nSellPrice = pNewExtraDefine.m_nSellPrice; m_pExtraDefine.M_nEquipBindInfo = pNewExtraDefine.M_nEquipBindInfo; // 增加克隆时候的可以镶嵌的宝石个数、强化等级 [9/14/2011 edit by ZL] m_pExtraDefine.m_EnableGemCount = pNewExtraDefine.m_EnableGemCount; m_pExtraDefine.m_EquipEnhanceLevel = pNewExtraDefine.m_EquipEnhanceLevel; m_pExtraDefine.m_vEquipAttachGem.Clear(); m_pExtraDefine.m_vBlueEquipAttributes.Clear(); m_pExtraDefine.m_vEquipAttributes.Clear(); for (int i = 0; i < pNewExtraDefine.m_vEquipAttachGem.Count; i++) { m_pExtraDefine.m_vEquipAttachGem.Add(pNewExtraDefine.m_vEquipAttachGem[i]); } for (int i = 0; i < pNewExtraDefine.m_vBlueEquipAttributes.Count; i++) { m_pExtraDefine.m_vBlueEquipAttributes.Add(pNewExtraDefine.m_vBlueEquipAttributes[i]); } // 增加基础属性克隆 [9/14/2011 edit by ZL] for (int i = 0; i < pNewExtraDefine.m_vEquipAttributes.Count; i++) { m_pExtraDefine.m_vEquipAttributes.Add(pNewExtraDefine.m_vEquipAttributes[i]); } SetNumber(pItemSource.GetNumber()); m_Quality = pItemSource.GetEquipQuantity(); m_theBaseDef = pItemSource.GetEquipBaseDefine(); // 装备是否鉴定过属性。2006-4-10。 m_EquipAttrib = pItemSource.m_EquipAttrib; }
// // 装备镶嵌消息 [9/16/2011 edit by ZL] // void Send_EnchaseMsg(int type); // // 返回装备上,总共有多少颗宝石。 // INT GetEquip_GemCount(INT nIndexEquip ); // // 返回装备上,总共可以镶嵌多少个宝石 //// INT GetEquip_GemCount( ); // // 返回宝石的级别。 //// INT Compound_Preparation( ); // // 是否可以镶嵌 // INT Can_Enchase( INT nIndexEquip, INT nIndexGem ); // // 是否可以合成 // bool Can_Combine( INT nIndexGem1, INT nIndexGem2 ); // // 物品可以放到镶嵌界面这个位置。 // bool Enchase_Preparation( INT nIndexInterface, INT nIndexPacket ); // // 物品可以放到合成界面这个位置。 // bool Compound_Preparation( INT nIndexPacket ); // ////////////////////////////////////////////////////////////////////////// // INT Stiletto_GetEquipOwner(); // // 装备打孔检测,必须先将装备拖到目标位置上 [7/14/2011 ivan edit] // Lua_SLOT_COST Stiletto_Preparation(INT nEquipIndex, INT equipOwner); // // 装备打孔 [7/15/2011 ivan edit] // INT Do_Stilietto(int equipOwner = -1, int equipPos = -1); // // 装备强化预览 [9/14/2011 edit by ZL] // CActionItem* GetStrengthenPreView(INT actionId); // // 装备强化预览 [9/14/2011 edit by ZL] // 升档预览 [4/11/2012 SUN] public CActionItem GetEquipUpdatePreView(int actionId) { CActionItem_Item action = CActionSystem.Instance.GetActionByActionId(actionId) as CActionItem_Item; if (action == null) { throw new NullReferenceException("Can not find actionitem: " + actionId); } CObject_Item_Equip equip = action.GetImpl() as CObject_Item_Equip; if (equip == null) { return(null); } CObject_Item_Equip resEquip = CDataPool.Instance.PreviewEquip; int nNextTableId = equip.GetEquipBaseDefine().nNextDangCiItemSN; if (resEquip != null && resEquip.GetIdTable() != nNextTableId) { CDataPool.Instance.PreviewEquip = null; } resEquip = ObjectSystem.Instance.NewItem((uint)nNextTableId) as CObject_Item_Equip; resEquip.CloneForUpLevel(equip); resEquip.TypeOwner = ITEM_OWNER.IO_QUESTVIRTUALITEM; // 必须保存回去 [10/25/2011 Ivan edit] CDataPool.Instance.PreviewEquip = resEquip; CActionItem pActionItem = CActionSystem.Instance.GetAction_ItemID(resEquip.GetID(), false); if (pActionItem != null) { return(pActionItem); } else { return(CActionItem.s_InvalidAction); } }