fix crash in gm command thing, commit stupid shit i havent figured out yet

This commit is contained in:
Tahir Akhlaq
2017-08-21 00:40:41 +01:00
parent 1856cc0634
commit a89fc64555
7 changed files with 52 additions and 31 deletions

View File

@@ -86,11 +86,17 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
utils.BattleUtils.DamageTarget(owner, target, damage);
lua.LuaEngine.CallLuaBattleAction(owner, "onAttack", false, owner, target, damage);
foreach (var player in owner.zone.GetActorsAroundActor<Player>(owner, 50))
player.QueuePacket(BattleActionX01Packet.BuildPacket(player.actorId, owner.actorId, target.actorId, 0, 537094006, 0, 27260, (ushort)damage, 0));
//if (target is Player)
// ((Player)target).SendPacket("139.bin");
{
foreach (var player in owner.zone.GetActorsAroundActor<Player>(owner, 50))
{
var packet = BattleActionX01Packet.BuildPacket(player.actorId, owner.actorId, target.actorId, 0, 537094006, 0, 27260, (ushort)damage, 0);
player.QueuePacket(packet);
Program.Log.Error("asudyaisydaisydaioysdaisydaiosdyaiosuydaisydiaosydioasydaiusdyaisduy");
packet.DebugPrintSubPacket();
}
if (target is Player)
((Player)target).SendPacket("139_attack");
}
target.AddHP((short)damage);
attackTime = attackTime.AddMilliseconds(owner.GetAttackDelayMs());
owner.LookAt(target);