mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10310] Clarify argument in emote related functions, expecting emote id
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
a6d0b61d45
commit
8aaf32798f
5 changed files with 18 additions and 18 deletions
|
|
@ -556,9 +556,9 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
|
|||
if (!em)
|
||||
return;
|
||||
|
||||
uint32 emote_anim = em->textid;
|
||||
uint32 emote_id = em->textid;
|
||||
|
||||
switch(emote_anim)
|
||||
switch(emote_id)
|
||||
{
|
||||
case EMOTE_STATE_SLEEP:
|
||||
case EMOTE_STATE_SIT:
|
||||
|
|
@ -566,7 +566,7 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
|
|||
case EMOTE_ONESHOT_NONE:
|
||||
break;
|
||||
default:
|
||||
GetPlayer()->HandleEmoteCommand(emote_anim);
|
||||
GetPlayer()->HandleEmoteCommand(emote_id);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1726,29 +1726,29 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
|
|||
}
|
||||
|
||||
|
||||
void Unit::HandleEmoteCommand(uint32 anim_id)
|
||||
void Unit::HandleEmoteCommand(uint32 emote_id)
|
||||
{
|
||||
WorldPacket data( SMSG_EMOTE, 4 + 8 );
|
||||
data << uint32(anim_id);
|
||||
data << uint32(emote_id);
|
||||
data << uint64(GetGUID());
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Unit::HandleEmoteState(uint32 anim_id)
|
||||
void Unit::HandleEmoteState(uint32 emote_id)
|
||||
{
|
||||
SetUInt32Value(UNIT_NPC_EMOTESTATE, anim_id);
|
||||
SetUInt32Value(UNIT_NPC_EMOTESTATE, emote_id);
|
||||
}
|
||||
|
||||
void Unit::HandleEmote(uint32 anim_id)
|
||||
void Unit::HandleEmote(uint32 emote_id)
|
||||
{
|
||||
if (!anim_id)
|
||||
if (!emote_id)
|
||||
HandleEmoteState(0);
|
||||
else if (EmotesEntry const* emoteEntry = sEmotesStore.LookupEntry(anim_id))
|
||||
else if (EmotesEntry const* emoteEntry = sEmotesStore.LookupEntry(emote_id))
|
||||
{
|
||||
if (emoteEntry->EmoteType) // 1,2 states, 0 command
|
||||
HandleEmoteState(anim_id);
|
||||
HandleEmoteState(emote_id);
|
||||
else
|
||||
HandleEmoteCommand(anim_id);
|
||||
HandleEmoteCommand(emote_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1278,9 +1278,9 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
void ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellEntry const *procSpell = NULL);
|
||||
void ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage );
|
||||
|
||||
void HandleEmote(uint32 anim_id); // auto-select command/state
|
||||
void HandleEmoteCommand(uint32 anim_id);
|
||||
void HandleEmoteState(uint32 anim_id);
|
||||
void HandleEmote(uint32 emote_id); // auto-select command/state
|
||||
void HandleEmoteCommand(uint32 emote_id);
|
||||
void HandleEmoteState(uint32 emote_id);
|
||||
void AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false );
|
||||
|
||||
float MeleeMissChanceCalc(const Unit *pVictim, WeaponAttackType attType) const;
|
||||
|
|
|
|||
|
|
@ -751,8 +751,8 @@ bool ChatHandler::HandleDebugAnimCommand(const char* args)
|
|||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 anim_id = atoi((char*)args);
|
||||
m_session->GetPlayer()->HandleEmoteCommand(anim_id);
|
||||
uint32 emote_id = atoi((char*)args);
|
||||
m_session->GetPlayer()->HandleEmoteCommand(emote_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10309"
|
||||
#define REVISION_NR "10310"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue