Small fixes

Fixed final message for multi-hit attacks.
Fixed self targeting for commands
Made it so player.lua doesn't skip over home points setting, just the quest setitng.
Began adding knockback effect handling
This commit is contained in:
yogurt 2018-06-25 18:20:20 -05:00
parent 79f2edf406
commit ace4dfe58f
8 changed files with 59 additions and 42 deletions

View file

@ -1072,6 +1072,7 @@ namespace FFXIVClassic_Map_Server.Actors
foreach (var chara in targets)
{
ushort hitCount = 0;
ushort totalDamage = 0;
for (int hitNum = 1; hitNum <= command.numHits; hitNum++)
{
var action = new BattleAction(chara.actorId, command, (byte)GetHitDirection(chara), (byte) hitNum);
@ -1084,13 +1085,16 @@ namespace FFXIVClassic_Map_Server.Actors
{
hitTarget = true;
hitCount++;
totalDamage += action.amount;
}
}
if (command.numHits > 1)
{
//You use [command] on [target].
actions.AddAction(new BattleAction(chara.actorId, 30442, 0, 0, (byte)hitCount));
//30442: [hitCount]fold Attack! [chara] takes a total of totalDamage points of damage.
//30450: All attacks miss!
ushort textId = (ushort) (hitTarget ? 30442 : 30450);
actions.AddAction(new BattleAction(chara.actorId, textId, 0, totalDamage, (byte)hitCount));
}
}