Пример #1
0
 /// <summary>
 /// Called when [delete].
 /// </summary>
 public override void OnDelete()
 {
     IOBSystem.KinCityRegion region = IOBSystem.KinCityRegion.GetKinCityAt(Map, Location);
     if (region != null)
     {
         ((KinCityRegionStone)region.GetRegionControler()).UnRegisterChamp(this);
     }
     base.OnDelete();
 }
Пример #2
0
        /// <summary>
        /// Called when [location change].
        /// </summary>
        /// <param name="oldLoc">The old loc.</param>
        public override void OnLocationChange(Point3D oldLoc)
        {
            IOBSystem.KinCityRegion region = IOBSystem.KinCityRegion.GetKinCityAt(Map == Map.Internal == true ? Map.Felucca : Map, oldLoc);
            if (region != null)
            {
                ((KinCityRegionStone)region.GetRegionControler()).UnRegisterChamp(this);
            }

            base.OnLocationChange(oldLoc);

            region = IOBSystem.KinCityRegion.GetKinCityAt(Map == Map.Internal == true ? Map.Felucca : Map, Location);
            if (region != null)
            {
                ((KinCityRegionStone)region.GetRegionControler()).RegisterChamp(this);
                this.SendMessage("Champ successfully registered to the city of" + region.Name);
            }

            if (KinCityRegion != null)
            {
                //Add the city spawners into a queue..
                RefreshSpawnerList();
            }
        }