예제 #1
0
        public String toHealTimeString()
        {
            int    level = Player.GetLevel(this.fRace, this.fXP);
            String str   = level + ". " + this.fName;

            str = this.toDisplayString();
            if (this.fHP != this.fMaxHP)
            {
                long wound = 0;
                for (int w = Player.kMaxWounds; w > 0; w--)
                {
                    if (fWounds[w - 1] != 0)
                    {
                        wound = w;
                        break;
                    }
                }
                long healtime = (fTimestamp + wound * 60 * 60 * 1000) - DateTime.Now.Ticks;
                if (healtime > 0)
                {
                    Timespan t = new Timespan(healtime);
                    str += " " + t.toString();
                }
            }
            return(str);
        }
예제 #2
0
        public String toDisplayString()
        {
            String str  = fNumber + ".";
            long   span = fOpenTime - DateTime.Now.Ticks;

            if (span > 0)
            {
                Timespan t = new Timespan(span);
                str += " " + t.toDisplayString();
            }
            else
            {
                span = fTreasureTime - DateTime.Now.Ticks;
                if (span <= 0 && fContent != "")
                {
                    str += " " + fContent + " - ";
                }
                str += " " + this.fName;
            }
            return(str);
        }
예제 #3
0
        public String toString()
        {
            Utility.Trace("DungeonRecord.toString - enter");
            String str = this.fNumber + ". " + this.fName + "\n";

            //      if (explored_rooms != null)
            //      {
            //          str += " explored: ";
            //          for (int i = 0; i < explored_rooms.length; i++)
            //          {
            //              str += explored_rooms[i] + " ";
            //          }
            //          str += "\n";
            //      }
            str += " compl: " + fCompleted;
            long span = fOpenTime - DateTime.Now.Ticks;

            Utility.Trace("DungeonRecord.toString - open span: " + span);
            if (span <= 0)
            {
                span = fTreasureTime - DateTime.Now.Ticks;
                Utility.Trace("DungeonRecord.toString - treasure span: " + span);
                if (span > 0)
                {
                    Timespan t = new Timespan(span);
                    str += " empty. " + t.toDisplayString();
                }
                else
                {
                    str += " open.";
                }
            }
            else
            {
                Timespan t = new Timespan(span);
                str += " closed. " + t.toDisplayString();
            }
            Utility.Trace("DungeonRecord.toString - returns: " + str);
            return(str);
        }