TwilightRaven
Member
Hi
I'm working on revamping Peoharen's Blue Magic system. I *think* I have all the changes I need to have made except these two errors I can't figure out.
The code I'm working with is in SpellHelper.cs
AND
I'm working on revamping Peoharen's Blue Magic system. I *think* I have all the changes I need to have made except these two errors I can't figure out.
Code:
------------------------------------------------------------------------------------------------------------------------
ServUO - [https://www.servuo.com] Version 0.5, Build 6472.26597
Errors:
+ Customs/Blue Magic Expansion/Blue Magic/Spells/Traveler.cs:
CS1729: Line 79: 'Server.Map' does not contain a constructor that takes 0 arguments
CS1729: Line 110: 'Server.Map' does not contain a constructor that takes 0 arguments
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
The code I'm working with is in SpellHelper.cs
Code:
public static bool FindValidSpawnLocation(Map map, ref Point3D p, bool surroundingsOnly)
{
if (map == null) //sanity
return false;
if (!surroundingsOnly)
{
if (map.CanSpawnMobile(p)) //p's fine.
{
p = new Point3D(p);
return true;
}
int z = map.GetAverageZ(p.X, p.Y);
if (map.CanSpawnMobile(p.X, p.Y, z))
{
p = new Point3D(p.X, p.Y, z);
return true;
}
}
int offset = Utility.Random(8) * 2;
for (int i = 0; i < m_Offsets.Length; i += 2)
{
int x = p.X + m_Offsets[(offset + i) % m_Offsets.Length];
int y = p.Y + m_Offsets[(offset + i + 1) % m_Offsets.Length];
if (map.CanSpawnMobile(x, y, p.Z))
{
p = new Point3D(x, y, p.Z);
return true;
}
else
{
int z = map.GetAverageZ(x, y);
if (map.CanSpawnMobile(x, y, z))
{
p = new Point3D(x, y, z);
return true;
}
}
}
return false;
}
AND
Code:
else
{
Caster.SendMessage( "Teleporting to " + point.X.ToString() + ", " + point.Y.ToString() );
Caster.Mana -= ScaleMana( GetMana() );
/*blue magic*/
Server.Map server_map = new Server.Map();
Caster.MoveToWorld( point, server_map );
/* blue magic */
Effects.SendLocationParticles( EffectItem.Create( new Point3D ( point.X, point.Y, point.Z ), Caster.Map, EffectItem.DefaultDuration ), 0x3716, 7, 10, 1266, 3, 5052, 0 );
Effects.SendLocationParticles( EffectItem.Create( new Point3D ( point.X, point.Y, point.Z+20 ), Caster.Map, EffectItem.DefaultDuration ), 0x3716, 7, 10, 1266, 3, 5052, 0 );
Effects.SendLocationParticles( EffectItem.Create( new Point3D ( point.X, point.Y, point.Z+40 ), Caster.Map, EffectItem.DefaultDuration ), 0x3716, 7, 10, 1266, 3, 5052, 0 );
Effects.SendLocationParticles( EffectItem.Create( new Point3D ( point.X, point.Y, point.Z+60 ), Caster.Map, EffectItem.DefaultDuration ), 0x3716, 7, 10, 1266, 3, 5052, 0 );
}