Exemple #1
0
    public void ShowCompanionStatus(int iIdnex)
    {
        if (iIdnex != -1)
        {
            CharacterData Node   = UserInfo.instance.CompanionList[iIdnex];
            CLASS         eClass = (CLASS)Util.EnumChange <CLASS>(Util.ConvertToString(Node.ReturnData(CHARACTER_DATA.CHAR_CLASS_TYPE)));
            if (eClass == CLASS.CLASS_WARRIOR)
            {
                m_CharClass.text = "워리어";
            }
            else if (eClass == CLASS.CLASS_THIEF)
            {
                m_CharClass.text = "도적";
            }
            else if (eClass == CLASS.CLASS_ARCHER)
            {
                m_CharClass.text = "궁수";
            }
            else if (eClass == CLASS.CLASS_WIZARD)
            {
                m_CharClass.text = "마법사";
            }

            //스테이터스
            string Max = Util.ConvertToString(Node.ReturnData(CHARACTER_DATA.CHAR_MAX_HP));
            m_HpLabel.text  = Max;
            m_ATKLabel.text = Util.ConvertToString(Node.ReturnData(CHARACTER_DATA.CHAR_ATK));

            string[] Split = Util.ConvertToString(Node.ReturnData(CHARACTER_DATA.CHAR_SPEED)).Split(';');
            m_SteminaLabel.text = Split[0] + " 턴당 " + Split[1] + "스테미너";
            m_LevelLabel.text   = "Lv." + Util.ConvertToString(Node.ReturnData(CHARACTER_DATA.CHAR_LEVEL));
            m_iIndex            = iIdnex;
            m_NameLable.text    = Util.ConvertToString(Node.ReturnData(CHARACTER_DATA.CHAR_NAME));
        }
    }
Exemple #2
0
 public PlayerData()
 {
     SlotIndex      = 0;
     SkinColor      = new RGB();
     Name           = "";
     Class          = CLASS.Warrior;
     lvl            = 1;
     paragon_lvl    = 0;
     exp            = 0;
     souls          = 0;
     SkillPoints    = 1;
     BaseStats      = new Stats(Stats.InitStatsType.CHAR);
     SkillTreelvls  = new int[Patch.SkillTreeSize];
     ActiveSlotData = new string[Patch.SkillSlots];
     for (int i = 0; i < ActiveSlotData.Length; i++)
     {
         ActiveSlotData[i] = "";
     }
     Equipments = new Equipment[Enum.GetValues(typeof(EQUIPTYPE)).Length];
     for (int i = 0; i < Equipments.Length; i++)
     {
         Equipments[i] = new Equipment();
     }
     Inventory = new Equipment[Patch.InventoryCapacity];
     for (int i = 0; i < Inventory.Length; i++)
     {
         Inventory[i] = new Equipment();
     }
 }
 /// <summary>
 /// Abstract base class for a resource record.
 /// </summary>
 public ResourceRecord()
 {
     this.name   = string.Empty;
     this.type   = TYPE.A;
     this._class = CLASS.IN;
     this.ttl    = 0;
 }
 /// <summary>
 /// Abstract base class for a resource record.
 /// </summary>
 /// <param name="Name">Name</param>
 /// <param name="Type">Resource Record Type</param>
 /// <param name="Class">Resource Record Class</param>
 /// <param name="Ttl">Time to live</param>
 public ResourceRecord(string Name, TYPE Type, CLASS Class, uint Ttl)
 {
     this.name   = Name;
     this.type   = Type;
     this._class = Class;
     this.ttl    = Ttl;
 }
Exemple #5
0
        //////////////////////////////////////////////////////
        //----Main Interface

        /// <summary>
        /// Class: Role
        /// 构造函数
        /// 设置人物的名字和初始种族 职业
        /// </summary>
        /// <param name="name"></param>
        /// <param name="player_race"></param>
        /// <param name="role_class"></param>
        public Role(String name, RACE player_race, CLASS role_class)
        {
            this.PLAYERNAME = name;
            //拷贝种族配置
            Race.instance.Selection(this, player_race);
            Class.instance.Selection(this, role_class);
        }
