mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-16 09:42:27 +00:00
Merge branch 'Development' of https://github.com/KayenEQ/Server into KayenEQ-Development
This commit is contained in:
commit
85bd837a66
@ -1569,13 +1569,9 @@ void Mob::AI_Process() {
|
||||
//Do Ranged attack here
|
||||
if(doranged)
|
||||
{
|
||||
int attacks = GetSpecialAbilityParam(SPECATK_RANGED_ATK, 0);
|
||||
attacks = attacks > 0 ? attacks : 1;
|
||||
for(int i = 0; i < attacks; ++i) {
|
||||
RangedAttack(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void NPC::AI_DoMovement() {
|
||||
float walksp = GetMovespeed();
|
||||
|
||||
@ -973,6 +973,10 @@ void NPC::RangedAttack(Mob* other)
|
||||
return;
|
||||
}
|
||||
|
||||
int attacks = GetSpecialAbilityParam(SPECATK_RANGED_ATK, 0);
|
||||
attacks = attacks > 0 ? attacks : 1;
|
||||
for(int i = 0; i < attacks; ++i) {
|
||||
|
||||
//if we have SPECATK_RANGED_ATK set then we range attack without weapon or ammo
|
||||
const Item_Struct* weapon = nullptr;
|
||||
const Item_Struct* ammo = nullptr;
|
||||
@ -982,7 +986,7 @@ void NPC::RangedAttack(Mob* other)
|
||||
return;
|
||||
}
|
||||
|
||||
int sa_min_range = GetSpecialAbilityParam(SPECATK_RANGED_ATK, 0); //Min Range of NPC attack
|
||||
int sa_min_range = GetSpecialAbilityParam(SPECATK_RANGED_ATK, 4); //Min Range of NPC attack
|
||||
int sa_max_range = GetSpecialAbilityParam(SPECATK_RANGED_ATK, 1); //Max Range of NPC attack
|
||||
|
||||
float min_range = static_cast<float>(RuleI(Combat, MinRangedAttackDist));
|
||||
@ -1081,6 +1085,7 @@ void NPC::RangedAttack(Mob* other)
|
||||
|
||||
CommonBreakInvisible();
|
||||
}
|
||||
}
|
||||
|
||||
uint16 Mob::GetThrownDamage(int16 wDmg, int32& TotalDmg, int& minDmg)
|
||||
{
|
||||
|
||||
@ -2143,7 +2143,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
{
|
||||
if(CheckLosFN((*iter)) || spells[spell_id].npc_no_los){
|
||||
(*iter)->CalcSpellPowerDistanceMod(spell_id, 0, this);
|
||||
SpellOnTarget(spell_id, spell_target, false, true, resist_adjust);
|
||||
SpellOnTarget(spell_id, (*iter), false, true, resist_adjust);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user