mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
[7538] Hide some implementation details for reputation/forced faction reaction.
This commit is contained in:
parent
3b3144004a
commit
df9caf58cd
10 changed files with 148 additions and 117 deletions
|
|
@ -2917,20 +2917,8 @@ void Aura::HandleForceReaction(bool apply, bool Real)
|
|||
uint32 faction_id = m_modifier.m_miscvalue;
|
||||
uint32 faction_rank = m_modifier.m_amount;
|
||||
|
||||
if(apply)
|
||||
player->m_forcedReactions[faction_id] = ReputationRank(faction_rank);
|
||||
else
|
||||
player->m_forcedReactions.erase(faction_id);
|
||||
|
||||
WorldPacket data;
|
||||
data.Initialize(SMSG_SET_FORCED_REACTIONS, 4+player->m_forcedReactions.size()*(4+4));
|
||||
data << uint32(player->m_forcedReactions.size());
|
||||
for(ForcedReactions::const_iterator itr = player->m_forcedReactions.begin(); itr != player->m_forcedReactions.end(); ++itr)
|
||||
{
|
||||
data << uint32(itr->first); // faction_id (Faction.dbc)
|
||||
data << uint32(itr->second); // reputation rank
|
||||
}
|
||||
player->SendDirectMessage(&data);
|
||||
player->ApplyForceReaction(faction_id,ReputationRank(faction_rank),apply);
|
||||
player->SendForceReactions();
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModSkill(bool apply, bool Real)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue