Exemplo n.º 1
0
        public Sprite GetPSprite(PHIPart part)
        {
            Sprite ret          = null;
            var    tempHeadIcon = GetHeadIcon();

            if (tempHeadIcon.ContainsKey(part))
            {
                //获得原始Key
                string temp = tempHeadIcon[part];
                if (temp.IsInv())
                {
                    return(null);
                }
                //身份(职业)加工(自定义处理)身份加工
                string sourcePartKey = OnProcessIdentity(part, temp);
                string addPartKey    = sourcePartKey;
                //隐藏设置
                if (OnProcessHide(part))
                {
                    return(null);
                }
                //加工年龄
                addPartKey = OnProcessAge(part, addPartKey);
                //获得图片
                ret = GRMgr.Head.Get(addPartKey, false);
                if (ret == null)
                {
                    ret = GRMgr.Head.Get(sourcePartKey, true);
                }
                //记录ID
                if (ret != null)
                {
                    if (LastPartIDs.ContainsKey(part))
                    {
                        LastPartIDs[part] = sourcePartKey;
                    }
                    else
                    {
                        LastPartIDs.Add(part, sourcePartKey);
                    }
                }
                else
                {
                    LastPartIDs.Remove(part);
                }

                return(ret);
            }
            else
            {
                throw new NotImplementedException("没有这个部分:" + part.ToString());
            }
        }
Exemplo n.º 2
0
 public virtual bool IsRopeHelmet()
 {
     if (NameData == null)
     {
         return(false);
     }
     if (!LastPartIDs.ContainsKey(PHIPart.PHelmet))
     {
         return(false);
     }
     if (NameData.GetInfo(Gender).IsRope(LastPartIDs[PHIPart.PHelmet]))
     {
         return(true);
     }
     return(false);
 }