mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Health updating fix, temp r0 fix
This commit is contained in:
@@ -39,22 +39,24 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.controllers
|
||||
public override void Update(DateTime tick)
|
||||
{
|
||||
lastUpdate = tick;
|
||||
|
||||
// todo: handle aggro/deaggro and other shit here
|
||||
if (!owner.aiContainer.IsEngaged())
|
||||
if (!owner.IsDead())
|
||||
{
|
||||
TryAggro(tick);
|
||||
}
|
||||
// todo: handle aggro/deaggro and other shit here
|
||||
if (!owner.aiContainer.IsEngaged())
|
||||
{
|
||||
TryAggro(tick);
|
||||
}
|
||||
|
||||
if(owner.aiContainer.IsEngaged())
|
||||
{
|
||||
//DoCombatTick(tick);
|
||||
}
|
||||
if (owner.aiContainer.IsEngaged())
|
||||
{
|
||||
DoCombatTick(tick);
|
||||
}
|
||||
|
||||
//Only move if owner isn't dead and is either too far away from their spawn point or is meant to roam
|
||||
if (!owner.IsDead() && (owner.isMovingToSpawn || owner.GetMobMod((uint) MobModifier.Roams) > 0))
|
||||
{
|
||||
DoRoamTick(tick);
|
||||
//Only move if owner isn't dead and is either too far away from their spawn point or is meant to roam
|
||||
else if (!owner.IsDead() && (owner.isMovingToSpawn || owner.GetMobMod((uint)MobModifier.Roams) > 0))
|
||||
{
|
||||
DoRoamTick(tick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +105,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.controllers
|
||||
Engage(owner.hateContainer.GetMostHatedTarget());
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Engage(Character target)
|
||||
{
|
||||
var canEngage = this.owner.aiContainer.InternalEngage(target);
|
||||
|
@@ -129,7 +129,6 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||
|
||||
private bool CanAttack()
|
||||
{
|
||||
return false;
|
||||
if (!owner.isAutoAttackEnabled)
|
||||
{
|
||||
return false;
|
||||
|
@@ -15,7 +15,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||
: base(owner, null)
|
||||
{
|
||||
owner.Disengage();
|
||||
//owner.ChangeState(SetActorStatePacket.MAIN_STATE_DEAD2);
|
||||
//owner.ChangeState(SetActorStatePacket.MAIN_STATE_DEAD);
|
||||
var deathStatePacket = SetActorStatePacket.BuildPacket(owner.actorId, SetActorStatePacket.MAIN_STATE_DEAD, owner.currentSubState);
|
||||
owner.zone.BroadcastPacketAroundActor(owner, deathStatePacket);
|
||||
canInterrupt = false;
|
||||
|
@@ -106,6 +106,8 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||
var errors = (BattleAction[])actions.Clone();
|
||||
owner.OnWeaponSkill(this, actions, ref errors);
|
||||
owner.DoBattleAction(skill.id, skill.battleAnimation, actions);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void TryInterrupt()
|
||||
|
Reference in New Issue
Block a user