mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 08:21:28 +00:00
Merge pull request #372 from noudess/master
A non magical weapon with an augment tagged as magic now hits as magic
This commit is contained in:
commit
aaa9595b59
@ -917,6 +917,7 @@ int Mob::GetWeaponDamage(Mob *against, const ItemInst *weapon_item, uint32 *hate
|
|||||||
{
|
{
|
||||||
int dmg = 0;
|
int dmg = 0;
|
||||||
int banedmg = 0;
|
int banedmg = 0;
|
||||||
|
int x = 0;
|
||||||
|
|
||||||
if(!against || against->GetInvul() || against->GetSpecialAbility(IMMUNE_MELEE)){
|
if(!against || against->GetInvul() || against->GetSpecialAbility(IMMUNE_MELEE)){
|
||||||
return 0;
|
return 0;
|
||||||
@ -945,10 +946,20 @@ int Mob::GetWeaponDamage(Mob *against, const ItemInst *weapon_item, uint32 *hate
|
|||||||
bool MagicWeapon = false;
|
bool MagicWeapon = false;
|
||||||
if(weapon_item->GetItem() && weapon_item->GetItem()->Magic)
|
if(weapon_item->GetItem() && weapon_item->GetItem()->Magic)
|
||||||
MagicWeapon = true;
|
MagicWeapon = true;
|
||||||
else {
|
else
|
||||||
if(spellbonuses.MagicWeapon || itembonuses.MagicWeapon)
|
if(spellbonuses.MagicWeapon || itembonuses.MagicWeapon)
|
||||||
MagicWeapon = true;
|
MagicWeapon = true;
|
||||||
}
|
else
|
||||||
|
// An augment on the weapon that is marked magic makes
|
||||||
|
// the item magical.
|
||||||
|
for(x = 0; MagicWeapon == false && x < EmuConstants::ITEM_COMMON_SIZE; x++)
|
||||||
|
{
|
||||||
|
if(weapon_item->GetAugment(x) && weapon_item->GetAugment(x)->GetItem())
|
||||||
|
{
|
||||||
|
if (weapon_item->GetAugment(x)->GetItem()->Magic)
|
||||||
|
MagicWeapon = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(MagicWeapon) {
|
if(MagicWeapon) {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user