Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Maple2.File.Ingest/Mapper/AdditionalEffectMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ private static AdditionalEffectMetadataStatus Convert(StatusProperty status, Off
return null;
}

return new AdditionalEffectMetadataDot.DotBuff(Target: (SkillTargetType) dotBuff.target, Id: dotBuff.buffID, Level: dotBuff.buffLevel);
return new AdditionalEffectMetadataDot.DotBuff(Target: (DotTargetType) dotBuff.target, Id: dotBuff.buffID, Level: dotBuff.buffLevel);
}

private static AdditionalEffectMetadataShield? Convert(ShieldProperty shield) {
Expand Down
5 changes: 5 additions & 0 deletions Maple2.Model/Enum/Skill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ public enum SkillTargetType {
RegionPet = 8,
}

public enum DotTargetType {
Caster = 0,
Owner = 1,
}

public enum ApplyTargetType {
None = 0,
Hostile = 1,
Expand Down
2 changes: 1 addition & 1 deletion Maple2.Model/Metadata/AdditionalEffectMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public record DotDamage(
bool NotKill);

public record DotBuff(
SkillTargetType Target, // 0,1
DotTargetType Target, // 0,1
int Id,
short Level);
}
Expand Down
6 changes: 3 additions & 3 deletions Maple2.Server.Game/Model/Field/Buff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ private void ApplyDotBuff() {
}

AdditionalEffectMetadataDot.DotBuff dotBuff = Metadata.Dot.Buff;
if (dotBuff.Target == SkillTargetType.Owner) {
Owner.Buffs.AddBuff(Caster, Owner, dotBuff.Id, dotBuff.Level, Field.FieldTick);
if (dotBuff.Target == DotTargetType.Caster) {
Caster.Buffs.AddBuff(Owner, Caster, dotBuff.Id, dotBuff.Level, Field.FieldTick);
} else {
Caster.Buffs.AddBuff(Caster, Owner, dotBuff.Id, dotBuff.Level, Field.FieldTick);
Owner.Buffs.AddBuff(Caster, Owner, dotBuff.Id, dotBuff.Level, Field.FieldTick);
}
}

Expand Down
Loading