LFG: Drop comment field, it no longer exists in packets
This commit is contained in:
@@ -137,7 +137,7 @@ namespace Game.Chat
|
||||
var dungeons = Global.LFGMgr.GetSelectedDungeons(guid);
|
||||
|
||||
handler.SendSysMessage(CypherStrings.LfgPlayerInfo, player.GetName(), Global.LFGMgr.GetState(guid), dungeons.Count, LFGQueue.ConcatenateDungeons(dungeons),
|
||||
LFGQueue.GetRolesString(Global.LFGMgr.GetRoles(guid)), Global.LFGMgr.GetComment(guid));
|
||||
LFGQueue.GetRolesString(Global.LFGMgr.GetRoles(guid)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,10 +329,10 @@ namespace Game.DungeonFinding
|
||||
if (!gguid.IsEmpty())
|
||||
{
|
||||
SetState(gguid, LfgState.Proposal);
|
||||
SendLfgUpdateStatus(guid, new LfgUpdateData(LfgUpdateType.ProposalBegin, GetSelectedDungeons(guid), GetComment(guid)), true);
|
||||
SendLfgUpdateStatus(guid, new LfgUpdateData(LfgUpdateType.ProposalBegin, GetSelectedDungeons(guid)), true);
|
||||
}
|
||||
else
|
||||
SendLfgUpdateStatus(guid, new LfgUpdateData(LfgUpdateType.ProposalBegin, GetSelectedDungeons(guid), GetComment(guid)), false);
|
||||
SendLfgUpdateStatus(guid, new LfgUpdateData(LfgUpdateType.ProposalBegin, GetSelectedDungeons(guid)), false);
|
||||
SendLfgUpdateProposal(guid, proposal);
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ namespace Game.DungeonFinding
|
||||
m_QueueTimer += diff;
|
||||
}
|
||||
|
||||
public void JoinLfg(Player player, LfgRoles roles, List<uint> dungeons, string comment)
|
||||
public void JoinLfg(Player player, LfgRoles roles, List<uint> dungeons)
|
||||
{
|
||||
if (!player || player.GetSession() == null || dungeons.Empty())
|
||||
return;
|
||||
@@ -487,8 +487,6 @@ namespace Game.DungeonFinding
|
||||
return;
|
||||
}
|
||||
|
||||
SetComment(guid, comment);
|
||||
|
||||
if (isRaid)
|
||||
{
|
||||
Log.outDebug(LogFilter.Lfg, "Join: [{0}] trying to join raid browser and it's disabled.", guid);
|
||||
@@ -516,7 +514,7 @@ namespace Game.DungeonFinding
|
||||
|
||||
SetState(gguid, LfgState.Rolecheck);
|
||||
// Send update to player
|
||||
LfgUpdateData updateData = new LfgUpdateData(LfgUpdateType.JoinQueue, dungeons, comment);
|
||||
LfgUpdateData updateData = new LfgUpdateData(LfgUpdateType.JoinQueue, dungeons);
|
||||
for (GroupReference refe = grp.GetFirstMember(); refe != null; refe = refe.next())
|
||||
{
|
||||
Player plrg = refe.GetSource();
|
||||
@@ -554,7 +552,7 @@ namespace Game.DungeonFinding
|
||||
}
|
||||
// Send update to player
|
||||
SetRoles(guid, roles);
|
||||
player.GetSession().SendLfgUpdateStatus(new LfgUpdateData(LfgUpdateType.JoinQueue, dungeons, comment), false);
|
||||
player.GetSession().SendLfgUpdateStatus(new LfgUpdateData(LfgUpdateType.JoinQueue, dungeons), false);
|
||||
player.GetSession().SendLfgJoinResult(joinData);
|
||||
SetState(gguid, LfgState.Queued);
|
||||
debugNames += player.GetName();
|
||||
@@ -693,7 +691,7 @@ namespace Game.DungeonFinding
|
||||
case LfgRoleCheckState.Finished:
|
||||
SetState(pguid, LfgState.Queued);
|
||||
SetRoles(pguid, it.Value);
|
||||
SendLfgUpdateStatus(pguid, new LfgUpdateData(LfgUpdateType.AddedToQueue, dungeons, GetComment(pguid)), true);
|
||||
SendLfgUpdateStatus(pguid, new LfgUpdateData(LfgUpdateType.AddedToQueue, dungeons), true);
|
||||
break;
|
||||
default:
|
||||
if (roleCheck.leader == pguid)
|
||||
@@ -1078,10 +1076,10 @@ namespace Game.DungeonFinding
|
||||
if (gguid != guid)
|
||||
{
|
||||
SetState(gguid, LfgState.Queued);
|
||||
SendLfgUpdateStatus(guid, new LfgUpdateData(LfgUpdateType.AddedToQueue, GetSelectedDungeons(guid), GetComment(guid)), true);
|
||||
SendLfgUpdateStatus(guid, new LfgUpdateData(LfgUpdateType.AddedToQueue, GetSelectedDungeons(guid)), true);
|
||||
}
|
||||
else
|
||||
SendLfgUpdateStatus(guid, new LfgUpdateData(LfgUpdateType.AddedToQueue, GetSelectedDungeons(guid), GetComment(guid)), false);
|
||||
SendLfgUpdateStatus(guid, new LfgUpdateData(LfgUpdateType.AddedToQueue, GetSelectedDungeons(guid)), false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1458,12 +1456,6 @@ namespace Game.DungeonFinding
|
||||
return roles;
|
||||
}
|
||||
|
||||
public string GetComment(ObjectGuid guid)
|
||||
{
|
||||
Log.outDebug(LogFilter.Lfg, "GetComment: [{0}] = {1}", guid, PlayersStore[guid].GetComment());
|
||||
return PlayersStore[guid].GetComment();
|
||||
}
|
||||
|
||||
public List<uint> GetSelectedDungeons(ObjectGuid guid)
|
||||
{
|
||||
Log.outDebug(LogFilter.Lfg, "GetSelectedDungeons: [{0}]", guid);
|
||||
@@ -1604,13 +1596,6 @@ namespace Game.DungeonFinding
|
||||
PlayersStore[guid].SetRoles(roles);
|
||||
}
|
||||
|
||||
public void SetComment(ObjectGuid guid, string comment)
|
||||
{
|
||||
AddPlayerData(guid);
|
||||
Log.outDebug(LogFilter.Lfg, "SetComment: [{0}] comment: {1}", guid, comment);
|
||||
PlayersStore[guid].SetComment(comment);
|
||||
}
|
||||
|
||||
public void SetSelectedDungeons(ObjectGuid guid, List<uint> dungeons)
|
||||
{
|
||||
AddPlayerData(guid);
|
||||
@@ -1997,27 +1982,23 @@ namespace Game.DungeonFinding
|
||||
{
|
||||
updateType = _type;
|
||||
state = LfgState.None;
|
||||
comment = "";
|
||||
}
|
||||
public LfgUpdateData(LfgUpdateType _type, List<uint> _dungeons, string _comment)
|
||||
public LfgUpdateData(LfgUpdateType _type, List<uint> _dungeons)
|
||||
{
|
||||
updateType = _type;
|
||||
state = LfgState.None;
|
||||
dungeons = _dungeons;
|
||||
comment = _comment;
|
||||
}
|
||||
public LfgUpdateData(LfgUpdateType _type, LfgState _state, List<uint> _dungeons, string _comment = "")
|
||||
public LfgUpdateData(LfgUpdateType _type, LfgState _state, List<uint> _dungeons)
|
||||
{
|
||||
updateType = _type;
|
||||
state = _state;
|
||||
dungeons = _dungeons;
|
||||
comment = _comment;
|
||||
}
|
||||
|
||||
public LfgUpdateType updateType;
|
||||
public LfgState state;
|
||||
public List<uint> dungeons = new List<uint>();
|
||||
public string comment;
|
||||
}
|
||||
|
||||
public class LfgQueueStatusData
|
||||
|
||||
@@ -27,7 +27,6 @@ namespace Game.DungeonFinding
|
||||
{
|
||||
m_State = LfgState.None;
|
||||
m_OldState = LfgState.None;
|
||||
m_Comment = "";
|
||||
}
|
||||
|
||||
public void SetState(LfgState state)
|
||||
@@ -38,7 +37,6 @@ namespace Game.DungeonFinding
|
||||
case LfgState.FinishedDungeon:
|
||||
m_Roles = 0;
|
||||
m_SelectedDungeons.Clear();
|
||||
m_Comment = "";
|
||||
goto case LfgState.Dungeon;
|
||||
case LfgState.Dungeon:
|
||||
m_OldState = state;
|
||||
@@ -72,11 +70,6 @@ namespace Game.DungeonFinding
|
||||
m_Roles = roles;
|
||||
}
|
||||
|
||||
public void SetComment(string comment)
|
||||
{
|
||||
m_Comment = comment;
|
||||
}
|
||||
|
||||
public void SetSelectedDungeons(List<uint> dungeons)
|
||||
{
|
||||
m_SelectedDungeons = dungeons;
|
||||
@@ -107,11 +100,6 @@ namespace Game.DungeonFinding
|
||||
return m_Roles;
|
||||
}
|
||||
|
||||
public string GetComment()
|
||||
{
|
||||
return m_Comment;
|
||||
}
|
||||
|
||||
public List<uint> GetSelectedDungeons()
|
||||
{
|
||||
return m_SelectedDungeons;
|
||||
@@ -126,7 +114,6 @@ namespace Game.DungeonFinding
|
||||
|
||||
// Queue
|
||||
LfgRoles m_Roles;
|
||||
string m_Comment;
|
||||
List<uint> m_SelectedDungeons = new List<uint>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Game
|
||||
|
||||
}
|
||||
|
||||
Global.LFGMgr.JoinLfg(GetPlayer(), dfJoin.Roles, newDungeons, dfJoin.Comment);
|
||||
Global.LFGMgr.JoinLfg(GetPlayer(), dfJoin.Roles, newDungeons);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.DfLeave)]
|
||||
|
||||
@@ -483,20 +483,6 @@ namespace Game.Network.Packets
|
||||
}
|
||||
}
|
||||
|
||||
class DFSetComment : ClientPacket
|
||||
{
|
||||
public DFSetComment(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
Ticket.Read(_worldPacket);
|
||||
Comment = _worldPacket.ReadString(_worldPacket.ReadBits<uint>(9));
|
||||
}
|
||||
|
||||
public RideTicket Ticket;
|
||||
public string Comment;
|
||||
}
|
||||
|
||||
class DFSetRoles : ClientPacket
|
||||
{
|
||||
public DFSetRoles(WorldPacket packet) : base(packet) { }
|
||||
|
||||
Reference in New Issue
Block a user