public IEnumerator OnNetMsg_NotifySkillModelBufCoroutine(GSToGC.BuffEffect pMsg) { //解析消息 yield return(1); //创建特效 UInt64 skillowner; skillowner = pMsg.guid; UInt64 skilltarget; skilltarget = pMsg.targuid; float rTime = pMsg.time / 1000.0f; Ientity target = null; EntityManager.AllEntitys.TryGetValue(skilltarget, out target); if (0 == pMsg.state) { HolyTech.Skill.BuffManager.Instance.AddBuff(pMsg.uniqueid, pMsg.effectid, rTime, target); Ientity entity = null; EntityManager.AllEntitys.TryGetValue(skilltarget, out entity); HolyTech.Effect.EffectManager.Instance.CreateBuffEffect(entity, pMsg.effectid, pMsg.uniqueid); //ToReview uniqueid是否就是instid } else if (1 == pMsg.state) { HolyTech.Skill.BuffManager.Instance.RemoveBuff(pMsg.uniqueid); HolyTech.Effect.EffectManager.Instance.DestroyEffect(pMsg.uniqueid); } }
//位置已调 IEnumerator OnNetMsg_NotifySkillModelBufCoroutine(GSToGC.BuffEffect pMsg) { yield return(1); //创建特效 UInt64 skillowner = pMsg.guid; UInt64 skilltarget = pMsg.targuid; float rTime = pMsg.time / 1000.0f; Player target = null; PlayersManager.Instance.PlayerDic.TryGetValue(skilltarget, out target); if (0 == pMsg.state) { // HolyTech.Skill.BuffManager.Instance.AddBuff(pMsg.uniqueid, pMsg.effectid, rTime, target); Player entity = null; PlayersManager.Instance.PlayerDic.TryGetValue(skilltarget, out entity); EffectManager.Instance.CreateBuffEffect(entity, pMsg.effectid, pMsg.uniqueid); } else if (1 == pMsg.state) { Thanos.Skill.BuffManager.Instance.RemoveBuff(pMsg.uniqueid); Thanos.Effect.EffectManager.Instance.DestroyEffect(pMsg.uniqueid); } }
/////////////////////消息处理/////////////////////// public int OnNotifySkillModelBufEffect(GSToGC.BuffEffect pMsg) { StartCoroutine(OnNetMsg_NotifySkillModelBufCoroutine(pMsg)); return((Int32)ErrorCodeEnum.Normal); }
public Int32 OnNotifySkillModelBuf(GSToGC.BuffEffect pMsg) { StartCoroutine(OnNetMsg_NotifySkillModelBufCoroutine(pMsg)); return((Int32)EErrorCode.eNormal); }