mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-18 05:49:41 -04:00
Fix warnings
This commit is contained in:
@@ -543,7 +543,6 @@ bool npc_escortAI::GetWaypointPosition(uint32 pointId, float& x, float& y, float
|
||||
if (waypoints.empty())
|
||||
return false;
|
||||
|
||||
ScriptPointVector::const_iterator itrEnd = waypoints.end();
|
||||
for (ScriptPointVector::const_iterator itr = waypoints.begin(); itr != waypoints.end(); ++itr)
|
||||
{
|
||||
if (itr->uiPointId == pointId)
|
||||
|
||||
@@ -18903,7 +18903,7 @@ void Player::_SaveSkills(SQLTransaction& trans)
|
||||
|
||||
void Player::_SaveSpells(SQLTransaction& trans)
|
||||
{
|
||||
for (PlayerSpellMap::iterator itr = m_spells.begin(), next = m_spells.begin(); itr != m_spells.end();)
|
||||
for (PlayerSpellMap::iterator itr = m_spells.begin(); itr != m_spells.end();)
|
||||
{
|
||||
if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->state == PLAYERSPELL_CHANGED)
|
||||
trans->PAppend("DELETE FROM character_spell WHERE guid = '%u' and spell = '%u'", GetGUIDLow(), itr->first);
|
||||
|
||||
@@ -1926,12 +1926,7 @@ void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool ext
|
||||
CombatStart(victim);
|
||||
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MELEE_ATTACK);
|
||||
|
||||
uint32 hitInfo;
|
||||
if (attType == BASE_ATTACK)
|
||||
hitInfo = HITINFO_NORMALSWING2;
|
||||
else if (attType == OFF_ATTACK)
|
||||
hitInfo = HITINFO_LEFTSWING;
|
||||
else
|
||||
if (attType != BASE_ATTACK || attType != OFF_ATTACK)
|
||||
return; // ignore ranged case
|
||||
|
||||
// melee attack spell casted at main hand attack only - no normal melee dmg dealt
|
||||
|
||||
@@ -3818,11 +3818,11 @@ void ObjectMgr::LoadQuests()
|
||||
// no changes, quest not dependent from this value but can have problems at client (note some may be 0, we must allow this so no check)
|
||||
}
|
||||
//check for proper RequiredSkillId value (skill case)
|
||||
if (int32 skill_id = SkillByQuestSort(-int32(qinfo->ZoneOrSort)))
|
||||
if (uint32 skill_id = SkillByQuestSort(-int32(qinfo->ZoneOrSort)))
|
||||
{
|
||||
if (qinfo->RequiredSkillId != skill_id)
|
||||
{
|
||||
sLog->outErrorDb("Quest %u has `ZoneOrSort` = %i but `RequiredSkillId` does not have a corresponding value (%i).",
|
||||
sLog->outErrorDb("Quest %u has `ZoneOrSort` = %i but `RequiredSkillId` does not have a corresponding value (%d).",
|
||||
qinfo->GetQuestId(), qinfo->ZoneOrSort, skill_id);
|
||||
//override, and force proper value here?
|
||||
}
|
||||
|
||||
@@ -47,11 +47,10 @@ template<>
|
||||
void
|
||||
RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
|
||||
{
|
||||
float X, Y, Z, z, nx, ny, nz, ori, dist;
|
||||
float X, Y, Z, nx, ny, nz, ori, dist;
|
||||
|
||||
creature.GetHomePosition(X, Y, Z, ori);
|
||||
|
||||
z = creature.GetPositionZ();
|
||||
Map const* map = creature.GetBaseMap();
|
||||
|
||||
// For 2D/3D system selection
|
||||
|
||||
@@ -878,19 +878,18 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data)
|
||||
// reputation discount
|
||||
float discountMod = _player->GetReputationPriceDiscount(unit);
|
||||
|
||||
uint32 TotalCost = 0;
|
||||
if (itemGUID)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "ITEM: Repair item, itemGUID = %u, npcGUID = %u", GUID_LOPART(itemGUID), GUID_LOPART(npcGUID));
|
||||
|
||||
Item* item = _player->GetItemByGuid(itemGUID);
|
||||
if (item)
|
||||
TotalCost = _player->DurabilityRepair(item->GetPos(), true, discountMod, guildBank);
|
||||
_player->DurabilityRepair(item->GetPos(), true, discountMod, guildBank);
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "ITEM: Repair all items, npcGUID = %u", GUID_LOPART(npcGUID));
|
||||
TotalCost = _player->DurabilityRepairAll(true, discountMod, guildBank);
|
||||
_player->DurabilityRepairAll(true, discountMod, guildBank);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -311,21 +311,16 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
|
||||
uint64 ownerguid = 0;
|
||||
uint32 type;
|
||||
std::string name = "NO_NAME_FOR_GUID";
|
||||
uint8 signs = 0;
|
||||
|
||||
QueryResult result = CharacterDatabase.PQuery(
|
||||
"SELECT ownerguid, name, "
|
||||
" (SELECT COUNT(playerguid) FROM petition_sign WHERE petition_sign.petitionguid = '%u') AS signs, "
|
||||
" type "
|
||||
"FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid), GUID_LOPART(petitionguid));
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT ownerguid, name, type"
|
||||
"FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
|
||||
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
ownerguid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
|
||||
name = fields[1].GetString();
|
||||
signs = fields[2].GetUInt8();
|
||||
type = fields[3].GetUInt32();
|
||||
type = fields[2].GetUInt32();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -635,7 +635,7 @@ class World
|
||||
|
||||
/// Are we in the middle of a shutdown?
|
||||
bool IsShuttingDown() const { return m_ShutdownTimer > 0; }
|
||||
uint32 const GetShutDownTimeLeft() { return m_ShutdownTimer; }
|
||||
uint32 GetShutDownTimeLeft() const { return m_ShutdownTimer; }
|
||||
void ShutdownServ(uint32 time, uint32 options, uint8 exitcode);
|
||||
void ShutdownCancel();
|
||||
void ShutdownMsg(bool show = false, Player* player = NULL);
|
||||
|
||||
+1
-1
@@ -582,7 +582,7 @@ public:
|
||||
{
|
||||
Unit* pJaina = GetClosestCreatureWithEntry(me, NPC_JAINA, 50.0f);
|
||||
if (!pJaina)
|
||||
pJaina = pJaina = me->SummonCreature(NPC_JAINA, 1895.48f, 1292.66f, 143.706f, 0.023475f, TEMPSUMMON_DEAD_DESPAWN, 180000);
|
||||
pJaina = me->SummonCreature(NPC_JAINA, 1895.48f, 1292.66f, 143.706f, 0.023475f, TEMPSUMMON_DEAD_DESPAWN, 180000);
|
||||
if (pJaina)
|
||||
uiJainaGUID = pJaina->GetGUID();
|
||||
bStepping = false;
|
||||
|
||||
@@ -590,7 +590,7 @@ class boss_freya : public CreatureScript
|
||||
waveCount++;
|
||||
}
|
||||
|
||||
void JustDied(Unit* who)
|
||||
void JustDied(Unit* /*who*/)
|
||||
{
|
||||
//! Freya's chest is dynamically spawned on death by different spells.
|
||||
const uint32 summonSpell[2][4] =
|
||||
|
||||
+1
-3
@@ -303,9 +303,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
|
||||
|
||||
if (resetcheck_timer <= diff)
|
||||
{
|
||||
uint32 tempx, tempy;
|
||||
tempx = uint32(me->GetPositionX());
|
||||
tempy = uint32(me->GetPositionY());
|
||||
uint32 tempx = uint32(me->GetPositionX());
|
||||
if (tempx > 255 || tempx < 205)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
|
||||
@@ -573,7 +573,7 @@ public:
|
||||
{
|
||||
Talk(SAY_KUR_MORE);
|
||||
|
||||
if (Creature* temp = me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0], kurenaiAmbushB[1], kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
|
||||
if (me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0], kurenaiAmbushB[1], kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
|
||||
Talk(SAY_KUR_MORE_TWO);
|
||||
|
||||
me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0]-2.5f, kurenaiAmbushB[1]-2.5f, kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
|
||||
@@ -104,7 +104,7 @@ void utf8print(void* /*arg*/, const char* str)
|
||||
printf(temp_buf);
|
||||
#else
|
||||
{
|
||||
printf(str);
|
||||
printf("%s", str);
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -286,7 +286,7 @@ int RASocket::subnegotiate()
|
||||
|
||||
if (n >= 1024)
|
||||
{
|
||||
sLog->outRemote("RASocket::subnegotiate: allocated buffer 1024 bytes was too small for negotiation packet, size: %u", n);
|
||||
sLog->outRemote("RASocket::subnegotiate: allocated buffer 1024 bytes was too small for negotiation packet, size: %u", uint32(n));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user