public bool Equip_InsertEquipItem(EAObjID _id, uint slot, EA_CItemUnit pitem) { EA_CCharBPlayer pActor = EACObjManager.instance.GetActor(_id); if (pActor == null) { return(false); } if (pActor.GetObjInfo().m_eObjType == eObjectType.CT_MYPLAYER) { EA_Equipment pEquipment = m_myPlItemManager.GetEquip(); if (pEquipment != null) { pEquipment.InsertEquipItem(slot, pitem); } } else { EA_Equipment pEquipment = m_PCItemManager.Get_PCEquipItem(_id); if (pEquipment == null) { pEquipment = new EA_Equipment(); m_PCItemManager.InsertPCEquip(_id, pEquipment); } // [4/10/2014 puos] Equipped with items pEquipment.InsertEquipItem(slot, pitem); } return(true); }
public bool Equip_RemoveEquip(EAObjID _id) { EA_CCharBPlayer pActor = EACObjManager.instance.GetActor(_id); if (pActor != null) { if (pActor.GetObjInfo().m_eObjType != eObjectType.CT_MYPLAYER) { m_PCItemManager.RemovePCEquip(_id); } return(true); } return(false); }
/*! Mount item in equipment slot */ public bool EquipmentItem(EAObjID _id, uint equip_slot) { EA_CCharBPlayer pUser = EACObjManager.instance.GetActor(_id); EA_Equipment pEquipment = null; if (pUser.GetObjInfo().m_eObjType == eObjectType.CT_MYPLAYER) { pEquipment = m_myPlItemManager.GetEquip(); } else { pEquipment = m_PCItemManager.Get_PCEquipItem(_id); } pEquipment.EquipItem(pUser, equip_slot); return(true); }
public EA_Equipment Equip_FindEqipment(EAObjID _id) { EA_CCharBPlayer pActor = EACObjManager.instance.GetActor(_id); EA_Equipment pEquipment = null; if (pActor != null) { if (pActor.GetObjInfo().m_eObjType == eObjectType.CT_MYPLAYER) { pEquipment = m_myPlItemManager.GetEquip(); } else { pEquipment = m_PCItemManager.Get_PCEquipItem(_id); } } return(pEquipment); }