mirror of
https://gitlab.com/hashborgir/d2tweaks-rnd2k.git
synced 2025-10-14 00:44:22 -05:00
Initial commit
This commit is contained in:
35
include/d2tweaks/server/modules/autosort/autosort_server.h
Normal file
35
include/d2tweaks/server/modules/autosort/autosort_server.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include <d2tweaks/server/modules/server_module.h>
|
||||
|
||||
//Inventory auto sort module server side
|
||||
|
||||
namespace diablo2 {
|
||||
namespace structures {
|
||||
struct game;
|
||||
struct inventory;
|
||||
struct unit;
|
||||
}
|
||||
}
|
||||
|
||||
namespace d2_tweaks {
|
||||
namespace server {
|
||||
class server;
|
||||
|
||||
namespace modules {
|
||||
class autosort final : public server_module {
|
||||
public:
|
||||
void init() override;
|
||||
|
||||
bool handle_packet(diablo2::structures::game* game, diablo2::structures::unit* player,
|
||||
common::packet_header* packet) override;
|
||||
private:
|
||||
bool sort(diablo2::structures::game* game, diablo2::structures::unit* player, uint8_t page);
|
||||
bool find_free_space(diablo2::structures::inventory* inv,
|
||||
diablo2::structures::unit* item, int32_t inventoryIndex, char page, uint32_t& x, uint32_t& y, bool isCharmZone);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user