/// <summary> /// 背包已满提示 /// </summary> /// <param name="itemId"></param> void ShowBoxTips(uint itemId) { Client.IEntitySystem es = ControllerSystem.m_ClientGlobal.GetEntitySystem(); IBox box = es.FindBox(itemId); if (box == null) { return; } Client.IControllerHelper controllerhelper = GetControllerHelper(); if (controllerhelper != null) { int itemBaseId = box.GetProp((int)EntityProp.BaseID); int itemNum = box.GetProp((int)BoxProp.Number); //1、捡到的item 为金币 if (itemBaseId == 60001) { return; } //2、不可放入背包 if (false == controllerhelper.CanPutInKanpsack((uint)itemBaseId, (uint)itemNum)) { Client.ITipsManager tip = ControllerSystem.m_ClientGlobal.GetTipsManager(); if (tip != null) { tip.ShowTips("背包空间不足"); } } } }
public PlayerDistanceCondition(PLAYERPKMODEL pkmodel, Vector3 playerPos, float dis) { m_playerPos = playerPos; m_dis = dis; m_pkmodel = pkmodel; m_mainPlayer = ControllerSystem.m_ClientGlobal.MainPlayer; m_controllerhelper = ControllerSystem.m_ClientGlobal.GetControllerSystem().GetControllerHelper(); }
void UseAtOnceMedice() { Client.IControllerHelper controllerhelper = GetControllerHelper(); if (controllerhelper == null) { return; } controllerhelper.UseAtOnceMedicine(); }
void OnUseMedecal() { Client.IControllerHelper controllerhelper = GetControllerHelper(); if (controllerhelper == null) { return; } controllerhelper.CheckUseMedicine(); }
public bool CanAutoPick() { if (EntitySystem.m_ClientGlobal.gameOption == null) { return(false); } int canPickUp = EntitySystem.m_ClientGlobal.gameOption.GetInt("Pick", "PickMedecal", 1); if (canPickUp != 1) { return(false); } int pickLevel = EntitySystem.m_ClientGlobal.gameOption.GetInt("Pick", "EquipLevel", 1); int nID = GetProp((int)EntityProp.BaseID); var table_data = GameTableManager.Instance.GetTableItem <table.ItemDataBase>((uint)nID); if (table_data == null) { return(false); } if (table_data.grade < pickLevel) { return(false); } Client.IControllerSystem cs = EntitySystem.m_ClientGlobal.GetControllerSystem(); if (cs != null) { Client.IControllerHelper controllerhelper = cs.GetControllerHelper(); if (controllerhelper != null) { int itemId = GetProp((int)EntityProp.BaseID); int itemNum = GetProp((int)BoxProp.Number); //1、捡到的item 不为金币(金币不进背包,不做背包检测) if (itemId != 60001) { //2、不可放入背包 if (false == cs.GetControllerHelper().CanPutInKanpsack((uint)itemId, (uint)itemNum)) { return(false); } } } } return(CanPick()); }
public bool CanPick() { GameCmd.SceneItemOwnerType ownerType = (GameCmd.SceneItemOwnerType)GetProp((int)Client.BoxProp.OwnerType); //int owernId = (int)GetProp((int)Client.BoxProp.Owner); uint owernIdLow = (uint)GetProp((int)Client.BoxProp.OwnerLow); uint owernIdHigh = (uint)GetProp((int)Client.BoxProp.OwnerHigh); uint owernId = (owernIdHigh << 16) | owernIdLow; if (ownerType == GameCmd.SceneItemOwnerType.SceneItemOwnerType_Null) { return(true); } else if (ownerType == GameCmd.SceneItemOwnerType.SceneItemOwnerType_User) { return(owernId == (int)EntitySystem.m_ClientGlobal.MainPlayer.GetID()); } else if (ownerType == GameCmd.SceneItemOwnerType.SceneItemOwnerType_Clan) { Client.IControllerSystem cs = EntitySystem.m_ClientGlobal.GetControllerSystem(); if (cs != null) { Client.IControllerHelper controllerhelper = cs.GetControllerHelper(); if (controllerhelper != null) { return(owernId == controllerhelper.GetMainPlayerClanId()); } } } else if (ownerType == GameCmd.SceneItemOwnerType.SceneItemOwnerType_Team) { Client.IControllerSystem cs = EntitySystem.m_ClientGlobal.GetControllerSystem(); if (cs != null) { return(cs.GetControllerHelper().IsTeamerCanPick((uint)owernId)); } } return(false); }