protected override void OnSendStart() { if (Singleton <PvpManager> .Instance.IsInPvp && base.unit.isPlayer && PvpServerStartSkillHeroList.IsStartByServer(base.unit.npc_id)) { return; } ReadySkillInfo readySkillInfo = new ReadySkillInfo(); readySkillInfo.unitId = base.unit.unique_id; readySkillInfo.skillId = this.skillKey.SkillID; Vector3?targetPosition = this.targetPosition; if (targetPosition.HasValue) { readySkillInfo.targetPosition = MoveController.Vector3ToSVector3(this.targetPosition.Value); } List <short> list = null; if (this.targetUnits != null) { list = new List <short>(); for (int i = 0; i < this.targetUnits.Count; i++) { list.Add((short)this.targetUnits[i].unique_id); } } readySkillInfo.targetUnits = list; PvpEvent.SendReadySkillEvent(readySkillInfo); }
public static void SendReadySkillEvent(ReadySkillInfo info) { byte[] args = SerializeHelper.Serialize <ReadySkillInfo>(info); SendMsgManager.Instance.SendPvpMsg(PvpCode.C2P_ReadySkill, args); }