internal static void SendToPlayer(GUC.WorldObjects.Character.Player pl) { foreach (KeyValuePair <int, View> v in allViewDic) { if (v.Value.isSingleUser) { continue; } v.Value.create(pl.ID); } }
public static Int32 ViewDraw_DrawChildren(String message) { try { Process process = Process.ThisProcess(); return(0); GUC.WorldObjects.Character.Player pl = GUC.WorldObjects.Character.Player.Hero; if (pl == null) { return(0); } if (pl.ItemList.Count == 0) { return(0); } if (pl.ItemList[0].Address == 0) { return(0); } if (oCGame.Game(process).World.Address == 0) { return(0); } if (rndrWorld == null) { rndrWorld = zCWorld.Create(process); rndrWorld.IsInventoryWorld = true; } oCItem item = new oCItem(process, pl.ItemList[0].Address); zCView zV = zCView.Create(Process.ThisProcess(), 0, 0, 0x2000, 0x2000); zV.FillZ = true; zV.Blit(); zCView.GetScreen(Process.ThisProcess()).InsertItem(zV, 0); item.RenderItem(rndrWorld, zV, 0.0f); zCView.GetScreen(Process.ThisProcess()).RemoveItem(zV); zV.Dispose(); } catch (Exception ex) { zERROR.GetZErr(Process.ThisProcess()).Report(4, 'G', ex.ToString(), 0, "ViewDraw_DrawChildren", 0); } return(0); }
protected void sendStream(int to, BitStream stream) { if (isSingleUser) { if (singleUserID == 0 || !sWorld.VobDict.ContainsKey(singleUserID)) { throw new Exception("Single-User-ID was not valid! The User does not exists on the server: " + singleUserID); } Vob v = sWorld.VobDict[singleUserID]; if (!(v is GUC.WorldObjects.Character.Player)) { throw new Exception("PlayerID: " + singleUserID + " was not a Player! " + v); } GUC.WorldObjects.Character.Player player = (GUC.WorldObjects.Character.Player)v; using (RakNetGUID guid = player.GUID) Program.server.ServerInterface.Send(stream, PacketPriority.HIGH_PRIORITY, PacketReliability.RELIABLE_ORDERED, (char)0, guid, false); } else { if (to <= 0) { Program.server.ServerInterface.Send(stream, PacketPriority.HIGH_PRIORITY, PacketReliability.RELIABLE_ORDERED, (char)0, RakNet.RakNet.UNASSIGNED_SYSTEM_ADDRESS, true); } else { if (!sWorld.VobDict.ContainsKey(to)) { throw new Exception("To-User-ID was not valid! The User does not exists on the server: " + to); } Vob v = sWorld.VobDict[to]; if (!(v is GUC.WorldObjects.Character.Player)) { throw new Exception("PlayerID: " + to + " was not a Player! " + v); } GUC.WorldObjects.Character.Player player = (GUC.WorldObjects.Character.Player)v; using (RakNetGUID guid = player.GUID) Program.server.ServerInterface.Send(stream, PacketPriority.HIGH_PRIORITY, PacketReliability.RELIABLE_ORDERED, (char)0, guid, false); } } }