diff --git a/zone/loottables.cpp b/zone/loottables.cpp index 03f1590b1..7f8e371bd 100644 --- a/zone/loottables.cpp +++ b/zone/loottables.cpp @@ -332,8 +332,10 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch CastToMob()->AddProcToWeapon(item2->Proc.Effect, true); eslot = EQEmu::textures::weaponPrimary; - if (item2->Damage > 0) + if (item2->Damage > 0) { SendAddPlayerState(PlayerState::PrimaryWeaponEquipped); + SetFacestab(true); + } if (item2->IsType2HWeapon()) SetTwoHanderEquipped(true); } diff --git a/zone/mob.cpp b/zone/mob.cpp index 4f8b51ee9..506c8b44e 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -213,6 +213,7 @@ Mob::Mob(const char* in_name, has_shieldequiped = false; has_twohandbluntequiped = false; has_twohanderequipped = false; + can_facestab = false; has_numhits = false; has_MGB = false; has_ProjectIllusion = false; diff --git a/zone/mob.h b/zone/mob.h index dfa0cb16f..52ad3937b 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -373,6 +373,8 @@ public: inline void SetTwoHandBluntEquiped(bool val) { has_twohandbluntequiped = val; } bool HasTwoHanderEquipped() { return has_twohanderequipped; } void SetTwoHanderEquipped(bool val) { has_twohanderequipped = val; } + bool CanFacestab() { return can_facestab; } + void SetFacestab(bool val) { can_facestab = val; } virtual uint16 GetSkill(EQEmu::skills::SkillType skill_num) const { return 0; } virtual uint32 GetEquipment(uint8 material_slot) const { return(0); } virtual int32 GetEquipmentMaterial(uint8 material_slot) const; @@ -1298,6 +1300,7 @@ protected: bool has_shieldequiped; bool has_twohandbluntequiped; bool has_twohanderequipped; + bool can_facestab; bool has_numhits; bool has_MGB; bool has_ProjectIllusion; diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 7f6ec112d..81c888915 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -528,8 +528,8 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) { bCanFrontalBS = true; } - if (bIsBehind || bCanFrontalBS){ // Player is behind other OR can do Frontal Backstab - if (bCanFrontalBS) + if (bIsBehind || bCanFrontalBS || (IsNPC() && CanFacestab())) { // Player is behind other OR can do Frontal Backstab + if (bCanFrontalBS && IsClient()) // I don't think there is any message ... CastToClient()->Message(0,"Your fierce attack is executed with such grace, your target did not see it coming!"); RogueBackstab(other,false,ReuseTime);