Merge pull request #877 from noudess/light-wield

Light wield for Npcs/mobs
This commit is contained in:
Chris Miles 2019-09-01 15:39:50 -05:00 committed by GitHub
commit 69a3432898
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -1387,13 +1387,13 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|| (GetHP() < 0)
|| (!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
}
if (DivineAura() && !GetGM()) {//cant attack while invulnerable unless your a gm
Log(Logs::Detail, Logs::Combat, "Attack canceled, Divine Aura is in effect.");
MessageString(Chat::DefaultText, DIVINE_AURA_NO_ATK); //You can't attack while invulnerable!
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
return false;
}
@ -1412,7 +1412,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
if (weapon != nullptr) {
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);
}
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) {
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) {
Log(Logs::Detail, Logs::Combat, "Attack with shield canceled.");
if (Hand == EQEmu::invslot::slotSecondary && !weapon->IsType1HWeapon()) {
Log(Logs::Detail, Logs::Combat, "Attack with non-weapon cancelled.");
return false;
}
@ -3941,7 +3941,7 @@ void Mob::TryWeaponProc(const EQEmu::ItemInstance* weapon_g, Mob *on, uint16 han
}
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;
}

View File

@ -352,7 +352,7 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch
}
else if (foundslot == EQEmu::invslot::slotSecondary
&& (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)
CastToMob()->AddProcToWeapon(item2->Proc.Effect, true);