mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-09-11 22:45:06 -04:00
Add support for beast master respec versioning
Also cleans up some existing expertise check stuff and fixes an omission from the addition of the mail opt in rewards
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
profession version
|
||||
s i[0]
|
||||
spy 4
|
||||
bounty_hunter 2
|
||||
force_sensitive 3
|
||||
officer 2
|
||||
commando 1
|
||||
smuggler 1
|
||||
trader_eng 1
|
||||
beast_master 5
|
||||
bounty_hunter 5
|
||||
commando 5
|
||||
force_sensitive 5
|
||||
medic 5
|
||||
officer 5
|
||||
smuggler 5
|
||||
spy 5
|
||||
trader_dom 5
|
||||
trader_struct 5
|
||||
trader_mun 5
|
||||
trader_eng 5
|
||||
|
||||
@@ -11,6 +11,7 @@ public class respec extends script.base_script
|
||||
}
|
||||
public static final String EXPERTISE_VERSION_TABLE = "datatables/expertise/respec_version.iff";
|
||||
public static final String EXPERTISE_VERSION_OBJVAR = "professionExpertiseVersion";
|
||||
public static final String BEAST_MASTER_EXPERTISE_VERSION_OBJVAR = "beastMasterExpertiseVersion";
|
||||
public static final int RESPEC_PRICE_MULTIPLIER = 10000;
|
||||
public static final int[] RESPEC_COST = new int[]
|
||||
{
|
||||
|
||||
@@ -6483,6 +6483,12 @@ public class base_player extends script.base_script
|
||||
}
|
||||
skill.recalcPlayerPools(self, false);
|
||||
}
|
||||
// when we learn our first beast master skill, store the current expertise version we're learning from
|
||||
if(skillName.equalsIgnoreCase("expertise_bm_incubation_base_1")) {
|
||||
int row = dataTableSearchColumnForString("beast_master", "profession", respec.EXPERTISE_VERSION_TABLE);
|
||||
int bmExpertiseVersion = dataTableGetInt(respec.EXPERTISE_VERSION_TABLE, row, "version");
|
||||
setObjVar(self, respec.BEAST_MASTER_EXPERTISE_VERSION_OBJVAR, bmExpertiseVersion);
|
||||
}
|
||||
recomputeCommandSeries(self);
|
||||
beast_lib.verifyAndUpdateCalledBeastStats(self);
|
||||
trial.bumpSession(self, "displayDefensiveMods");
|
||||
|
||||
@@ -88,6 +88,7 @@ public class live_conversions extends script.base_script
|
||||
removeDeprecatedQuests(player);
|
||||
addPlayerScripts(player);
|
||||
handleEsbAnniversaryGifts(player);
|
||||
handleMailOptInRewards(player);
|
||||
}
|
||||
public void runOncePerTravelConversions(obj_id player) throws InterruptedException
|
||||
{
|
||||
@@ -754,6 +755,21 @@ public class live_conversions extends script.base_script
|
||||
CustomerServiceLog("professionExpertiseReset:", " player " + getFirstName(player) + "(" + player + ") has had their expertise reset due to profession updates.");
|
||||
return true;
|
||||
}
|
||||
// handle beast master expertise reset as it doesn't fall under the profession checks
|
||||
if(hasSkill(player, "expertise_bm_incubation_base_1")) {
|
||||
int row = dataTableSearchColumnForString("beast_master", "profession", respec.EXPERTISE_VERSION_TABLE);
|
||||
int bmExpertiseVersion = dataTableGetInt(respec.EXPERTISE_VERSION_TABLE, row, "version");
|
||||
int playerBmVersion = 0;
|
||||
if(hasObjVar(player, respec.BEAST_MASTER_EXPERTISE_VERSION_OBJVAR)) {
|
||||
playerBmVersion = getIntObjVar(player, respec.BEAST_MASTER_EXPERTISE_VERSION_OBJVAR);
|
||||
}
|
||||
if(playerBmVersion != bmExpertiseVersion) {
|
||||
messageTo(player, "fullExpertiseReset", null, 2, false);
|
||||
sui.msgbox(player, EXPERTISE_RESET_FROM_CHANGES);
|
||||
CustomerServiceLog("professionExpertiseReset:", " player " + getFirstName(player) + "(" + player + ") has had their expertise reset due to profession updates.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public boolean updatePermanentSchematics(obj_id player) throws InterruptedException
|
||||
|
||||
Reference in New Issue
Block a user