mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-07 07:12:25 +00:00
commit
ff5eb54331
@ -829,6 +829,7 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
|||||||
this function is then run again to do the damage portion
|
this function is then run again to do the damage portion
|
||||||
*/
|
*/
|
||||||
bool LaunchProjectile = false;
|
bool LaunchProjectile = false;
|
||||||
|
bool ProjectileImpact = false;
|
||||||
bool ProjectileMiss = false;
|
bool ProjectileMiss = false;
|
||||||
|
|
||||||
if (RuleB(Combat, ProjectileDmgOnImpact)){
|
if (RuleB(Combat, ProjectileDmgOnImpact)){
|
||||||
@ -845,6 +846,8 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
|||||||
|
|
||||||
if (!RangeWeapon && !Ammo && range_id && ammo_id){
|
if (!RangeWeapon && !Ammo && range_id && ammo_id){
|
||||||
|
|
||||||
|
ProjectileImpact = true;
|
||||||
|
|
||||||
if (weapon_damage == 0)
|
if (weapon_damage == 0)
|
||||||
ProjectileMiss = true; //This indicates that MISS was originally calculated.
|
ProjectileMiss = true; //This indicates that MISS was originally calculated.
|
||||||
|
|
||||||
@ -866,7 +869,7 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
|||||||
else if (AmmoItem)
|
else if (AmmoItem)
|
||||||
SendItemAnimation(other, AmmoItem, SkillArchery);
|
SendItemAnimation(other, AmmoItem, SkillArchery);
|
||||||
|
|
||||||
if (ProjectileMiss || !other->CheckHitChance(this, SkillArchery, MainPrimary, chance_mod)) {
|
if (ProjectileMiss || (!ProjectileImpact && !other->CheckHitChance(this, SkillArchery, MainPrimary, chance_mod))) {
|
||||||
mlog(COMBAT__RANGED, "Ranged attack missed %s.", other->GetName());
|
mlog(COMBAT__RANGED, "Ranged attack missed %s.", other->GetName());
|
||||||
|
|
||||||
if (LaunchProjectile){
|
if (LaunchProjectile){
|
||||||
@ -1383,6 +1386,7 @@ void Mob::DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
|||||||
this function is then run again to do the damage portion
|
this function is then run again to do the damage portion
|
||||||
*/
|
*/
|
||||||
bool LaunchProjectile = false;
|
bool LaunchProjectile = false;
|
||||||
|
bool ProjectileImpact = false;
|
||||||
bool ProjectileMiss = false;
|
bool ProjectileMiss = false;
|
||||||
|
|
||||||
if (RuleB(Combat, ProjectileDmgOnImpact)){
|
if (RuleB(Combat, ProjectileDmgOnImpact)){
|
||||||
@ -1392,6 +1396,8 @@ void Mob::DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
|||||||
else{
|
else{
|
||||||
if (!RangeWeapon && range_id){
|
if (!RangeWeapon && range_id){
|
||||||
|
|
||||||
|
ProjectileImpact = true;
|
||||||
|
|
||||||
if (weapon_damage == 0)
|
if (weapon_damage == 0)
|
||||||
ProjectileMiss = true; //This indicates that MISS was originally calculated.
|
ProjectileMiss = true; //This indicates that MISS was originally calculated.
|
||||||
|
|
||||||
@ -1409,7 +1415,7 @@ void Mob::DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
|||||||
else if (AmmoItem)
|
else if (AmmoItem)
|
||||||
SendItemAnimation(other, AmmoItem, SkillThrowing);
|
SendItemAnimation(other, AmmoItem, SkillThrowing);
|
||||||
|
|
||||||
if (ProjectileMiss || !other->CheckHitChance(this, SkillThrowing, MainPrimary, chance_mod)){
|
if (ProjectileMiss || (!ProjectileImpact && !other->CheckHitChance(this, SkillThrowing, MainPrimary, chance_mod))){
|
||||||
mlog(COMBAT__RANGED, "Ranged attack missed %s.", other->GetName());
|
mlog(COMBAT__RANGED, "Ranged attack missed %s.", other->GetName());
|
||||||
if (LaunchProjectile){
|
if (LaunchProjectile){
|
||||||
TryProjectileAttack(other, AmmoItem, SkillThrowing, 0, RangeWeapon, nullptr, AmmoSlot, speed);
|
TryProjectileAttack(other, AmmoItem, SkillThrowing, 0, RangeWeapon, nullptr, AmmoSlot, speed);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user