XmdsServerProxy.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using CommonAI.Zone.Instance;
  2. using XmdsServerNode.Node.Interface;
  3. using XmdsServerNode.Node.R2bNotify;
  4. using static CommonAIServer.Node.ZoneNode;
  5. namespace XmdsServerEdgeJS.Zone
  6. {
  7. public class XmdsServerProxy : IServerProxy
  8. {
  9. public XmdsServerProxy()
  10. {
  11. }
  12. public void SendToBattleServer(InstanceZone zone, R2BNotifyMessage msg)
  13. {
  14. msg.OnHandle(zone);
  15. }
  16. public void SendToGameServer(string playerUUID, string eventType, object msg)
  17. {
  18. XmdsPlayer player = ZoneService.Instance.getPlayer(playerUUID);
  19. if(player != null)
  20. {
  21. player.Node.SendToGameServer(eventType, msg);
  22. }
  23. //ZoneService.Instance.sendToGameServer(eventType, msg);
  24. }
  25. public void SendMsgToPlayer(string playerUUID, CommonLang.Protocol.IMessage msg)
  26. {
  27. XmdsPlayer player = ZoneService.Instance.getPlayer(playerUUID);
  28. if (player != null)
  29. {
  30. PlayerClient mClient = player.Node.GetPlayerClient(playerUUID);
  31. if(mClient != null)
  32. {
  33. mClient.Send(msg);
  34. }
  35. }
  36. //ZoneService.Instance.sendToGameServer(eventType, msg);
  37. }
  38. public void Dispose()
  39. {
  40. }
  41. }
  42. }