From 254ac20beb95e1e01f77d2fdf99f4c96f8a5423d Mon Sep 17 00:00:00 2001 From: PrisonCamp Date: Fri, 20 Feb 2015 23:24:16 -0800 Subject: [PATCH] The following has been fixed: *Removed unnecessary options in the faction QA tool *Fixed Empire/Remembrance Day Ceremonies. They now work. *Killing a player through the event tool should now work *Removed unecessary comments from base_player script *Fixed the badge QA tool *Fixed the location bug in several different methods *Fixed the Exar Kun first boss sparks to accurately choose a target *Life Day and Love Day now work and spawn correctly --- .../game/datatables/test/qa_tool_menu.tab | 4 +-- .../script/event/emp_day/gating_vader.script | 10 +++--- .../event/emperorsday/emperor_statue.script | 18 +++++----- .../event/emperorsday/yoda_fountain.script | 6 ++-- .../game/script/event/event_tool.script | 3 +- .../game/script/library/trial.scriptlib | 4 +-- .../game/script/library/vendor_lib.scriptlib | 2 +- .../script/player/base/base_player.script | 13 ++++--- .../game/script/player/player_utility.script | 6 ++-- .../script/systems/buff/buff_handler.script | 4 +-- .../missions/base/mission_dynamic_base.script | 20 +++++------ .../missions/dynamic/mission_bounty.script | 4 +-- .../events/figrin_dan_band_spawner.script | 6 ++-- .../compiled/game/script/test/qatool.script | 36 +++++++++---------- 14 files changed, 68 insertions(+), 68 deletions(-) diff --git a/sku.0/sys.server/compiled/game/datatables/test/qa_tool_menu.tab b/sku.0/sys.server/compiled/game/datatables/test/qa_tool_menu.tab index 723aa63e5..e251d922a 100644 --- a/sku.0/sys.server/compiled/game/datatables/test/qa_tool_menu.tab +++ b/sku.0/sys.server/compiled/game/datatables/test/qa_tool_menu.tab @@ -6,8 +6,8 @@ Chu-Gon Dar Cube Tool Go Overt (Special Forces) FS Village Exit Quests Cybernetic Tool Go On Leave Damage Tool Go Neutral Datapad Tool Manipulate NPC Factions -Dynamic Loot Tool Get Factional HQ's and Supplies -Experience Tool Galactic Civil War Testing +Dynamic Loot Tool +Experience Tool Factional Tool Inventory Tool Master Item Tool diff --git a/sku.0/sys.server/compiled/game/script/event/emp_day/gating_vader.script b/sku.0/sys.server/compiled/game/script/event/emp_day/gating_vader.script index a97186c6c..ab9df4ca0 100644 --- a/sku.0/sys.server/compiled/game/script/event/emp_day/gating_vader.script +++ b/sku.0/sys.server/compiled/game/script/event/emp_day/gating_vader.script @@ -15,7 +15,7 @@ messageHandler spawnStormtroopers() string spawn = "stormtrooper_novatrooper"; location here = getLocation(self); - location outsideLoc = here; + location outsideLoc = (location)here.clone(); outsideLoc.z += 15; for(int i = 0; i < 10; i++) @@ -29,9 +29,9 @@ messageHandler spawnStormtroopers() obj_id room1Cell = getCellId(self, "room1"); obj_id room2Cell = getCellId(self, "room2"); obj_id room3Cell = getCellId(self, "room3"); - location room1Loc = here; - location room2Loc = here; - location room3Loc = here; + location room1Loc = (location)here.clone(); + location room2Loc = (location)here.clone(); + location room3Loc = (location)here.clone(); room1Loc.x = 2.1f; room1Loc.z = 1.5f; room1Loc.cell = room1Cell; @@ -79,4 +79,4 @@ trigger OnAboutToReceiveItem (obj_id destinationCell, obj_id transferrer, obj_id } return SCRIPT_CONTINUE; -} \ No newline at end of file +} diff --git a/sku.0/sys.server/compiled/game/script/event/emperorsday/emperor_statue.script b/sku.0/sys.server/compiled/game/script/event/emperorsday/emperor_statue.script index db0e957d4..ddc2c90e4 100644 --- a/sku.0/sys.server/compiled/game/script/event/emperorsday/emperor_statue.script +++ b/sku.0/sys.server/compiled/game/script/event/emperorsday/emperor_statue.script @@ -103,7 +103,7 @@ trigger OnInitialize() } CustomerServiceLog("holidayEvent", "emperor_statue.OnInitialize: Preparing Parade."); - messageTo(self, "prepareParade", null, 10.0f, false); + messageTo(self, "prepareParade", null, 30.0f, false); return SCRIPT_CONTINUE; } @@ -460,7 +460,7 @@ messageHandler spawnDarkTroopers1() obj_id spawnPoint = holiday.getEmpireDayWaypointObjectObjId(self, "spawnDark1", holiday.OBJECT_NEAR_CHECK_RANGE_100M); location spawnLoc = getLocation(spawnPoint); - location tempLoc = spawnLoc; + location tempLoc = (location)spawnLoc.clone(); for (int i=0;i 0 && !utils.hasScriptVar(self, "recieved_city_motd")) { @@ -2671,7 +2671,7 @@ trigger OnNewbieTutorialResponse(string action) //Give everyone the uniform crate static_item.createNewItemFunction("item_npe_uniform_crate_01_01", objInv); - //11/9: wwallace: changed this to use the library function + //changed this to use the library function npe.giveProfessionWeapon(self); @@ -5575,7 +5575,6 @@ commandHandler cmdCorpse() return SCRIPT_CONTINUE; /* - // JEFF DOESN'T KNOW WHAT THE FUCK debugConsoleMsg( self, "*********************** CORPSE\n" ); resizeable obj_id[] movedCorpses = new obj_id[0]; @@ -8596,7 +8595,7 @@ trigger OnSkillGranted(string skillName) // and "does the player already have it?" badge.grantMasterSkillBadge( self, skillName ); - // 2/2006 mhalash: No more armor hindrance + // No more armor hindrance // armor.calculateArmorHinderances(self); //check for worn item effects we may now qualify for diff --git a/sku.0/sys.server/compiled/game/script/player/player_utility.script b/sku.0/sys.server/compiled/game/script/player/player_utility.script index c913565cd..142f56173 100644 --- a/sku.0/sys.server/compiled/game/script/player/player_utility.script +++ b/sku.0/sys.server/compiled/game/script/player/player_utility.script @@ -1130,7 +1130,7 @@ commandHandler cmdFind() { min = dist; locIdx = n; - there = tmpLoc; + there = (location)tmpLoc.clone(); } } @@ -1228,7 +1228,7 @@ commandHandler cmdFind() if ( isIdValid(start.cell) ) start = getBuildingEjectLocation(getTopMostContainer(self)); - location destination = there; + location destination = (location)there.clone(); obj_id tId = map_locs[locIdx].getLocationId(); if ( isIdValid(tId) && tId.isLoaded() ) @@ -1243,7 +1243,7 @@ commandHandler cmdFind() } if ( destination == null ) - destination = there; + destination = (location)there.clone(); //debugSpeakMsg(self, "Attempting to create client path..."); if ( !createClientPath(self, start, destination) ) diff --git a/sku.0/sys.server/compiled/game/script/systems/buff/buff_handler.script b/sku.0/sys.server/compiled/game/script/systems/buff/buff_handler.script index 4c5794b74..f49dffa6a 100644 --- a/sku.0/sys.server/compiled/game/script/systems/buff/buff_handler.script +++ b/sku.0/sys.server/compiled/game/script/systems/buff/buff_handler.script @@ -4273,7 +4273,7 @@ messageHandler openSparkHandler() } location selfLoc = getLocation(self); - location tesla = selfLoc; + location tesla = (location)selfLoc.clone(); tesla.x = -11.7f; tesla.y = 11.0f; tesla.z = -64.6f; @@ -5908,4 +5908,4 @@ int gcwMiniTurretAddBuffHandler(obj_id self, string effectName, string subtype, int gcwMiniTurretRemoveBuffHandler(obj_id self, string effectName, string subtype, float duration, float value, string buffName, obj_id caster) { return SCRIPT_CONTINUE; -} \ No newline at end of file +} diff --git a/sku.0/sys.server/compiled/game/script/systems/missions/base/mission_dynamic_base.script b/sku.0/sys.server/compiled/game/script/systems/missions/base/mission_dynamic_base.script index 8206e17cf..65077c0b4 100644 --- a/sku.0/sys.server/compiled/game/script/systems/missions/base/mission_dynamic_base.script +++ b/sku.0/sys.server/compiled/game/script/systems/missions/base/mission_dynamic_base.script @@ -292,7 +292,7 @@ obj_id createDestructionMissionDataFromLocation(obj_id objMissionData, obj_id ob if(locGoodLocation != null) { - locMissionDestination = locGoodLocation; // we can mangle now that its a good loc + locMissionDestination = (location)locGoodLocation.clone(); // we can mangle now that its a good loc rgnCities = getRegionsWithMunicipalAtPoint(locMissionDestination, regions.MUNI_TRUE); // check the destination region[] rgnCities2 = getRegionsWithGeographicalAtPoint(locMissionDestination, regions.GEO_CITY); @@ -488,7 +488,7 @@ obj_id createDestructionMissionDataFromLocation(obj_id objMissionData, obj_id ob //LOG("mission_spam", "Transferred credits, we should get a callback any minute now"); - location locSpawnLocation = locMissionDestination; + location locSpawnLocation = (location)locMissionDestination.clone(); setMissionStartLocation(objMissionData, locSpawnLocation); @@ -934,7 +934,7 @@ obj_id createDynamicBountyMission(obj_id objMissionData, obj_id objCreator, int setMissionReward(objMissionData, intReward); dictionary dctParams = new dictionary(); - location locSpawnLocation = locMissionDestination; + location locSpawnLocation = (location)locMissionDestination.clone(); setObjVar(objMissionData, "locSpawnLocation", locSpawnLocation); @@ -1443,7 +1443,7 @@ void moveMissionStartLocation(obj_id objMission) location locStartLocation = getLocationObjVar(objMission, "location.locMissionStart"); int intDistance = rand(MIN_DISTANCE_FOR_RETRY, MAX_DISTANCE_FOR_RETRY); - location locNewLocation = locSpawnLocation; + location locNewLocation = (location)locSpawnLocation.clone(); locNewLocation.x = locSpawnLocation.x - locStartLocation.x; locNewLocation.z = locSpawnLocation.z - locStartLocation.z; @@ -1457,7 +1457,7 @@ void moveMissionStartLocation(obj_id objMission) ////LOG("missions", "locNewLocation2 is "+locNewLocation); - location locFinalLocation = locSpawnLocation; + location locFinalLocation = (location)locSpawnLocation.clone(); locFinalLocation.x = locSpawnLocation.x + (float) (locNewLocation.x * intDistance); locFinalLocation.z = locSpawnLocation.z + (float) (locNewLocation.z * intDistance); @@ -3320,7 +3320,7 @@ obj_id createReconMission(obj_id objMissionData, obj_id objCreator, location loc return null; } - location locSpawnLocation = locMissionDestination; + location locSpawnLocation = (location)locMissionDestination.clone(); location locCreator = getMissionLocation(objCreator); float fltDistance = 0; @@ -3626,7 +3626,7 @@ obj_id createEscortToCreatorMission(obj_id objMissionData, obj_id objCreator, lo location locCreatorLocation = getMissionLocation(objCreator); - locEndLocation = locCreatorLocation; + locEndLocation = (location)locCreatorLocation.clone(); if(intDifficulty < ESCORT_DIFFICULTY_EASY) { @@ -3755,7 +3755,7 @@ obj_id createEscortTargetMission(obj_id objMissionData, obj_id objCreator, locat location locCreatorLocation = getMissionLocation(objCreator); - locEndLocation = locCreatorLocation; + locEndLocation = (location)locCreatorLocation.clone(); if(intDifficulty < ESCORT_DIFFICULTY_EASY) { @@ -5262,8 +5262,8 @@ location[] getAssassinMissionLocation() region rgnStartRegion = rgnCities[rand(0, rgnCities.length - 1)]; location locStartLocation = locations.getRegionCenter(rgnStartRegion); location locSpawnLocation = locations.getGoodCityLocation(rgnStartRegion, strPlanet); - locMissionLocations[0] = locStartLocation; - locMissionLocations[1] = locSpawnLocation; + locMissionLocations[0] = (location)locStartLocation.clone(); + locMissionLocations[1] = (location)locSpawnLocation.clone(); return locMissionLocations; } diff --git a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_bounty.script b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_bounty.script index 3c091c82e..c293660f2 100644 --- a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_bounty.script +++ b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_bounty.script @@ -511,7 +511,7 @@ messageHandler probe_Droid_Response() { tmpLocation = getLocation(topmost); } - locSpawnLocation = tmpLocation; + locSpawnLocation = (location)tmpLocation.clone(); } else { @@ -792,7 +792,7 @@ messageHandler moveTarget() if(fltDistance<128) { setObjVar(self, "locSpawnLocation", locDestination); - locSpawnLocation = locDestination; + locSpawnLocation = (location)locDestination.clone(); removeObjVar(self, "locDestination"); } setupSpawn(self, locSpawnLocation); diff --git a/sku.0/sys.server/compiled/game/script/systems/storyteller/events/figrin_dan_band_spawner.script b/sku.0/sys.server/compiled/game/script/systems/storyteller/events/figrin_dan_band_spawner.script index 25c9bb9d6..66e4723cc 100644 --- a/sku.0/sys.server/compiled/game/script/systems/storyteller/events/figrin_dan_band_spawner.script +++ b/sku.0/sys.server/compiled/game/script/systems/storyteller/events/figrin_dan_band_spawner.script @@ -95,8 +95,8 @@ void spawnBithBand (obj_id self) float bandMemberYaw = webster.getFloat("yaw"); - location bandMemberLoc = tempLoc; - location omni_box_loc = tempLoc; + location bandMemberLoc = (location)tempLoc.clone(); + location omni_box_loc = (location)tempLoc.clone(); if ( myYaw != 0 ) { bandMemberLoc = storyteller.rotateLocationXZ(here, tempLoc, myYaw); @@ -209,7 +209,7 @@ location rotateXZ(location locOrigin, location locPoint, float fltAngle) float fltC = (float)Math.cos(fltRadians); float fltS = (float) Math.sin(fltRadians); - location locNewOffset = locOrigin; + location locNewOffset = (location)locOrigin.clone(); locNewOffset.x += (dx * fltC) + (dz * fltS); locNewOffset.y = locPoint.y; diff --git a/sku.0/sys.server/compiled/game/script/test/qatool.script b/sku.0/sys.server/compiled/game/script/test/qatool.script index 46585967f..bb29dc0d7 100644 --- a/sku.0/sys.server/compiled/game/script/test/qatool.script +++ b/sku.0/sys.server/compiled/game/script/test/qatool.script @@ -2617,30 +2617,30 @@ messageHandler toolMainMenu() { case BADGETOOL_MENUOPTION: //Badge tool // Create a String array that has all badge types in it, with no duplications - Vector vectorMenuArray = new Vector(); - vectorMenuArray.addElement("*Add All Badges*"); - vectorMenuArray.addElement("*Remove All Badges*"); + Vector vectorMenuArray = new Vector(); + vectorMenuArray.addElement("*Add All Badges*"); + vectorMenuArray.addElement("*Remove All Badges*"); - string[] badgeCategories = getAllCollectionSlotCategoriesInBook("badge_book"); - if ((badgeCategories != null) && (badgeCategories.length > 0)) + string[] badgePages = getAllCollectionPagesInBook("badge_book"); + if ((badgePages != null) && (badgePages.length > 0)) + { + for (int i = 0; i < badgePages.length; ++i) { - for (int i = 0; i < badgeCategories.length; ++i) - { - if (badgeCategories[i] != "accumulation") - vectorMenuArray.addElement(badgeCategories[i]); - } + if (!badgePages[i].equals("bdg_accumulation")) + vectorMenuArray.addElement(badgePages[i]); } + } - String[] badgeMenuArray = new String[vectorMenuArray.size()]; - vectorMenuArray.toArray(badgeMenuArray); + String[] badgeMenuArray = new String[vectorMenuArray.size()]; + vectorMenuArray.toArray(badgeMenuArray); - utils.setScriptVar(player, "qabadge.mainMenu", badgeMenuArray); + utils.setScriptVar(self, "qabadge.mainMenu", badgeMenuArray); - if (badgeMenuArray.length < 1) - sendSystemMessageTestingOnly(self, "Badge UI creation failed."); + if (badgeMenuArray.length < 1) + sendSystemMessageTestingOnly(self, "Badge UI creation failed."); - utils.setScriptVar(self, "qabadge.mainMenu", badgeMenuArray); - qa.refreshMenu(player, "Choose the Badge", "Badge Granter", badgeMenuArray, "mainMenuOptions", "qabadge.pid", sui.OK_CANCEL_REFRESH); + utils.setScriptVar(self, "qabadge.mainMenu", badgeMenuArray); + qa.refreshMenu(self, "Choose the Badge", "Badge Granter", badgeMenuArray, "mainMenuOptions", "qabadge.pid", sui.OK_CANCEL_REFRESH); break; case BUFFTOOL_MENUOPTION: //Buff Tool string[] allBuffs = dataTableGetStringColumn(BUFF_TABLE, "NAME"); @@ -4609,7 +4609,7 @@ int commandKill(obj_id self, obj_id target) } else if (target==self) { - sendSystemMessageTestingOnly(self,"Kill Command Failed. Cannot Kill self."); + sendSystemMessageTestingOnly(self,"Kill Command Failed. Cannot Kill self. Use /qatool suicide."); return SCRIPT_CONTINUE; } else if (isPlayer(target))