Skip to content
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

Merged
merged 73 commits into from
May 16, 2024
Merged

Account Inventory and more WIP #2047

merged 73 commits into from
May 16, 2024

Conversation

jasonmoonen
Copy link
Collaborator

@jasonmoonen jasonmoonen commented Apr 3, 2024

This PR includes the following changes and additions:

  • Send Z1BR rulesets.
  • Only send item definitions for items in the player's inventory.
  • You can now salvage ammo in bulk.
  • Proximity will now update when you drop an item.
  • You should be able to trade with people; this means your shots should still count when you just died.
  • Account inventory is now functional.
  • Added account crates and bags. There are only a few working; if you want to know which ones work, you can look at RewardCrates.json.
  • Updated the vehicle kit.
  • Flash and fire traps are now functional.
  • Landmines and traps will now be activated 10 seconds after being placed.
  • You can now harvest a maximum of one brain from a zombie.
  • You can now harvest cloth from screamers as well.
  • You can no longer equip grenades in weapon slots, except for smoke grenades.
  • Smoke grenades are now functional.
  • Fixed the dam location for the /tp command.
  • Fixed an exploit with stashes.
  • Placement of stashes inside or near bases is now blocked.
  • You can no longer place stashes near each other.
  • Limited stash storage to 5000 bulk or 10 slots.
  • Kits will now give you full durability conveys.

@jasonmoonen jasonmoonen added the client-2016 About the 2016 client label Apr 3, 2024
Z1Meme and others added 15 commits May 15, 2024 03:58
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.
@QuentinGruber QuentinGruber linked an issue May 16, 2024 that may be closed by this pull request
) as Collection;
const updatePromises = [];
for (let i = 0; i < traps.length; i++) {
const construction = traps[i];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const construction = traps[i];
const trap = traps[i];

quick rename

const itemSubData: any = packet.data.itemSubData;

switch (packet.data.unknownDword3) {
case 85:
Copy link
Owner

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];
Copy link
Owner

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 ?? "");
Copy link
Owner

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

src/servers/ZoneServer2016/zoneserver.ts Outdated Show resolved Hide resolved
src/servers/ZoneServer2016/zoneserver.ts Outdated Show resolved Hide resolved
@@ -6340,7 +6567,7 @@ export class ZoneServer2016 extends EventEmitter {
}

if (
item.itemDefinitionId != Items.AIRDROP_CODE ||
![1800, Items.AIRDROP_CODE].includes(item.itemDefinitionId) ||
Copy link
Owner

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

@QuentinGruber QuentinGruber marked this pull request as ready for review May 16, 2024 10:13
@QuentinGruber QuentinGruber merged commit 22b796c into dev May 16, 2024
17 checks passed
@QuentinGruber QuentinGruber added this to the v0.36.0 milestone May 16, 2024
@jasonmoonen jasonmoonen deleted the jmoo_patch4 branch May 18, 2024 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-2016 About the 2016 client server-data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Trading" bullets upon death Ammo salvage all Add account items
3 participants