diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index 027a5065a..753c6be83 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -1293,7 +1293,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data) uint8 srcbag, srcslot; recv_data >> srcbag >> srcslot; - sLog.outDebug("Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot); + sLog.outDebug("Item " I64FMT ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot); Item *item = _player->GetItemByGuid(itemGuid); diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index b4432790e..faa91bf13 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1462,7 +1462,7 @@ float Creature::GetAttackDistance(Unit const* pl) const uint32 playerlevel = pl->getLevelForTarget(this); uint32 creaturelevel = getLevelForTarget(pl); - int32 leveldif = playerlevel - creaturelevel; + int32 leveldif = int32(playerlevel) - int32(creaturelevel); // "The maximum Aggro Radius has a cap of 25 levels under. Example: A level 30 char has the same Aggro Radius of a level 5 char on a level 60 mob." if ( leveldif < - 25) diff --git a/src/game/Guild.h b/src/game/Guild.h index 62c168414..0ff6a3bf1 100644 --- a/src/game/Guild.h +++ b/src/game/Guild.h @@ -295,19 +295,19 @@ class Guild uint32 GetId(){ return m_Id; } const uint64& GetLeader(){ return m_LeaderGuid; } - std::string GetName(){ return m_Name; } - std::string GetMOTD(){ return MOTD; } - std::string GetGINFO(){ return GINFO; } + std::string const& GetName() const { return m_Name; } + std::string const& GetMOTD() const { return MOTD; } + std::string const& GetGINFO() const { return GINFO; } - uint32 GetCreatedYear(){ return m_CreatedYear; } - uint32 GetCreatedMonth(){ return m_CreatedMonth; } - uint32 GetCreatedDay(){ return m_CreatedDay; } + uint32 GetCreatedYear() const { return m_CreatedYear; } + uint32 GetCreatedMonth() const { return m_CreatedMonth; } + uint32 GetCreatedDay() const { return m_CreatedDay; } - uint32 GetEmblemStyle(){ return m_EmblemStyle; } - uint32 GetEmblemColor(){ return m_EmblemColor; } - uint32 GetBorderStyle(){ return m_BorderStyle; } - uint32 GetBorderColor(){ return m_BorderColor; } - uint32 GetBackgroundColor(){ return m_BackgroundColor; } + uint32 GetEmblemStyle() const { return m_EmblemStyle; } + uint32 GetEmblemColor() const { return m_EmblemColor; } + uint32 GetBorderStyle() const { return m_BorderStyle; } + uint32 GetBorderColor() const { return m_BorderColor; } + uint32 GetBackgroundColor() const { return m_BackgroundColor; } void SetLeader(uint64 guid); bool AddMember(uint64 plGuid, uint32 plRank); diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index c4ca4d8f5..a3bba87ae 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -438,7 +438,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) if(_player->m_mover->GetGUID() != guid) { - sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD, _player->m_mover->GetGUID(), guid); + sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " I64FMT " and should be " I64FMT, _player->m_mover->GetGUID(), guid); return; } } @@ -453,7 +453,7 @@ void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data) if(_player->m_mover->GetGUID() == old_mover_guid) { - sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD " instead of " UI64FMTD, _player->m_mover->GetGUID(), _player->GetGUID(), old_mover_guid); + sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is " I64FMT " and should be " I64FMT " instead of " UI64FMTD, _player->m_mover->GetGUID(), _player->GetGUID(), old_mover_guid); recv_data.rpos(recv_data.wpos()); // prevent warnings spam return; } diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 0a064aa3e..65944c5a9 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -7080,10 +7080,7 @@ bool PlayerCondition::Meets(Player const * player) const case CONDITION_REPUTATION_RANK: { FactionEntry const* faction = sFactionStore.LookupEntry(value1); - // -1 used if faction couldn't be found - if (player->GetReputationMgr().GetRank(faction) == -1) - return false; - return faction && uint32(player->GetReputationMgr().GetRank(faction)) >= value2; + return faction && player->GetReputationMgr().GetRank(faction) >= int32(value2); } case CONDITION_TEAM: return player->GetTeam() == value1; diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 5ffee0e34..1d6c4d764 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2989,7 +2989,7 @@ void SpellMgr::CheckUsedSpells(char const* table) { if(spellEntry->SpellFamilyFlags != 0 || spellEntry->SpellFamilyFlags2 != 0) { - sLog.outError("Spell %u '%s' not fit to (" UI64FMTD "," I32FMT ") but used in %s.", + sLog.outError("Spell %u '%s' not fit to (" I64FMT "," I32FMT ") but used in %s.", spell, name.c_str(), familyMaskA, familyMaskB, code.c_str()); continue; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 47bc1a6d8..654a1f652 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8475" + #define REVISION_NR "8476" #endif // __REVISION_NR_H__