benilla-re systems structs docs

CGUnit_C::GetPowerCostBase

function · objectlayer · primitive

Address
0x612c50 · 77 bytes, up to 0x612c9c
Signature
int32_t __thiscall (CGUnit_C *this, int32_t powerType)
Meaning
Returns the base a percentage cost scales: base mana, base health, 1000 or 100 by power type
Confidence
verified, proof one
Finding
spell/records#power-cost

Finding: Power cost in spell: records

0x6e31b0(spellId, pet) returns −1 without a record or caster. Else, with L the level from slot 42 over 5: c = (L − base)·perLevel + cost from +0x70, +0x84, +0x80; if +0x270 is nonzero, c += P·pct/100 with P from 0x612c50 for the power type +0x7c (base mana for 0, base health for −2, 1000 for 1, 100 for 2 and 3, else 0). Then c += M[s] and c = rint((float)((1.0 + K[s])·c)) for the school s at +0x04, M and K the unit's int32_t at +0x29c and float at +0x2b8; c ≤ 0 gives 0; then the integer applier with op 14, unclamped.

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.