mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-21 20:27:47 +00:00
Cleaned up the emotes code.
This commit is contained in:
parent
0e8de966a9
commit
1d9f57a385
3 changed files with 14 additions and 11 deletions
|
@ -771,9 +771,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||||
return mountState;
|
return mountState;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DoEmote(uint animId, uint descId)
|
public void DoEmote(uint targettedActor, uint animId, uint descId)
|
||||||
{
|
{
|
||||||
BroadcastPacket(ActorDoEmotePacket.BuildPacket(actorId, actorId, currentTarget, animId, descId), true);
|
BroadcastPacket(ActorDoEmotePacket.BuildPacket(actorId, actorId, targettedActor, animId, descId), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGameMessage(Actor sourceActor, Actor textIdOwner, ushort textId, byte log, params object[] msgParams)
|
public void SendGameMessage(Actor sourceActor, Actor textIdOwner, ushort textId, byte log, params object[] msgParams)
|
||||||
|
|
|
@ -14,16 +14,18 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||||
{
|
{
|
||||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||||
|
|
||||||
if (targettedActorId == 0xC0000000)
|
if (targettedActorId == 0)
|
||||||
|
{
|
||||||
targettedActorId = sourceActorId;
|
targettedActorId = sourceActorId;
|
||||||
|
if (descriptionId != 10105)
|
||||||
|
descriptionId++;
|
||||||
|
}
|
||||||
|
|
||||||
using (MemoryStream mem = new MemoryStream(data))
|
using (MemoryStream mem = new MemoryStream(data))
|
||||||
{
|
{
|
||||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||||
{
|
{
|
||||||
uint realAnimID = 0x5000000 | (animationId << 12);
|
uint realAnimID = 0x5000000 | (animationId << 12);
|
||||||
if (descriptionId != 10105 && targettedActorId == sourceActorId)
|
|
||||||
descriptionId++;
|
|
||||||
binWriter.Write((UInt32)realAnimID);
|
binWriter.Write((UInt32)realAnimID);
|
||||||
binWriter.Write((UInt32)targettedActorId);
|
binWriter.Write((UInt32)targettedActorId);
|
||||||
binWriter.Write((UInt32)descriptionId);
|
binWriter.Write((UInt32)descriptionId);
|
||||||
|
|
|
@ -63,12 +63,16 @@ emoteTable = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function onEventStarted(player, actor, triggerName, emoteId)
|
function onEventStarted(player, actor, triggerName, emoteId, unknownArg1, arg2, arg3, targetId)
|
||||||
|
|
||||||
|
if (targetId == nil) then
|
||||||
|
targetId = 0;
|
||||||
|
end
|
||||||
|
|
||||||
if (player:GetState() == 0) then
|
if (player:GetState() == 0) then
|
||||||
emote = emoteTable[emoteId];
|
emote = emoteTable[emoteId];
|
||||||
if (emote ~= nil) then
|
if (emote ~= nil) then
|
||||||
player:doEmote(emote.animId, emote.descId);
|
player:doEmote(targetId, emote.animId, emote.descId);
|
||||||
else
|
else
|
||||||
player:SendMessage(0x20, "", string.format("Not implemented; EmoteId: %d", emoteId));
|
player:SendMessage(0x20, "", string.format("Not implemented; EmoteId: %d", emoteId));
|
||||||
end
|
end
|
||||||
|
@ -77,6 +81,3 @@ function onEventStarted(player, actor, triggerName, emoteId)
|
||||||
player:EndEvent();
|
player:EndEvent();
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function onEventUpdate(player, npc)
|
|
||||||
end
|
|
Loading…
Add table
Reference in a new issue