Refactored some actor field names

This commit is contained in:
Filip Maj
2022-02-05 17:48:49 -05:00
parent 563118372a
commit 4e0cf36552
42 changed files with 462 additions and 462 deletions

View File

@@ -66,7 +66,7 @@ namespace Meteor.Map.actors.chara.ai.controllers
{
if(owner.aiContainer.GetTargetFind().CanTarget((Character) chara.target) && chara.target is BattleNpc && ((BattleNpc)chara.target).hateContainer.HasHateForTarget(chara))
{
owner.Engage(chara.target.actorId);
owner.Engage(chara.target.Id);
owner.hateContainer.AddBaseHate((Character) chara.target);
break;
}

View File

@@ -417,8 +417,8 @@ namespace Meteor.Map.actors.chara.ai.controllers
if (target != owner.target)
{
owner.target = target;
owner.currentLockedTarget = target?.actorId ?? Actor.INVALID_ACTORID;
owner.currentTarget = target?.actorId ?? Actor.INVALID_ACTORID;
owner.currentLockedTarget = target?.Id ?? Actor.INVALID_ACTORID;
owner.currentTarget = target?.Id ?? Actor.INVALID_ACTORID;
foreach (var player in owner.CurrentArea.GetActorsAroundActor<Player>(owner, 50))
player.QueuePacket(owner.GetHateTypePacket(player));

View File

@@ -332,7 +332,7 @@ namespace Meteor.Map.actors.chara.ai
{
if (!(owner is BattleNpc))
{
Program.Log.Error($"TargetFind.AddAllInHateList() owner [{owner.actorId}] {owner.customDisplayName} {owner.actorName} is not a BattleNpc");
Program.Log.Error($"TargetFind.AddAllInHateList() owner [{owner.Id}] {owner.DisplayName} {owner.Name} is not a BattleNpc");
}
else
{

View File

@@ -40,7 +40,7 @@ namespace Meteor.Map.actors.chara.ai.state
this.target = (skill.mainTarget & ValidTarget.SelfOnly) != 0 ? owner : target;
errorResult = new CommandResult(owner.actorId, 32553, 0);
errorResult = new CommandResult(owner.Id, 32553, 0);
if (returnCode == 0)
{
OnStart();
@@ -59,7 +59,7 @@ namespace Meteor.Map.actors.chara.ai.state
if (returnCode != 0)
{
interrupt = true;
errorResult = new CommandResult(owner.actorId, (ushort)(returnCode == -1 ? 32558 : returnCode), 0);
errorResult = new CommandResult(owner.Id, (ushort)(returnCode == -1 ? 32558 : returnCode), 0);
}
else
{
@@ -76,7 +76,7 @@ namespace Meteor.Map.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 CommandResult(target.actorId, 30126, 1, 0, 1));
owner.DoBattleAction(skill.id, (uint)0x6F000000 | skill.castType, new CommandResult(target.Id, 30126, 1, 0, 1));
}
}
}

View File

@@ -49,7 +49,7 @@ namespace Meteor.Map.actors.chara.ai.state
public override bool Update(DateTime tick)
{
if ((target == null || owner.target != target || owner.target?.actorId != owner.currentLockedTarget) && owner.isAutoAttackEnabled)
if ((target == null || owner.target != target || owner.target?.Id != owner.currentLockedTarget) && owner.isAutoAttackEnabled)
owner.aiContainer.ChangeTarget(target = owner.CurrentArea.FindActorInArea<Character>(owner.currentTarget));
if (target == null || target.IsDead())

View File

@@ -47,7 +47,7 @@ namespace Meteor.Map.actors.chara.ai.state
this.target = (spell.mainTarget & ValidTarget.SelfOnly) != 0 ? owner : target;
errorResult = new CommandResult(owner.actorId, 32553, 0);
errorResult = new CommandResult(owner.Id, 32553, 0);
if (returnCode == 0 && owner.CanUse(this.target, spell, errorResult))
{
OnStart();
@@ -65,7 +65,7 @@ namespace Meteor.Map.actors.chara.ai.state
if (returnCode != 0)
{
interrupt = true;
errorResult = new CommandResult(target.actorId, (ushort)(returnCode == -1 ? 32553 : returnCode), 0, 0, 0, 1);
errorResult = new CommandResult(target.Id, (ushort)(returnCode == -1 ? 32553 : returnCode), 0, 0, 0, 1);
}
else
{
@@ -98,7 +98,7 @@ namespace Meteor.Map.actors.chara.ai.state
}
owner.GetSubState().chantId = 0xf0;
owner.SubstateModified();
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)
owner.DoBattleAction(spell.id, (uint) 0x6F000000 | spell.castType, new CommandResult(target.Id, 30128, 1, 0, 1)); //You begin casting (6F000002: BLM, 6F000003: WHM, 0x6F000008: BRD)
}
}
}
@@ -174,7 +174,7 @@ namespace Meteor.Map.actors.chara.ai.state
if (HasMoved())
{
errorResult = new CommandResult(owner.actorId, 30211, 0);
errorResult = new CommandResult(owner.Id, 30211, 0);
errorResult.animation = 0x7F000002;
interrupt = true;
return;

View File

@@ -41,7 +41,7 @@ namespace Meteor.Map.actors.chara.ai.state
this.target = (skill.mainTarget & ValidTarget.SelfOnly) != 0 ? owner : target;
errorResult = new CommandResult(owner.actorId, 32553, 0);
errorResult = new CommandResult(owner.Id, 32553, 0);
if (returnCode == 0 && owner.CanUse(this.target, skill, errorResult))
{
OnStart();
@@ -60,7 +60,7 @@ namespace Meteor.Map.actors.chara.ai.state
if (returnCode != 0)
{
interrupt = true;
errorResult = new CommandResult(owner.actorId, (ushort)(returnCode == -1 ? 32558 : returnCode), 0);
errorResult = new CommandResult(owner.Id, (ushort)(returnCode == -1 ? 32558 : returnCode), 0);
}
else
{
@@ -106,7 +106,7 @@ namespace Meteor.Map.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 CommandResult(target.actorId, 30126, 1, 0, 1));
owner.DoBattleAction(skill.id, (uint)0x6F000000 | skill.castType, new CommandResult(target.Id, 30126, 1, 0, 1));
}
}
}

