mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 19:37:01 +00:00
[c12635] Fix saving and loading currency loot to/from db
This commit is contained in:
parent
b7a01a632c
commit
905815feb9
3 changed files with 5 additions and 5 deletions
|
|
@ -114,7 +114,7 @@ void LootStore::LoadLootTable()
|
|||
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
uint32 item = abs(fields[1].GetInt32());
|
||||
uint8 type = fields[1].GetInt32() > 0 ? LOOT_ITEM_TYPE_ITEM : LOOT_ITEM_TYPE_CURRENCY;
|
||||
uint8 type = fields[1].GetInt32() >= 0 ? LOOT_ITEM_TYPE_ITEM : LOOT_ITEM_TYPE_CURRENCY;
|
||||
float chanceOrQuestChance = fields[2].GetFloat();
|
||||
uint8 group = fields[3].GetUInt8();
|
||||
int32 mincountOrRef = fields[4].GetInt32();
|
||||
|
|
@ -359,7 +359,7 @@ LootItem::LootItem(LootStoreItem const& li)
|
|||
itemid = li.itemid;
|
||||
type = li.type;
|
||||
conditionId = li.conditionId;
|
||||
currency = type == LOOT_ITEM_TYPE_CURRENCY;
|
||||
currency = type == LOOT_ITEM_TYPE_CURRENCY;
|
||||
count = urand(li.mincountOrRef, li.maxcount); // constructor called for mincountOrRef > 0 only
|
||||
|
||||
is_looted = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue