Deprecate isFreeTrialAccount

This commit is contained in:
AconiteGodOfSWG
2021-08-15 04:53:12 -04:00
parent 66d6e5e0ba
commit 8a2b1bf0e8
29 changed files with 11 additions and 306 deletions
@@ -220,11 +220,6 @@ public class player_building extends script.base_script
}
public int OnPermissionListModify(obj_id self, obj_id player, String name, String listName, String action) throws InterruptedException
{
if (utils.isFreeTrial(player))
{
sendSystemMessage(player, SID_TRIAL_NO_MODIFY);
return SCRIPT_CONTINUE;
}
LOG("debug", "player_building::OnPermissionListModify");
obj_id structure = player_structure.getStructure(self);
if ((structure == null) || (structure == obj_id.NULL_ID))
@@ -1169,10 +1164,6 @@ public class player_building extends script.base_script
public int paWithdraw(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
{
obj_id structure = player_structure.getStructure(self);
if (utils.isFreeTrial(self))
{
return SCRIPT_CONTINUE;
}
if (!player_structure.isGuildHall(structure))
{
LOG("LOG_CHANNEL", self + " ->You can only do that in a guild hall.");
@@ -1351,14 +1342,6 @@ public class player_building extends script.base_script
utils.removeScriptVarTree(self, "addPower");
}
obj_id structure = player_structure.getStructure(self);
if (!player_structure.isOwner(structure, self))
{
if (utils.isFreeTrial(self))
{
sendSystemMessage(self, SID_TRIAL_STRUCTURE);
return SCRIPT_CONTINUE;
}
}
if (!isIdValid(structure))
{
LOG("LOG_CHANNEL", "You must be in a building, be near an installation, or have one targeted to do that.");
@@ -1490,14 +1473,6 @@ public class player_building extends script.base_script
public int assignDroid(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
{
obj_id structure = player_structure.getStructure(self);
if (!player_structure.isOwner(structure, self))
{
if (utils.isFreeTrial(self))
{
sendSystemMessage(self, SID_TRIAL_STRUCTURE);
return SCRIPT_CONTINUE;
}
}
if (!isIdValid(structure))
{
LOG("LOG_CHANNEL", self + " ->You must in a building or near an installation to use that command.");
@@ -1729,11 +1704,6 @@ public class player_building extends script.base_script
{
LOG("LOG_CHANNEL", "player_building::setPermission-- params ->" + params + " target ->" + target);
obj_id structure = player_structure.getStructure(self);
if (utils.isFreeTrial(self))
{
sendSystemMessage(self, SID_TRIAL_NO_MODIFY);
return SCRIPT_CONTINUE;
}
LOG("LOG_CHANNEL", "structure ->" + structure);
if (!isIdValid(structure))
{
@@ -2337,14 +2307,6 @@ public class player_building extends script.base_script
return SCRIPT_CONTINUE;
}
LOG("house", "payMaintenance - structure = " + structure);
if (!player_structure.isOwner(structure, self))
{
if (utils.isFreeTrial(self))
{
sendSystemMessage(self, SID_TRIAL_STRUCTURE);
return SCRIPT_CONTINUE;
}
}
if (player_structure.isCivic(structure))
{
return SCRIPT_CONTINUE;
@@ -2420,13 +2382,6 @@ public class player_building extends script.base_script
{
LOG("LOG_CHANNEL", "player_building::setPrivacy");
obj_id structure = player_structure.getStructure(self);
if (!player_structure.isOwner(structure, self))
{
if (utils.isFreeTrial(self))
{
return SCRIPT_CONTINUE;
}
}
if (!isIdValid(structure))
{
LOG("LOG_CHANNEL", "You must be in a building to do that.");
@@ -2512,11 +2467,6 @@ public class player_building extends script.base_script
public int declareResidence(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
{
obj_id structure = player_structure.getStructure(self);
if (utils.isFreeTrial(self))
{
sendSystemMessage(self, SID_NO_DECLARE);
return SCRIPT_CONTINUE;
}
if (!isIdValid(structure))
{
LOG("LOG_CHANNEL", "You must be in a building to do that.");
@@ -2742,11 +2692,6 @@ public class player_building extends script.base_script
sendSystemMessage(self, player_structure.SID_SPECIAL_SIGN_NO_TRANSFER);
return SCRIPT_CONTINUE;
}
if (utils.isFreeTrial(target))
{
sendSystemMessage(self, SID_NO_TRANSFER);
return SCRIPT_CONTINUE;
}
if (player_structure.isBanned(structure, target))
{
LOG("LOG_CHANNEL", "You cannot transfer ownership to a banned player");
@@ -4274,11 +4219,6 @@ public class player_building extends script.base_script
removeVendorVars(player);
return SCRIPT_CONTINUE;
}
if (utils.isFreeTrial(player))
{
removeVendorVars(player);
return SCRIPT_CONTINUE;
}
blog("player_building.buildVendor: vendor data initial validation pass");
obj_id structure = player_structure.getStructure(player);
obj_id inventory = getObjectInSlot(player, "inventory");
@@ -5396,10 +5336,6 @@ public class player_building extends script.base_script
}
public boolean canPlaceCivic(obj_id player, obj_id deed, location position, String template) throws InterruptedException
{
if (utils.isFreeTrial(player))
{
return false;
}
int city_id = getCityAtLocation(position, 0);
if (!cityExists(city_id))
{
@@ -5419,10 +5355,6 @@ public class player_building extends script.base_script
{
return false;
}
if (utils.isFreeTrial(player))
{
return false;
}
if (player_structure.isShuttleportTemplate(template))
{
int travelCost = cityGetTravelCost(city_id);
@@ -5525,12 +5457,6 @@ public class player_building extends script.base_script
blog("player_building:validateVendorPlacement() - isCivic = true");
return false;
}
if (utils.isFreeTrial(self))
{
blog("player_building:validateVendorPlacement() - Player is free trial");
sendSystemMessage(self, SID_NO_VENDOR);
return false;
}
if (hasObjVar(self, "vendor_not_initialized"))
{
blog("player_building:validateVendorPlacement() - has vendor_not_initialized");