So apparently my version of runuo doesn't allow an admin account to recall to any destination. I'd like my admin account (accesslevel.owner) to be able to recall and gate anywhere, so in recall.cs i added some code to the section i think determines if the caster can recall or not:
It doesn't like my way of checking if the account is a gamemaster or owner if ( Caster is PlayerMobile && ((PlayerMobile)Caster).Owner)
. I tried multiple variations, if (Caster.Owner), if (Mobile.Owner), and tried using GameMaster instead... but the fact is i don't know how to do this. Could someone help?
getting variations of this error message
When i [props my admin account, it says his access level is owner, which is why i used that at first... Anyways, it's a runuo server if that makes a difference.
C#:
public void Effect( Point3D loc, Map map, bool checkMulti )
{
if ( Caster is PlayerMobile && ((PlayerMobile)Caster).Owner)
{
Caster.PlaySound( 0x1FC );
Effects.SendLocationParticles( EffectItem.Create( Caster.Location, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 32, Server.Items.CharacterDatabase.GetMySpellHue( Caster, 0 ), 0, 5024, 0 );
Caster.MoveToWorld( loc, map );
Caster.PlaySound( 0x1FC );
Effects.SendLocationParticles( EffectItem.Create( Caster.Location, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 32, Server.Items.CharacterDatabase.GetMySpellHue( Caster, 0 ), 0, 5024, 0 );
}
...
It doesn't like my way of checking if the account is a gamemaster or owner if ( Caster is PlayerMobile && ((PlayerMobile)Caster).Owner)
. I tried multiple variations, if (Caster.Owner), if (Mobile.Owner), and tried using GameMaster instead... but the fact is i don't know how to do this. Could someone help?
getting variations of this error message
C#:
Errors:
+ Magic/Magery 4th/Recall.cs:
CS1061: Line 70: 'Server.Mobiles.PlayerMobile' does not contain a definition for 'Owner' and no extension method 'Owner' accepting a first argument of type 'Server.Mobiles.PlayerMobile' could be found (are you missing a using directive or an assembly reference?)
When i [props my admin account, it says his access level is owner, which is why i used that at first... Anyways, it's a runuo server if that makes a difference.