-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Account Inventory and more WIP #2047
Conversation
Updated CommerceSessionResponse struct and renamed itemTimerData to accountItems
* Only for dev's as this is a WIP
Some of them probably need to be removed.
Added Categories and ItemClass definitions. Curently only ItemClasses are being sent I moved ClientGameSettings above the reference data to make it more in line with Z1BR
This is how it works in Z1BR
1. When an item is dropped you will receive a proximity update. 2. Show stackCount for dropped Items
Now we can test some of the crates
This file will set the rewards for every crate
Allows admins to put items inside containers. Could be useful for admins who want to put account items inside containers where players will fight for during events
This will make it possible to share account inventories across your own server if they share the same database
Thanks KronicWayz for providing me with all the information
Currently they don't do anything because all crates are unlocked.
) as Collection; | ||
const updatePromises = []; | ||
for (let i = 0; i < traps.length; i++) { | ||
const construction = traps[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const construction = traps[i]; | |
const trap = traps[i]; |
quick rename
const itemSubData: any = packet.data.itemSubData; | ||
|
||
switch (packet.data.unknownDword3) { | ||
case 85: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the futur we would need enums for these cases
@@ -1241,6 +1287,23 @@ export class ZoneServer2016 extends EventEmitter { | |||
savedCharacter as FullCharacterSaveData | |||
); | |||
client.startingPos = client.character.state.position; | |||
if (this._accountInventories[accountInventory.loginSessionId]) { | |||
delete this._accountInventories[accountInventory.loginSessionId]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since you reassign a new object to the key on 1303 it would be marked for deletion anyway
"IncrementEntitlement", | ||
"EmoteAnimation", | ||
"AccountGiveRewardSet" | ||
].includes(itemDef?.CODE_FACTORY_NAME ?? ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can check if CODE_FACTORY_NAME exist before and return false if falsy, that way we don't create an array to test an impossible match on it
@@ -6340,7 +6567,7 @@ export class ZoneServer2016 extends EventEmitter { | |||
} | |||
|
|||
if ( | |||
item.itemDefinitionId != Items.AIRDROP_CODE || | |||
![1800, Items.AIRDROP_CODE].includes(item.itemDefinitionId) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in that case it's better to just use a OR
This PR includes the following changes and additions: