diff --git a/zone/attack.cpp b/zone/attack.cpp index eec84e3c4..ef18f6fae 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1362,11 +1362,8 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b MeleeLifeTap(damage); - if (damage > 0){ - CheckNumHitsRemaining(NUMHIT_OutgoingHitSuccess); - if (HasSkillProcSuccess() && other && other->GetHP() > 0) - TrySkillProc(other, skillinuse, 0, true, Hand); - } + if (damage > 0 && HasSkillProcSuccess() && other && other->GetHP() > 0) + TrySkillProc(other, skillinuse, 0, true, Hand); CommonBreakInvisible(); diff --git a/zone/entity.cpp b/zone/entity.cpp index eef15b2ff..781e1164e 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -3652,7 +3652,8 @@ void EntityList::AddTempPetsToHateList(Mob *owner, Mob* other, bool bFrenzy) NPC* n = it->second; if (n->GetSwarmInfo()) { if (n->GetSwarmInfo()->owner_id == owner->GetID()) { - n->CastToNPC()->hate_list.Add(other, 0, 0, bFrenzy); + if (!n->GetSpecialAbility(IMMUNE_AGGRO)) + n->hate_list.Add(other, 0, 0, bFrenzy); } } ++it; diff --git a/zone/mob.cpp b/zone/mob.cpp index 55c3773c1..15fb731e2 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -3059,7 +3059,7 @@ void Mob::TriggerOnCast(uint32 focus_spell, uint32 spell_id, bool aa_trigger) if(IsValidSpell(trigger_spell_id) && GetTarget()){ SpellFinished(trigger_spell_id, GetTarget(),10, 0, -1, spells[trigger_spell_id].ResistDiff); - CheckNumHitsRemaining(NUMHIT_MatchingSpells,0, focus_spell); + CheckNumHitsRemaining(NUMHIT_MatchingSpells,-1, focus_spell); } } } @@ -3396,7 +3396,7 @@ void Mob::TrySympatheticProc(Mob *target, uint32 spell_id) SpellFinished(focus_trigger, target, 10, 0, -1, spells[focus_trigger].ResistDiff); } - CheckNumHitsRemaining(NUMHIT_MatchingSpells, 0, focus_spell); + CheckNumHitsRemaining(NUMHIT_MatchingSpells, -1, focus_spell); } } diff --git a/zone/mob.h b/zone/mob.h index a4dd2d665..525cbb2e8 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -275,7 +275,7 @@ public: int16 GetBuffSlotFromType(uint16 type); uint16 GetSpellIDFromSlot(uint8 slot); int CountDispellableBuffs(); - void CheckNumHitsRemaining(uint8 type, uint32 buff_slot=0, uint16 spell_id=SPELL_UNKNOWN); + void CheckNumHitsRemaining(uint8 type, uint32 buff_slot=-1, uint16 spell_id=SPELL_UNKNOWN); bool HasNumhits() const { return has_numhits; } inline void Numhits(bool val) { has_numhits = val; } bool HasMGB() const { return has_MGB; } diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 963bf51a8..3625c9180 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -2128,8 +2128,6 @@ void Mob::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillUseTypes if (HasDied()) return; - CheckNumHitsRemaining(NUMHIT_OutgoingHitSuccess); - if(aabonuses.SpecialAttackKBProc[0] && aabonuses.SpecialAttackKBProc[1] == skillinuse){ int kb_chance = 25; kb_chance += kb_chance*(100-aabonuses.SpecialAttackKBProc[0])/100; diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index d73c667a1..4a73926c3 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -5595,8 +5595,8 @@ void Mob::CheckNumHitsRemaining(uint8 type, uint32 buff_slot, uint16 spell_id) } } } - } else if (type == 7) { - if (buff_slot > 0) { + } else if (type == NUMHIT_MatchingSpells) { + if (buff_slot >= 0) { if (--buffs[buff_slot].numhits == 0) { CastOnNumHitFade(buffs[buff_slot].spellid); if (!TryFadeEffect(buff_slot)) diff --git a/zone/spells.cpp b/zone/spells.cpp index 858bb6412..1b78030e6 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1670,6 +1670,12 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce } else { spell_target = this; } + + if (spell_target && spell_target->IsPet() && spells[spell_id].targettype == ST_GroupNoPets){ + Message_StringID(13,NO_CAST_ON_PET); + return false; + } + CastAction = GroupSpell; break; } diff --git a/zone/string_ids.h b/zone/string_ids.h index 57711a40d..5375c2d7d 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -264,6 +264,7 @@ #define TRADESKILL_MISSING_COMPONENTS 3456 //Sorry, but you don't have everything you need for this recipe in your general inventory. #define TRADESKILL_LEARN_RECIPE 3457 //You have learned the recipe %1! #define EXPEDITION_MIN_REMAIN 3551 //You only have %1 minutes remaining before this expedition comes to an end. +#define NO_CAST_ON_PET 4045 //You cannot cast this spell on your pet. #define REWIND_WAIT 4059 //You must wait a bit longer before using the rewind command again. #define CORPSEDRAG_LIMIT 4061 //You are already dragging as much as you can! #define CORPSEDRAG_ALREADY 4062 //You are already dragging %1.