Example #1
0
        private void InitalizeTownVariables()
        {
            Act CurrentAct = Act.Invalid;

            if (FunkyGame.AdventureMode)
            {
                CurrentAct = GameCache.FindActByTownLevelAreaID(ZetaDia.CurrentLevelAreaId);
            }
            else
            {
                CurrentAct = ZetaDia.CurrentAct;
            }

            switch (TownObject)
            {
            case TownObjects.Stash:
                MovementVector = GameCache.ReturnTownRunMovementVector(GameCache.TownRunBehavior.Stash, CurrentAct);
                ObjectSNO      = GameCache.ReturnTownRunObjectSNO(GameCache.TownRunBehavior.Stash, CurrentAct);
                break;

            case TownObjects.Sell:
                MovementVector = GameCache.ReturnTownRunMovementVector(GameCache.TownRunBehavior.Sell, CurrentAct);
                ObjectSNO      = GameCache.ReturnTownRunObjectSNO(GameCache.TownRunBehavior.Sell, CurrentAct);
                break;

            case TownObjects.Salvage:
                MovementVector = GameCache.ReturnTownRunMovementVector(GameCache.TownRunBehavior.Salvage, CurrentAct);
                ObjectSNO      = GameCache.ReturnTownRunObjectSNO(GameCache.TownRunBehavior.Salvage, CurrentAct);
                break;

            case TownObjects.Gamble:
                MovementVector = GameCache.ReturnTownRunMovementVector(GameCache.TownRunBehavior.Gamble, CurrentAct);
                ObjectSNO      = GameCache.ReturnTownRunObjectSNO(GameCache.TownRunBehavior.Gamble, CurrentAct);
                break;

            case TownObjects.Idenify:
                MovementVector = GameCache.ReturnTownRunMovementVector(GameCache.TownRunBehavior.Idenify, CurrentAct);
                ObjectSNO      = GameCache.ReturnTownRunObjectSNO(GameCache.TownRunBehavior.Idenify, CurrentAct);
                break;

            case TownObjects.NephalemObelisk:
                MovementVector = GameCache.ReturnTownRunMovementVector(GameCache.TownRunBehavior.NephalemObelisk, CurrentAct);
                ObjectSNO      = GameCache.ReturnTownRunObjectSNO(GameCache.TownRunBehavior.NephalemObelisk, CurrentAct);
                break;

            case TownObjects.NephalemNPC:
                MovementVector = GameCache.ReturnTownRunMovementVector(GameCache.TownRunBehavior.NephalemNPC, CurrentAct);
                ObjectSNO      = GameCache.ReturnTownRunObjectSNO(GameCache.TownRunBehavior.NephalemNPC, CurrentAct);
                break;

            case TownObjects.Tyrael:
                MovementVector = GameCache.ReturnTownRunMovementVector(GameCache.TownRunBehavior.Tyrael, CurrentAct);
                ObjectSNO      = GameCache.ReturnTownRunObjectSNO(GameCache.TownRunBehavior.Tyrael, CurrentAct);
                break;
            }

            //Navigator.Clear();

            Helpers.Logger.DBLog.InfoFormat("Initalized Variables Vector {0} Sno {1}", MovementVector, ObjectSNO);

            initalizedTownVars = true;
        }