mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Fixed bug with Broadcast Packet. Was adding player to the instance list while it shouldn't have been, and designed BroadcastPacket assuming so. Cleaned it all up and fixed, so now emote work after warp. Fixed Chocobo packets so correct appearance will show when player is spawned while riding gobbue.
This commit is contained in:
parent
33e580ed38
commit
5dff4cbdd3
@ -613,7 +613,7 @@ namespace FFXIVClassic_Map_Server
|
|||||||
|
|
||||||
//Send packets
|
//Send packets
|
||||||
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId));
|
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId));
|
||||||
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x10));
|
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x2));
|
||||||
player.SendZoneInPackets(this, spawnType);
|
player.SendZoneInPackets(this, spawnType);
|
||||||
player.playerSession.ClearInstance();
|
player.playerSession.ClearInstance();
|
||||||
player.SendInstanceUpdate();
|
player.SendInstanceUpdate();
|
||||||
|
@ -344,6 +344,11 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
subpackets.Add(Database.GetAchievementsPacket(this));
|
subpackets.Add(Database.GetAchievementsPacket(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mountState == 1)
|
||||||
|
subpackets.Add(SetCurrentMountChocoboPacket.BuildPacket(actorId, chocoboAppearance));
|
||||||
|
else if (mountState == 2)
|
||||||
|
subpackets.Add(SetCurrentMountGoobbuePacket.BuildPacket(actorId, 1));
|
||||||
|
|
||||||
return subpackets;
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -621,13 +626,19 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
|
|
||||||
public void BroadcastPacket(SubPacket packet, bool sendToSelf)
|
public void BroadcastPacket(SubPacket packet, bool sendToSelf)
|
||||||
{
|
{
|
||||||
|
if (sendToSelf)
|
||||||
|
{
|
||||||
|
SubPacket clonedPacket = new SubPacket(packet, actorId);
|
||||||
|
QueuePacket(clonedPacket);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (Actor a in playerSession.actorInstanceList)
|
foreach (Actor a in playerSession.actorInstanceList)
|
||||||
{
|
{
|
||||||
if (a is Player)
|
if (a is Player)
|
||||||
{
|
{
|
||||||
Player p = (Player)a;
|
Player p = (Player)a;
|
||||||
|
|
||||||
if (p.Equals(this) && !sendToSelf)
|
if (p.Equals(this))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SubPacket clonedPacket = new SubPacket(packet, a.actorId);
|
SubPacket clonedPacket = new SubPacket(packet, a.actorId);
|
||||||
@ -744,19 +755,18 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, 1));
|
QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendChocoboAppearance()
|
public void SendMountAppearance()
|
||||||
{
|
{
|
||||||
|
if (mountState == 1)
|
||||||
BroadcastPacket(SetCurrentMountChocoboPacket.BuildPacket(actorId, chocoboAppearance), true);
|
BroadcastPacket(SetCurrentMountChocoboPacket.BuildPacket(actorId, chocoboAppearance), true);
|
||||||
}
|
else if (mountState == 2)
|
||||||
|
|
||||||
public void SendGoobbueAppearance()
|
|
||||||
{
|
|
||||||
BroadcastPacket(SetCurrentMountGoobbuePacket.BuildPacket(actorId, 1), true);
|
BroadcastPacket(SetCurrentMountGoobbuePacket.BuildPacket(actorId, 1), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMountState(byte mountState)
|
public void SetMountState(byte mountState)
|
||||||
{
|
{
|
||||||
this.mountState = mountState;
|
this.mountState = mountState;
|
||||||
|
SendMountAppearance();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte GetMountState()
|
public byte GetMountState()
|
||||||
|
@ -28,7 +28,6 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||||||
{
|
{
|
||||||
this.id = sessionId;
|
this.id = sessionId;
|
||||||
playerActor = new Player(this, sessionId);
|
playerActor = new Player(this, sessionId);
|
||||||
actorInstanceList.Add(playerActor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void QueuePacket(List<SubPacket> packets)
|
public void QueuePacket(List<SubPacket> packets)
|
||||||
|
@ -14,12 +14,10 @@ function onEventStarted(player, actor, triggerName, isGoobbue)
|
|||||||
|
|
||||||
if (isGoobbue ~= true) then
|
if (isGoobbue ~= true) then
|
||||||
player:ChangeMusic(83);
|
player:ChangeMusic(83);
|
||||||
player:SendChocoboAppearance();
|
|
||||||
player:SendGameMessage(player, worldMaster, 26001, 0x20);
|
player:SendGameMessage(player, worldMaster, 26001, 0x20);
|
||||||
player:SetMountState(1);
|
player:SetMountState(1);
|
||||||
else
|
else
|
||||||
player:ChangeMusic(98);
|
player:ChangeMusic(98);
|
||||||
player:SendGoobbueAppearance();
|
|
||||||
player:SendGameMessage(player, worldMaster, 26019, 0x20);
|
player:SendGameMessage(player, worldMaster, 26019, 0x20);
|
||||||
player:SetMountState(2);
|
player:SetMountState(2);
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user