benilla-re systems structs docs

Script::UnitRangedAttack

function · ui · orchestration

Address
0x518b90 · 132 bytes, up to 0x518c13
Signature
int __fastcall (lua_State *L)
Meaning
Returns the local player's ranged attack skill pair, 0 and 0 for any other unit
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.