Exemple #6
0
        static public List <USINGEVENT> CheckOverLapEvent(USINGCLASS usingClass, CLASS class_)
        {
            List <USINGEVENT> listOverlappedEvent = new List <USINGEVENT>();

            var listEventMayOverlap = (from UsingEvent in DataProvider.Ins.DB.USINGEVENTs
                                       join StartPeriod in DataProvider.Ins.DB.PERIOD_TIMERANGE on UsingEvent.StartPeriod equals StartPeriod.PeriodID
                                       where UsingEvent.RoomID == usingClass.RoomID
                                       select new { UsingEvent, StartPeriod }).ToList();

            listEventMayOverlap = listEventMayOverlap.FindAll(x =>
            {
                int dayOfWeek   = (int)x.UsingEvent.Date_.DayOfWeek;
                var startPeriod = (from period in DataProvider.Ins.DB.PERIOD_TIMERANGE
                                   where period.PeriodID == usingClass.StartPeriod
                                   select period).Single();

                return
                (((x.UsingEvent.Date_ - ((DateTime)usingClass.StartDate)).Days / 7) % usingClass.RepeatCycle == 0 &&
                 dayOfWeek == usingClass.Day_ &&
                 (x.UsingEvent.Date_ >= usingClass.StartDate && x.UsingEvent.Date_ <= usingClass.EndDate) &&
                 !(x.StartPeriod.StartTime + x.UsingEvent.Duration <= startPeriod.StartTime || x.StartPeriod.StartTime >= startPeriod.StartTime + usingClass.Duration));
            });

            foreach (var event_ in listEventMayOverlap)
            {
                listOverlappedEvent.Add(event_.UsingEvent);
            }

            return(listOverlappedEvent);
        }
 public CreationData(int SlotIndex, RGB SkinColor, string Name, CLASS Class)
 {
     this.SlotIndex = SlotIndex;
     this.SkinColor = SkinColor;
     this.Name      = Name;
     this.Class     = Class;
 }
Exemple #8
0
        /// <summary>
        /// NULL (Experimental)
        /// </summary>
        /// <param name="Name">Name</param>
        /// <param name="Type">Resource Record Type</param>
        /// <param name="Class">Resource Record Class</param>
        /// <param name="Ttl">Time to live</param>
        /// <param name="Data">RR-specific binary data.</param>
        /// <param name="EndPos">End position of record.</param>
        public NULL(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data, long EndPos)
            : base(Name, Type, Class, Ttl)
        {
            int c = (int)(EndPos - Data.Position);

            this.data = new byte[c];
            Data.Read(this.data, 0, c);
        }
        public ActionResult DeleteConfirmed(int id)
        {
            CLASS cLASS = db.CLASSes.Find(id);

            db.CLASSes.Remove(cLASS);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #10
0
 public string ToString(int namePadding)
 {
     return(String.Join(" ", new string[] {
         NAME.PadLeft(namePadding),
         TTL.ToString(),
         CLASS.ToString(),
         TypeString
     }));
 }
Exemple #11
0
        /// <summary>
        /// Well Known Services
        /// </summary>
        /// <param name="Name">Name</param>
        /// <param name="Type">Resource Record Type</param>
        /// <param name="Class">Resource Record Class</param>
        /// <param name="Ttl">Time to live</param>
        /// <param name="Data">RR-specific binary data.</param>
        /// <param name="EndPos">End position of record.</param>
        public WKS(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data, long EndPos)
            : base(Name, Type, Class, Ttl, Data)
        {
            this.protocol = (byte)Data.ReadByte();
            int c = (int)(EndPos - Data.Position);

            this.bitMap = new byte[c];
            Data.Read(bitMap, 0, c);
        }
Exemple #12
0
        /// <summary>
        /// Abstract base class for Resource Address Records.
        /// </summary>
        /// <param name="Name">Name</param>
        /// <param name="Type">Resource Record Type</param>
        /// <param name="Class">Resource Record Class</param>
        /// <param name="Ttl">Time to live</param>
        /// <param name="Data">RR-specific binary data.</param>
        public ResourceAddressRecord(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data)
            : base(Name, Type, Class, Ttl)
        {
            int c = this.AddressSize;

            byte[] Bin = new byte[c];
            Data.Read(Bin, 0, c);

            this.address = new IPAddress(Bin);
        }
Exemple #13
0
 /// <summary>
 /// Start Of zone Authority
 /// </summary>
 /// <param name="Name">Name</param>
 /// <param name="Type">Resource Record Type</param>
 /// <param name="Class">Resource Record Class</param>
 /// <param name="Ttl">Time to live</param>
 /// <param name="Data">RR-specific binary data.</param>
 public SOA(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data)
     : base(Name, Type, Class, Ttl)
 {
     this.mName   = DnsClient.ReadName(Data);
     this.rName   = DnsClient.ReadName(Data);
     this.serial  = DnsClient.ReadUInt32(Data);
     this.refresh = DnsClient.ReadUInt32(Data);
     this.retry   = DnsClient.ReadUInt32(Data);
     this.expire  = DnsClient.ReadUInt32(Data);
     this.minimum = DnsClient.ReadUInt32(Data);
 }
 public ActionResult Edit([Bind(Include = "Class_ID,ClassName,TotalSectons,TotalStudents,Admin_ID")] CLASS cLASS)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cLASS).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Admin_ID = new SelectList(db.ADMINs, "Admin_ID", "AdminName", cLASS.Admin_ID);
     return(View(cLASS));
 }
