Exemple #1
0
        public void OnCurrentClientEnterWorld(Player player)
        {
            var mymod = ModHelpersMod.Instance;

            if (!this.HasLoadedOldUID)
            {
                LogHelpers.Alert("No (old) UID for " + player.name + " (" + player.whoAmI + ") to send to server");
                this.HasLoadedOldUID = true;                    // Ugly failsafe; don't really know why data from ModPlayer.Load isn't available here
            }

            // Send
            PlayerOldIdProtocol.QuickSendToServer();
            PlayerDataProtocol.SyncToEveryone(this.PermaBuffsById, this.HasBuffIds, this.EquipSlotsToItemTypes);

            // Receive
            WorldDataProtocol.QuickRequest();
        }
 private void OnClientConnect()
 {
     LoadHooks.AddWorldLoadOnceHook(() => {
         WorldDataProtocol.QuickRequest();
     });
 }