Exemplo n.º 1
0
 internal bool ConvertServerHeroSkillInfo(ref ActorServerSkillData serverData, ActorSkillSlot skillSlot, COMDT_CHOICEHERO serverHeroInfo)
 {
     if (skillSlot >= ActorSkillSlot.SlotMaxCount)
     {
         return(false);
     }
     serverData.SkillSlot  = skillSlot;
     serverData.IsUnlocked = (serverHeroInfo.stBaseInfo.stCommonInfo.stSkill.astSkillInfo[(int)((UIntPtr)skillSlot)].bUnlocked != 0);
     serverData.SkillLevel = (uint)serverHeroInfo.stBaseInfo.stCommonInfo.stSkill.astSkillInfo[(int)((UIntPtr)skillSlot)].wLevel;
     return(true);
 }
Exemplo n.º 2
0
 public virtual bool GetActorServerSkillData(ref ActorMeta actorMeta, ActorSkillSlot skillSlot, ref ActorServerSkillData skillData)
 {
     return(false);
 }
Exemplo n.º 3
0
        public override bool GetActorServerSkillData(ref ActorMeta actorMeta, ActorSkillSlot skillSlot, ref ActorServerSkillData skillData)
        {
            skillData.TheActorMeta = actorMeta;
            ListView <COMDT_CHOICEHERO> inSearchList = null;

            if (!this._serverCachedInfo.TryGetValue(actorMeta.PlayerId, ref inSearchList))
            {
                return(false);
            }
            int configId = actorMeta.ConfigId;

            return(this.ConvertServerHeroSkillInfo(ref skillData, skillSlot, this.Find(inSearchList, (COMDT_CHOICEHERO hero) => (ulong)hero.stBaseInfo.stCommonInfo.dwHeroID == (ulong)((long)configId))));
        }