Exemple #15
0
 public bool Equals(RRBase rrbase)
 {
     if (object.ReferenceEquals(null, rrbase))
     {
         return(false);
     }
     return
         (NAME.Equals(rrbase.NAME) &&
          TypeValue.Equals(rrbase.TypeValue) &&
          CLASS.Equals(rrbase.CLASS) &&
          TTL.Equals(rrbase.TTL));
 }
Exemple #16
0
        /// <summary>
        /// Descriptive text
        /// </summary>
        /// <param name="Name">Name</param>
        /// <param name="Type">Resource Record Type</param>
        /// <param name="Class">Resource Record Class</param>
        /// <param name="Ttl">Time to live</param>
        /// <param name="Data">RR-specific binary data.</param>
        /// <param name="EndPos">End position of record.</param>
        public TXT(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data, long EndPos)
            : base(Name, Type, Class, Ttl)
        {
            List <string> Text = new List <string>();

            while (Data.Position < EndPos)
            {
                Text.Add(DnsClient.ReadString(Data));
            }

            this.text = Text.ToArray();
        }
Exemple #17
0
    private string itemeffect; //アイテムの説明、文字型

    //ItemSpecのコンストラクタ
    public ItemSpec(CLASS itemClass,
                    TYPE itemType,
                    float?numValue,
                    string charaValue,
                    string itemEffect)
    {
        itemclass  = itemClass.ToString();
        itemtype   = itemType.ToString();
        numvalue   = numValue;
        charavalue = charaValue;
        itemeffect = itemEffect;
    }
