mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-24 19:38:26 +02:00
Merging
This commit is contained in:
commit
205d3619d6
49 changed files with 118 additions and 491 deletions
|
@ -136,7 +136,6 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
this.statusEffects = new StatusEffectContainer(this);
|
||||
|
||||
// todo: move this somewhere more appropriate
|
||||
ResetMoveSpeeds();
|
||||
// todo: base this on equip and shit
|
||||
SetMod((uint)Modifier.AttackRange, 3);
|
||||
SetMod((uint)Modifier.AttackDelay, (Program.Random.Next(30, 60) * 100));
|
||||
|
@ -279,22 +278,8 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
|
||||
public void FollowTarget(Actor target, float stepSize = 1.2f, int maxPath = 25, float radius = 0.0f)
|
||||
{
|
||||
var player = target as Player;
|
||||
|
||||
if (player != null)
|
||||
{
|
||||
if (this.target != player)
|
||||
{
|
||||
this.target = target;
|
||||
}
|
||||
// todo: move this to own function thing
|
||||
this.oldMoveState = this.moveState;
|
||||
this.moveState = 2;
|
||||
updateFlags |= ActorUpdateFlags.Position | ActorUpdateFlags.Speed;
|
||||
//this.moveSpeeds = player.moveSpeeds;
|
||||
|
||||
PathTo(player.positionX, player.positionY, player.positionZ, stepSize, maxPath, radius);
|
||||
}
|
||||
if (target != null)
|
||||
PathTo(target.positionX, target.positionY, target.positionZ, stepSize, maxPath, radius);
|
||||
}
|
||||
|
||||
public Int64 GetMod(uint modifier)
|
||||
|
@ -690,12 +675,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
}
|
||||
|
||||
// todo: call onAttack/onDamageTaken
|
||||
BattleUtils.DamageTarget(this, target, action);
|
||||
target.OnDamageTaken(this, action, DamageTakenType.Ability);
|
||||
|
||||
if (target is BattleNpc)
|
||||
((BattleNpc)target).lastAttacker = this;
|
||||
|
||||
BattleUtils.DamageTarget(this, target, action, DamageTakenType.Attack);
|
||||
AddTP(115);
|
||||
target.AddTP(100);
|
||||
}
|
||||
|
@ -708,20 +688,8 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
this.DelMP(spellCost); // mpCost can be set in script e.g. if caster has something for free spells
|
||||
|
||||
foreach (BattleAction action in actions)
|
||||
{
|
||||
if (zone.FindActorInArea<Character>(action.targetId) is Character chara)
|
||||
{
|
||||
if (chara != null && chara is BattleNpc)
|
||||
{
|
||||
((BattleNpc)chara).hateContainer.UpdateHate(this, action.amount);
|
||||
((BattleNpc)chara).lastAttacker = this;
|
||||
}
|
||||
|
||||
BattleUtils.DamageTarget(this, chara, action);
|
||||
}
|
||||
}
|
||||
|
||||
if (target is BattleNpc)
|
||||
BattleUtils.DamageTarget(this, chara, action, DamageTakenType.Magic);
|
||||
|
||||
lua.LuaEngine.GetInstance().OnSignal("spellUsed");
|
||||
}
|
||||
|
@ -733,22 +701,8 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
this.DelTP(skill.tpCost);
|
||||
|
||||
foreach (BattleAction action in actions)
|
||||
{
|
||||
if (zone.FindActorInArea<Character>(action.targetId) is Character chara)
|
||||
{
|
||||
if (chara != null && chara is BattleNpc)
|
||||
{
|
||||
((BattleNpc)chara).hateContainer.UpdateHate(this, action.amount);
|
||||
((BattleNpc)chara).lastAttacker = this;
|
||||
}
|
||||
|
||||
BattleUtils.DamageTarget(this, chara, action);
|
||||
}
|
||||
}
|
||||
|
||||
if (target is BattleNpc)
|
||||
((BattleNpc)target).lastAttacker = this;
|
||||
|
||||
BattleUtils.DamageTarget(this, chara, action, DamageTakenType.Weaponskill);
|
||||
|
||||
lua.LuaEngine.GetInstance().OnSignal("weaponskillUsed");
|
||||
}
|
||||
|
@ -821,7 +775,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
|
||||
public bool IsMonster()
|
||||
{
|
||||
return this is BattleNpc && !IsAlly();
|
||||
return this is BattleNpc;
|
||||
}
|
||||
|
||||
public bool IsPet()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue