mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Renamed BattleActionPacket -> CommandResultPacket as it better defines what these packets do. A command fires -> here is what happened due to it.
This commit is contained in:
		| @@ -43,7 +43,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|             if (returnCode != 0) | ||||
|             { | ||||
|                 interrupt = true; | ||||
|                 errorResult = new BattleAction(owner.actorId, (ushort)(returnCode == -1 ? 32558 : returnCode), 0); | ||||
|                 errorResult = new CommandResult(owner.actorId, (ushort)(returnCode == -1 ? 32558 : returnCode), 0); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
| @@ -60,7 +60,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|                     owner.GetSubState().chantId = 0xf0; | ||||
|                     owner.SubstateModified(); | ||||
|                     //You ready [skill] (6F000002: BLM, 6F000003: WHM, 0x6F000008: BRD) | ||||
|                     owner.DoBattleAction(skill.id, (uint)0x6F000000 | skill.castType, new BattleAction(target.actorId, 30126, 1, 0, 1)); | ||||
|                     owner.DoBattleAction(skill.id, (uint)0x6F000000 | skill.castType, new CommandResult(target.actorId, 30126, 1, 0, 1)); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|   | ||||
| @@ -74,7 +74,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|             // todo: send paralyzed/sleep message etc. | ||||
|             if (errorResult != null) | ||||
|             { | ||||
|                 owner.zone.BroadcastPacketAroundActor(owner, BattleActionX01Packet.BuildPacket(errorResult.targetId, errorResult.animation, 0x765D, errorResult)); | ||||
|                 owner.zone.BroadcastPacketAroundActor(owner, CommandResultX01Packet.BuildPacket(errorResult.targetId, errorResult.animation, 0x765D, errorResult)); | ||||
|                 errorResult = null; | ||||
|             } | ||||
|         } | ||||
| @@ -103,12 +103,12 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|             // todo: Change this to use a BattleCommand like the other states | ||||
|  | ||||
|             //List<BattleAction> actions = new List<BattleAction>(); | ||||
|             BattleActionContainer actions = new BattleActionContainer(); | ||||
|             CommandResultContainer actions = new CommandResultContainer(); | ||||
|              | ||||
|             var i = 0; | ||||
|             for (int hitNum = 0; hitNum < 1 /* owner.GetMod((uint) Modifier.HitCount)*/; hitNum++) | ||||
|             { | ||||
|                 BattleAction action = new BattleAction(target.actorId, 0x765D, (uint)HitEffect.Hit, 100, (byte)HitDirection.None, (byte) hitNum); | ||||
|                 CommandResult action = new CommandResult(target.actorId, 0x765D, (uint)HitEffect.Hit, 100, (byte)HitDirection.None, (byte) hitNum); | ||||
|                 action.commandType = CommandType.AutoAttack; | ||||
|                 action.actionType = ActionType.Physical; | ||||
|                 action.actionProperty = (ActionProperty) owner.GetMod(Modifier.AttackType); | ||||
| @@ -118,8 +118,8 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|             } | ||||
|  | ||||
|             // todo: this is fuckin stupid, probably only need *one* error packet, not an error for each action | ||||
|             BattleAction[] errors = (BattleAction[])actions.GetList().ToArray().Clone(); | ||||
|             BattleAction error = null;// new BattleAction(0, null, 0, 0); | ||||
|             CommandResult[] errors = (CommandResult[])actions.GetList().ToArray().Clone(); | ||||
|             CommandResult error = null;// new BattleAction(0, null, 0, 0); | ||||
|             //owner.DoActions(null, actions.GetList(), ref error); | ||||
|             //owner.OnAttack(this, actions[0], ref errorResult); | ||||
|             var anim = (uint)(17 << 24 | 1 << 12); | ||||
|   | ||||
| @@ -42,7 +42,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 errorResult = new BattleAction(owner.actorId, 32553, 0); | ||||
|                 errorResult = new CommandResult(owner.actorId, 32553, 0); | ||||
|                 interrupt = true; | ||||
|             } | ||||
|         } | ||||
| @@ -54,7 +54,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|             if (returnCode != 0) | ||||
|             { | ||||
|                 interrupt = true; | ||||
|                 errorResult = new BattleAction(target.actorId, (ushort)(returnCode == -1 ? 32553 : returnCode), 0, 0, 0, 1); | ||||
|                 errorResult = new CommandResult(target.actorId, (ushort)(returnCode == -1 ? 32553 : returnCode), 0, 0, 0, 1); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
| @@ -87,7 +87,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|                     } | ||||
|                     owner.GetSubState().chantId = 0xf0; | ||||
|                     owner.SubstateModified(); | ||||
|                     owner.DoBattleAction(spell.id, (uint) 0x6F000000 | spell.castType, new BattleAction(target.actorId, 30128, 1, 0, 1)); //You begin casting (6F000002: BLM, 6F000003: WHM, 0x6F000008: BRD) | ||||
|                     owner.DoBattleAction(spell.id, (uint) 0x6F000000 | spell.castType, new CommandResult(target.actorId, 30128, 1, 0, 1)); //You begin casting (6F000002: BLM, 6F000003: WHM, 0x6F000008: BRD) | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| @@ -163,7 +163,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|  | ||||
|             if (HasMoved()) | ||||
|             { | ||||
|                 errorResult = new BattleAction(owner.actorId, 30211, 0); | ||||
|                 errorResult = new CommandResult(owner.actorId, 30211, 0); | ||||
|                 errorResult.animation = 0x7F000002; | ||||
|                 interrupt = true; | ||||
|                 return; | ||||
|   | ||||
| @@ -19,7 +19,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|  | ||||
|         protected DateTime startTime; | ||||
|  | ||||
|         protected BattleAction errorResult; | ||||
|         protected CommandResult errorResult; | ||||
|  | ||||
|         protected bool isCompleted; | ||||
|  | ||||
|   | ||||
| @@ -42,7 +42,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|             if (returnCode != 0) | ||||
|             { | ||||
|                 interrupt = true; | ||||
|                 errorResult = new BattleAction(owner.actorId, (ushort)(returnCode == -1 ? 32558 : returnCode), 0); | ||||
|                 errorResult = new CommandResult(owner.actorId, (ushort)(returnCode == -1 ? 32558 : returnCode), 0); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
| @@ -90,7 +90,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state | ||||
|                         owner.GetSubState().chantId = 0xf0; | ||||
|                         owner.SubstateModified(); | ||||
|                         //You ready [skill] (6F000002: BLM, 6F000003: WHM, 0x6F000008: BRD) | ||||
|                         owner.DoBattleAction(skill.id, (uint)0x6F000000 | skill.castType, new BattleAction(target.actorId, 30126, 1, 0, 1)); | ||||
|                         owner.DoBattleAction(skill.id, (uint)0x6F000000 | skill.castType, new CommandResult(target.actorId, 30126, 1, 0, 1)); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user