mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 14:34:32 +02: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:
parent
7c7742fb35
commit
e236e1d207
17 changed files with 199 additions and 199 deletions
|
@ -0,0 +1,76 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.send.actor.battle
|
||||
{
|
||||
class CommandResultContainer
|
||||
{
|
||||
private List<CommandResult> actionsList = new List<CommandResult>();
|
||||
|
||||
//EXP messages are always the last mesages in battlea ction packets, so they get appended after all the rest of the actions are done.
|
||||
private List<CommandResult> expActionList = new List<CommandResult>();
|
||||
|
||||
public CommandResultContainer()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AddAction(uint targetId, ushort worldMasterTextId, uint effectId, ushort amount = 0, byte param = 0, byte hitNum = 0)
|
||||
{
|
||||
AddAction(new CommandResult(targetId, worldMasterTextId, effectId, amount, param, hitNum));
|
||||
}
|
||||
|
||||
//Just to make scripting simpler
|
||||
public void AddMPAction(uint targetId, ushort worldMasterTextId, ushort amount)
|
||||
{
|
||||
uint effectId = (uint) (HitEffect.MagicEffectType | HitEffect.MP | HitEffect.Heal);
|
||||
AddAction(targetId, worldMasterTextId, effectId, amount);
|
||||
}
|
||||
|
||||
public void AddHPAction(uint targetId, ushort worldMasterTextId, ushort amount)
|
||||
{
|
||||
uint effectId = (uint)(HitEffect.MagicEffectType | HitEffect.Heal);
|
||||
AddAction(targetId, worldMasterTextId, effectId, amount);
|
||||
}
|
||||
|
||||
public void AddTPAction(uint targetId, ushort worldMasterTextId, ushort amount)
|
||||
{
|
||||
uint effectId = (uint)(HitEffect.MagicEffectType | HitEffect.TP);
|
||||
AddAction(targetId, worldMasterTextId, effectId, amount);
|
||||
}
|
||||
|
||||
public void AddAction(CommandResult action)
|
||||
{
|
||||
if (action != null)
|
||||
actionsList.Add(action);
|
||||
}
|
||||
|
||||
public void AddActions(List<CommandResult> actions)
|
||||
{
|
||||
actionsList.AddRange(actions);
|
||||
}
|
||||
|
||||
public void AddEXPAction(CommandResult action)
|
||||
{
|
||||
expActionList.Add(action);
|
||||
}
|
||||
|
||||
public void AddEXPActions(List<CommandResult> actionList)
|
||||
{
|
||||
expActionList.AddRange(actionList);
|
||||
}
|
||||
|
||||
public void CombineLists()
|
||||
{
|
||||
actionsList.AddRange(expActionList);
|
||||
}
|
||||
|
||||
public List<CommandResult> GetList()
|
||||
{
|
||||
return actionsList;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue