import { InsuranceService } from "https://deno.land/x/sptaki@1.2.0/services/InsuranceService.d.ts";
Constructors
Properties
Methods
Add gear item to InsuredItems array in player profile
Take the insurance item packages within a profile session and ensure that each of the items in that package are not orphaned from their parent ID.
Get a timestamp of when insurance items should be sent to player based on trader used to insure Apply insurance return bonus if found in profile
Take preraid item and update properties to ensure its ready to be given to player in insurance return mail
Does insurance exist for a player and by trader
Check all root insured items and remove location property + set slotId to 'hideout'
Reset slotId property to "hideout" when necessary (used to be in )
Store insured item
Create insurance equipment packages that should be sent to the user. The packages should contain items that have been lost in a raid and should be returned to the player through the insurance system.
NOTE: We do not have data on items that were dropped in a raid. This means we have to pull item data from the profile at the start of the raid to return to the player in insurance. Because of this, the item positioning may differ from the position the item was in when the player died. Apart from removing all positioning, this is the best we can do. >:{}
Get all insured items by all traders for a profile
Get insured items by profile id + trader id
Get price of insurance * multiplier from config
Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance.
Does player have insurance array
Empty out array holding insured items by sessionid + traderid
Sends stored insured items as message to player
Store lost gear post-raid inside profile, ready for later code to pick it up and mail it