示例#1
0
        private void HandleMoveStructure()
        {
            NWPlayer oPC    = GetPC();
            Model    model  = GetDialogCustomData <Model>();
            int      flagID = _structure.GetTerritoryFlagID(model.Flag);

            if (!_structure.PlayerHasPermission(oPC, StructurePermission.CanMoveStructures, flagID))
            {
                ChangePage("MainPage");
                return;
            }

            _.FloatingTextStringOnCreature("Please use your build tool to select a new location for this structure.", GetPC().Object, FALSE);
            _structure.SetIsPCMovingStructure(GetPC(), model.ActiveStructure, true);
            EndConversation();
        }
示例#2
0
        private void HandleMainPageResponse(int responseID)
        {
            Model model = GetDialogCustomData <Model>();

            if (model.ConstructionSiteID <= 0)
            {
                switch (responseID)
                {
                case 1:     // Select Blueprint

                    LoadCategoryPageResponses();
                    ChangePage("BlueprintCategoryPage");
                    break;

                case 2:     // Move
                    _structure.SetIsPCMovingStructure(GetPC(), (NWPlaceable)GetDialogTarget(), true);
                    _.FloatingTextStringOnCreature("Please use your build tool to select a new location for this structure.", GetPC().Object, FALSE);
                    EndConversation();
                    break;

                case 3:     // Raze
                    ChangePage("RazePage");
                    break;
                }
            }
            else
            {
                switch (responseID)
                {
                case 1:     // Quick Build
                    ChangePage("QuickBuildPage");
                    break;

                case 2:     // Build
                    NWObject target = GetDialogTarget();
                    GetPC().AssignCommand(() => _.ActionAttack(target.Object));
                    break;

                case 3:     // Preview
                    DoConstructionSitePreview();
                    break;

                case 4:     // Preview Interior
                    DoBuildingInteriorPreview();
                    break;

                case 5:     // Change Interior Layout
                    LoadChangeLayoutResponses();
                    ChangePage("ChangeLayoutPage");
                    break;

                case 6:     // Rotate
                    ToggleRotateOptions();
                    ChangePage("RotatePage");
                    break;

                case 7:     // Move
                    _structure.SetIsPCMovingStructure(GetPC(), (NWPlaceable)GetDialogTarget(), true);
                    _.FloatingTextStringOnCreature("Please use your build tool to select a new location for this structure.", GetPC().Object, FALSE);
                    EndConversation();
                    break;

                case 8:     // Raze
                    ChangePage("RazePage");
                    break;
                }
            }
        }