Ignore:
Timestamp:
Aug 9, 2017, 7:43:07 PM (7 years ago)
Author:
alloc
Message:

Fixes 14_16_21

Location:
binary-improvements/AllocsCommands
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/AllocsCommands/AllocsCommands.csproj

    r290 r309  
    3939      <Private>False</Private>
    4040    </Reference>
     41    <Reference Include="Assembly-CSharp-firstpass">
     42      <HintPath>..\..\..\RPGMod\7dtd-binaries\Assembly-CSharp-firstpass.dll</HintPath>
     43      <Private>False</Private>
     44    </Reference>
    4145  </ItemGroup>
    4246  <ItemGroup>
  • binary-improvements/AllocsCommands/Commands/Reply.cs

    r251 r309  
    3535                                Chat.SendMessage (receiver, _sender, message);
    3636                        } else {
    37                                 if (receiver != null) {
    38                                         SdtdConsole.Instance.Output ("The sender of the PM you last received is currently not online.");
    39                                 } else {
    40                                         SdtdConsole.Instance.Output ("You have not received a PM so far.");
    41                                 }
     37                                SdtdConsole.Instance.Output ("You have not received a PM so far or sender of last received PM is no longer online.");
    4238                        }
    4339                }
  • binary-improvements/AllocsCommands/ModInfo.xml

    r306 r309  
    55                <Description value="Additional commands for server operation" />
    66                <Author value="Christian 'Alloc' Illy" />
    7                 <Version value="13" />
     7                <Version value="14" />
    88                <Website value="http://7dtd.illy.bz" />
    99        </ModInfo>
  • binary-improvements/AllocsCommands/PrivateMessageConnections.cs

    r251 r309  
    11using System;
    22using System.Collections.Generic;
     3using Steamworks;
    34
    45namespace AllocsFixes.CustomCommands
     
    67        public class PrivateMessageConnections
    78        {
    8                 private static Dictionary<ClientInfo, ClientInfo> senderOfLastPM = new Dictionary<ClientInfo, ClientInfo> ();
     9                private static Dictionary<CSteamID, CSteamID> senderOfLastPM = new Dictionary<CSteamID, CSteamID> ();
    910
    1011                public static void SetLastPMSender (ClientInfo _sender, ClientInfo _receiver)
    1112                {
    12                         if (senderOfLastPM.ContainsKey (_receiver))
    13                                 senderOfLastPM [_receiver] = _sender;
    14                         else
    15                                 senderOfLastPM.Add (_receiver, _sender);
     13                        senderOfLastPM [_receiver.steamId] = _sender.steamId;
    1614                }
    1715
    1816                public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player)
    1917                {
    20                         if (senderOfLastPM.ContainsKey (_player))
    21                                 return senderOfLastPM [_player];
     18                        if (senderOfLastPM.ContainsKey (_player.steamId)) {
     19                                CSteamID recSteamId = senderOfLastPM [_player.steamId];
     20                                ClientInfo recInfo = ConnectionManager.Instance.GetClientInfoForSteamId (recSteamId);
     21                                return recInfo;
     22                        }
    2223                        return null;
    2324                }
Note: See TracChangeset for help on using the changeset viewer.