IsDeadOrGhost
function · objectlayer · primitive
- Address
0x605f30· 52 bytes, up to0x605f63- Meaning
- Returns 1 for a unit with health 0 or below or a player whose PLAYER_FLAGS has 0x10
- Confidence
- verified, proof one
- Finding
- spell/checks#usability-predicate
Finding: Usability predicate in spell: checks
0x6e3d60(rec, &noPower) returns 1 when the active player can use the spell now, else 0, and
reports nothing. It clears noPower, returns 0 when there is no active player object, and returns
1 at once when the first effect is 47. Otherwise it applies these gates in order; the first that
fails returns 0:
| # | fails when |
|---|---|
| 1 | 0x605f30 is true and Attributes & 0x800000 is clear |
| 2 | 0xb4b3e4 is zero and no scan exempts the spell (Lost control exemption) |
| 3 | 0x6e4000(player, rec, 0) returns 0 |
| 4 | 0x6e40e0(player, rec, ammo 1, report 0) returns 0 |
| 5 | AttributesEx & 0x500000 and PLAYER_FIELD_BYTES byte 1 is 0 |
| 6 | the form test 0x612480 returns 0 |
| 7 | Attributes & 0x20000 and UNIT_FIELD_BYTES_1 byte 3 lacks 2 |
| 8 | Attributes & 0x10000000 and UNIT_FIELD_FLAGS & 0x80000 |
| 9 | CasterAuraState n is nonzero and bit n−1 of UNIT_FIELD_AURASTATE is clear |
| 10 | TargetAuraState n is nonzero and: no unit at 0xb4e2d8, its bit n−1 clear, first implicit target 6 and 0x606980 false, or 21 and 0x6066f0 false |
| 11 | Attributes & 0x2000000 and 0x6e2fa0(rec, 0) is nonzero |
| 12 | the cost 0x6e31b0(id, 0) exceeds the power (signed); sets noPower to 1 |
The power is UNIT_FIELD_HEALTH for power type −2, else UNIT_FIELD_POWER1 plus the type.
The derivation is in the doc.
Callers 27
- CGWorldFrame::ClassifyHoveredUnit ui
- Script::InitiateTrade ui
- SelectObjectByClick ui
- CGGameUI::SelectTarget ui
- CGGameUI::TargetKindAccepts ui
- Script::SendChatMessage ui
- CGTradeInfo::HandleTradeMessage ui
- Script::UnitIsDeadOrGhost ui
- CGItem_C::Interact objectlayer
- ShowResurrectRequest objectlayer
- CGPlayer_C::SendRepopRequest objectlayer
- ReadSummonRequest objectlayer
- CGPlayer_C::CanLootNow objectlayer
- CGPlayer_C::StartMeleeAttack objectlayer
- BaseHandlerCanUse objectlayer
- CGUnit_C::CGUnit_C objectlayer
- CGUnit_C::Reactivate objectlayer
- CGUnit_C::OnLand objectlayer
- CGUnit_C::OnHealthFieldChanged objectlayer
- CGUnit_C::Interact objectlayer
- CGUnit_C::PlayGreetingSound objectlayer
- CGUnit_C::PlayNPCSound objectlayer
- CGUnit_C::CanStartMeleeAttack objectlayer
- PLAYERNAMEDESC::UpdatePlate playername
- IsSpellUsable spell
- TryCastSpell spell
- LaunchSpellMissiles spell
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.