Instructions Jenkins Doxygen

[Adjusted] stat ranges on nightsister shards to be closer to live - 12/1612/1
authorIvojedi <ivojedi@swgemu.com>
Fri, 25 Apr 2014 02:16:33 +0000 (19:16 -0700)
committerIvojedi <ivojedi@swgemu.com>
Fri, 25 Apr 2014 02:16:33 +0000 (19:16 -0700)
mantis 4901
[Fixed] negative value stats on looted items now improve with higher
creature level rather than the opposite - mantis 4896

Change-Id: Ic06ded6b8ad3317e7ceeca8242583a5ccede3be4

MMOCoreORB/bin/scripts/loot/items/npc/nightsister_shards.lua
MMOCoreORB/src/server/zone/managers/loot/LootManagerImplementation.cpp

index adba0e0..62133a7 100644 (file)
@@ -7,13 +7,13 @@ nightsister_shards = {
        directObjectTemplate = "object/tangible/component/armor/armor_segment_enhancement_nightsister.iff",
        craftingValues = {
                {"armor_special_type",0,0,0},
-               {"armor_health_encumbrance",-8,-20,0},
-               {"armor_action_encumbrance",-8,-20,0},
+               {"armor_health_encumbrance",-10,-25,0},
+               {"armor_action_encumbrance",-10,-25,0},
                {"armor_mind_encumbrance",-10,-25,0},
-               {"useCount",1,10,0},
+               {"useCount",1,11,0},
        },
        customizationStringNames = {},
        customizationValues = {}
 }
 
-addLootItemTemplate("nightsister_shards", nightsister_shards)
\ No newline at end of file
+addLootItemTemplate("nightsister_shards", nightsister_shards)
index 4990bff..8117757 100644 (file)
@@ -319,21 +319,25 @@ TangibleObject* LootManagerImplementation::createLootObject(LootItemTemplate* te
                        float minMod = (max >= min) ? 2000.f : -2000.f;
                        float maxMod = (max >= min) ? 500.f : -500.f;
 
-                       min = (min * level / minMod) + min;
-                       max = (max * level / maxMod) + max;
-
                        if (max >= min && max > 0) {
-                               min *= excMod;
-                               max *= excMod;
+                               min = ((min * level / minMod) + min) * excMod;
+                               max = ((max * level / maxMod) + max) * excMod;
+
                        } else if (max <= min && max > 0) {
-                               min /= excMod;
-                               max /= excMod;
+                               min = ((min * level / minMod) + min) / excMod;
+                               max = ((max * level / maxMod) + max) / excMod;
+
                        } else if (max <= min && max <= 0) {
-                               min *= excMod;
-                               max *= excMod;
+                               minMod *= -1;
+                               maxMod *= -1;
+                               min = ((min * level / minMod) + min) * excMod;
+                               max = ((max * level / maxMod) + max) * excMod;
+
                        } else {
-                               min /= excMod;
-                               max /= excMod;
+                               minMod *= -1;
+                               maxMod *= -1;
+                               min = ((min * level / minMod) + min) / excMod;
+                               max = ((max * level / maxMod) + max) / excMod;
                        }
                } else {
                        if (excMod != 1.0) {