Ignore:
Timestamp:
Jun 21, 2024, 2:58:18 PM (5 months ago)
Author:
alloc
Message:

27_32_48

  • V1.0 compatibility
Location:
binary-improvements/7dtd-server-fixes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/7dtd-server-fixes/ModInfo.xml

    r464 r488  
    55        <Description value="Common functions" />
    66        <Author value="Christian 'Alloc' Illy" />
    7         <Version value="31" />
     7        <Version value="32" />
    88        <Website value="https://7dtd.illy.bz" />
    99</xml>
  • binary-improvements/7dtd-server-fixes/src/API.cs

    r455 r488  
    4747
    4848                private static void PlayerSpawned (ClientInfo _cInfo, RespawnType _respawnReason, Vector3i _spawnPos) {
     49                        if (_cInfo == null) {
     50                                return;
     51                        }
     52                       
    4953                        PersistentContainer.Instance.Players.GetOrCreate (_cInfo.InternalId, _cInfo.PlatformId, _cInfo.CrossplatformId).SetOnline (_cInfo);
    5054                        PersistentContainer.Instance.Save ();
     
    5458
    5559                private static bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName,
    56                         bool _localizeMain, List<int> _recipientEntityIds) {
     60                        List<int> _recipientEntityIds) {
    5761                        if (string.IsNullOrEmpty (_msg) || !_msg.EqualsCaseInsensitive ("/alloc")) {
    5862                                return true;
     
    6165                        if (_cInfo != null) {
    6266                                Log.Out ($"Sent chat hook reply to {_cInfo.InternalId}");
    63                                 _cInfo.SendPackage (NetPackageManager.GetPackage<NetPackageChat> ().Setup (EChatType.Whisper, -1, ANSWER, "", false, null));
     67                                _cInfo.SendPackage (NetPackageManager.GetPackage<NetPackageChat> ().Setup (EChatType.Whisper, -1, ANSWER, "", null));
    6468                        } else {
    6569                                Log.Error ($"ChatHookExample: Argument _cInfo null on message: {_msg}");
  • binary-improvements/7dtd-server-fixes/src/LandClaimList.cs

    r448 r488  
    4141
    4242                        foreach (KeyValuePair<PersistentPlayerData, List<Vector3i>> kvp in owners) {
    43                                 Player p = PersistentContainer.Instance.Players.GetByInternalId (kvp.Key.UserIdentifier);
     43                                Player p = PersistentContainer.Instance.Players.GetByInternalId (kvp.Key.PrimaryId);
    4444                                if (p == null) {
    45                                         PlatformUserIdentifierAbs platformId = kvp.Key.PlatformUserIdentifier;
    46                                         PlatformUserIdentifierAbs internalId = kvp.Key.UserIdentifier;
     45                                        PlatformUserIdentifierAbs platformId = kvp.Key.NativeId;
     46                                        PlatformUserIdentifierAbs internalId = kvp.Key.PrimaryId;
    4747                                        PlatformUserIdentifierAbs crossPlatformId = platformId == null || platformId.Equals (internalId) ? null : internalId;
    4848                                        p = new Player (internalId, platformId, crossPlatformId);
Note: See TracChangeset for help on using the changeset viewer.