Ejemplo n.º 1
0
        public void SaveLocation(NWPlayer player)
        {
            if (!player.IsPlayer)
            {
                return;
            }

            NWArea area         = player.Area;
            bool   isPlayerHome = area.GetLocalInt("IS_PLAYER_HOME") == 1;

            if (area.Tag != "ooc_area" && !isPlayerHome)
            {
                PlayerCharacter entity = GetPlayerEntity(player.GlobalID);
                entity.LocationAreaTag     = area.Tag;
                entity.LocationX           = player.Position.m_X;
                entity.LocationY           = player.Position.m_Y;
                entity.LocationZ           = player.Position.m_Z;
                entity.LocationOrientation = (player.Facing);

                _db.SaveChanges();

                if (entity.RespawnAreaTag == "")
                {
                    _death.BindPlayerSoul(player, false);
                }
            }
        }
Ejemplo n.º 2
0
 public override void DoAction(NWPlayer player, string pageName, int responseID)
 {
     if (responseID == 1)
     {
         _death.BindPlayerSoul(player, true);
         EndConversation();
     }
 }