12345678910111213141516171819202122232425262728293031 |
- using FL.Data;
- using XGame.Database;
- using XGame.Framework.Network;
- namespace FL.Network
- {
- public class ActEpsAllEpsPushCtrl : MsgController<ActEpsAllEpsPush>
- {
- protected override void OnProcess(ActEpsAllEpsPush message, object context)
- {
- if (message.power > 0) PlayerData.Instance.Power = message.power;
- if (message.allEps != null)
- {
- var attr = PlayerData.Instance.Attr;
- // 全属性
- foreach (var item in message.allEps)
- {
- attr.SetValue((EAttributeType)item.epid, item.val);
- //XGame.Log.Warn($"当前角色属性名称:{(EAttributeType)item.epid},属性值:{item.val}");
- }
- //TODO 先临时复制血量上限值
- //attr.Hp = 10000;
- //attr.HpLimit = attr.Hp;
- attr.MoveSpeed = 5;
- //attr.Attack = 15;
- EventSingle.Instance.Notify(EventDefine.AttributeChange); // 角色属性变化
- }
- }
- }
- }
|