示例#1
0
 protected HashSet <ulong> _Node(ulong iNode, HashSet <ulong> hFound, ulong iInitialNode)
 {
     try
     {
         if ((long)iNode == (long)iInitialNode || hFound.Add(iNode))
         {
             ProcessCommunicationPointer communicationPointer = Game.Process[iNode].ToBuffered((ulong)(Game.Process.PointerSize * 3U));
             long num1             = 0;
             uint unsignedInteger1 = communicationPointer.GetUnsignedInteger((ulong)num1);
             long num2             = (long)Game.Process.PointerSize;
             uint unsignedInteger2 = communicationPointer.GetUnsignedInteger((ulong)num2);
             long num3             = (long)(Game.Process.PointerSize * 2U);
             uint unsignedInteger3 = communicationPointer.GetUnsignedInteger((ulong)num3);
             if ((int)unsignedInteger1 != 0)
             {
                 hFound = this._Node((ulong)unsignedInteger1, hFound, iInitialNode);
             }
             if ((int)unsignedInteger2 != 0)
             {
                 hFound = this._Node((ulong)unsignedInteger2, hFound, iInitialNode);
             }
             if ((int)unsignedInteger3 != 0)
             {
                 hFound = this._Node((ulong)unsignedInteger3, hFound, iInitialNode);
             }
         }
         return(hFound);
     }
     catch (Exception ex)
     {
         return(hFound);
     }
 }
示例#2
0
        public DialogList Update()
        {
            List <Dialog> list      = this._hDialogList;
            bool          lockTaken = false;

            try
            {
                Monitor.Enter((object)list, ref lockTaken);
                if (this == Game.DialogList && (this._hDialogList.Count == 0 || this._iUpdateTime < Game.Time()))
                {
                    ProcessCommunicationPointer communicationPointer = Game.Process[this._iBase + (ulong)Game.Resolver["DialogCollection"]["Array"].Value].ToBuffered((ulong)Game.Resolver["DialogCollection"]["Size"].Value);
                    for (uint iIndex = 0; iIndex < Game.Resolver["DialogCollection"]["Size"].Value / Game.Process.PointerSize; ++iIndex)
                    {
                        ulong pointer = communicationPointer.GetPointer((ulong)(Game.Process.PointerSize * iIndex));
                        if (!this._hDialogAddress.Contains(pointer) && (long)pointer != 0L && (Game.Process.GetString(pointer + (ulong)Game.Resolver["DialogCollection"]["Validate"].Value, 4U, MessageHandlerString.ASCII) == "Vera" || Game.Process.GetString(pointer + (ulong)Game.Resolver["DialogCollection"]["Validate"].Value, 8U, MessageHandlerString.ASCII) == "MYRIADPR"))
                        {
                            this._hDialogList.Add(new Dialog(this._iBase, pointer, iIndex, (Dialog)null));
                            this._hDialogAddress.Add(pointer);
                        }
                    }
                    this._hDialogList.Sort();
                    this._iUpdateTime = Game.Time() + 1000U;
                }
                return(this);
            }
            finally
            {
                if (lockTaken)
                {
                    Monitor.Exit((object)list);
                }
            }
        }
示例#3
0
 public Vector3D UpdatePosition()
 {
     if ((long)this._iEntityExtended != 0L)
     {
         ProcessCommunicationPointer communicationPointer = Game.Process[this._iEntityExtended + (ulong)Game.Resolver["ActorPosition"]["Position"].Value].ToBuffered(12UL);
         this._hPosition = new Vector3D(communicationPointer.GetFloat(0UL), communicationPointer.GetFloat(4UL), communicationPointer.GetFloat(8UL));
     }
     return(this._hPosition);
 }
示例#4
0
        protected HashSet <ulong> _Node(ulong iNode, HashSet <ulong> hFound)
        {
            ProcessCommunicationPointer communicationPointer = Game.Process[iNode].ToBuffered((ulong)(Game.Process.PointerSize * 3U));

            if (!hFound.Contains(iNode))
            {
                hFound.Add(iNode);
            }
            for (uint index = 0; index < 3U; ++index)
            {
                ulong pointer;
                if ((long)(pointer = communicationPointer.GetPointer((ulong)(Game.Process.PointerSize * index))) != 0L && !hFound.Contains(pointer))
                {
                    hFound = this._Node(pointer, hFound);
                }
            }
            return(hFound);
        }
