• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Why is gainCap multiplied by 100 on TFS source files?

Joined
Dec 7, 2016
Messages
22
Reaction score
6
As you can see right here in the vocations.cpp file, the gaincap is multiplied by 100.
C++:
if ((attr = vocationNode.attribute("gaincap"))) {
    voc.gainCap = pugi::cast<uint32_t>(attr.value()) * 100;
}

I wanted to know why?

The reason is, we are setting up an account manager on our server, and it uses this values to create the character. It's weird that the server is always multiplying the cap values by 100. We "fixed" this on our sources, but shouldn't we fix it on the oficial repo as well?
 
1 capacity is equal to 0.01oz in-game (100 capacity = 1oz). This is a common programming workaround to avoid working with float, that would be my guess as to why it’s this way.

Red
Hmmmmm, that makes sense, I guess we should change some of our own code then. Our characters were being created with their caps as high as 7000 cap, level 8. lmao.

I'll check our code post back what we find out.
 
Back
Top