What is wrong with that code?

Code:
BaseWeapon wea = o as BaseWeapon;

foreach( int i in Enum.GetValues(typeof( AosWeaponAttribute)) )

Server crashes server like that
System.InvalidCastException: Specified cast is not valid.
 
Solved.

For anyone who having that problem (just like script in colored weaps) you have to look at imbuing

foreach (long i in Enum.GetValues(typeof(AosWeaponAttribute)))
 
Back