mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Merge branch 'master' into random
This commit is contained in:
commit
bc53ca3b71
@ -827,6 +827,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)){
|
||||||
@ -843,6 +844,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.
|
||||||
|
|
||||||
@ -864,7 +867,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){
|
||||||
@ -1380,6 +1383,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)){
|
||||||
@ -1389,6 +1393,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.
|
||||||
|
|
||||||
@ -1406,7 +1412,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