mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +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)
|
if (!em)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 emote_anim = em->textid;
|
uint32 emote_id = em->textid;
|
||||||
|
|
||||||
switch(emote_anim)
|
switch(emote_id)
|
||||||
{
|
{
|
||||||
case EMOTE_STATE_SLEEP:
|
case EMOTE_STATE_SLEEP:
|
||||||
case EMOTE_STATE_SIT:
|
case EMOTE_STATE_SIT:
|
||||||
|
|
@ -566,7 +566,7 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
|
||||||
case EMOTE_ONESHOT_NONE:
|
case EMOTE_ONESHOT_NONE:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
GetPlayer()->HandleEmoteCommand(emote_anim);
|
GetPlayer()->HandleEmoteCommand(emote_id);
|
||||||
break;
|
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 );
|
WorldPacket data( SMSG_EMOTE, 4 + 8 );
|
||||||
data << uint32(anim_id);
|
data << uint32(emote_id);
|
||||||
data << uint64(GetGUID());
|
data << uint64(GetGUID());
|
||||||
SendMessageToSet(&data, true);
|
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);
|
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
|
if (emoteEntry->EmoteType) // 1,2 states, 0 command
|
||||||
HandleEmoteState(anim_id);
|
HandleEmoteState(emote_id);
|
||||||
else
|
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 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 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 HandleEmote(uint32 emote_id); // auto-select command/state
|
||||||
void HandleEmoteCommand(uint32 anim_id);
|
void HandleEmoteCommand(uint32 emote_id);
|
||||||
void HandleEmoteState(uint32 anim_id);
|
void HandleEmoteState(uint32 emote_id);
|
||||||
void AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false );
|
void AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false );
|
||||||
|
|
||||||
float MeleeMissChanceCalc(const Unit *pVictim, WeaponAttackType attType) const;
|
float MeleeMissChanceCalc(const Unit *pVictim, WeaponAttackType attType) const;
|
||||||
|
|
|
||||||
|
|
@ -751,8 +751,8 @@ bool ChatHandler::HandleDebugAnimCommand(const char* args)
|
||||||
if (!*args)
|
if (!*args)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
uint32 anim_id = atoi((char*)args);
|
uint32 emote_id = atoi((char*)args);
|
||||||
m_session->GetPlayer()->HandleEmoteCommand(anim_id);
|
m_session->GetPlayer()->HandleEmoteCommand(emote_id);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10309"
|
#define REVISION_NR "10310"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue