public static double gamedistance(WorldMgr.spez_obj p1, WorldMgr.character._pos p2) { // Nukei: for test with range checking on objects, maybe faster than only calculating distance if ((p1.xSec >= p2.xSec - 1) && (p1.xSec <= p2.xSec + 1) && (p1.ySec >= p2.ySec - 1) && (p1.ySec <= p2.ySec + 1)) { return(gamedistance((float)p1.x, (float)p1.y, p2.x, p2.y)); } else { return(99999999999999); } }
// theese attributes are not serializable public void HandleSpecialBuff(int skillid) { try { string series = ObjData.Manager.SkillBase[skillid].Series.Remove(ObjData.Manager.SkillBase[skillid].Series.Length - 2); switch (series) { case "SKILL_OP_HARMONY": case "SKILL_CH_WATER_HARMONY": WorldMgr.spez_obj so = new WorldMgr.spez_obj(); so.Name = series; so.ID = skillid; so.spezType = 0x850; so.Radius = ObjData.Manager.SkillBase[skillid].Distance / 10; so.Ids = new GenerateUniqueID(GenerateUniqueID.IDS.Object); so.UniqueID = so.Ids.GetUniqueID; so.xSec = Character.Position.xSec; so.ySec = Character.Position.ySec; so.x = Character.Position.x; so.z = Character.Position.z; so.y = Character.Position.y; Helpers.Manager.SpecialObjects.Add(so); so.SpawnMe(ObjData.Manager.SkillBase[skillid].Properties1["dura"]); break; } } catch (Exception ex) { Log.Exception(ex); } }