/// <summary> /// 技能cd改变 /// </summary> /// <param name="beastId"></param> /// <param name="skillId"></param> /// <param name="value"></param> /// <param name="msg"></param> public void OnCDChange(long beastId, int skillId, byte value, CPtcM2CNtf_CDChanged msg) { int type = skillId >> 16; int cdValue = (int)value; ECoolDownType eCoolDownType = (ECoolDownType)type; Beast beast = this.GetBeastById(beastId); if (beast != null) { switch (eCoolDownType) { case ECoolDownType.COOL_DOWN_SKILL: cdValue = beast.SkillManager.GetSkillCD(skillId); Singleton <BeastManager> .singleton.OnBeastSkillCDChange(beastId, skillId, (int)value); break; case ECoolDownType.COOL_DOWN_EQUIP: break; } if (!beast.IsDead) { if (Singleton <SequenceShowManager> .singleton.CanRecevieMsg) { Singleton <SequenceShowManager> .singleton.OnMsg(msg, cdValue); } } } }
public override void Process() { int skillId = this.m_dwID; int type = this.m_dwID >> 16;//10000末尾4位随便填有(skill),100000末尾4位随便填有(equip) ECoolDownType eCoolDownType = (ECoolDownType)type; XLog.Log.Debug(string.Concat(new object[] { "Rec CPtcG2CNtf_CDBegin", eCoolDownType.ToString(), "id:", skillId, " CD:", this.m_btValue.ToString() })); Beast beast = Singleton <BeastManager> .singleton.GetBeastById(this.m_dwRoleID); byte preCDTime = 0; switch (eCoolDownType) { case ECoolDownType.COOL_DOWN_SKILL: if (beast != null) { preCDTime = beast.GetSkillById(skillId).CDTime; } Singleton <BeastManager> .singleton.OnBeastSkillCDChange(this.m_dwRoleID, skillId, this.m_btValue); break; case ECoolDownType.COOL_DOWN_EQUIP: if (beast != null) { //暂时不做 } break; } }