mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-20 03:37:48 +00:00
Fixed bug where when a mob was insta-killed they would disappear (not die). More renames for action -> result. Reverted result packet unknown from 0x801 to 0x810. Added hitnum. Fixed isolation.
This commit is contained in:
parent
e236e1d207
commit
080f9ea23d
5 changed files with 31 additions and 23 deletions
|
@ -443,7 +443,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
{
|
||||
if (a is Player)
|
||||
{
|
||||
if (isIsolated && packet.header.sourceId != a.actorId)
|
||||
if (isIsolated)
|
||||
continue;
|
||||
|
||||
SubPacket clonedPacket = new SubPacket(packet, a.actorId);
|
||||
|
|
|
@ -224,25 +224,25 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
zone.BroadcastPacketAroundActor(this, CommandResultX00Packet.BuildPacket(actorId, animationId, commandId));
|
||||
}
|
||||
|
||||
public void DoBattleAction(ushort commandId, uint animationId, CommandResult action)
|
||||
public void DoBattleAction(ushort commandId, uint animationId, CommandResult result)
|
||||
{
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(actorId, animationId, commandId, action));
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(actorId, animationId, commandId, result));
|
||||
}
|
||||
|
||||
public void DoBattleAction(ushort commandId, uint animationId, CommandResult[] actions)
|
||||
public void DoBattleAction(ushort commandId, uint animationId, CommandResult[] results)
|
||||
{
|
||||
int currentIndex = 0;
|
||||
//AoE abilities only ever hit 16 people, so we probably won't need this loop anymore
|
||||
//Apparently aoe are limited to 8?
|
||||
while (true)
|
||||
{
|
||||
if (actions.Length - currentIndex >= 10)
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX18Packet.BuildPacket(actorId, animationId, commandId, actions, ref currentIndex));
|
||||
else if (actions.Length - currentIndex > 1)
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX10Packet.BuildPacket(actorId, animationId, commandId, actions, ref currentIndex));
|
||||
else if (actions.Length - currentIndex == 1)
|
||||
if (results.Length - currentIndex >= 10)
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX18Packet.BuildPacket(actorId, animationId, commandId, results, ref currentIndex));
|
||||
else if (results.Length - currentIndex > 1)
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX10Packet.BuildPacket(actorId, animationId, commandId, results, ref currentIndex));
|
||||
else if (results.Length - currentIndex == 1)
|
||||
{
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(actorId, animationId, commandId, actions[currentIndex]));
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(actorId, animationId, commandId, results[currentIndex]));
|
||||
currentIndex++;
|
||||
}
|
||||
else
|
||||
|
@ -253,19 +253,19 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
}
|
||||
}
|
||||
|
||||
public void DoBattleAction(ushort commandId, uint animationId, List<CommandResult> actions)
|
||||
public void DoBattleAction(ushort commandId, uint animationId, List<CommandResult> results)
|
||||
{
|
||||
int currentIndex = 0;
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (actions.Count - currentIndex >= 10)
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX18Packet.BuildPacket(actorId, animationId, commandId, actions, ref currentIndex));
|
||||
else if (actions.Count - currentIndex > 1)
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX10Packet.BuildPacket(actorId, animationId, commandId, actions, ref currentIndex));
|
||||
else if (actions.Count - currentIndex == 1)
|
||||
if (results.Count - currentIndex >= 10)
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX18Packet.BuildPacket(actorId, animationId, commandId, results, ref currentIndex));
|
||||
else if (results.Count - currentIndex > 1)
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX10Packet.BuildPacket(actorId, animationId, commandId, results, ref currentIndex));
|
||||
else if (results.Count - currentIndex == 1)
|
||||
{
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(actorId, animationId, commandId, actions[currentIndex]));
|
||||
zone.BroadcastPacketAroundActor(this, CommandResultX01Packet.BuildPacket(actorId, animationId, commandId, results[currentIndex]));
|
||||
currentIndex++;
|
||||
}
|
||||
else
|
||||
|
@ -374,9 +374,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
|
||||
if ((updateFlags & ActorUpdateFlags.SubState) != 0)
|
||||
{
|
||||
packets.Add(SetActorSubStatePacket.BuildPacket(actorId, currentSubState));
|
||||
packets.Add(CommandResultX00Packet.BuildPacket(actorId, 0x72000062, 0));
|
||||
packets.Add(CommandResultX01Packet.BuildPacket(actorId, 0x7C000062, 21001, new CommandResult(actorId, 0, 1)));
|
||||
//packets.Add(SetActorSubStatePacket.BuildPacket(actorId, currentSubState));
|
||||
//packets.Add(CommandResultX00Packet.BuildPacket(actorId, 0x72000062, 0));
|
||||
//packets.Add(CommandResultX01Packet.BuildPacket(actorId, 0x7C000062, 21001, new CommandResult(actorId, 0, 1)));
|
||||
|
||||
updateFlags &= ~ActorUpdateFlags.SubState;
|
||||
//DoBattleAction(21001, 0x7C000062, new BattleAction(this.actorId, 0, 1, 0, 0, 1)); //Attack Mode
|
||||
|
|
|
@ -227,6 +227,14 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.utils
|
|||
if (defender != null)
|
||||
{
|
||||
|
||||
//Bugfix, mobs that instantly died were insta disappearing due to lastAttacker == null.
|
||||
if (defender is BattleNpc)
|
||||
{
|
||||
var bnpc = defender as BattleNpc;
|
||||
if (bnpc.lastAttacker == null)
|
||||
bnpc.lastAttacker = attacker;
|
||||
}
|
||||
|
||||
defender.DelHP((short)action.amount);
|
||||
attacker.OnDamageDealt(defender, action, actionContainer);
|
||||
defender.OnDamageTaken(attacker, action, actionContainer);
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle
|
|||
binWriter.Seek(0x20, SeekOrigin.Begin);
|
||||
binWriter.Write((UInt32)1); //Num actions (always 1 for this)
|
||||
binWriter.Write((UInt16)commandId);
|
||||
binWriter.Write((UInt16)0x801); //?
|
||||
binWriter.Write((UInt16)0x810); //?
|
||||
|
||||
binWriter.Write((UInt32)action.targetId);
|
||||
|
||||
|
@ -42,7 +42,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle
|
|||
|
||||
binWriter.Write((UInt32)action.effectId);
|
||||
binWriter.Write((Byte)action.param);
|
||||
binWriter.Write((Byte)1); //?
|
||||
binWriter.Write((Byte)action.hitNum);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle
|
|||
binWriter.Seek(0x20, SeekOrigin.Begin);
|
||||
binWriter.Write((UInt32)max); //Num actions
|
||||
binWriter.Write((UInt16)commandId);
|
||||
binWriter.Write((UInt16)0x818); //?
|
||||
binWriter.Write((UInt16)0x810); //?
|
||||
|
||||
binWriter.Seek(0x28, SeekOrigin.Begin);
|
||||
for (int i = 0; i < max; i++)
|
||||
|
|
Loading…
Add table
Reference in a new issue