/// <summary> /// GitPacket packet /// </summary> /// <param name="packet"></param> public void Git(GitPacket packet) { MapButton button = Session.CurrentMapInstance.Buttons.FirstOrDefault(s => s.MapButtonId == packet.ButtonId); if (button != null) { Session.CurrentMapInstance.Broadcast(button.GenerateOut()); button.RunAction(); Session.CurrentMapInstance.Broadcast(button.GenerateIn()); } }
private void ExecuteHandler(ClientSession session) { MapButton button = session.CurrentMapInstance.Buttons.Find(s => s.MapButtonId == ButtonId); if (button != null) { session.CurrentMapInstance.Broadcast(StaticPacketHelper.Out(UserType.Object, button.MapButtonId)); button.RunAction(); session.CurrentMapInstance.Broadcast(button.GenerateIn()); } }