public Player(PlayerInput input, IManager manager, byte clientId, Coordinate curPoint, Coordinate halfDefault) { this._input = input; this._clientId = clientId; this._manager = manager; this._match = manager.Match; this._propCore = new PropertyCore(this); this._status = new PlayerStatus(this, curPoint, halfDefault); this._report = new PlayerReport(input, clientId); _report.ClientId = clientId; _report.Position = input.Position; _report.Name = input.FamilyName; #region ISkill this.boostCore = new BoostCore(this._match); this.buffCore = new BuffCore(this._match); this.specBuffCoe = new SpecBuffCore(); #endregion #region Buff int last = _match.RoundPerMinute * 90; int point = 0; int percent = 0; if (null != input.PropList) { foreach (var item in input.PropList) { if (null == item.BuffId) { continue; } point = (int)(item.Point * 100); percent = (int)(item.Percent * 10000); this.AddBuff(_manager.CreatePropBuff(last, point, percent, item.BuffId)); } } if (null != input.BoostList) { foreach (var item in input.BoostList) { if (null == item.BuffId) { continue; } point = (int)(item.Point * 100); percent = (int)(item.Percent * 10000); this.AddBoost(_manager.CreateBoostBuff(item.BoostType, last, point, percent, item.BuffId)); } } #endregion }
/// <summary> /// /// </summary> /// <param name="propertyCore"></param> protected void SetPropertyInstance(PropertyCore propertyCore) { int index = Array.IndexOf(Properties, propertyCore.PropertyId); PropertyInstances[index] = propertyCore; }
/// <summary> /// /// </summary> /// <returns></returns> public virtual string GetMarkup(PropertyCore property) { return(GetMarkup(property.PropertyId)); }
/// <summary> /// /// </summary> /// <returns></returns> public virtual string GetJson(PropertyCore property) { return(GetJson(property.PropertyId)); }
/// <summary> /// /// </summary> /// <returns></returns> public virtual string GetProtocolBuffer(PropertyCore property) { return(GetProtocolBuffer(property.PropertyId)); }