@@ -187,7 +187,7 @@ private void RootCommand_Exec(CommandArgs args) {
187187 int playerProtectionCount = 0 ;
188188 lock ( this . WorldMetadata . Protections ) {
189189 foreach ( KeyValuePair < DPoint , ProtectionEntry > protection in this . WorldMetadata . Protections ) {
190- if ( protection . Value . Owner == args . Player . User . ID )
190+ if ( protection . Value . Owner == args . Player . Account . ID )
191191 playerProtectionCount ++ ;
192192 }
193193 }
@@ -306,7 +306,7 @@ private bool TryExecuteSubCommand(string commandNameLC, CommandArgs args) {
306306 DPoint location = protectionPair . Key ;
307307 ProtectionEntry protection = protectionPair . Value ;
308308
309- TShockAPI . DB . User tsUser = TShock . Users . GetUserByID ( protection . Owner ) ;
309+ TShockAPI . DB . UserAccount tsUser = TShock . UserAccounts . GetUserAccountByID ( protection . Owner ) ;
310310 if ( tsUser == null )
311311 protectionsToRemove . Add ( location ) ;
312312 }
@@ -974,7 +974,7 @@ private void ShareCommand_Exec(CommandArgs args) {
974974 playerName = args . ParamsToSingleString ( ) ;
975975 }
976976
977- TShockAPI . DB . User tsUser ;
977+ TShockAPI . DB . UserAccount tsUser ;
978978 if ( ! TShockEx . MatchUserByPlayerName ( playerName , out tsUser , args . Player ) )
979979 return ;
980980
@@ -1029,7 +1029,7 @@ private void UnshareCommand_Exec(CommandArgs args) {
10291029 playerName = args . ParamsToSingleString ( ) ;
10301030 }
10311031
1032- TShockAPI . DB . User tsUser ;
1032+ TShockAPI . DB . UserAccount tsUser ;
10331033 if ( ! TShockEx . MatchUserByPlayerName ( playerName , out tsUser , args . Player ) )
10341034 return ;
10351035
@@ -2161,7 +2161,7 @@ where itemsToLookup.Any(li => li.netID == item.Type)
21612161 string chestOwner = "{not protected}" ;
21622162 ProtectionEntry protection = this . ProtectionManager . GetProtectionAt ( chestLocation ) ;
21632163 if ( protection != null ) {
2164- User tsUser = TShock . Users . GetUserByID ( protection . Owner ) ;
2164+ UserAccount tsUser = TShock . UserAccounts . GetUserAccountByID ( protection . Owner ) ;
21652165 chestOwner = tsUser ? . Name ?? $ "{{user id: { protection . Owner } }}";
21662166 }
21672167
@@ -2294,7 +2294,7 @@ public bool HandleTileEdit(TSPlayer player, TileEditType editType, int blockType
22942294 }
22952295
22962296 if (
2297- protection . Owner == player . User . ID || (
2297+ protection . Owner == player . Account . ID || (
22982298 this . Config . AutoDeprotectEverythingOnDestruction &&
22992299 player . Group . HasPermission ( ProtectorPlugin . ProtectionMaster_Permission )
23002300 )
@@ -2816,7 +2816,7 @@ private void PerformTrade(TSPlayer player, ProtectionEntry protection, Inventory
28162816 }
28172817
28182818 try {
2819- protection . TradeChestData . AddOrUpdateLooter ( player . User . ID ) ;
2819+ protection . TradeChestData . AddOrUpdateLooter ( player . Account . ID ) ;
28202820 } catch ( InvalidOperationException ) {
28212821 player . SendErrorMessage ( $ "The vendor doesn't allow more than { protection . TradeChestData . LootLimitPerPlayer } trades per player.") ;
28222822 return ;
@@ -2858,7 +2858,7 @@ public virtual bool HandleChestModifySlot(TSPlayer player, int chestIndex, int s
28582858 // The player who set up the refill chest or masters shall modify its contents.
28592859 if (
28602860 this . Config . AllowRefillChestContentChanges &&
2861- ( refillChest . Owner == player . User . ID || player . Group . HasPermission ( ProtectorPlugin . ProtectionMaster_Permission ) )
2861+ ( refillChest . Owner == player . Account . ID || player . Group . HasPermission ( ProtectorPlugin . ProtectionMaster_Permission ) )
28622862 ) {
28632863 refillChest . RefillItems [ slotIndex ] = newItem ;
28642864
@@ -2880,8 +2880,8 @@ public virtual bool HandleChestModifySlot(TSPlayer player, int chestIndex, int s
28802880
28812881 if ( refillChest . OneLootPerPlayer || refillChest . RemainingLoots > 0 ) {
28822882 Contract . Assert ( refillChest . Looters != null ) ;
2883- if ( ! refillChest . Looters . Contains ( player . User . ID ) ) {
2884- refillChest . Looters . Add ( player . User . ID ) ;
2883+ if ( ! refillChest . Looters . Contains ( player . Account . ID ) ) {
2884+ refillChest . Looters . Add ( player . Account . ID ) ;
28852885
28862886 if ( refillChest . RemainingLoots > 0 )
28872887 refillChest . RemainingLoots -- ;
@@ -3366,7 +3366,7 @@ private bool TryGetProtectionInfo(TSPlayer player, DPoint tileLocation, bool sen
33663366
33673367 bool canViewExtendedInfo = (
33683368 player . Group . HasPermission ( ProtectorPlugin . ViewAllProtections_Permission ) ||
3369- protection . Owner == player . User . ID ||
3369+ protection . Owner == player . Account . ID ||
33703370 protection . IsSharedWithPlayer ( player )
33713371 ) ;
33723372
@@ -3461,7 +3461,7 @@ private bool TryGetProtectionInfo(TSPlayer player, DPoint tileLocation, bool sen
34613461 if ( i > 0 )
34623462 sharedListBuilder . Append ( ", " ) ;
34633463
3464- TShockAPI . DB . User tsUser = TShock . Users . GetUserByID ( protection . SharedUsers [ i ] ) ;
3464+ TShockAPI . DB . UserAccount tsUser = TShock . UserAccounts . GetUserAccountByID ( protection . SharedUsers [ i ] ) ;
34653465 if ( tsUser != null )
34663466 sharedListBuilder . Append ( tsUser . Name ) ;
34673467 }
@@ -3498,7 +3498,7 @@ private bool TryGetProtectionInfo(TSPlayer player, DPoint tileLocation, bool sen
34983498 }
34993499
35003500 private static string GetUserName ( int userId ) {
3501- TShockAPI . DB . User tsUser = TShock . Users . GetUserByID ( userId ) ;
3501+ TShockAPI . DB . UserAccount tsUser = TShock . UserAccounts . GetUserAccountByID ( userId ) ;
35023502 if ( tsUser != null )
35033503 return tsUser . Name ;
35043504 else
@@ -3942,7 +3942,7 @@ public bool CheckRefillChestLootability(RefillChestMetadata refillChest, TSPlaye
39423942
39433943 if (
39443944 ! this . Config . AllowRefillChestContentChanges ||
3945- ( player . User . ID != refillChest . Owner && ! player . Group . HasPermission ( ProtectorPlugin . ProtectionMaster_Permission ) )
3945+ ( player . Account . ID != refillChest . Owner && ! player . Group . HasPermission ( ProtectorPlugin . ProtectionMaster_Permission ) )
39463946 ) {
39473947 if ( refillChest . RemainingLoots == 0 ) {
39483948 if ( sendReasonMessages )
@@ -3956,7 +3956,7 @@ public bool CheckRefillChestLootability(RefillChestMetadata refillChest, TSPlaye
39563956 if ( refillChest . Looters == null )
39573957 refillChest . Looters = new Collection < int > ( ) ;
39583958
3959- if ( refillChest . Looters . Contains ( player . User . ID ) ) {
3959+ if ( refillChest . Looters . Contains ( player . Account . ID ) ) {
39603960 if ( sendReasonMessages )
39613961 player . SendErrorMessage ( "This chest can be looted only once per player." ) ;
39623962
0 commit comments