Fixes crash in BattleGrounds.
This commit is contained in:
@@ -1559,7 +1559,7 @@ namespace Game.BattleGrounds
|
||||
|
||||
public void SendMessage2ToAll(CypherStrings entry, ChatMsg type, Player source, CypherStrings arg1 = 0, CypherStrings arg2 = 0)
|
||||
{
|
||||
var bg_builder = new BattlegroundChatBuilder(type, entry, source, arg1, arg2);
|
||||
var bg_builder = new Battleground2ChatBuilder(type, entry, source, arg1, arg2);
|
||||
var bg_do = new LocalizedPacketDo(bg_builder);
|
||||
BroadcastWorker(bg_do);
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@ namespace Game.BattleGrounds
|
||||
|
||||
void BuildBattlegroundStatusHeader(ref BattlefieldStatusHeader header, Battleground bg, Player player, uint ticketId, uint joinTime, ArenaTypes arenaType)
|
||||
{
|
||||
header.Ticket = new RideTicket();
|
||||
header.Ticket.RequesterGuid = player.GetGUID();
|
||||
header.Ticket.Id = ticketId;
|
||||
header.Ticket.Type = RideType.Battlegrounds;
|
||||
|
||||
@@ -567,10 +567,8 @@ namespace Game.BattleGrounds
|
||||
m_PointState[i] = EotSPointState.Uncontrolled;
|
||||
m_PointBarStatus[i] = EotSProgressBarConsts.ProgressBarStateMiddle;
|
||||
m_PlayersNearPoint[i].Clear();
|
||||
//m_PlayersNearPoint[i].reserve(15); //tip size
|
||||
}
|
||||
m_PlayersNearPoint[EotSPoints.PlayersOutOfPoints].Clear();
|
||||
//m_PlayersNearPoint[EotSPoints.PlayersOutOfPoints].reserve(30);
|
||||
}
|
||||
|
||||
void RespawnFlag(bool send_message)
|
||||
|
||||
@@ -494,7 +494,11 @@ namespace Game.DungeonFinding
|
||||
return;
|
||||
}
|
||||
|
||||
RideTicket ticket = new RideTicket(guid, GetQueueId(gguid), RideType.Lfg, (int)Time.UnixTime);
|
||||
RideTicket ticket = new RideTicket();
|
||||
ticket.RequesterGuid = guid;
|
||||
ticket.Id = GetQueueId(gguid);
|
||||
ticket.Type = RideType.Lfg;
|
||||
ticket.Time = (int)Time.UnixTime;
|
||||
|
||||
string debugNames = "";
|
||||
if (grp) // Begin rolecheck
|
||||
|
||||
@@ -5493,7 +5493,6 @@ namespace Game.Entities
|
||||
SendPacket(sendSpellCharges);
|
||||
|
||||
ActiveGlyphs activeGlyphs = new ActiveGlyphs();
|
||||
//activeGlyphs.Glyphs.reserve(GetGlyphs(GetActiveTalentGroup()).size());
|
||||
foreach (uint glyphId in GetGlyphs(GetActiveTalentGroup()))
|
||||
{
|
||||
List<uint> bindableSpells = Global.DB2Mgr.GetGlyphBindableSpells(glyphId);
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace Game.Network.Packets
|
||||
Ticket.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public RideTicket Ticket;
|
||||
public RideTicket Ticket = new RideTicket();
|
||||
}
|
||||
|
||||
public class BattlefieldStatusNeedConfirmation : ServerPacket
|
||||
@@ -286,7 +286,7 @@ namespace Game.Network.Packets
|
||||
public ulong QueueID;
|
||||
public ObjectGuid ClientID;
|
||||
public int Reason;
|
||||
public RideTicket Ticket;
|
||||
public RideTicket Ticket = new RideTicket();
|
||||
}
|
||||
|
||||
class BattlemasterJoin : ClientPacket
|
||||
@@ -339,7 +339,7 @@ namespace Game.Network.Packets
|
||||
AcceptedInvite = _worldPacket.HasBit();
|
||||
}
|
||||
|
||||
public RideTicket Ticket;
|
||||
public RideTicket Ticket = new RideTicket();
|
||||
public bool AcceptedInvite;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Game.Network.Packets
|
||||
Ticket.Read(_worldPacket);
|
||||
}
|
||||
|
||||
public RideTicket Ticket;
|
||||
public RideTicket Ticket = new RideTicket();
|
||||
}
|
||||
|
||||
class DFProposalResponse : ClientPacket
|
||||
@@ -69,7 +69,7 @@ namespace Game.Network.Packets
|
||||
Accepted = _worldPacket.HasBit();
|
||||
}
|
||||
|
||||
public RideTicket Ticket;
|
||||
public RideTicket Ticket = new RideTicket();
|
||||
public ulong InstanceID;
|
||||
public uint ProposalID;
|
||||
public bool Accepted;
|
||||
@@ -194,7 +194,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public RideTicket Ticket;
|
||||
public RideTicket Ticket = new RideTicket();
|
||||
public byte SubType;
|
||||
public byte Reason;
|
||||
public List<uint> Slots = new List<uint>();
|
||||
@@ -735,14 +735,6 @@ namespace Game.Network.Packets
|
||||
|
||||
public class RideTicket
|
||||
{
|
||||
public RideTicket(ObjectGuid requesterGuid, uint id, RideType type, int time)
|
||||
{
|
||||
RequesterGuid = requesterGuid;
|
||||
Id = id;
|
||||
Type = type;
|
||||
Time = time;
|
||||
}
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
RequesterGuid = data.ReadPackedGuid();
|
||||
|
||||
@@ -307,7 +307,9 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
RideTicket = new RideTicket();
|
||||
RideTicket.Read(data);
|
||||
|
||||
GroupFinderActivityID = data.ReadUInt32();
|
||||
LastTitleAuthorGuid = data.ReadPackedGuid();
|
||||
LastDescriptionAuthorGuid = data.ReadPackedGuid();
|
||||
@@ -336,6 +338,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
RideTicket = new RideTicket();
|
||||
RideTicket.Read(data);
|
||||
|
||||
Comment = data.ReadString(data.ReadBits<uint>(9));
|
||||
|
||||
Reference in New Issue
Block a user