private void OnBuff(object sender, BuffResponse message) { Debug.LogFormat("OnBuff:count:{0}", message.Buffs.Count); foreach (var buff in message.Buffs) { Debug.LogFormat("Buff:{0} : {1} [{2}]", buff.buffId, buff.buffType, buff.Action); Creature owner = EntityManager.Instance.GetEntity(buff.ownerId) as Creature; if (owner != null) { owner.DoBuffAction(buff); } } }
public async Task <ActionResult> GetBuff(string name) { try { BuffResponse buff = await operatorServcie.GetOperatorBuff(name); return(Ok(buff)); } catch (Exception e) { return(BadRequest(e.Message)); } }