CGPlayer_C::StartMeleeAttack
function · objectlayer · primitive
- Address
0x5ecb70· 563 bytes, up to0x5ecda2- Signature
void __thiscall (CGPlayer_C *this, uint64_t *guid)- Meaning
- Starts a melee attack on an attackable unit, sending CMSG_ATTACKSWING unless already attacking
- Confidence
- verified, proof one
- Finding
- objectlayer/playercombat#the-melee-attack
Finding: The melee attack in objectlayer: player spells and combat
0x5ecb70(guid) starts the active player's attack on a unit it can attack, unless
UNIT_FIELD_FLAGS has 0x20000, the player lacks control, is dead or is mounted; a target that fails
stops a running attack. It cancels the cast when its precast spell has Attributes 0x2, stands up, selects the target, sends
0x141 with the GUID unless already attacking, draws the weapons, ends the precast and auto-repeat,
and refreshes the animation. 0x5ecac0 stops it: raises the low-health (0xa) and low-mana (0xb) tutorials below one half, sends
0x142, and cancels the next-swing spells. On the active player's own attacker state (0x6259b6), 0x5ea800 clears the attack
error and sends the stop with the victim at or beyond four times the reach.
The derivation is in the doc.
Callers 5
- Script::AssistUnit ui
- Script::AssistByName ui
- CGGameUI::SelectTarget ui
- CGUnit_C::Interact objectlayer
- CGUnit_C::StartAttack objectlayer
Callees 19
- CDataStore::PutUInt32 base
- CDataStore::PutGuid base
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- ReadGuidAt objectlayer
- StoreGuidAndFlag objectlayer
- CGGameUI::SelectTarget ui
- CheckActivePlayer ui
- ClientServices::Send net
- CGPlayer_C::StopMeleeAttack objectlayer
- CGPlayer_C::SendStandStateChange objectlayer
- CGUnit_C::UpdateBaseAnimation objectlayer
- IsDeadOrGhost objectlayer
- CGUnit_C::CanAttack objectlayer
- CGUnit_C::HasAttackTarget objectlayer
- CGUnit_C::EndPrecast objectlayer
- CGUnit_C::SetSheatheState objectlayer
- CancelCast spell
- StopAutoRepeatSpell spell
Calls and jumps by a bare address, from tables/calls.tsv.