mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-10-10 01:12:58 -04:00
Add ESB Anniversary Celebration Items and Rewards (Fix #190)
Handles all changes listed here: https://swg.fandom.com/wiki/The_Empire_Strikes_Back_30th_Anniversary_Celebration
This commit is contained in:
@@ -87,6 +87,7 @@ public class live_conversions extends script.base_script
|
||||
givePlayersDeathTroopersPrologQuestComlink(player);
|
||||
removeDeprecatedQuests(player);
|
||||
addPlayerScripts(player);
|
||||
handleEsbAnniversaryGifts(player);
|
||||
}
|
||||
public void runOncePerTravelConversions(obj_id player) throws InterruptedException
|
||||
{
|
||||
@@ -945,4 +946,23 @@ public class live_conversions extends script.base_script
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public void handleEsbAnniversaryGifts(obj_id player) throws InterruptedException {
|
||||
if(!utils.checkConfigFlag("Custom", "grantEsbAnniversaryRewards")) {
|
||||
return;
|
||||
}
|
||||
if(hasObjVar(player, "publish_gifts.has_esb_rewards")) {
|
||||
return;
|
||||
}
|
||||
obj_id inv = utils.getInventoryContainer(player);
|
||||
obj_id col1 = createObjectInInventoryAllowOverload("object/tangible/collection/esb_week_1.iff", player);
|
||||
obj_id col2 = createObjectInInventoryAllowOverload("object/tangible/collection/esb_week_2.iff", player);
|
||||
obj_id col3 = createObjectInInventoryAllowOverload("object/tangible/collection/esb_week_3.iff", player);
|
||||
obj_id col4 = createObjectInInventoryAllowOverload("object/tangible/collection/esb_week_4.iff", player);
|
||||
obj_id cos1 = static_item.createNewItemFunction("item_esb_luke_costume", inv);
|
||||
obj_id cos2 = static_item.createNewItemFunction("item_esb_leia_costume", inv);
|
||||
obj_id cos3 = static_item.createNewItemFunction("item_esb_han_solo_costume", inv);
|
||||
obj_id cos4 = static_item.createNewItemFunction("item_esb_lando_costume", inv);
|
||||
showLootBox(player, new obj_id[] {col1, col2, col3, col4, cos1, cos2, cos3, cos4});
|
||||
setObjVar(player, "publish_gifts.has_esb_rewards", 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user