mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
Weapons allow NPCs to facestab
This commit is contained in:
parent
da9792160d
commit
d8519bc270
@ -332,8 +332,10 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch
|
|||||||
CastToMob()->AddProcToWeapon(item2->Proc.Effect, true);
|
CastToMob()->AddProcToWeapon(item2->Proc.Effect, true);
|
||||||
|
|
||||||
eslot = EQEmu::textures::weaponPrimary;
|
eslot = EQEmu::textures::weaponPrimary;
|
||||||
if (item2->Damage > 0)
|
if (item2->Damage > 0) {
|
||||||
SendAddPlayerState(PlayerState::PrimaryWeaponEquipped);
|
SendAddPlayerState(PlayerState::PrimaryWeaponEquipped);
|
||||||
|
SetFacestab(true);
|
||||||
|
}
|
||||||
if (item2->IsType2HWeapon())
|
if (item2->IsType2HWeapon())
|
||||||
SetTwoHanderEquipped(true);
|
SetTwoHanderEquipped(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -213,6 +213,7 @@ Mob::Mob(const char* in_name,
|
|||||||
has_shieldequiped = false;
|
has_shieldequiped = false;
|
||||||
has_twohandbluntequiped = false;
|
has_twohandbluntequiped = false;
|
||||||
has_twohanderequipped = false;
|
has_twohanderequipped = false;
|
||||||
|
can_facestab = false;
|
||||||
has_numhits = false;
|
has_numhits = false;
|
||||||
has_MGB = false;
|
has_MGB = false;
|
||||||
has_ProjectIllusion = false;
|
has_ProjectIllusion = false;
|
||||||
|
|||||||
@ -373,6 +373,8 @@ public:
|
|||||||
inline void SetTwoHandBluntEquiped(bool val) { has_twohandbluntequiped = val; }
|
inline void SetTwoHandBluntEquiped(bool val) { has_twohandbluntequiped = val; }
|
||||||
bool HasTwoHanderEquipped() { return has_twohanderequipped; }
|
bool HasTwoHanderEquipped() { return has_twohanderequipped; }
|
||||||
void SetTwoHanderEquipped(bool val) { has_twohanderequipped = val; }
|
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 uint16 GetSkill(EQEmu::skills::SkillType skill_num) const { return 0; }
|
||||||
virtual uint32 GetEquipment(uint8 material_slot) const { return(0); }
|
virtual uint32 GetEquipment(uint8 material_slot) const { return(0); }
|
||||||
virtual int32 GetEquipmentMaterial(uint8 material_slot) const;
|
virtual int32 GetEquipmentMaterial(uint8 material_slot) const;
|
||||||
@ -1298,6 +1300,7 @@ protected:
|
|||||||
bool has_shieldequiped;
|
bool has_shieldequiped;
|
||||||
bool has_twohandbluntequiped;
|
bool has_twohandbluntequiped;
|
||||||
bool has_twohanderequipped;
|
bool has_twohanderequipped;
|
||||||
|
bool can_facestab;
|
||||||
bool has_numhits;
|
bool has_numhits;
|
||||||
bool has_MGB;
|
bool has_MGB;
|
||||||
bool has_ProjectIllusion;
|
bool has_ProjectIllusion;
|
||||||
|
|||||||
@ -528,8 +528,8 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) {
|
|||||||
bCanFrontalBS = true;
|
bCanFrontalBS = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bIsBehind || bCanFrontalBS){ // Player is behind other OR can do Frontal Backstab
|
if (bIsBehind || bCanFrontalBS || (IsNPC() && CanFacestab())) { // Player is behind other OR can do Frontal Backstab
|
||||||
if (bCanFrontalBS)
|
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!");
|
CastToClient()->Message(0,"Your fierce attack is executed with such grace, your target did not see it coming!");
|
||||||
|
|
||||||
RogueBackstab(other,false,ReuseTime);
|
RogueBackstab(other,false,ReuseTime);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user