mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 10:58:20 +00:00
[Bug Fix] Stop skill ups on Charmed NPCs. (#2249)
- Clients were capable of leveling up their melee skills on Charmed Mobs according to: https://github.com/EQEmu/Server/issues/2182
This commit is contained in:
@@ -330,7 +330,7 @@ bool Client::Process() {
|
||||
{
|
||||
if (ranged->GetItem() && ranged->GetItem()->ItemType == EQ::item::ItemTypeBow) {
|
||||
if (ranged_timer.Check(false)) {
|
||||
if (GetTarget() && (GetTarget()->IsNPC() || GetTarget()->IsClient())) {
|
||||
if (GetTarget() && (GetTarget()->IsNPC() || GetTarget()->IsClient()) && IsAttackAllowed(GetTarget())) {
|
||||
if (GetTarget()->InFrontMob(this, GetTarget()->GetX(), GetTarget()->GetY())) {
|
||||
if (CheckLosFN(GetTarget())) {
|
||||
//client has built in los check, but auto fire does not.. done last.
|
||||
@@ -350,7 +350,7 @@ bool Client::Process() {
|
||||
}
|
||||
else if (ranged->GetItem() && (ranged->GetItem()->ItemType == EQ::item::ItemTypeLargeThrowing || ranged->GetItem()->ItemType == EQ::item::ItemTypeSmallThrowing)) {
|
||||
if (ranged_timer.Check(false)) {
|
||||
if (GetTarget() && (GetTarget()->IsNPC() || GetTarget()->IsClient())) {
|
||||
if (GetTarget() && (GetTarget()->IsNPC() || GetTarget()->IsClient()) && IsAttackAllowed(GetTarget())) {
|
||||
if (GetTarget()->InFrontMob(this, GetTarget()->GetX(), GetTarget()->GetY())) {
|
||||
if (CheckLosFN(GetTarget())) {
|
||||
//client has built in los check, but auto fire does not.. done last.
|
||||
@@ -411,7 +411,7 @@ bool Client::Process() {
|
||||
else if (!los_status || !los_status_facing) {
|
||||
//you can't see your target
|
||||
}
|
||||
else if (auto_attack_target->GetHP() > -10) // -10 so we can watch people bleed in PvP
|
||||
else if (auto_attack_target->GetHP() > -10 && IsAttackAllowed(auto_attack_target)) // -10 so we can watch people bleed in PvP
|
||||
{
|
||||
EQ::ItemInstance *wpn = GetInv().GetItem(EQ::invslot::slotPrimary);
|
||||
TryCombatProcs(wpn, auto_attack_target, EQ::invslot::slotPrimary);
|
||||
@@ -456,7 +456,7 @@ bool Client::Process() {
|
||||
{
|
||||
//you can't see your target
|
||||
}
|
||||
else if (auto_attack_target->GetHP() > -10) {
|
||||
else if (auto_attack_target->GetHP() > -10 && IsAttackAllowed(auto_attack_target)) {
|
||||
CheckIncreaseSkill(EQ::skills::SkillDualWield, auto_attack_target, -10);
|
||||
if (CheckDualWield()) {
|
||||
EQ::ItemInstance *wpn = GetInv().GetItem(EQ::invslot::slotSecondary);
|
||||
|
||||
Reference in New Issue
Block a user