CGGameUI::SelectTarget
function · ui · primitive
- Address
0x493540· 966 bytes, up to0x493905- Signature
void __stdcall (uint64_t guid)- Meaning
- Selects, or with GUID 0 clears, the player's target and sends CMSG_SET_SELECTION
- Confidence
- verified, proof one
- Finding
- ui/targeting#setting-the-target
Finding: Setting the target in ui: selecting a target
0x493540(guid) selects a unit, or clears the selection for GUID 0. It does nothing when the protected gate for kind 3
fails or when the active player is charmed (descriptor dwords +0x10 and +0x14 not both 0). A nonzero GUID's
object is looked up. While a spell awaits a target, a found one is only bound as its target;
otherwise its virtual slot +0x58 must answer nonzero. A missing one skips both. Selecting the current target does nothing.
Otherwise the old target is kept for TargetLastTarget and the new one stored, object or not; a found object is lit, and an
attackable one kept for TargetLastEnemy. CMSG_SET_SELECTION (0x13d) is sent, PLAYER_TARGET_CHANGED signalled, and an
attacking player attacks the target.
The derivation is in the doc.
Callers 20
- CGGameUI::Target ui
- Script::TargetLastTarget ui
- Script::TargetByName ui
- Script::ClearTarget ui
- OpenLootWindow ui
- EnterWorldUI ui
- CGGameUI::Shutdown ui
- SelectObjectByClick ui
- InteractWithObjectByClick ui
- WorldClickGround ui
- WorldClickNothing ui
- CGGameUI::TargetNearest ui
- CGPlayer_C::OnWorldClick objectlayer
- CGPlayer_C::OnDied objectlayer
- CGPlayer_C::StartMeleeAttack objectlayer
- CGUnit_C::ClearTargetIfSelected objectlayer
- CGUnit_C::OnDied objectlayer
- CGUnit_C::CanStartMeleeAttack objectlayer
- HandleUnitCombatMessage objectlayer
- HandleSpellStart spell
Callees 22
- CDataStore::PutUInt32 base
- CDataStore::PutGuid base
- SndInterfacePlayInterfaceSound sound
- GetObjectManager objectlayer
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- CGGameUI::ReleaseTarget ui
- CheckActivePlayer ui
- FireUsableEvents ui
- FireTutorial ui
- ClientServices::Send net
- CGPlayer_C::StartMeleeAttack objectlayer
- IsDeadOrGhost objectlayer
- CGUnit_C::CanAttack objectlayer
- CGUnit_C::CanCooperate objectlayer
- CGUnit_C::AddUnitTokenFlags objectlayer
- CGUnit_C::HasAttackTarget objectlayer
- CGObject_C::SetLight objectlayer
- PlayerNameMarkColorDirty playername
- IsSpellTargeting spell
- BindSpellTargetObject spell
- FrameScript_SignalEvent ui
Calls and jumps by a bare address, from tables/calls.tsv.