mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Implemented npc specialability (44) COUNTER_AVOID_DAMAGE which when applied to the ATTACKING NPC will make their attacks more difficult to be avoided by riposte/dodge/parry/block.
Parama0: Negative modifer value that affects ALL avoid damage types dodge/parry/riposte/block) chance on defender. Ie (44,50 = 50 pct reduction to ALL) Parama1: Negative modifer value that affects RIPOSTE chance on defender. Ie (44,1,0,50 = 50 pct reduction to riposte chance) Parama2: Negative modifer value that affects PARRY chance on defender. Ie (44,1,0,0,50 = 50 pct reduction to parry chance) Parama3: Negative modifer value that affects BLOCK chance on defender. Ie (44,1,0,0,0,50 = 50 pct reduction to block chance) Parama4: Negative modifer value that affects DODGE chance on defender. e (44,1,0,0,0,0,50 = 50 pct reduction to dodge chance) Example of usage: Player has Improved Dodge V (+50 pct dodge chance), you want to negate this bonus you would set 44,1,0,0,0,0,50 on your NPC. Clean up and minor fixes to AvoidDamage function. Added support to a few AA bonuses there.
This commit is contained in:
+8
-4
@@ -139,7 +139,8 @@ void Client::CalcItemBonuses(StatBonuses* newbon) {
|
||||
|
||||
// Clear item faction mods
|
||||
ClearItemFactionBonuses();
|
||||
ShieldEquiped(false);
|
||||
SetShieldEquiped(false);
|
||||
SetTwoHandBluntEquiped(false);
|
||||
|
||||
unsigned int i;
|
||||
//should not include 21 (SLOT_AMMO)
|
||||
@@ -149,9 +150,12 @@ void Client::CalcItemBonuses(StatBonuses* newbon) {
|
||||
continue;
|
||||
AddItemBonuses(inst, newbon);
|
||||
|
||||
//Check if item is secondary slot is a 'shield'. Required for multiple spelll effects.
|
||||
if (i == MainSecondary && (m_inv.GetItem(MainSecondary)->GetItem()->ItemType == ItemTypeShield))
|
||||
ShieldEquiped(true);
|
||||
//These are given special flags due to how often they are checked for various spell effects.
|
||||
const Item_Struct *item = inst->GetItem();
|
||||
if (i == MainSecondary && (item && item->ItemType == ItemTypeShield))
|
||||
SetShieldEquiped(true);
|
||||
else if (i == MainPrimary && (item && item->ItemType == ItemType2HBlunt))
|
||||
SetTwoHandBluntEquiped(true);
|
||||
}
|
||||
|
||||
//Power Source Slot
|
||||
|
||||
Reference in New Issue
Block a user