LFG: Drop comment field, it no longer exists in packets

This commit is contained in:
hondacrx
2017-07-07 23:13:10 -04:00
parent 0437beccfd
commit 81a7609fd4
5 changed files with 12 additions and 58 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ namespace Game.Chat
var dungeons = Global.LFGMgr.GetSelectedDungeons(guid); var dungeons = Global.LFGMgr.GetSelectedDungeons(guid);
handler.SendSysMessage(CypherStrings.LfgPlayerInfo, player.GetName(), Global.LFGMgr.GetState(guid), dungeons.Count, LFGQueue.ConcatenateDungeons(dungeons), 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)));
} }
} }
} }
+10 -29
View File
@@ -329,10 +329,10 @@ namespace Game.DungeonFinding
if (!gguid.IsEmpty()) if (!gguid.IsEmpty())
{ {
SetState(gguid, LfgState.Proposal); 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 else
SendLfgUpdateStatus(guid, new LfgUpdateData(LfgUpdateType.ProposalBegin, GetSelectedDungeons(guid), GetComment(guid)), false); SendLfgUpdateStatus(guid, new LfgUpdateData(LfgUpdateType.ProposalBegin, GetSelectedDungeons(guid)), false);
SendLfgUpdateProposal(guid, proposal); SendLfgUpdateProposal(guid, proposal);
} }
@@ -352,7 +352,7 @@ namespace Game.DungeonFinding
m_QueueTimer += diff; 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()) if (!player || player.GetSession() == null || dungeons.Empty())
return; return;
@@ -487,8 +487,6 @@ namespace Game.DungeonFinding
return; return;
} }
SetComment(guid, comment);
if (isRaid) if (isRaid)
{ {
Log.outDebug(LogFilter.Lfg, "Join: [{0}] trying to join raid browser and it's disabled.", guid); 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); SetState(gguid, LfgState.Rolecheck);
// Send update to player // 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()) for (GroupReference refe = grp.GetFirstMember(); refe != null; refe = refe.next())
{ {
Player plrg = refe.GetSource(); Player plrg = refe.GetSource();
@@ -554,7 +552,7 @@ namespace Game.DungeonFinding
} }
// Send update to player // Send update to player
SetRoles(guid, roles); 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); player.GetSession().SendLfgJoinResult(joinData);
SetState(gguid, LfgState.Queued); SetState(gguid, LfgState.Queued);
debugNames += player.GetName(); debugNames += player.GetName();
@@ -693,7 +691,7 @@ namespace Game.DungeonFinding
case LfgRoleCheckState.Finished: case LfgRoleCheckState.Finished:
SetState(pguid, LfgState.Queued); SetState(pguid, LfgState.Queued);
SetRoles(pguid, it.Value); SetRoles(pguid, it.Value);
SendLfgUpdateStatus(pguid, new LfgUpdateData(LfgUpdateType.AddedToQueue, dungeons, GetComment(pguid)), true); SendLfgUpdateStatus(pguid, new LfgUpdateData(LfgUpdateType.AddedToQueue, dungeons), true);
break; break;
default: default:
if (roleCheck.leader == pguid) if (roleCheck.leader == pguid)
@@ -1078,10 +1076,10 @@ namespace Game.DungeonFinding
if (gguid != guid) if (gguid != guid)
{ {
SetState(gguid, LfgState.Queued); 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 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; 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) public List<uint> GetSelectedDungeons(ObjectGuid guid)
{ {
Log.outDebug(LogFilter.Lfg, "GetSelectedDungeons: [{0}]", guid); Log.outDebug(LogFilter.Lfg, "GetSelectedDungeons: [{0}]", guid);
@@ -1604,13 +1596,6 @@ namespace Game.DungeonFinding
PlayersStore[guid].SetRoles(roles); 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) public void SetSelectedDungeons(ObjectGuid guid, List<uint> dungeons)
{ {
AddPlayerData(guid); AddPlayerData(guid);
@@ -1997,27 +1982,23 @@ namespace Game.DungeonFinding
{ {
updateType = _type; updateType = _type;
state = LfgState.None; state = LfgState.None;
comment = "";
} }
public LfgUpdateData(LfgUpdateType _type, List<uint> _dungeons, string _comment) public LfgUpdateData(LfgUpdateType _type, List<uint> _dungeons)
{ {
updateType = _type; updateType = _type;
state = LfgState.None; state = LfgState.None;
dungeons = _dungeons; 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; updateType = _type;
state = _state; state = _state;
dungeons = _dungeons; dungeons = _dungeons;
comment = _comment;
} }
public LfgUpdateType updateType; public LfgUpdateType updateType;
public LfgState state; public LfgState state;
public List<uint> dungeons = new List<uint>(); public List<uint> dungeons = new List<uint>();
public string comment;
} }
public class LfgQueueStatusData public class LfgQueueStatusData
-13
View File
@@ -27,7 +27,6 @@ namespace Game.DungeonFinding
{ {
m_State = LfgState.None; m_State = LfgState.None;
m_OldState = LfgState.None; m_OldState = LfgState.None;
m_Comment = "";
} }
public void SetState(LfgState state) public void SetState(LfgState state)
@@ -38,7 +37,6 @@ namespace Game.DungeonFinding
case LfgState.FinishedDungeon: case LfgState.FinishedDungeon:
m_Roles = 0; m_Roles = 0;
m_SelectedDungeons.Clear(); m_SelectedDungeons.Clear();
m_Comment = "";
goto case LfgState.Dungeon; goto case LfgState.Dungeon;
case LfgState.Dungeon: case LfgState.Dungeon:
m_OldState = state; m_OldState = state;
@@ -72,11 +70,6 @@ namespace Game.DungeonFinding
m_Roles = roles; m_Roles = roles;
} }
public void SetComment(string comment)
{
m_Comment = comment;
}
public void SetSelectedDungeons(List<uint> dungeons) public void SetSelectedDungeons(List<uint> dungeons)
{ {
m_SelectedDungeons = dungeons; m_SelectedDungeons = dungeons;
@@ -107,11 +100,6 @@ namespace Game.DungeonFinding
return m_Roles; return m_Roles;
} }
public string GetComment()
{
return m_Comment;
}
public List<uint> GetSelectedDungeons() public List<uint> GetSelectedDungeons()
{ {
return m_SelectedDungeons; return m_SelectedDungeons;
@@ -126,7 +114,6 @@ namespace Game.DungeonFinding
// Queue // Queue
LfgRoles m_Roles; LfgRoles m_Roles;
string m_Comment;
List<uint> m_SelectedDungeons = new List<uint>(); List<uint> m_SelectedDungeons = new List<uint>();
} }
} }
+1 -1
View File
@@ -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)] [WorldPacketHandler(ClientOpcodes.DfLeave)]
-14
View File
@@ -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 class DFSetRoles : ClientPacket
{ {
public DFSetRoles(WorldPacket packet) : base(packet) { } public DFSetRoles(WorldPacket packet) : base(packet) { }