private static void ZNet_Awake(ref ZNet __instance) { _instance = __instance; // EpicTitles.Log.LogInfo("Patching ZNET"); // try // { if (__instance.IsServer()) { ZRoutedRpc.instance.Register <String, ZPackage>("SkillUpdate", LaddersHandler.OnClientSkillUpdate); // ZRoutedRpc.instance.Register<String, String, int>("SkillUpdate", LaddersHandler.OnClientSkillUpdate); ZRoutedRpc.instance.Register <String, String>("LadderRequest", LaddersHandler.OnClientLadderRequest); LaddersHandler.loadSkillLadder(); // EpicTitles.Log.LogInfo("ZNet patched for server side"); } else { ZRoutedRpc.instance.Register <String, String>("SkillRankUpNotification", LaddersHandler.SkillRankUpNotification); ZRoutedRpc.instance.Register <String>("LadderResponse", LaddersHandler.LadderResponse); // EpicTitles.Log.LogInfo("ZNet patched for client side"); } // } // catch (Exception e) // { // // log error, not info! // // ETLogger.logMeOn(e); // ETLogger.logMeOn(e.ToString()); // } }
private static void ZNet_SaveWorld(ref ZNet __instance) { if (isServer()) { // if (__instance.IsServer()) LaddersHandler.saveSkillLadder(); } }