Files
mir_server/Gateway/common/db/consignment.h
aixianling 5c9f1dae4a init
2025-01-09 17:45:40 +08:00

45 lines
1.1 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _CONSIGNMENT_H_
#define _CONSIGNMENT_H_
#include "common.h"
#include "item_data.h"
#include "common/datalist.h"
//禁止编译器对此结构进行字节对齐
#pragma pack (push, 1)
//
typedef struct tagConsingmentData
{
ItemSeries id_; // 唯一的id
ItemData* item_; //标准的物品结构
int sell_money_; // 出售的是金钱
int sell_money_type_; // 金钱类型,只能是非绑定的
UINT restTime_; //寄卖的剩余时间
UINT price_; //价钱
ActorId actorId_; //所有者的id
uint8_t moneyType_; //元宝或者银两
uint8_t bJob; //适用的职业0是通用见职业定义
uint8_t bType; //类型,
uint8_t bLevel; //物品使用所需的等级
uint8_t timeOut_; //是否过期0表示没过期否则表示过期
unsigned int handle_; //用于内存管理的handle
ACTORNAME actor_name_; //所有者名字
char account_name_[64]; // 账户名称
tagConsingmentData()
{
ZeroMemory(this, sizeof(*this));
}
static bool SortRule(tagConsingmentData* data1, tagConsingmentData* data2)
{
return (data1->moneyType_ == data2->moneyType_) ? (data1->price_ < data2->price_) : (data1->moneyType_ > data2->moneyType_);
}
}ConsingmentData;
#pragma pack(pop)
#endif