Full Version : Trouble getting attachments to work
xmlspawner >>XMLSpawner - Attachments >>Trouble getting attachments to work
<< Prev | Next >>
DazedAndConfused- 12-30-2006
I am having trouble getting attachments to work with mobiles. Specifically, xmllightning, xmlfire, xmlminionstrike, and my favorite, xmlpetmastery (an attachment Arte wrote for Corbomite). They show as attached, but they do not function. Am I misisng an optional installation step, or did I mess something else up?
ArteGordon- 12-30-2006
probably missing an installation step. Those all require attachment support for triggering on weapon hits which is installation step 7.

QUOTE
STEP 7: (recommended but not required) To allow attachments to be triggered on weapon hits, one line must be added to BaseWeapon.cs (Scripts/Items/Weapons/BaseWeapon.cs) as described below (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the attachment OnWeaponHit method simply wont be called so attachments such as XmlMinionStrike will not work)
around line 1644 of BaseWeapon.cs at the end of the OnHit method, change
if ( AnimalForm.UnderTransformation( defender, typeof( BullFrog ) ) )
attacker.ApplyPoison( defender, Poison.Regular );
}
}
to
if ( AnimalForm.UnderTransformation( defender, typeof( BullFrog ) ) )
attacker.ApplyPoison( defender, Poison.Regular );
}
// hook for attachment OnWeaponHit method
Server.Engines.XmlSpawner2.XmlAttach.OnWeaponHit(this, attacker, defender, damageGiven);
}

DazedAndConfused- 12-30-2006
Let me try that Arte. Thanks again.