Exemple #18
0
    public void ShowPartyStatus(int iIdnex, CHARACTER_TYPE eType, bool bBattle)
    {
        //파티 원
        CharPartyData Node = null;

        if (bBattle)
        {
            if (eType == CHARACTER_TYPE.CHAR_PLAYER)
            {
                Node = GameManager.instance.PlayerParty[iIdnex];
            }
            else if (eType != CHARACTER_TYPE.CHAR_NONE)
            {
                Node = GameManager.instance.EnemyParty[iIdnex];
            }
        }
        else
        {
            Node = UserInfo.instance.PartyList[iIdnex];
        }

        CLASS eClass = (CLASS)Util.EnumChange <CLASS>(Util.ConvertToString(Node.CharData.ReturnData(CHARACTER_DATA.CHAR_CLASS_TYPE)));

        if (eClass == CLASS.CLASS_WARRIOR)
        {
            m_CharClass.text = "워리어";
        }
        else if (eClass == CLASS.CLASS_THIEF)
        {
            m_CharClass.text = "도적";
        }
        else if (eClass == CLASS.CLASS_ARCHER)
        {
            m_CharClass.text = "궁수";
        }
        else if (eClass == CLASS.CLASS_WIZARD)
        {
            m_CharClass.text = "마법사";
        }

        //스테이터스
        string Max = Util.ConvertToString(Node.CharData.ReturnData(CHARACTER_DATA.CHAR_MAX_HP));

        m_HpLabel.text  = Max;
        m_ATKLabel.text = Util.ConvertToString(Node.CharData.ReturnData(CHARACTER_DATA.CHAR_ATK));

        string[] Split = Util.ConvertToString(Node.CharData.ReturnData(CHARACTER_DATA.CHAR_SPEED)).Split(';');
        m_SteminaLabel.text = Split[0] + " 턴당 " + Split[1] + "스테미너";
        m_LevelLabel.text   = "Lv." + Util.ConvertToString(Node.CharData.ReturnData(CHARACTER_DATA.CHAR_LEVEL));
        m_iIndex            = iIdnex;
        m_NameLable.text    = Util.ConvertToString(Node.CharData.ReturnData(CHARACTER_DATA.CHAR_NAME));
    }
Exemple #19
0
 public ActionResult Them(CLASS lop)
 {
     if (dao.Insert_Class(lop))
     {
         TempData["msg"] = "<script>alert('Thêm Thành Công');</script>";
         return(RedirectToAction("Index", "Class"));
     }
     else
     {
         TempData["msg"] = "<script>alert('Thêm Thất Bại! Lỗi!');</script>";
         return(RedirectToAction("Them", "Class"));
     }
 }
Exemple #20
0
 public ActionResult Sua(CLASS lop)
 {
     if (dao.Update_Class(lop))
     {
         TempData["msg"] = "<script>alert('Cập Nhật Thành Công');</script>";
         return(RedirectToAction("Index", "Class"));
     }
     else
     {
         TempData["msg"] = "<script>alert('Cập Nhật Thất Bại! Lỗi!');</script>";
         return(RedirectToAction("Sua", "Class"));
     }
 }
		public bool Insert(CLASS obj)
		{
			try
			{
                DataContext.Instance.CLASSES.AddObject(obj);
				DataContext.Instance.SaveChanges();
				return true;
			}
			catch
			{
				return false;
			}
		}
        // GET: CLASSes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CLASS cLASS = db.CLASSes.Find(id);

            if (cLASS == null)
            {
                return(HttpNotFound());
            }
            return(View(cLASS));
        }
