public static void Read(Nettention.Proud.Message msg, out Vector3Array posArray) { int count = 0; msg.Read(out count); if (count > 0) { UnityEngine.Vector3[] posData = new UnityEngine.Vector3[count]; for (int i = 0; i < count; i++) { UnityEngine.Vector3 data = new UnityEngine.Vector3(); msg.Read(out data.x); msg.Read(out data.y); msg.Read(out data.z); posData[i] = data; } posArray = new Vector3Array(posData); } else { posArray = new Vector3Array(); } }
public static void Read(Nettention.Proud.Message msg, out Vector3 b) { b = new Vector3(); msg.Read(out b.x); msg.Read(out b.y); msg.Read(out b.z); }
public static void Read(Nettention.Proud.Message msg, out SportGameResult data) { data = new SportGameResult(); byte wintype; msg.Read(out wintype); data.WinType = (WinType)wintype; byte length; msg.Read(out length); data.Winner = new Nettention.Proud.HostID[length]; while (length > 0) { msg.Read(out data.Winner[length - 1]); length--; } msg.Read(out data.Score); msg.Read(out data.RewardMoney); }
public static void Read(Nettention.Proud.Message msg, out UnityEngine.Vector3 pos) { pos = new UnityEngine.Vector3(); msg.Read(out pos.x); msg.Read(out pos.y); msg.Read(out pos.z); }
public static void Read(Nettention.Proud.Message msg, out CardBag data) { data = new CardBag(); msg.Read(out data.C_Card); msg.Read(out data.G_Card); msg.Read(out data.P_Card); }
public static void Read(Nettention.Proud.Message msg, out List <ClientInfo> clients) { int count = 0; clients = new List <ClientInfo>(); msg.Read(out count); if (count > 0) { for (int i = 0; i < count; i++) { ClientInfo data = new ClientInfo(); byte state; msg.Read(out state); data.State = (CHAR_STAT)state; msg.Read(out data.UniqID); msg.Read(out data.Name); msg.Read(out data.CharacterIndex); msg.Read(out data.locaIndex); msg.Read(out data.RemoteID); msg.Read(out data.IsJoin); clients.Add(data); } } }
public override bool ProcessReceivedMessage(Nettention.Proud.ReceivedMessage pa, Object hostTag) { Nettention.Proud.HostID remote = pa.RemoteHostID; if (remote == Nettention.Proud.HostID.HostID_None) { ShowUnknownHostIDWarning(remote); } Nettention.Proud.Message __msg = pa.ReadOnlyMessage; int orgReadOffset = __msg.ReadOffset; Nettention.Proud.RmiID __rmiID = Nettention.Proud.RmiID.RmiID_None; if (!__msg.Read(out __rmiID)) { goto __fail; } switch (__rmiID) { case Common.ScribblePoint: ProcessReceivedMessage_ScribblePoint(__msg, pa, hostTag, remote); break; default: goto __fail; } return(true); __fail: { __msg.ReadOffset = orgReadOffset; return(false); } }
public static void Read(Nettention.Proud.Message msg, out CardData b) { b = new CardData(); msg.Read(out b.number); msg.Read(out b.name); msg.Read(out b.mana); msg.Read(out b.attack); msg.Read(out b.speed); msg.Read(out b.a_type); msg.Read(out b.effect); msg.Read(out b.picture); msg.Read(out b.health); }
public static void Read(Nettention.Proud.Message msg, out List <ShipReservate> infos) { int count = 0; infos = new List <ShipReservate>(); msg.Read(out count); if (count > 0) { for (int i = 0; i < count; i++) { ShipReservate data = new ShipReservate(); msg.Read(out data.RemoteID); msg.Read(out data.UID); msg.Read(out data.NickName); msg.Read(out data.CharIndex); msg.Read(out data.LocalIndex); msg.Read(out data.Connected); infos.Add(data); } } }
public static void Read(Nettention.Proud.Message msg, out ShipObjectArray objArray) { int count = 0; msg.Read(out count); if (count > 0) { ShipObject[] worldData = new ShipObject[count]; for (int i = 0; i < count; i++) { ShipObject data = new ShipObject(); msg.Read(out data.Owner); msg.Read(out data.LocalID); msg.Read(out data.Position.x); msg.Read(out data.Position.y); msg.Read(out data.Position.z); msg.Read(out data.resIndex); worldData[i] = data; } objArray = new ShipObjectArray(worldData); } else { objArray = new ShipObjectArray(); } }
public static void Read(Nettention.Proud.Message msg, out List <ScoreMiniBoard> data) { data = new List <ScoreMiniBoard>(); int count; msg.Read(out count); int index = 0; while (index < count) { ScoreMiniBoard miniboard = new ScoreMiniBoard(); msg.Read(out miniboard.OwnerIndex); msg.Read(out miniboard.C_Card); msg.Read(out miniboard.G_Card); msg.Read(out miniboard.P_Card); msg.Read(out miniboard.Life); msg.Read(out miniboard.PlayMoney); data.Add(miniboard); index++; } }
public static void Read(Nettention.Proud.Message msg, out List <byte> data) { data = new List <byte>(); int count; msg.Read(out count); int index = 0; byte temp; while (index < count) { msg.Read(out temp); data.Add(temp); index++; } }
public override bool ProcessReceivedMessage(Nettention.Proud.ReceivedMessage pa, Object hostTag) { Nettention.Proud.HostID remote = pa.RemoteHostID; if (remote == Nettention.Proud.HostID.HostID_None) { ShowUnknownHostIDWarning(remote); } Nettention.Proud.Message __msg = pa.ReadOnlyMessage; int orgReadOffset = __msg.ReadOffset; Nettention.Proud.RmiID __rmiID = Nettention.Proud.RmiID.RmiID_None; if (!__msg.Read(out __rmiID)) { goto __fail; } switch (__rmiID) { case Common.ReplyLogon: ProcessReceivedMessage_ReplyLogon(__msg, pa, hostTag, remote); break; case Common.ReplyEnterGame: ProcessReceivedMessage_ReplyEnterGame(__msg, pa, hostTag, remote); break; case Common.NotifyAddTree: ProcessReceivedMessage_NotifyAddTree(__msg, pa, hostTag, remote); break; case Common.NotifyRemoveTree: ProcessReceivedMessage_NotifyRemoveTree(__msg, pa, hostTag, remote); break; case Common.NotifyPlayerJoin: ProcessReceivedMessage_NotifyPlayerJoin(__msg, pa, hostTag, remote); break; case Common.NotifyPlayerLeave: ProcessReceivedMessage_NotifyPlayerLeave(__msg, pa, hostTag, remote); break; default: goto __fail; } return(true); __fail: { __msg.ReadOffset = orgReadOffset; return(false); } }
public static void Read(Nettention.Proud.Message msg, out BattleInvition data) { data = new BattleInvition(); msg.Read(out data.BattleIndex); msg.Read(out data.SenderRemoteID); msg.Read(out data.ReceiverRemoteID); msg.Read(out data.SenderPlayer); msg.Read(out data.ReceiverPlayer); msg.Read(out data.SenderIndex); msg.Read(out data.ReceiverIndex); }
public static void Read(Nettention.Proud.Message msg, out Nettention.Proud.FastArray <long> data) { int count = 0; msg.Read(out count); if (count > 0) { long[] datavalue = new long[count]; for (int i = 0; i < count; i++) { msg.Read(out datavalue[i]); } data = new Nettention.Proud.FastArray <long>(); data.AddRange(datavalue); } else { data = new Nettention.Proud.FastArray <long>(); } }
public static void Read(Nettention.Proud.Message msg, out AuctionContent data) { data = new AuctionContent(); msg.Read(out data.index); msg.Read(out data.Seller); msg.Read(out data.itemType); msg.Read(out data.PriceType); msg.Read(out data.Price); msg.Read(out data.Count); }
public static void Read(Nettention.Proud.Message msg, out CardInfo_send b) { b = new CardInfo_send(); msg.Read(out b.number); msg.Read(out b.cooltime); msg.Read(out b.leftcooltime); //msg.Read(out b.cardLocation); msg.Read(out b.FieldLocation); msg.Read(out b.health); msg.Read(out b.isReturn); msg.Read(out b.isEnemyCard); //msg.Read(out b.attackType); //msg.Read(out b.maxHp); //msg.Read(out b.presentHp); }
public static void Read(Nettention.Proud.Message msg, out List <AuctionContent> data) { int count = 0; msg.Read(out count); data = new List <AuctionContent>(); for (int i = 0; i < count; i++) { AuctionContent datavalue = new AuctionContent(); msg.Read(out datavalue.index); msg.Read(out datavalue.Seller); msg.Read(out datavalue.itemType); msg.Read(out datavalue.PriceType); msg.Read(out datavalue.Price); msg.Read(out datavalue.Count); data.Add(datavalue); } }
public static void Read(Nettention.Proud.Message msg, out ScoreMiniBoard data) { data = new ScoreMiniBoard(); msg.Read(out data.OwnerIndex); if (data.OwnerIndex > 99) { data = null; return; } msg.Read(out data.C_Card); msg.Read(out data.G_Card); msg.Read(out data.P_Card); msg.Read(out data.Life); msg.Read(out data.PlayMoney); }
public static void Read(Nettention.Proud.Message msg, out Ship playShip) { playShip = null; bool nullCheck; msg.Read(out nullCheck); if (nullCheck) { playShip = new Ship(); msg.Read(out playShip.P2PGroupID); msg.Read(out playShip.ShipIndex); byte state; msg.Read(out state); playShip.State = (ShipState)state; msg.Read(out playShip.StartTimeMs); msg.Read(out playShip.TimeInex); } }
public override bool ProcessReceivedMessage(Nettention.Proud.ReceivedMessage pa, Object hostTag) { Nettention.Proud.HostID remote = pa.RemoteHostID; if (remote == Nettention.Proud.HostID.HostID_None) { ShowUnknownHostIDWarning(remote); } Nettention.Proud.Message __msg = pa.ReadOnlyMessage; int orgReadOffset = __msg.ReadOffset; Nettention.Proud.RmiID __rmiID = Nettention.Proud.RmiID.RmiID_None; if (!__msg.Read(out __rmiID)) { goto __fail; } switch (__rmiID) { case Common.ReplyLogon: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; int clientID; CardClient.CardMarshaler.Read(__msg, out clientID); core.PostCheckReadMessage(__msg, RmiName_ReplyLogon); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += clientID.ToString() + ","; NotifyCallFromStub(Common.ReplyLogon, RmiName_ReplyLogon, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.ReplyLogon; summary.rmiName = RmiName_ReplyLogon; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = ReplyLogon(remote, ctx, clientID); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_ReplyLogon); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.ReplyLogon; summary.rmiName = RmiName_ReplyLogon; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.ReplyClientCount: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; int clientCount; CardClient.CardMarshaler.Read(__msg, out clientCount); core.PostCheckReadMessage(__msg, RmiName_ReplyClientCount); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += clientCount.ToString() + ","; NotifyCallFromStub(Common.ReplyClientCount, RmiName_ReplyClientCount, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.ReplyClientCount; summary.rmiName = RmiName_ReplyClientCount; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = ReplyClientCount(remote, ctx, clientCount); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_ReplyClientCount); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.ReplyClientCount; summary.rmiName = RmiName_ReplyClientCount; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.MachingComplete: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; core.PostCheckReadMessage(__msg, RmiName_MachingComplete); if (enableNotifyCallFromStub == true) { string parameterString = ""; NotifyCallFromStub(Common.MachingComplete, RmiName_MachingComplete, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.MachingComplete; summary.rmiName = RmiName_MachingComplete; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = MachingComplete(remote, ctx); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_MachingComplete); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.MachingComplete; summary.rmiName = RmiName_MachingComplete; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.SendCardData: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; CardData cardData; CardClient.CardMarshaler.Read(__msg, out cardData); core.PostCheckReadMessage(__msg, RmiName_SendCardData); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += cardData.ToString() + ","; NotifyCallFromStub(Common.SendCardData, RmiName_SendCardData, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.SendCardData; summary.rmiName = RmiName_SendCardData; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = SendCardData(remote, ctx, cardData); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_SendCardData); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.SendCardData; summary.rmiName = RmiName_SendCardData; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; default: goto __fail; } return(true); __fail: { __msg.ReadOffset = orgReadOffset; return(false); } }
public override bool ProcessReceivedMessage(Nettention.Proud.ReceivedMessage pa, Object hostTag) { Nettention.Proud.HostID remote = pa.RemoteHostID; if (remote == Nettention.Proud.HostID.HostID_None) { ShowUnknownHostIDWarning(remote); } Nettention.Proud.Message __msg = pa.ReadOnlyMessage; int orgReadOffset = __msg.ReadOffset; Nettention.Proud.RmiID __rmiID = Nettention.Proud.RmiID.RmiID_None; if (!__msg.Read(out __rmiID)) { goto __fail; } switch (__rmiID) { case Common.Snapshot: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; nan2.module.TeamModule.Snapshot snapshot; nan2.ProudMarshaler.Read(__msg, out snapshot); core.PostCheckReadMessage(__msg, RmiName_Snapshot); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += snapshot.ToString() + ","; NotifyCallFromStub(Common.Snapshot, RmiName_Snapshot, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.Snapshot; summary.rmiName = RmiName_Snapshot; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = Snapshot(remote, ctx, snapshot); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_Snapshot); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.Snapshot; summary.rmiName = RmiName_Snapshot; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.TeamJoined: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; Nettention.Proud.HostID player_id; nan2.ProudMarshaler.Read(__msg, out player_id); int team; nan2.ProudMarshaler.Read(__msg, out team); core.PostCheckReadMessage(__msg, RmiName_TeamJoined); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += player_id.ToString() + ","; parameterString += team.ToString() + ","; NotifyCallFromStub(Common.TeamJoined, RmiName_TeamJoined, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.TeamJoined; summary.rmiName = RmiName_TeamJoined; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = TeamJoined(remote, ctx, player_id, team); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_TeamJoined); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.TeamJoined; summary.rmiName = RmiName_TeamJoined; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.TeamLeft: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; Nettention.Proud.HostID player_id; nan2.ProudMarshaler.Read(__msg, out player_id); int team; nan2.ProudMarshaler.Read(__msg, out team); core.PostCheckReadMessage(__msg, RmiName_TeamLeft); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += player_id.ToString() + ","; parameterString += team.ToString() + ","; NotifyCallFromStub(Common.TeamLeft, RmiName_TeamLeft, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.TeamLeft; summary.rmiName = RmiName_TeamLeft; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = TeamLeft(remote, ctx, player_id, team); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_TeamLeft); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.TeamLeft; summary.rmiName = RmiName_TeamLeft; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.Scored: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; int team; nan2.ProudMarshaler.Read(__msg, out team); int score; nan2.ProudMarshaler.Read(__msg, out score); core.PostCheckReadMessage(__msg, RmiName_Scored); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += team.ToString() + ","; parameterString += score.ToString() + ","; NotifyCallFromStub(Common.Scored, RmiName_Scored, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.Scored; summary.rmiName = RmiName_Scored; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = Scored(remote, ctx, team, score); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_Scored); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.Scored; summary.rmiName = RmiName_Scored; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; default: goto __fail; } return(true); __fail: { __msg.ReadOffset = orgReadOffset; return(false); } }
public override bool ProcessReceivedMessage(Nettention.Proud.ReceivedMessage pa, Object hostTag) { Nettention.Proud.HostID remote = pa.RemoteHostID; if (remote == Nettention.Proud.HostID.HostID_None) { ShowUnknownHostIDWarning(remote); } Nettention.Proud.Message __msg = pa.ReadOnlyMessage; int orgReadOffset = __msg.ReadOffset; Nettention.Proud.RmiID __rmiID = Nettention.Proud.RmiID.RmiID_None; if (!__msg.Read(out __rmiID)) { goto __fail; } switch (__rmiID) { case Common.RequestLogon: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; String villeName; SngClient.Marshaler.Read(__msg, out villeName); bool isNewVille; SngClient.Marshaler.Read(__msg, out isNewVille); core.PostCheckReadMessage(__msg, RmiName_RequestLogon); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += villeName.ToString() + ","; parameterString += isNewVille.ToString() + ","; NotifyCallFromStub(Common.RequestLogon, RmiName_RequestLogon, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.RequestLogon; summary.rmiName = RmiName_RequestLogon; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = RequestLogon(remote, ctx, villeName, isNewVille); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_RequestLogon); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.RequestLogon; summary.rmiName = RmiName_RequestLogon; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.RequestAddTree: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; UnityEngine.Vector3 position; SngClient.Marshaler.Read(__msg, out position); core.PostCheckReadMessage(__msg, RmiName_RequestAddTree); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += position.ToString() + ","; NotifyCallFromStub(Common.RequestAddTree, RmiName_RequestAddTree, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.RequestAddTree; summary.rmiName = RmiName_RequestAddTree; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = RequestAddTree(remote, ctx, position); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_RequestAddTree); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.RequestAddTree; summary.rmiName = RmiName_RequestAddTree; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.RequestRemoveTree: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; int treeID; SngClient.Marshaler.Read(__msg, out treeID); core.PostCheckReadMessage(__msg, RmiName_RequestRemoveTree); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += treeID.ToString() + ","; NotifyCallFromStub(Common.RequestRemoveTree, RmiName_RequestRemoveTree, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.RequestRemoveTree; summary.rmiName = RmiName_RequestRemoveTree; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = RequestRemoveTree(remote, ctx, treeID); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_RequestRemoveTree); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.RequestRemoveTree; summary.rmiName = RmiName_RequestRemoveTree; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; default: goto __fail; } return(true); __fail: { __msg.ReadOffset = orgReadOffset; return(false); } }
public override bool ProcessReceivedMessage(Nettention.Proud.ReceivedMessage pa, Object hostTag) { Nettention.Proud.HostID remote = pa.RemoteHostID; if (remote == Nettention.Proud.HostID.HostID_None) { ShowUnknownHostIDWarning(remote); } Nettention.Proud.Message __msg = pa.ReadOnlyMessage; int orgReadOffset = __msg.ReadOffset; Nettention.Proud.RmiID __rmiID = Nettention.Proud.RmiID.RmiID_None; if (!__msg.Read(out __rmiID)) { goto __fail; } switch (__rmiID) { case Common.SettingOK: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; core.PostCheckReadMessage(__msg, RmiName_SettingOK); if (enableNotifyCallFromStub == true) { string parameterString = ""; NotifyCallFromStub(Common.SettingOK, RmiName_SettingOK, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.SettingOK; summary.rmiName = RmiName_SettingOK; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = SettingOK(remote, ctx); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_SettingOK); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.SettingOK; summary.rmiName = RmiName_SettingOK; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.CardInfo: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; CardInfo_send info; CardClient.Marshaler.Read(__msg, out info); core.PostCheckReadMessage(__msg, RmiName_CardInfo); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += info.ToString() + ","; NotifyCallFromStub(Common.CardInfo, RmiName_CardInfo, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.CardInfo; summary.rmiName = RmiName_CardInfo; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = CardInfo(remote, ctx, info); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_CardInfo); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.CardInfo; summary.rmiName = RmiName_CardInfo; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.ClearInfo: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; core.PostCheckReadMessage(__msg, RmiName_ClearInfo); if (enableNotifyCallFromStub == true) { string parameterString = ""; NotifyCallFromStub(Common.ClearInfo, RmiName_ClearInfo, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.ClearInfo; summary.rmiName = RmiName_ClearInfo; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = ClearInfo(remote, ctx); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_ClearInfo); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.ClearInfo; summary.rmiName = RmiName_ClearInfo; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.Init: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; int hostNum; CardClient.Marshaler.Read(__msg, out hostNum); core.PostCheckReadMessage(__msg, RmiName_Init); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += hostNum.ToString() + ","; NotifyCallFromStub(Common.Init, RmiName_Init, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.Init; summary.rmiName = RmiName_Init; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = Init(remote, ctx, hostNum); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_Init); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.Init; summary.rmiName = RmiName_Init; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.HandCardCount: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; int num; CardClient.Marshaler.Read(__msg, out num); core.PostCheckReadMessage(__msg, RmiName_HandCardCount); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += num.ToString() + ","; NotifyCallFromStub(Common.HandCardCount, RmiName_HandCardCount, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.HandCardCount; summary.rmiName = RmiName_HandCardCount; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = HandCardCount(remote, ctx, num); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_HandCardCount); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.HandCardCount; summary.rmiName = RmiName_HandCardCount; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.ReturnInfo: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; int fieldNum; CardClient.Marshaler.Read(__msg, out fieldNum); core.PostCheckReadMessage(__msg, RmiName_ReturnInfo); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += fieldNum.ToString() + ","; NotifyCallFromStub(Common.ReturnInfo, RmiName_ReturnInfo, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.ReturnInfo; summary.rmiName = RmiName_ReturnInfo; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = ReturnInfo(remote, ctx, fieldNum); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_ReturnInfo); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.ReturnInfo; summary.rmiName = RmiName_ReturnInfo; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.SummonInfo: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; CardInfo_send info; CardClient.Marshaler.Read(__msg, out info); core.PostCheckReadMessage(__msg, RmiName_SummonInfo); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += info.ToString() + ","; NotifyCallFromStub(Common.SummonInfo, RmiName_SummonInfo, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.SummonInfo; summary.rmiName = RmiName_SummonInfo; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = SummonInfo(remote, ctx, info); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_SummonInfo); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.SummonInfo; summary.rmiName = RmiName_SummonInfo; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.RandomInfo: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; bool ran1; CardClient.Marshaler.Read(__msg, out ran1); bool ran2; CardClient.Marshaler.Read(__msg, out ran2); bool ran3; CardClient.Marshaler.Read(__msg, out ran3); bool ran4; CardClient.Marshaler.Read(__msg, out ran4); bool ran5; CardClient.Marshaler.Read(__msg, out ran5); core.PostCheckReadMessage(__msg, RmiName_RandomInfo); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += ran1.ToString() + ","; parameterString += ran2.ToString() + ","; parameterString += ran3.ToString() + ","; parameterString += ran4.ToString() + ","; parameterString += ran5.ToString() + ","; NotifyCallFromStub(Common.RandomInfo, RmiName_RandomInfo, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.RandomInfo; summary.rmiName = RmiName_RandomInfo; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = RandomInfo(remote, ctx, ran1, ran2, ran3, ran4, ran5); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_RandomInfo); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.RandomInfo; summary.rmiName = RmiName_RandomInfo; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.InitInfo: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; int cardNum; CardClient.Marshaler.Read(__msg, out cardNum); core.PostCheckReadMessage(__msg, RmiName_InitInfo); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += cardNum.ToString() + ","; NotifyCallFromStub(Common.InitInfo, RmiName_InitInfo, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.InitInfo; summary.rmiName = RmiName_InitInfo; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = InitInfo(remote, ctx, cardNum); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_InitInfo); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.InitInfo; summary.rmiName = RmiName_InitInfo; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; default: goto __fail; } return(true); __fail: { __msg.ReadOffset = orgReadOffset; return(false); } }
public static void Read(Nettention.Proud.Message msg, out GeniusTake.Model.Player data) { data = new GeniusTake.Model.Player(); msg.Read(out data.RemoteID); msg.Read(out data.UID); msg.Read(out data.CharacterIndex); msg.Read(out data.Nickname); byte side; msg.Read(out side); data.Side = (GeniusTake.Model.SIDE)side; msg.Read(out data.IsReady); msg.Read(out data.IsDead); msg.Read(out data.Order); msg.Read(out data.Hp); msg.Read(out data.Power); msg.Read(out data.Speed); msg.Read(out data.MaxPower); msg.Read(out data.Pain); msg.Read(out data.Patience); int count; msg.Read(out count); while (count > 0) { long key; int containValue; msg.Read(out key); msg.Read(out containValue); data.AddDeckItem(key, containValue); count--; } }
public static void Read(Nettention.Proud.Message msg, out ClientInfo data) { bool nullCheck; msg.Read(out nullCheck); data = new ClientInfo(); if (nullCheck) { return; } byte state; msg.Read(out state); data.State = (CHAR_STAT)state; msg.Read(out data.UniqID); msg.Read(out data.Name); msg.Read(out data.locaIndex); msg.Read(out data.P2PGroupID); msg.Read(out data.RemoteID); msg.Read(out data.Money); msg.Read(out data.Cash); msg.Read(out data.Flower); msg.Read(out data.CharacterIndex); msg.Read(out data.IsJoin); msg.Read(out data.Rank); msg.Read(out data.Score); msg.Read(out data.SportsRank); msg.Read(out data.SportsScore); msg.Read(out data.DeckCount); msg.Read(out data.NextStage); int charCount; msg.Read(out charCount); data.PlayerCharacterList = new List <byte>(); data.LevelList = new List <byte>(); data.ExpList = new List <int>(); byte charindex; byte level; int exp; for (int j = 0; j < charCount; j++) { msg.Read(out charindex); data.PlayerCharacterList.Add(charindex); } for (int j = 0; j < charCount; j++) { msg.Read(out level); data.LevelList.Add(level); } for (int j = 0; j < charCount; j++) { msg.Read(out exp); data.ExpList.Add(exp); } int itemCount; msg.Read(out itemCount); data.ItemList = new List <Item>(); for (int j = 0; j < itemCount; j++) { Item hasItem = new Item(); msg.Read(out hasItem.UID); msg.Read(out hasItem.Index); msg.Read(out hasItem.Level); data.ItemList.Add(hasItem); } int loopCount = 1; data.DeckInfo = new Dictionary <byte, List <long> >(); while (loopCount <= data.DeckCount) { var deckList = new List <long>(); byte keyIndex; int loop; long itemUID; msg.Read(out keyIndex); msg.Read(out loop); for (int z = 0; z < loop; z++) { msg.Read(out itemUID); deckList.Add(itemUID); } data.DeckInfo.Add(keyIndex, deckList); loopCount++; } }
public static void Read(Nettention.Proud.Message msg, out IList <Player> data) { int length; msg.Read(out length); data = new List <Player>(); while (length > 0) { Player playerData = new Player(); msg.Read(out playerData.RemoteID); msg.Read(out playerData.UID); msg.Read(out playerData.Nickname); byte side; msg.Read(out side); playerData.Side = (SIDE)side; msg.Read(out playerData.IsReady); msg.Read(out playerData.IsDead); msg.Read(out playerData.Order); msg.Read(out playerData.Hp); msg.Read(out playerData.Power); msg.Read(out playerData.Speed); msg.Read(out playerData.MaxPower); msg.Read(out playerData.Pain); msg.Read(out playerData.Patience); msg.Read(out playerData.CharacterIndex); int count; msg.Read(out count); while (count > 0) { long key; int containValue; msg.Read(out key); msg.Read(out containValue); playerData.AddDeckItem(key, containValue); count--; } data.Add(playerData); length--; } }
public static void Read(Nettention.Proud.Message msg, out GameScoreBoard data) { data = new GameScoreBoard(); msg.Read(out data.ShipUID); msg.Read(out data.PlayerUID); msg.Read(out data.NickName); msg.Read(out data.Life); msg.Read(out data.PlayMoney); msg.Read(out data.CardBag.C_Card); msg.Read(out data.CardBag.G_Card); msg.Read(out data.CardBag.P_Card); msg.Read(out data.Win); msg.Read(out data.Lose); msg.Read(out data.Draw); msg.Read(out data.Reason); msg.Read(out data.Reward); msg.Read(out data.Ranking); }
public override bool ProcessReceivedMessage(Nettention.Proud.ReceivedMessage pa, Object hostTag) { Nettention.Proud.HostID remote = pa.RemoteHostID; if (remote == Nettention.Proud.HostID.HostID_None) { ShowUnknownHostIDWarning(remote); } Nettention.Proud.Message __msg = pa.ReadOnlyMessage; int orgReadOffset = __msg.ReadOffset; Nettention.Proud.RmiID __rmiID = Nettention.Proud.RmiID.RmiID_None; if (!__msg.Read(out __rmiID)) { goto __fail; } switch (__rmiID) { case Common.PlayerSnapshots: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; nan2.LocalCharacterSnapshot local_character_snapshot; nan2.ProudMarshaler.Read(__msg, out local_character_snapshot); System.Collections.Generic.List <nan2.RemoteCharacterSnapshot> remote_character_snapshot; nan2.ProudMarshaler.Read(__msg, out remote_character_snapshot); core.PostCheckReadMessage(__msg, RmiName_PlayerSnapshots); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += local_character_snapshot.ToString() + ","; parameterString += remote_character_snapshot.ToString() + ","; NotifyCallFromStub(Common.PlayerSnapshots, RmiName_PlayerSnapshots, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.PlayerSnapshots; summary.rmiName = RmiName_PlayerSnapshots; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = PlayerSnapshots(remote, ctx, local_character_snapshot, remote_character_snapshot); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_PlayerSnapshots); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.PlayerSnapshots; summary.rmiName = RmiName_PlayerSnapshots; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.JoinWorld: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; System.Collections.Generic.List <Nettention.Proud.HostID> player_ids; nan2.ProudMarshaler.Read(__msg, out player_ids); core.PostCheckReadMessage(__msg, RmiName_JoinWorld); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += player_ids.ToString() + ","; NotifyCallFromStub(Common.JoinWorld, RmiName_JoinWorld, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.JoinWorld; summary.rmiName = RmiName_JoinWorld; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = JoinWorld(remote, ctx, player_ids); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_JoinWorld); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.JoinWorld; summary.rmiName = RmiName_JoinWorld; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.PlayerJoin: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; Nettention.Proud.HostID player_id; nan2.ProudMarshaler.Read(__msg, out player_id); core.PostCheckReadMessage(__msg, RmiName_PlayerJoin); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += player_id.ToString() + ","; NotifyCallFromStub(Common.PlayerJoin, RmiName_PlayerJoin, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.PlayerJoin; summary.rmiName = RmiName_PlayerJoin; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = PlayerJoin(remote, ctx, player_id); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_PlayerJoin); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.PlayerJoin; summary.rmiName = RmiName_PlayerJoin; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.PlayerLeave: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; Nettention.Proud.HostID player_id; nan2.ProudMarshaler.Read(__msg, out player_id); core.PostCheckReadMessage(__msg, RmiName_PlayerLeave); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += player_id.ToString() + ","; NotifyCallFromStub(Common.PlayerLeave, RmiName_PlayerLeave, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.PlayerLeave; summary.rmiName = RmiName_PlayerLeave; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = PlayerLeave(remote, ctx, player_id); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_PlayerLeave); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.PlayerLeave; summary.rmiName = RmiName_PlayerLeave; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.SkillCasted: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; Nettention.Proud.HostID player_id; nan2.ProudMarshaler.Read(__msg, out player_id); nan2.SkillCastSnapshot snapshot; nan2.ProudMarshaler.Read(__msg, out snapshot); core.PostCheckReadMessage(__msg, RmiName_SkillCasted); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += player_id.ToString() + ","; parameterString += snapshot.ToString() + ","; NotifyCallFromStub(Common.SkillCasted, RmiName_SkillCasted, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.SkillCasted; summary.rmiName = RmiName_SkillCasted; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = SkillCasted(remote, ctx, player_id, snapshot); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_SkillCasted); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.SkillCasted; summary.rmiName = RmiName_SkillCasted; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.CharacterSpawned: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; Nettention.Proud.HostID player_id; nan2.ProudMarshaler.Read(__msg, out player_id); UnityEngine.Vector2 position; nan2.ProudMarshaler.Read(__msg, out position); core.PostCheckReadMessage(__msg, RmiName_CharacterSpawned); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += player_id.ToString() + ","; parameterString += position.ToString() + ","; NotifyCallFromStub(Common.CharacterSpawned, RmiName_CharacterSpawned, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.CharacterSpawned; summary.rmiName = RmiName_CharacterSpawned; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = CharacterSpawned(remote, ctx, player_id, position); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_CharacterSpawned); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.CharacterSpawned; summary.rmiName = RmiName_CharacterSpawned; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; case Common.CharacterDied: { Nettention.Proud.RmiContext ctx = new Nettention.Proud.RmiContext(); ctx.sentFrom = pa.RemoteHostID; ctx.relayed = pa.IsRelayed; ctx.hostTag = hostTag; ctx.encryptMode = pa.EncryptMode; ctx.compressMode = pa.CompressMode; Nettention.Proud.HostID player_id; nan2.ProudMarshaler.Read(__msg, out player_id); core.PostCheckReadMessage(__msg, RmiName_CharacterDied); if (enableNotifyCallFromStub == true) { string parameterString = ""; parameterString += player_id.ToString() + ","; NotifyCallFromStub(Common.CharacterDied, RmiName_CharacterDied, parameterString); } if (enableStubProfiling) { Nettention.Proud.BeforeRmiSummary summary = new Nettention.Proud.BeforeRmiSummary(); summary.rmiID = Common.CharacterDied; summary.rmiName = RmiName_CharacterDied; summary.hostID = remote; summary.hostTag = hostTag; BeforeRmiInvocation(summary); } long t0 = Nettention.Proud.PreciseCurrentTime.GetTimeMs(); // Call this method. bool __ret = CharacterDied(remote, ctx, player_id); if (__ret == false) { // Error: RMI function that a user did not create has been called. core.ShowNotImplementedRmiWarning(RmiName_CharacterDied); } if (enableStubProfiling) { Nettention.Proud.AfterRmiSummary summary = new Nettention.Proud.AfterRmiSummary(); summary.rmiID = Common.CharacterDied; summary.rmiName = RmiName_CharacterDied; summary.hostID = remote; summary.hostTag = hostTag; summary.elapsedTime = Nettention.Proud.PreciseCurrentTime.GetTimeMs() - t0; AfterRmiInvocation(summary); } } break; default: goto __fail; } return(true); __fail: { __msg.ReadOffset = orgReadOffset; return(false); } }
public static void Read(Nettention.Proud.Message msg, out ScoreBoardArray data) { int count = 0; msg.Read(out count); if (count > 0) { GameScoreBoard[] worldData = new GameScoreBoard[count]; for (int i = 0; i < count; i++) { GameScoreBoard temp = new GameScoreBoard(); msg.Read(out temp.ShipUID); msg.Read(out temp.PlayerUID); msg.Read(out temp.NickName); msg.Read(out temp.Life); msg.Read(out temp.PlayMoney); msg.Read(out temp.CardBag.C_Card); msg.Read(out temp.CardBag.G_Card); msg.Read(out temp.CardBag.P_Card); msg.Read(out temp.Win); msg.Read(out temp.Lose); msg.Read(out temp.Draw); msg.Read(out temp.Reason); msg.Read(out temp.Reward); msg.Read(out temp.Ranking); worldData[i] = temp; } data = new ScoreBoardArray(worldData); } else { data = new ScoreBoardArray(); } }