Skip to content

Commit

Permalink
auto cast missile effect bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wkdgmr committed Sep 12, 2023
1 parent bf24db3 commit 2a65ec1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,7 @@ void HolyFireDamage(Player &attacker, Player &target)
mdam -= mdam * (attacker._pFireResist / 100);
mdam = mdam << 6;
NetSendCmdDamage(true, attacker.getId(), mdam, DamageType::Fire);
AddMissile(attacker.position.tile, { 0, 0 }, Direction::South, MissileID::FireWall, TARGET_MONSTERS, target.getId(), 0, 0);
NetSendAddMissile(true, attacker.position.tile, { 0, 0 }, Direction::South, MissileID::FireWall, TARGET_MONSTERS, target.getId(), 0, 0);
}
}
Expand Down Expand Up @@ -976,6 +977,8 @@ void CastHolyShock(Player &attacker, Player &target)
bsmdam -= bsmdam * (attacker._pLghtResist / 100);
bsmdam = bsmdam << 6;
NetSendCmdDamage(true, attacker.getId(), bsmdam, DamageType::Lightning);
AddMissile(target.position.tile, target.position.temp, target._pdir, MissileID::FlashBottom, TARGET_MONSTERS, target.getId(), mdam, spellLevel);
AddMissile(target.position.tile, target.position.temp, target._pdir, MissileID::FlashTop, TARGET_MONSTERS, target.getId(), mdam, spellLevel);
NetSendAddMissile(true, target.position.tile, target.position.temp, target._pdir, MissileID::FlashBottom, TARGET_MONSTERS, target.getId(), mdam, spellLevel);
NetSendAddMissile(true, target.position.tile, target.position.temp, target._pdir, MissileID::FlashTop, TARGET_MONSTERS, target.getId(), mdam, spellLevel);
}
Expand Down Expand Up @@ -1007,6 +1010,8 @@ void ExplodingBoneArmor(Player &attacker, Player &target)
}
Direction arrowDirection = static_cast<Direction>(arrowDirectionIndex);
Displacement displacement(arrowDirection);
AddMissile(target.position.tile, target.position.old + displacement,
arrowDirection, MissileID::BoneSpirit, TARGET_MONSTERS, target.getId(), mdam, 0);
NetSendAddMissile(true, target.position.tile, target.position.old + displacement,
arrowDirection, MissileID::BoneSpirit, TARGET_MONSTERS, target.getId(), mdam, 0);
}
Expand Down

0 comments on commit 2a65ec1

Please sign in to comment.