View File

@@ -97,7 +97,7 @@ namespace Meteor.Map.actors.chara.ai
{
//Unsure why 10105 is the textId used
//Also unsure why magicshield is used
CommandResult action = new CommandResult(owner.actorId, 10105, (uint)(HitEffect.MagicEffectType | HitEffect.MagicShield | HitEffect.NoResist), dotTick);
CommandResult action = new CommandResult(owner.Id, 10105, (uint)(HitEffect.MagicEffectType | HitEffect.MagicShield | HitEffect.NoResist), dotTick);
utils.BattleUtils.HandleStoneskin(owner, action);
// todo: figure out how to make red numbers appear for enemies getting hurt by dots
resultContainer.AddAction(action);
@@ -202,7 +202,7 @@ namespace Meteor.Map.actors.chara.ai
if (newEffect != null && !newEffect.GetSilentOnGain())
{
if (actionContainer != null)
actionContainer.AddAction(new CommandResult(owner.actorId, worldmasterTextId, newEffect.GetStatusEffectId() | (uint)HitEffect.StatusEffectType));
actionContainer.AddAction(new CommandResult(owner.Id, worldmasterTextId, newEffect.GetStatusEffectId() | (uint)HitEffect.StatusEffectType));
}
// wont send a message about losing effect here
@@ -254,7 +254,7 @@ namespace Meteor.Map.actors.chara.ai
{
//Only send a message if we're using an actioncontainer and the effect normally sends a message when it's lost
if (actionContainer != null)
actionContainer.AddAction(new CommandResult(owner.actorId, worldmasterTextId, effect.GetStatusEffectId() | (playEffect ? 0 : (uint)HitEffect.StatusLossType)));
actionContainer.AddAction(new CommandResult(owner.Id, worldmasterTextId, effect.GetStatusEffectId() | (playEffect ? 0 : (uint)HitEffect.StatusLossType)));
}
//hidden effects not in charawork
@@ -382,7 +382,7 @@ namespace Meteor.Map.actors.chara.ai
{
owner.charaWork.status[index] = statusId;
statusSubpackets.Add(SetActorStatusPacket.BuildPacket(owner.actorId, (ushort)index, statusId));
statusSubpackets.Add(SetActorStatusPacket.BuildPacket(owner.Id, (ushort)index, statusId));
owner.updateFlags |= ActorUpdateFlags.Status;
}
@@ -439,7 +439,7 @@ namespace Meteor.Map.actors.chara.ai
SetStatusAtIndex(index, (ushort) (newEffectId - 200000));
SetTimeAtIndex(index, time);
return new CommandResult(owner.actorId, 30330, (uint) HitEffect.StatusEffectType | newEffectId);
return new CommandResult(owner.Id, 30330, (uint) HitEffect.StatusEffectType | newEffectId);
}
}
}

View File

@@ -513,7 +513,7 @@ namespace Meteor.Map.actors.chara.ai.utils
if (skill != null && skill.numHits > 1)
{
if (action.hitNum == 1)
actionContainer?.AddAction(new CommandResult(attacker.actorId, 30441, 0));
actionContainer?.AddAction(new CommandResult(attacker.Id, 30441, 0));
textIds = MultiHitTypeTextIds;
}
@@ -717,7 +717,7 @@ namespace Meteor.Map.actors.chara.ai.utils
{
//If we need an extra action to show the status text
if (isAdditional)
results.AddAction(target.actorId, effect.GetStatusGainTextId(), skill.statusId | (uint) HitEffect.StatusEffectType);
results.AddAction(target.Id, effect.GetStatusGainTextId(), skill.statusId | (uint) HitEffect.StatusEffectType);
}
else
action.worldMasterTextId = 32002;//Is this right?
@@ -729,7 +729,7 @@ namespace Meteor.Map.actors.chara.ai.utils
{
//If we need an extra action to show the status text
if (isAdditional)
results.AddAction(target.actorId, 30328, skill.statusId | (uint) HitEffect.StatusEffectType);
results.AddAction(target.Id, 30328, skill.statusId | (uint) HitEffect.StatusEffectType);
}
else
action.worldMasterTextId = 32002;//Is this right?
@@ -905,7 +905,7 @@ namespace Meteor.Map.actors.chara.ai.utils
{
expChainNumber = effect.GetTier();
timeLimit = (uint)(GetChainTimeLimit(expChainNumber));
actionContainer?.AddEXPAction(new CommandResult(attacker.actorId, 33919, 0, expChainNumber, (byte)timeLimit));
actionContainer?.AddEXPAction(new CommandResult(attacker.Id, 33919, 0, expChainNumber, (byte)timeLimit));
}
totalBonus += GetChainBonus(expChainNumber);