示例#5
0
        public Player Update()
        {
            Dialog dialog = Game.DialogList == null ? (Dialog)null : Game.DialogList.GetDialog("target_dialog", true);
            ProcessCommunicationPointer communicationPointer = Game.Process[this._iBase + (ulong)Game.Resolver["ControllerSingle"]["Brand"].Value].ToBuffered(56UL);

            this.UpdateCamera();
            this.UpdatePosition();
            this._iID = this.GetID(this._iBase);
            if (this._zName == null)
            {
                this._zName = this.GetName(this._iBase);
            }
            if ((int)this._bLevel == 0)
            {
                this._bLevel = Game.Process.GetByte(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["Level"].Value);
            }
            Entity entity;

            if (Game.EntityList != null && (entity = Game.EntityList.GetEntity(this._iID)) != null)
            {
                this._iEntityNode = entity.GetAddress(1);
                base.Update();
                Game.DialogList.GetDialog("skill_delay_dialog", false);
                if (this.IsMoving() && this._iMoveTime < Game.Time())
                {
                    if (this._hMoveCheck.Equals((object)this._hPosition))
                    {
                        this._eActionPending = this._eAction;
                        this.SetAction(eAction.None);
                        this._iActionPending = Game.Time() + 500U;
                    }
                    this._hMoveCheck = this._hPosition;
                    this._iMoveTime  = Game.Time() + 1000U;
                }
                this._eAction = (eAction)Game.Process.GetUnsignedInteger(this._iEntity + (ulong)Game.Resolver["ActorSingle"]["Action"].Value);
                if ((int)this._iActionPending != 0 && this._iActionPending < Game.Time())
                {
                    if ((this._eAction == eAction.MoveForward && this._eActionPending == eAction.MoveForward || this._eAction == eAction.None) && this._eActionPending == eAction.MoveForward)
                    {
                        Player.PostMessage(Game.Process.ProcessWindowHandle, 256U, 144U, 0U);
                        Player.PostMessage(Game.Process.ProcessWindowHandle, 257U, 144U, 0U);
                    }
                    else
                    {
                        this.SetAction(this._eActionPending);
                    }
                    this._iActionPending = 0U;
                }
            }
            try
            {
                uint num = Game.Resolver["ControllerSingleCheat"]["GravitySkills"].Value;
                if (Game.Resolver["ControllerSingleCheat"]["GravityFlying"] != null)
                {
                    if (Game.Resolver["ControllerSingleCheat"]["GravitySkills"] != null)
                    {
                        if (this._iGravityPatchTimer >= Game.Time())
                        {
                            if (!this._bGravityLock)
                            {
                                if (Game.Player.GetStance() != eStance.Normal)
                                {
                                    if (Game.Player.GetStance() != eStance.Combat)
                                    {
                                        goto label_29;
                                    }
                                }
                                Game.Process.SetUnsignedInteger(Game.Player.GetAddress(0) + (ulong)Game.Resolver["ActorSingle"]["Stance"].Value, Game.Player.GetStance() == eStance.Combat ? 5U : 4U);
                                Game.Process.SetByte(Game.Base() + (ulong)Game.Resolver["ControllerSingleCheat"]["GravityFlying"].Value, (byte)0);
                                if ((int)num != 0)
                                {
                                    Game.Process.SetUnsignedShort(Game.Base() + (ulong)num, (ushort)37008);
                                }
                                this._bGravityLock = true;
                            }
                        }
                        else if (this._bGravityLock)
                        {
                            Game.Process.SetUnsignedInteger(Game.Player.GetAddress(0) + (ulong)Game.Resolver["ActorSingle"]["Stance"].Value, Game.Player.GetStance() == eStance.FlyingCombat ? 1U : 0U);
                            Game.Process.SetByte(Game.Base() + (ulong)Game.Resolver["ControllerSingleCheat"]["GravityFlying"].Value, (byte)1);
                            if ((int)num != 0)
                            {
                                Game.Process.SetUnsignedShort(Game.Base() + (ulong)num, (ushort)49203);
                            }
                            this._bGravityLock = false;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
label_29:
            this._fAttackRange           = Game.Process.GetFloat(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["AttackRange"].Value);
            this._hMoveClick             = new Vector3D(0.0f, 0.0f, 0.0f);
            this._iManaMaximum           = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["ManaMaximum"].Value);
            this._iManaCurrent           = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["ManaCurrent"].Value);
            this._iFlightTimeCurrent     = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["FlightTimeCurrent"].Value);
            this._iFlightTimeMaximum     = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["FlightTimeMaximum"].Value);
            this._iExperienceCurrent     = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["ExperienceCurrent"].Value);
            this._iExperienceRecoverable = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["ExperienceRecoverable"].Value);
            this._iExperienceRequired    = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["ExperienceMaximum"].Value);
            this._iFlightCooldown        = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["FlightCooldownRemainingTime"].Value);
            this._iWorld  = Game.Process.GetUnsignedInteger(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["WorldId"].Value) / 10000U * 10000U;
            this._zMarked = Game.Process.GetString(this._iBase + (ulong)Game.Resolver["ControllerSingle"]["NameSearch"].Value, 128U, MessageHandlerString.Unicode);
            for (uint index = 0; index < 14U; ++index)
            {
                this._hBrand[index + 1U] = communicationPointer.GetUnsignedInteger((ulong)(index * 4U));
            }
            if (dialog != null && dialog.IsVisible())
            {
                ulong address = dialog.GetAddress();
                this._iTargetID = Game.Process.GetUnsignedInteger(address + (ulong)Game.Resolver["ControllerSingle"]["TargetOffset"].Value);
            }
            return(this);
        }