benilla-re systems structs docs

Script::UnitAttackBothHands

function · ui · primitive

Address
0x518810 · 248 bytes, up to 0x518907
Signature
int __fastcall (lua_State *L)
Meaning
Returns base and modifier of the attack skill for both hands of a unit the player owns
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/unitstats#defense-and-weapon-skills

Finding: Defense and weapon skills in ui: unit stat functions

UnitDefense(unit) returns the defense skill and its modifier; UnitAttackBothHands(unit) returns base and modifier for the main hand and then the off hand; UnitRangedAttack(unit) returns the ranged pair. The first two ask the unit through a virtual call: for a creature or pet the answer is the unit's level times 5 with modifier 0, for the local player the skill line read, the value plus the permanent bonus and the temporary bonus. UnitDefense and UnitAttackBothHands raise a negative sum to zero by setting the modifier to the negative base. UnitRangedAttack answers 0, 0 for a pet, for any unit that is not the local player, and for a ranged slot that is not a weapon.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 6

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