Tiamat13
Sorceror
Gargouille;777753 said:Hi, very good code, thanks.
In order to more easily add this on shard I work on, I do some little changes, making install a little bit more "plug&play", as there only need declaring the new AI's in BaseAi.cs/AIType enum and BaseCreature.cs/ChangeAIType method...
All other things are now in distro files.
So I :
- Create a Flyingcreature class, inheriting from BaseCreature, and declaring all "flying-properties", serializing it also.
- Make several casts from Mobile to FlyingCreature instead of BaseCreature.
- Create a FlyingCleanup.cs
- And radicaly change the way to vorbid meleeattacks: replacing BaseWeapon.cs/OnHit method's test by another method in FlyingCreature.cs :
Not very accurate with the original, but a easy way I find to do... But no tested yetCode:public override void AlterMeleeDamageFrom( Mobile from, ref int damage ) { if(from.Weapon != null && from.Weapon is BaseRanged) return; else { if((from.Z > this.Z+10)||(from.Z < this.Z-10)) { from.SendMessage("You have to be closer to attack this!"); damage = 0; } } }
Hope it could help.
Very nice, I really havn't had the time to work on this since I released it and am impressed at your upgrades, feel free to continue this project as you see fit. Contact me via PM if you wish to take on some other projects I have on the go and never 100% finished.