Ejemplo n.º 1
0
        public static Beast Parse(uint[] BS, Character CHR)
        {
            int id = (int)BS[OFS.GetInt("BS_BL_ID") / 4];

            if (!INF.ContainsKey(id))
            {
                return(null);
            }
            Beast RB = new Beast(id);

            RB.BS      = BS;
            RB.Level   = (int)BS[OFS.GetInt("BS_BL_Level") / 4];
            RB.Enemies = BS[OFS.GetInt("BS_BL_Enemies") / 4];
            RB.Element = (BS[OFS.GetInt("BS_BL_Elements") / 4] & 0xFF);
            RB.Power   = INF[id].LVL[RB.Level - 1];
            RB.Name    = INF[id].Name;
            RB.ItemId  = INF[id].ItemId;
            RB.Class   = INF[id].Class;
            RB.CHR     = CHR;
            return(RB);
        }
Ejemplo n.º 2
0
        public void LoadEnemy()
        {
            ENEMY.Clear();
            int rr  = -1;
            int EAB = Memory.RD(CHR.HNDL, MBO + OFS.GetInt("BS_EnemyArrayBegin"));
            int EAE = Memory.RD(CHR.HNDL, MBO + OFS.GetInt("BS_EnemyArrayEnd"));

            while (EAB < EAE)
            {
                byte[] buffer = new byte[OFS.GetInt("BS_ArrayItemSize")];
                EF.ReadProcessMemory(CHR.HNDL, EAB, buffer, buffer.Length, ref rr);
                uint[] oa = new uint[buffer.Length / 4];
                Buffer.BlockCopy(buffer, 0, oa, 0, buffer.Length);
                Beast NB = Beast.Parse(oa, CHR);
                if (NB != null && !ENEMY.ContainsKey(NB.ID))
                {
                    ENEMY.Add(NB.ID, NB);
                }
                EAB += OFS.GetInt("BS_ArrayItemSize");
            }
        }
Ejemplo n.º 3
0
 public BeastFactory(Character CHR) : base(CHR)
 {
     Beast.Init(); BeastReward.Init();
 }
Ejemplo n.º 4
0
 public BeastFactory(Character CHR)
 {
     this.CHR = CHR; Beast.Init(); BeastReward.Init();
 }