mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 16:39:08 +01:00
Core/Misc:
- some simplifications in reputation calculation - removed aura in SPELL_AURA_LINKED should depends on SpellDifficulty - remove some unneeded variable declarations when it's already declared - remove some hacks - fix some warnings in Lfg stuff - some codestyle changes
This commit is contained in:
@@ -1806,7 +1806,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
if (recvData.GetOpcode() == CMSG_CHAR_FACTION_CHANGE)
|
||||
{
|
||||
// Delete all Flypaths
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXI_PATH);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXI_PATH);
|
||||
stmt->setUInt32(0, lowGuid);
|
||||
trans->Append(stmt);
|
||||
|
||||
@@ -1851,7 +1851,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
taximaskstream << '0';
|
||||
std::string taximask = taximaskstream.str();
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXIMASK);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXIMASK);
|
||||
stmt->setString(0, taximask);
|
||||
stmt->setUInt32(1, lowGuid);
|
||||
trans->Append(stmt);
|
||||
@@ -1898,7 +1898,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD))
|
||||
{
|
||||
// Reset guild
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER);
|
||||
|
||||
stmt->setUInt32(0, lowGuid);
|
||||
|
||||
@@ -1911,7 +1911,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND))
|
||||
{
|
||||
// Delete Friend List
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SOCIAL_BY_GUID);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SOCIAL_BY_GUID);
|
||||
stmt->setUInt32(0, lowGuid);
|
||||
trans->Append(stmt);
|
||||
|
||||
@@ -1957,7 +1957,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
uint32 achiev_alliance = it->first;
|
||||
uint32 achiev_horde = it->second;
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT);
|
||||
stmt->setUInt16(0, uint16(team == TEAM_ALLIANCE ? achiev_alliance : achiev_horde));
|
||||
stmt->setUInt32(1, lowGuid);
|
||||
trans->Append(stmt);
|
||||
@@ -1975,7 +1975,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
uint32 item_alliance = it->first;
|
||||
uint32 item_horde = it->second;
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_INVENTORY_FACTION_CHANGE);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_INVENTORY_FACTION_CHANGE);
|
||||
stmt->setUInt32(0, (team == TEAM_ALLIANCE ? item_alliance : item_horde));
|
||||
stmt->setUInt32(1, (team == TEAM_ALLIANCE ? item_horde : item_alliance));
|
||||
stmt->setUInt32(2, guid);
|
||||
@@ -1988,7 +1988,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
uint32 spell_alliance = it->first;
|
||||
uint32 spell_horde = it->second;
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SPELL_BY_SPELL);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SPELL_BY_SPELL);
|
||||
stmt->setUInt32(0, (team == TEAM_ALLIANCE ? spell_alliance : spell_horde));
|
||||
stmt->setUInt32(1, lowGuid);
|
||||
trans->Append(stmt);
|
||||
@@ -2009,7 +2009,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
uint32 oldReputation = (team == TEAM_ALLIANCE) ? reputation_horde : reputation_alliance;
|
||||
|
||||
// select old standing set in db
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_REP_BY_FACTION);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_REP_BY_FACTION);
|
||||
stmt->setUInt32(0, oldReputation);
|
||||
stmt->setUInt32(1, lowGuid);
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
@@ -2101,7 +2101,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
for (uint32 index = 0; index < ktcount; ++index)
|
||||
ss << knownTitles[index] << ' ';
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TITLES_FACTION_CHANGE);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TITLES_FACTION_CHANGE);
|
||||
stmt->setString(0, ss.str().c_str());
|
||||
stmt->setUInt32(1, lowGuid);
|
||||
trans->Append(stmt);
|
||||
|
||||
Reference in New Issue
Block a user