From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/XRoleAttributes.cs | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XRoleAttributes.cs (limited to 'Client/Assets/Scripts/XMainClient/XRoleAttributes.cs') diff --git a/Client/Assets/Scripts/XMainClient/XRoleAttributes.cs b/Client/Assets/Scripts/XMainClient/XRoleAttributes.cs new file mode 100644 index 00000000..7327a8b0 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XRoleAttributes.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using KKSG; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XRoleAttributes : XAttributes + { + public override uint ID + { + get + { + return XRoleAttributes.uuID; + } + } + + public RoleType Profession + { + get + { + return this._profession; + } + set + { + this._profession = value; + bool flag = XAttributes.IsPlayer(base.RoleID); + if (flag) + { + XFileLog.RoleProf = XFastEnumIntEqualityComparer.ToInt(this._profession); + } + } + } + + public string GuildName { get; set; } + + public ulong GuildID { get; set; } + + public uint DesignationID { get; set; } + + public string SpecialDesignation { get; set; } + + public List PrerogativeSetID { get; set; } + + public uint PrerogativeScore { get; set; } + + public uint MilitaryRank { get; set; } + + public uint GuildPortrait { get; set; } + + public override uint TypeID + { + get + { + return (uint)XFastEnumIntEqualityComparer.ToInt(this.Profession); + } + } + + public override uint BasicTypeID + { + get + { + return this.TypeID % 10u; + } + } + + public override uint Tag + { + get + { + return EntityMask.Role; + } + } + + public bool IsLocalFake + { + get + { + return this._isLocalFake; + } + set + { + this._isLocalFake = value; + } + } + + public new static readonly uint uuID = XSingleton.singleton.XHash("Role_Attributes"); + + private RoleType _profession = RoleType.Role_INVALID; + + private bool _isLocalFake = false; + + public XRoleAttributes() + { + this._battle_Statistics = default(XBattleStatistics); + } + + public override bool IsBindedSkill(uint id) + { + for (int i = 0; i < this.skillSlot.Length; i++) + { + bool flag = this.skillSlot[i] == id; + if (flag) + { + return true; + } + } + return false; + } + + public override void InitAttribute(KKSG.Attribute attr) + { + this.SkillLevelInfo.SetDefaultLevel(0u); + base.InitAttribute(attr); + } + } +} -- cgit v1.1-26-g67d0