Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
- index 8b1a833d..743bf088 100644
- --- a/src/server/game/Loot/LootMgr.cpp
- +++ b/src/server/game/Loot/LootMgr.cpp
- @@ -149,12 +149,12 @@ uint32 LootStore::LoadLootTable()
- bool needsquest = fields[4].GetBool();
- uint16 lootmode = fields[5].GetUInt16();
- uint8 groupid = fields[6].GetUInt8();
- - int32 mincount = fields[7].GetUInt8();
- - int32 maxcount = fields[8].GetUInt8();
- + uint16 mincount = fields[7].GetUInt16();
- + uint16 maxcount = fields[8].GetUInt16();
- - if (maxcount > std::numeric_limits<uint8>::max())
- + if (maxcount > std::numeric_limits<uint16>::max())
- {
- - sLog->outErrorDb("Table '%s' Entry %d Item %d: MaxCount value (%u) to large. must be less %u - skipped", GetName(), entry, item, maxcount, std::numeric_limits<uint8>::max());
- + sLog->outErrorDb("Table '%s' Entry %d Item %d: MaxCount value (%u) to large. must be less %u - skipped", GetName(), entry, item, maxcount, std::numeric_limits<uint16>::max());
- continue; // error already printed to log/console.
- }
- @@ -1126,7 +1126,7 @@ LootStoreItem const* LootTemplate::LootGroup::Roll(Loot& loot, Player const *pla
- {
- LootStoreItem* item = *itr;
- float chance = item->chance;
- -
- +
- sScriptMgr->OnItemRoll(player, item, chance, loot, store);
- if (chance >= 100.0f)
- @@ -1315,7 +1315,7 @@ void LootTemplate::CopyConditions(LootItem* li) const
- void LootTemplate::Process(Loot& loot, LootStore const& store, uint16 lootMode, Player const* player, uint8 groupId) const
- {
- bool rate = store.IsRatesAllowed();
- -
- +
- if (groupId) // Group reference uses own processing of the group
- {
- if (groupId > Groups.size())
- diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h
- index 9fccb5b5..4b5ffc3f 100644
- --- a/src/server/game/Loot/LootMgr.h
- +++ b/src/server/game/Loot/LootMgr.h
- @@ -120,14 +120,14 @@ struct LootStoreItem
- bool needs_quest : 1; // quest drop (quest is required for item to drop)
- uint16 lootmode;
- uint8 groupid : 7;
- - uint8 mincount; // mincount for drop items
- - uint8 maxcount; // max drop count for the item mincount or Ref multiplicator
- + uint16 mincount; // mincount for drop items
- + uint16 maxcount; // max drop count for the item mincount or Ref multiplicator
- ConditionList conditions; // additional loot condition
- // Constructor
- // displayid is filled in IsValid() which must be called after
- - LootStoreItem(uint32 _itemid, uint32 _reference, float _chance, bool _needs_quest, uint16 _lootmode, uint8 _groupid, int32 _mincount, uint8 _maxcount)
- - : itemid(_itemid), reference(_reference), chance(_chance), needs_quest(_needs_quest),
- + LootStoreItem(uint32 _itemid, uint32 _reference, float _chance, bool _needs_quest, uint16 _lootmode, uint8 _groupid, int32 _mincount, uint16 _maxcount)
- + : itemid(_itemid), reference(_reference), chance(_chance), needs_quest(_needs_quest),
- lootmode(_lootmode), groupid(_groupid), mincount(_mincount), maxcount(_maxcount)
- {}
- @@ -146,7 +146,7 @@ struct LootItem
- ConditionList conditions; // additional loot condition
- AllowedLooterSet allowedGUIDs;
- uint64 rollWinnerGUID; // Stores the guid of person who won loot, if his bags are full only he can see the item in loot list!
- - uint8 count : 8;
- + uint16 count : 16;
- bool is_looted : 1;
- bool is_blocked : 1;
- bool freeforall : 1; // free for all
- @@ -309,7 +309,7 @@ struct Loot
- uint8 unlootedCount;
- uint64 roundRobinPlayer; // GUID of the player having the Round-Robin ownership for the loot. If 0, round robin owner has released.
- LootType loot_type; // required for achievement system
- -
- +
- // GUIDLow of container that holds this loot (item_instance.entry), set for items that can be looted
- uint32 containerId;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement