public void OnChangeStatus(Actor sActor, MapEventArgs args) { Map.StatusArgs arg = (Map.StatusArgs)args; switch (arg.type) { case Map.StatusArgs.EventType.Add: foreach (Map.StatusArgs.StatusInfo i in arg.StatusList) { Packets.Server.ExchangeAddition p1 = new SagaMap.Packets.Server.ExchangeAddition(); p1.SetID(sActor.id); Skill info = SkillFactory.GetSkill(i.SkillID); if (info != null) { p1.SetStatusID(info.addition); } else { p1.SetStatusID(i.SkillID); } p1.SetTime(i.time); this.C.netIO.SendPacket(p1, C.SessionID); } break; case Map.StatusArgs.EventType.Remove: foreach (Map.StatusArgs.StatusInfo i in arg.StatusList) { Packets.Server.DeleteExchangeAddition p1 = new SagaMap.Packets.Server.DeleteExchangeAddition(); p1.SetID(sActor.id); Skill info = SkillFactory.GetSkill(i.SkillID); if (info != null) { p1.SetStatusID(info.addition); } else { p1.SetStatusID(i.SkillID); } this.C.netIO.SendPacket(p1, C.SessionID); } break; } }
public void OnChangeStatus(Actor sActor, MapEventArgs args) { Map.StatusArgs arg = (Map.StatusArgs)args; switch (arg.type) { case Map.StatusArgs.EventType.Add: foreach (Map.StatusArgs.StatusInfo i in arg.StatusList) { Packets.Server.ExchangeAddition p1 = new SagaMap.Packets.Server.ExchangeAddition(); p1.SetID(sActor.id); Skill info = SkillFactory.GetSkill(i.SkillID); if (info != null) p1.SetStatusID(info.addition); else p1.SetStatusID(i.SkillID); p1.SetTime(i.time); this.C.netIO.SendPacket(p1, C.SessionID); } break; case Map.StatusArgs.EventType.Remove : foreach (Map.StatusArgs.StatusInfo i in arg.StatusList) { Packets.Server.DeleteExchangeAddition p1 = new SagaMap.Packets.Server.DeleteExchangeAddition(); p1.SetID(sActor.id); Skill info = SkillFactory.GetSkill(i.SkillID); if (info != null) p1.SetStatusID(info.addition); else p1.SetStatusID(i.SkillID); this.C.netIO.SendPacket(p1, C.SessionID); } break; } }