Comments (3)
In talking to one other developer, they suggested the intent may have been to make it 0, 4k, 10k, Max. if that's the case, we should probably just make it a static point instead of a calculated midpoint.
from servuo.
Also in a related note, it looks like the Virtue gump uses hardcoded values instead of GetMaxAmount(...)
private int GetHueFor(int index)
{
if (m_Beheld.Virtues.GetValue(index) == 0)
return 2402;
int value = m_Beheld.Virtues.GetValue(index);
if (value < 4000)
return 2402;
if (value >= 30000)
value = 30000; //Sanity
int vl;
if (value < 10000)
vl = 0;
else if (value >= 20000 && index == 5)
vl = 2;
else if (value >= 21000 && index != 1)
vl = 2;
else if (value >= 22000 && index == 1)
vl = 2;
else
vl = 1;
return m_Table[(index * 3) + vl];
}
from servuo.
The calculation is wrong because the value was changed from 9999
to 10000
. The original RunUO calculation is a hack that actually works, albeit virtually unreadable.
If your value is 20,000
, and you use the SUO calculation:
(v + 10000) / 10000
-> (20000 + 10000) / 10000
-> 3
- which is wrong.
But if you use the RunUO calculation:
(v + 9999) / 10000
-> (20000 + 9999) / 10000
-> 2.99
-> 2
- which is correct, because the max value check was done before this one.
So the code simply needs to be reverted back to what RunUO had.
from servuo.
Related Issues (20)
- Town Cryer
- Server Crashing Critical Exploit via in game chat via macros. HOT 5
- dotnet 5 is EOL about 6 months ago HOT 3
- Typo in config file Config/CarryWeight.cfg HOT 1
- Mage weapons not altering skill
- [p58] Player character turns toward item being lifted.
- HouseTeleporterTile.Initialize() produces array out of bounds exception on startup HOT 1
- Reptalon|ColdDrake|CuSidhe can't be trained to Magery Mastery
- Personal Attendant Blocks NPCs and Wildlife - Video
- Enchant Weapon strips Mythic Weapon Buff HOT 1
- Blacksmith Weapoon LBODs award no gold if made with colored ingots instead of basic iron ingots
- Inaccessible logic in Scripts/Items/Equipments/Weapons/BaseWeapon.cs HOT 1
- DyeTub has an easy crash-fix HOT 1
- Potentially unnoticed bank exploit HOT 6
- Cooking Makers Mark HOT 1
- [p58] Linux makefile not working HOT 1
- Ubuntu mono doesn't support langversion 7.3.
- null exception after house decay
- Cache broken in UNIX
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from servuo.