public void ProcessPacket(IPacket packet) { FLLog.Info("Server", "Got packet of type " + packet.GetType()); switch (packet) { case CharacterListActionPacket c: ListAction(c); break; case LaunchPacket l: Launch(); break; case EnterLocationPacket lc: msnRuntime?.EnterLocation(lc.Room, lc.Base); break; case PositionUpdatePacket p: World.PositionUpdate(this, p.Position, p.Orientation); break; case RTCCompletePacket cp: RemoveRTC(cp.RTC); break; case LineSpokenPacket lp: msnRuntime?.LineFinished(lp.Hash); break; } }
public void ProcessPacket(IPacket packet) { try { switch (packet) { case CharacterListActionPacket c: ListAction(c); break; case LaunchPacket l: Launch(); break; case EnterLocationPacket lc: msnRuntime?.EnterLocation(lc.Room, lc.Base); break; case PositionUpdatePacket p: //TODO: Error handling World?.PositionUpdate(this, p.Position, p.Orientation); break; case RTCCompletePacket cp: RemoveRTC(cp.RTC); break; case LineSpokenPacket lp: msnRuntime?.LineFinished(lp.Hash); break; case ConsoleCommandPacket cmd: HandleConsoleCommand(cmd.Command); break; } } catch (Exception e) { FLLog.Exception("Player", e); throw; } }
void IServerPlayer.LineSpoken(uint hash) { msnRuntime?.LineFinished(hash); }