mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
Style cleanup from the Mangos Futures Team
This commit is contained in:
parent
809eee0f50
commit
283c68b6a9
203 changed files with 12039 additions and 353 deletions
|
|
@ -148,11 +148,15 @@ bool ChatHandler::HandleDebugRecvOpcodeCommand(char* /*args*/)
|
|||
{
|
||||
Unit* unit = getSelectedUnit();
|
||||
if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
|
||||
{ unit = m_session->GetPlayer(); }
|
||||
{
|
||||
unit = m_session->GetPlayer();
|
||||
}
|
||||
|
||||
std::ifstream stream("ropcode.txt");
|
||||
if (!stream.is_open())
|
||||
{ return false; }
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 opcode = 0;
|
||||
if (!(stream >> opcode))
|
||||
|
|
@ -167,7 +171,9 @@ bool ChatHandler::HandleDebugRecvOpcodeCommand(char* /*args*/)
|
|||
while (stream >> type)
|
||||
{
|
||||
if (type.empty())
|
||||
{ break; }
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (type == "uint8")
|
||||
{
|
||||
|
|
@ -206,17 +212,29 @@ bool ChatHandler::HandleDebugRecvOpcodeCommand(char* /*args*/)
|
|||
*data << value;
|
||||
}
|
||||
else if (type == "pguid")
|
||||
{ *data << unit->GetPackGUID(); }
|
||||
{
|
||||
*data << unit->GetPackGUID();
|
||||
}
|
||||
else if (type == "guid")
|
||||
{ *data << unit->GetObjectGuid(); }
|
||||
{
|
||||
*data << unit->GetObjectGuid();
|
||||
}
|
||||
else if (type == "mypguid")
|
||||
{ *data << m_session->GetPlayer()->GetPackGUID(); }
|
||||
{
|
||||
*data << m_session->GetPlayer()->GetPackGUID();
|
||||
}
|
||||
else if (type == "myguid")
|
||||
{ *data << m_session->GetPlayer()->GetObjectGuid(); }
|
||||
{
|
||||
*data << m_session->GetPlayer()->GetObjectGuid();
|
||||
}
|
||||
else if (type == "name")
|
||||
{ *data << unit->GetName(); }
|
||||
{
|
||||
*data << unit->GetName();
|
||||
}
|
||||
else if (type == "myname")
|
||||
{ *data << m_session->GetPlayerName(); }
|
||||
{
|
||||
*data << m_session->GetPlayerName();
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG("Sending opcode: unknown type '%s'", type.c_str());
|
||||
|
|
@ -301,17 +319,29 @@ bool ChatHandler::HandleDebugSendOpcodeCommand(char* /*args*/)
|
|||
data << value;
|
||||
}
|
||||
else if (type == "pguid")
|
||||
{ data << unit->GetPackGUID(); }
|
||||
{
|
||||
data << unit->GetPackGUID();
|
||||
}
|
||||
else if (type == "guid")
|
||||
{ data << unit->GetObjectGuid(); }
|
||||
{
|
||||
data << unit->GetObjectGuid();
|
||||
}
|
||||
else if(type == "mypguid")
|
||||
{ data << m_session->GetPlayer()->GetPackGUID(); }
|
||||
{
|
||||
data << m_session->GetPlayer()->GetPackGUID();
|
||||
}
|
||||
else if (type == "myguid")
|
||||
{ data << m_session->GetPlayer()->GetObjectGuid(); }
|
||||
{
|
||||
data << m_session->GetPlayer()->GetObjectGuid();
|
||||
}
|
||||
else if (type == "name")
|
||||
{ data << unit->GetName(); }
|
||||
{
|
||||
data << unit->GetName();
|
||||
}
|
||||
else if (type == "myname")
|
||||
{ data << m_session->GetPlayerName(); }
|
||||
{
|
||||
data << m_session->GetPlayerName();
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG("Sending opcode: unknown type '%s'", type.c_str());
|
||||
|
|
@ -1379,7 +1409,9 @@ bool ChatHandler::HandleDebugSpellCoefsCommand(char* args)
|
|||
{
|
||||
SpellEffectEntry const* spellEffect = spellEntry->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!spellEffect)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Heals (Also count Mana Shield and Absorb effects as heals)
|
||||
if (spellEffect->Effect == SPELL_EFFECT_HEAL || spellEffect->Effect == SPELL_EFFECT_HEAL_MAX_HEALTH ||
|
||||
(spellEffect->Effect == SPELL_EFFECT_APPLY_AURA && (spellEffect->EffectApplyAuraName == SPELL_AURA_SCHOOL_ABSORB || spellEffect->EffectApplyAuraName == SPELL_AURA_PERIODIC_HEAL)))
|
||||
|
|
@ -1394,7 +1426,9 @@ bool ChatHandler::HandleDebugSpellCoefsCommand(char* args)
|
|||
{
|
||||
SpellEffectEntry const* spellEffect = spellEntry->GetSpellEffect(SpellEffectIndex(i));
|
||||
if(!spellEffect)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Periodic Heals
|
||||
if (spellEffect->Effect == SPELL_EFFECT_APPLY_AURA && spellEffect->EffectApplyAuraName == SPELL_AURA_PERIODIC_HEAL)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue