drop_by_quality.patch.txt
上传用户:hgwhorse
上传日期:2021-02-26
资源大小:1k
文件大小:4k
- Index: ascent.conf
- ===================================================================
- --- ascent.conf (revision 1021)
- +++ ascent.conf (working copy)
- @@ -219,11 +219,15 @@
- # RestXP:
# Value is the amount of rest XP a player will recieve per minute of rest time.
#
-# Drop:
-# This value will be multiplied by any gold looted and the drop percentages of the
-# items for creatures will also be multiplied for this to determine which items
-# to drop.
+# Drop(Color):
+# These values will be multiplied by the drop percentages of the items for creatures
+# to determine which items to drop. All default to 1.
+# To allow you better control the drops, separate multipliers have been created for items
+# of each quality group.
#
+# DropMoney:
+# This value will be multiplied by any gold looted and pickpocketed
+#
# Save:
# Value in milliseconds (ms) that will be between player autosaves.
# Default: 300000 (5 minutes)
@@ -242,7 +246,13 @@
- XP="1"
QuestXP="1"
RestXP="1"
- Drop="1"
+ DropGrey="1"
+ DropWhite="1"
+ DropGreen="1"
+ DropBlue="1"
+ DropPurple="1"
+ DropOrange="1"
+ DropArtifact="1"
DropMoney="1"
Save="300000">
Index: game/LootMgr.cpp
- ===================================================================
- --- game/LootMgr.cpp (revision 1021)
- +++ game/LootMgr.cpp (working copy)
- @@ -232,7 +248,7 @@
- if(list->items[x].item.itemid)// this check is needed until loot DB is fixed
{
ItemPrototype *itemproto = ItemPrototypeStorage.LookupEntry(list->items[x].item.itemid);
- if(Rand(list->items[x].chance * sWorld.getRate(RATE_DROP)) )//|| itemproto->Class == ITEM_CLASS_QUEST)
+ if(Rand(list->items[x].chance * sWorld.getRate(RATE_DROP0 + itemproto->Quality)) )//|| itemproto->Class == ITEM_CLASS_QUEST)
{
for(i = 0; i < loot->items.size(); ++i)
{
Index: game/SpellEffects.cpp
- ===================================================================
- --- game/SpellEffects.cpp (revision 1021)
- +++ game/SpellEffects.cpp (working copy)
- @@ -2711,7 +2711,7 @@
- }
uint32 _rank = ((Creature*)unitTarget)->GetCreatureName()->Rank ;
- unitTarget->loot.gold = float2int32((_rank+1) * unitTarget->getLevel() * (sRand.randInt(5) + 1) * sWorld.getRate(RATE_DROP));
+ unitTarget->loot.gold = float2int32((_rank+1) * unitTarget->getLevel() * (sRand.randInt(5) + 1) * sWorld.getRate(RATE_MONEY));
unitTarget->loot.items.clear();
p_caster->SendLoot(unitTarget->GetGUID(), 2);
Index: game/World.cpp
- ===================================================================
- --- game/World.cpp (revision 1021)
- +++ game/World.cpp (working copy)
- @@ -1938,7 +1938,13 @@
- setRate(RATE_POWER1,Config.MainConfig.GetFloatDefault("Rates", "Power1",1));
setRate(RATE_POWER2,Config.MainConfig.GetFloatDefault("Rates", "Power2",1));
setRate(RATE_POWER3,Config.MainConfig.GetFloatDefault("Rates", "Power4",1));
- setRate(RATE_DROP,Config.MainConfig.GetFloatDefault("Rates", "Drop",1));
+ setRate(RATE_DROP0,Config.MainConfig.GetFloatDefault("Rates", "DropGrey",1));
+ setRate(RATE_DROP1,Config.MainConfig.GetFloatDefault("Rates", "DropWhite",1));
+ setRate(RATE_DROP2,Config.MainConfig.GetFloatDefault("Rates", "DropGreen",1));
+ setRate(RATE_DROP3,Config.MainConfig.GetFloatDefault("Rates", "DropBlue",1));
+ setRate(RATE_DROP4,Config.MainConfig.GetFloatDefault("Rates", "DropPurple",1));
+ setRate(RATE_DROP5,Config.MainConfig.GetFloatDefault("Rates", "DropOrange",1));
+ setRate(RATE_DROP6,Config.MainConfig.GetFloatDefault("Rates", "DropArtifact",1));
setRate(RATE_XP,Config.MainConfig.GetFloatDefault("Rates", "XP",1));
setRate(RATE_RESTXP,Config.MainConfig.GetFloatDefault("Rates", "RestXP", 1));
setRate(RATE_QUESTXP,Config.MainConfig.GetFloatDefault("Rates", "QuestXP", 1));
Index: game/World.h
- ===================================================================
- --- game/World.h (revision 1021)
- +++ game/World.h (working copy)
- @@ -40,8 +40,14 @@
- RATE_POWER1,
RATE_POWER2,
RATE_POWER3,
- RATE_DROP,
- RATE_MONEY,
+ RATE_DROP0, // separate rates for each quality level
+ RATE_DROP1,
+ RATE_DROP2,
+ RATE_DROP3,
+ RATE_DROP4,
+ RATE_DROP5,
+ RATE_DROP6,
+ RATE_MONEY,
RATE_XP,
RATE_RESTXP,
RATE_QUESTXP,