Exemple #23
0
 public bool Insert_Class(CLASS lop)
 {
     try
     {
         lop.Number = 0;
         db.CLASSes.Add(lop);
         db.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Exemple #24
0
 public AuditTrailEntry()
 {
     _auditTrailID = 0;
     _assetID      = 0;
     _assetName    = "";
     _location     = "";
     _date         = DateTime.Now;
     _username     = Environment.UserName;
     _key          = "";
     _oldValue     = "";
     _newValue     = "";
     _class        = CLASS.application_installs;
     _type         = TYPE.changed;
 }
Exemple #25
0
 public bool ifCompanionExist(CLASS eClass, int iIndex)
 {
     for (int i = 0; i < CompanionList.Count; i++)
     {
         CLASS CurClass = (CLASS)Util.EnumChange <CLASS>(Util.ConvertToString(CompanionList[i].ReturnData(CHARACTER_DATA.CHAR_CLASS_TYPE)));
         int   CurIndex = Util.ConvertToInt(CompanionList[i].ReturnData(CHARACTER_DATA.CHAR_INDEX));
         if (CurClass == eClass && CurIndex == iIndex)
         {
             return(true);//해당 캐릭터가 존재함
         }
     }
     //없음
     return(false);
 }
        public virtual BACVnetVar Decode(BACPacket cm, CONTEXT_TAG ct)
        {
            byte a = cm.getNextByte();

            classType = DecodeClass(a);
            length    = DecodeLenValType(a);

            switch (ct)
            {
            case CONTEXT_TAG.NULL:
                return(new BACVnetNull().Decode(cm));

            case CONTEXT_TAG.BOOLEAN:
                return(new BACVnetBoolean().Decode(cm));

            case CONTEXT_TAG.INT:
                return(new BACVnetInt().Decode(cm, length));

            case CONTEXT_TAG.UINT:
                return(new BACVnetUInt().Decode(cm, length));

            case CONTEXT_TAG.REAL:
                return(new BACVnetReal().Decode(cm, length));

            case CONTEXT_TAG.DOUBLE:
                return(new BACVnetDouble().Decode(cm, length));

            case CONTEXT_TAG.BSTRING:
                return(new BACVnetBString().Decode(cm, length));

            case CONTEXT_TAG.CSTRING:
                return(new BACVnetCString().Decode(cm, length));

            case CONTEXT_TAG.OSTRING:
                return(new BACVnetOString().Decode(cm, length));

            case CONTEXT_TAG.DATE:
                return(new BACVnetDate().Decode(cm, length));

            case CONTEXT_TAG.TIME:
                return(new BACVnetTime().Decode(cm, length));

            case CONTEXT_TAG.ENUM:     // 20.2.11 Encoding of an Enumerated Value; pg 1496
                return(new BACVnetEnum().Decode(cm, length));

            case CONTEXT_TAG.OBJECT:
                return(new BACVnetObjectIdentifier().Decode(cm, length));
            }
            return(this);
        }
        // GET: CLASSes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CLASS cLASS = db.CLASSes.Find(id);

            if (cLASS == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Admin_ID = new SelectList(db.ADMINs, "Admin_ID", "AdminName", cLASS.Admin_ID);
            return(View(cLASS));
        }
        public ActionResult Create([Bind(Include = "Class_ID,ClassName,TotalSectons,TotalStudents,Admin_ID")] CLASS cLASS)
        {
            if (ModelState.IsValid)
            {
                db.CLASSes.Add(cLASS);
                db.SaveChanges();
                //return RedirectToAction("Index");
            }

            ViewBag.Admin_ID = new SelectList(db.ADMINs, "Admin_ID", "AdminName", cLASS.Admin_ID);
            ModelState.Clear();
            ViewBag.Message = "successfully created";
            return(View());
            // return View(cLASS);
        }
Exemple #29
0
        public void setClass(CLASS role_class, String class_description, double str_g_b, double agi_g_b, double int_g_b, double sta_g_b, double luc_g_b)
        {
            this.ROLE_CLASS             = role_class;
            this.ROLE_CLASS_DESCRIPTION = class_description;

            this.ma_dSTR_G_BONUS = str_g_b;

            this.ma_dAGI_G_BONUS = agi_g_b;

            this.ma_dINT_G_BONUS = int_g_b;

            this.ma_dSTA_G_BONUS = sta_g_b;

            this.ma_dLUC_G_BONUS = luc_g_b;
        }
Exemple #30
0
        static bool OnInitTrainer(LoginClient client, string input)
        {
            if (client.Account.AccessLvl < ACCESSLEVEL.GM)
            {
                Chat.System(client, "You do not have access to this command");
                return(true);
            }

            string[] split = input.Split(' ');
            if (split.Length < 2)
            {
                return(false);
            }


            DataObject[] obj = DataServer.Database.SelectObjects(typeof(DBVendor), "GUID='" + client.Character.Selected + "'");
            if (obj == null || obj.Length == 0)
            {
                Chat.System(client, "Vendor not found");
                return(true);
            }
            DBVendor vendor   = (DBVendor)obj[0];
            CLASS    tmpClass = CLASS.MAGE;

            try
            {
                tmpClass = (CLASS)Enum.Parse(typeof(CLASS), split[1].ToUpper());
            }
            catch (Exception) { Chat.System(client, "Invalid class"); return(false); }
            vendor.Class = (int)tmpClass;
            Chat.System(client, "Setting Trainer Class:" + vendor.Class);
            DataServer.Database.SaveObject(vendor);
            DataServer.Database.FillObjectRelations(vendor);
            string classstr = tmpClass.ToString();

            classstr = classstr.Substring(0, 1).ToUpper() + classstr.Substring(1).ToLower();
            string      chatcmd = "!title " + '\"' + classstr + " Trainer" + '\"';
            WorldPacket pkg     = new WorldPacket(WORLDMSG.CLIENT_MESSAGE);

            pkg.Write(client.Character.ObjectId);
            pkg.Write((int)CMSG.MESSAGECHAT);
            pkg.Write((int)0);
            pkg.Write((int)0);
            pkg.Write(chatcmd);
            client.SendWorldServer(pkg);
            return(true);
        }
Exemple #31
0
    public void CompanionBlock(bool bPoint)
    {
        //플레이어가 엔드 포인트에 도달하면 이쪽으로
        if (bPoint)
        {
            //플레이어가 컴패니언 블럭에 도달
            if (m_bCompanion)
            {
                //해당 블럭의 컴패니언파일을 작성해서 새롭게 업데이트
                if (GameManager.instance.BlockList[GameManager.instance.BlockIndex].m_bActive)
                {
                    //우선 유저가 해당 컴패니언을 가지고 있는가와 더불어서, 해당 패널을 밟으면 GameManager에 해당 패널을 밟았다는 것을 표시

                    //유저에게 해당 클래스의 컴패니언이 있는가?
                    string Route    = "Excel/MapData/" + GameManager.instance.StageIndex + "/" + GameManager.instance.BlockIndex + "_" + CHARACTER_TYPE.CHAR_PLAYER.ToString();
                    var    ComTable = EXCEL.ExcelLoad.Read(Route);
                    CLASS  eClass   = (CLASS)Util.EnumChange <CLASS>(Util.ConvertToString(ComTable[0][CHARACTER_DATA.CHAR_CLASS_TYPE.ToString()]));
                    int    iIndex   = Util.ConvertToInt(ComTable[0][CHARACTER_DATA.CHAR_INDEX.ToString()]);
                    string strName  = Util.ConvertToString(ComTable[0][CHARACTER_DATA.CHAR_NAME.ToString()]);
                    //맵 데이터 셋팅
                    if (!UserInfo.instance.ifCompanionExist(eClass, iIndex))
                    {
                        //존재하는가?
                        //존재하지 않는다면, 보상으로서 획득가능 하니, 게임 매니저에 해당 캐릭터의 인덱스의 기타 등등을 저장해놓자.
                        GameManager.instance.WhoRescueIndex = iIndex;   //해당 블럭에서 구출 가능한 인덱스
                        GameManager.instance.WhoRescueClass = eClass;   //해당 블럭에서 구출 가능한 클래스
                        Debug.Log("CompanionSave");
                        Debug.Log(iIndex + eClass + strName);

                        m_ResqueObject.SetActive(true);
                        m_ResqueObject.GetComponent <ResqueObject>().SettingText(strName);
                    }
                    GameManager.instance.ifRescue = true;   //구출 완료
                    Debug.Log("Companion");
                    GameManager.instance.BlockList[GameManager.instance.BlockIndex].m_bActive = false;
                }
                m_bCompanion = false;
            }
        }
        else
        {
            //플레이어가 엔드 포인트에 도달 못함
            //미니맵 선택을 막아주고 전체적으로 리셋
            m_bCompanion = true;
        }
    }
 private bool DeleteClass(CLASS _class)
 {
     try
     {
         DeleteInvariant(_class.ID);
         for (int i = 0; i < _class.METHODS.Count; i++)
         {
             if (DeleteMethod(_class.METHODS.ElementAt(i)))
             {
                 i--;
             }
         }
         DataContext.Instance.CLASSES.DeleteObject(_class);
         return true;
     }
     catch
     {
         return false;
     }
 }