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); }
public virtual bool GetActorServerSkillData(ref ActorMeta actorMeta, ActorSkillSlot skillSlot, ref ActorServerSkillData skillData) { return(false); }
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)))); }