mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-26 02:41:28 +00:00
Merge pull request #877 from noudess/light-wield
Light wield for Npcs/mobs
This commit is contained in:
commit
69a3432898
@ -1387,13 +1387,13 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
|||||||
|| (GetHP() < 0)
|
|| (GetHP() < 0)
|
||||||
|| (!IsAttackAllowed(other))
|
|| (!IsAttackAllowed(other))
|
||||||
) {
|
) {
|
||||||
Log(Logs::Detail, Logs::Combat, "Attack canceled, invalid circumstances.");
|
Log(Logs::Detail, Logs::Combat, "Attack cancelled, invalid circumstances.");
|
||||||
return false; // Only bards can attack while casting
|
return false; // Only bards can attack while casting
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DivineAura() && !GetGM()) {//cant attack while invulnerable unless your a gm
|
if (DivineAura() && !GetGM()) {//cant attack while invulnerable unless your a gm
|
||||||
Log(Logs::Detail, Logs::Combat, "Attack canceled, Divine Aura is in effect.");
|
Log(Logs::Detail, Logs::Combat, "Attack cancelled, Divine Aura is in effect.");
|
||||||
MessageString(Chat::DefaultText, DIVINE_AURA_NO_ATK); //You can't attack while invulnerable!
|
MessageString(Chat::DefaultText, DIVINE_AURA_NO_ATK); //You can't attack while invulnerable
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1412,7 +1412,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
|||||||
|
|
||||||
if (weapon != nullptr) {
|
if (weapon != nullptr) {
|
||||||
if (!weapon->IsWeapon()) {
|
if (!weapon->IsWeapon()) {
|
||||||
Log(Logs::Detail, Logs::Combat, "Attack canceled, Item %s (%d) is not a weapon.", weapon->GetItem()->Name, weapon->GetID());
|
Log(Logs::Detail, Logs::Combat, "Attack cancelled, Item %s (%d) is not a weapon.", weapon->GetItem()->Name, weapon->GetID());
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
Log(Logs::Detail, Logs::Combat, "Attacking with weapon: %s (%d)", weapon->GetItem()->Name, weapon->GetID());
|
Log(Logs::Detail, Logs::Combat, "Attacking with weapon: %s (%d)", weapon->GetItem()->Name, weapon->GetID());
|
||||||
@ -1952,8 +1952,8 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
|||||||
if (weapon) {
|
if (weapon) {
|
||||||
Log(Logs::Detail, Logs::Combat, "Attacking with weapon: %s (%d) (too bad im not using it for much)", weapon->Name, weapon->ID);
|
Log(Logs::Detail, Logs::Combat, "Attacking with weapon: %s (%d) (too bad im not using it for much)", weapon->Name, weapon->ID);
|
||||||
|
|
||||||
if (Hand == EQEmu::invslot::slotSecondary && weapon->ItemType == EQEmu::item::ItemTypeShield) {
|
if (Hand == EQEmu::invslot::slotSecondary && !weapon->IsType1HWeapon()) {
|
||||||
Log(Logs::Detail, Logs::Combat, "Attack with shield canceled.");
|
Log(Logs::Detail, Logs::Combat, "Attack with non-weapon cancelled.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3941,7 +3941,7 @@ void Mob::TryWeaponProc(const EQEmu::ItemInstance* weapon_g, Mob *on, uint16 han
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (DivineAura()) {
|
if (DivineAura()) {
|
||||||
Log(Logs::Detail, Logs::Combat, "Procs canceled, Divine Aura is in effect.");
|
Log(Logs::Detail, Logs::Combat, "Procs cancelled, Divine Aura is in effect.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -352,7 +352,7 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch
|
|||||||
}
|
}
|
||||||
else if (foundslot == EQEmu::invslot::slotSecondary
|
else if (foundslot == EQEmu::invslot::slotSecondary
|
||||||
&& (GetOwner() != nullptr || (CanThisClassDualWield() && zone->random.Roll(NPC_DW_CHANCE)) || (item2->Damage==0)) &&
|
&& (GetOwner() != nullptr || (CanThisClassDualWield() && zone->random.Roll(NPC_DW_CHANCE)) || (item2->Damage==0)) &&
|
||||||
(item2->IsType1HWeapon() || item2->ItemType == EQEmu::item::ItemTypeShield))
|
(item2->IsType1HWeapon() || item2->ItemType == EQEmu::item::ItemTypeShield || item2->ItemType == EQEmu::item::ItemTypeLight))
|
||||||
{
|
{
|
||||||
if (item2->Proc.Effect!=0)
|
if (item2->Proc.Effect!=0)
|
||||||
CastToMob()->AddProcToWeapon(item2->Proc.Effect, true);
|
CastToMob()->AddProcToWeapon(item2->Proc.Effect, true);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user