mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[12021] Fix some warnings
Thx to stfx for porting Signed-off-by: stfx <stfx@hotmail.de> Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
e533ff54d5
commit
f777665d48
18 changed files with 35 additions and 57 deletions
|
|
@ -577,7 +577,7 @@ uint32 AuctionBotBuyer::GetBuyableEntry(AHB_Buyer_Config& config)
|
|||
}
|
||||
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: %u items added to buyable vector for ah type: %u",count, config.GetHouseType());
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: SameItemInfo size = %u", config.SameItemInfo.size());
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: SameItemInfo size = " SIZEFMTD, config.SameItemInfo.size());
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
@ -593,7 +593,7 @@ void AuctionBotBuyer::PrepareListOfEntry(AHB_Buyer_Config& config)
|
|||
++itr;
|
||||
}
|
||||
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: CheckedEntry size = %u",config.CheckedEntry.size());
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: CheckedEntry size = " SIZEFMTD, config.CheckedEntry.size());
|
||||
}
|
||||
|
||||
bool AuctionBotBuyer::IsBuyableEntry(uint32 buyoutPrice, double InGame_BuyPrice, double MaxBuyablePrice, uint32 MinBuyPrice, uint32 MaxChance, uint32 ChanceRatio)
|
||||
|
|
|
|||
|
|
@ -708,9 +708,6 @@ void WorldSession::HandleAuctionListPendingSales(WorldPacket & recv_data)
|
|||
if (!auctionHouseEntry)
|
||||
return;
|
||||
|
||||
// always return pointer
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(auctionHouseEntry);
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
WorldPacket data(SMSG_AUCTION_LIST_PENDING_SALES, 4);
|
||||
|
|
|
|||
|
|
@ -161,8 +161,8 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data )
|
|||
BattleGroundQueue& bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
|
||||
if (joinAsGroup)
|
||||
{
|
||||
GroupQueueInfo * ginfo;
|
||||
uint32 avgTime;
|
||||
GroupQueueInfo* ginfo = NULL;
|
||||
uint32 avgTime = 0;
|
||||
|
||||
if(err > 0)
|
||||
{
|
||||
|
|
@ -734,7 +734,7 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
|
|||
BattleGroundQueue &bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
|
||||
if (asGroup)
|
||||
{
|
||||
uint32 avgTime;
|
||||
uint32 avgTime = 0;
|
||||
|
||||
if(err > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1503,14 +1503,14 @@ valid examples:
|
|||
std::istringstream reader(message);
|
||||
char buffer[256];
|
||||
|
||||
uint32 color;
|
||||
uint32 color = 0;
|
||||
|
||||
ItemPrototype const* linkedItem;
|
||||
Quest const* linkedQuest;
|
||||
SpellEntry const *linkedSpell;
|
||||
AchievementEntry const* linkedAchievement;
|
||||
ItemRandomPropertiesEntry const* itemProperty;
|
||||
ItemRandomSuffixEntry const* itemSuffix;
|
||||
ItemPrototype const* linkedItem = NULL;
|
||||
Quest const* linkedQuest = NULL;
|
||||
SpellEntry const *linkedSpell= NULL;
|
||||
AchievementEntry const* linkedAchievement = NULL;
|
||||
ItemRandomPropertiesEntry const* itemProperty = NULL;
|
||||
ItemRandomSuffixEntry const* itemSuffix = NULL;
|
||||
|
||||
while(!reader.eof())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons(bool check_entry_use)
|
|||
m_CreatureEventAI_Summon_Map.clear();
|
||||
|
||||
// Gather additional data for EventAI
|
||||
QueryResult *result = WorldDatabase.Query("SELECT id, position_x, position_y, position_z, orientation, spawntimesecs FROM creature_ai_summons");
|
||||
QueryResult* result = WorldDatabase.Query("SELECT id, position_x, position_y, position_z, orientation, spawntimesecs FROM creature_ai_summons");
|
||||
if (result)
|
||||
{
|
||||
BarGoLink bar(result->GetRowCount());
|
||||
|
|
@ -169,21 +169,21 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons(bool check_entry_use)
|
|||
|
||||
CreatureEventAI_Summon temp;
|
||||
|
||||
uint32 i = fields[0].GetUInt32();
|
||||
temp.id = fields[0].GetUInt32();
|
||||
temp.position_x = fields[1].GetFloat();
|
||||
temp.position_y = fields[2].GetFloat();
|
||||
temp.position_z = fields[3].GetFloat();
|
||||
temp.orientation = fields[4].GetFloat();
|
||||
temp.SpawnTimeSecs = fields[5].GetUInt32();
|
||||
|
||||
if (!MaNGOS::IsValidMapCoord(temp.position_x,temp.position_y,temp.position_z,temp.orientation))
|
||||
if (!MaNGOS::IsValidMapCoord(temp.position_x, temp.position_y, temp.position_z, temp.orientation))
|
||||
{
|
||||
sLog.outErrorDb("CreatureEventAI: Summon id %u have wrong coordinates (%f,%f,%f,%f), skipping.", i,temp.position_x,temp.position_y,temp.position_z,temp.orientation);
|
||||
sLog.outErrorDb("CreatureEventAI: Summon id %u have wrong coordinates (%f, %f, %f, %f), skipping.", temp.id, temp.position_x, temp.position_y, temp.position_z, temp.orientation);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Add to map
|
||||
m_CreatureEventAI_Summon_Map[i] = temp;
|
||||
m_CreatureEventAI_Summon_Map[temp.id] = temp;
|
||||
++Count;
|
||||
}while (result->NextRow());
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ bool DynamicObject::Create(uint32 guidlow, Unit *caster, uint32 spellId, SpellEf
|
|||
SpellEntry const* spellProto = sSpellStore.LookupEntry(spellId);
|
||||
if (!spellProto)
|
||||
{
|
||||
sLog.outError("DynamicObject (spell %u) not created. Spell not exist!", spellId, GetPositionX(), GetPositionY());
|
||||
sLog.outError("DynamicObject (spell %u) not created. Spell not exist!", spellId);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,9 +40,6 @@ HostileRefManager::~HostileRefManager()
|
|||
|
||||
void HostileRefManager::threatAssist(Unit *pVictim, float pThreat, SpellEntry const *pThreatSpell, bool pSingleTarget)
|
||||
{
|
||||
float redirectedMod = pVictim->getHostileRefManager().GetThreatRedirectionMod();
|
||||
Unit* redirectedTarget = redirectedMod ? pVictim->getHostileRefManager().GetThreatRedirectionTarget() : NULL;
|
||||
|
||||
uint32 size = pSingleTarget ? 1 : getSize(); // if pSingleTarget do not devide threat
|
||||
float threat = pThreat/size;
|
||||
HostileReference* ref = getFirst();
|
||||
|
|
|
|||
|
|
@ -4672,10 +4672,6 @@ bool ChatHandler::HandleLookupPoolCommand(char * args)
|
|||
return false;
|
||||
|
||||
std::string namepart = args;
|
||||
|
||||
Player* player = m_session ? m_session->GetPlayer() : NULL;
|
||||
MapPersistentState* mapState = player ? player->GetMap()->GetPersistentState() : NULL;
|
||||
|
||||
strToLower(namepart);
|
||||
|
||||
uint32 counter = 0;
|
||||
|
|
@ -4719,7 +4715,6 @@ bool ChatHandler::HandlePoolListCommand(char* args)
|
|||
// spawn pools for expected map or for not initialized shared pools state for non-instanceable maps
|
||||
for(uint16 pool_id = 0; pool_id < sPoolMgr.GetMaxPoolId(); ++pool_id)
|
||||
{
|
||||
PoolTemplateData const& pool_template = sPoolMgr.GetPoolTemplate(pool_id);
|
||||
if (sPoolMgr.GetPoolTemplate(pool_id).CanBeSpawnedAtMap(mapState->GetMapEntry()))
|
||||
{
|
||||
ShowPoolListHelper(pool_id);
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj)
|
|||
|
||||
Map* MapManager::CreateBgMap(uint32 mapid, BattleGround* bg)
|
||||
{
|
||||
TerrainInfo * pData = sTerrainMgr.LoadTerrain(mapid);
|
||||
sTerrainMgr.LoadTerrain(mapid);
|
||||
|
||||
Guard _guard(*this);
|
||||
return CreateBattleGroundMap(mapid, sObjectMgr.GenerateInstanceLowGuid(), bg);
|
||||
|
|
|
|||
|
|
@ -1675,7 +1675,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||
// We have to perform this check before the teleport, otherwise the
|
||||
// ObjectAccessor won't find the flag.
|
||||
if (duel && GetMapId() != mapid)
|
||||
if (GameObject* obj = GetMap()->GetGameObject(GetGuidValue(PLAYER_DUEL_ARBITER)))
|
||||
if (GetMap()->GetGameObject(GetGuidValue(PLAYER_DUEL_ARBITER)))
|
||||
DuelComplete(DUEL_FLED);
|
||||
|
||||
// reset movement flags at teleport, because player will continue move with these flags after teleport
|
||||
|
|
@ -3268,7 +3268,7 @@ bool Player::IsNeedCastPassiveLikeSpellAtLearn(SpellEntry const* spellInfo) cons
|
|||
|
||||
// note: form passives activated with shapeshift spells be implemented by HandleShapeshiftBoosts instead of spell_learn_spell
|
||||
// talent dependent passives activated at form apply have proper stance data
|
||||
bool need_cast = !spellInfo->Stances || !form && spellInfo->HasAttribute(SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT);
|
||||
bool need_cast = !spellInfo->Stances || (!form && spellInfo->HasAttribute(SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT));
|
||||
|
||||
// Check CasterAuraStates
|
||||
return need_cast && (!spellInfo->CasterAuraState || HasAuraState(AuraState(spellInfo->CasterAuraState)));
|
||||
|
|
|
|||
|
|
@ -378,8 +378,6 @@ void PoolGroup<Creature>::Spawn1Object(MapPersistentState& mapState, PoolObject*
|
|||
{
|
||||
if (CreatureData const* data = sObjectMgr.GetCreatureData(obj->guid))
|
||||
{
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(data->mapid);
|
||||
|
||||
// for non-instanceable maps pool spawn can be at different map from provided mapState
|
||||
if (MapPersistentState* dataMapState = mapState.GetMapId() == data->mapid ? &mapState : sMapPersistentStateMgr.GetPersistentState(data->mapid, 0))
|
||||
{
|
||||
|
|
@ -424,8 +422,6 @@ void PoolGroup<GameObject>::Spawn1Object(MapPersistentState& mapState, PoolObjec
|
|||
{
|
||||
if (GameObjectData const* data = sObjectMgr.GetGOData(obj->guid))
|
||||
{
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(data->mapid);
|
||||
|
||||
// for non-instanceable maps pool spawn can be at different map from provided mapState
|
||||
if (MapPersistentState* dataMapState = mapState.GetMapId() == data->mapid ? &mapState : sMapPersistentStateMgr.GetPersistentState(data->mapid, 0))
|
||||
{
|
||||
|
|
@ -870,7 +866,7 @@ void PoolManager::LoadFromDB()
|
|||
goinfo->type != GAMEOBJECT_TYPE_GOOBER &&
|
||||
goinfo->type != GAMEOBJECT_TYPE_FISHINGHOLE)
|
||||
{
|
||||
sLog.outErrorDb("`pool_gameobject_template` has a not lootable gameobject spawn (GUID: %u Entry % Type: %u) defined for pool id (%u), skipped.", guid, entry_id, goinfo->type, pool_id );
|
||||
sLog.outErrorDb("`pool_gameobject_template` has a not lootable gameobject spawn (GUID: %u Entry %u Type: %u) defined for pool id (%u), skipped.", guid, entry_id, goinfo->type, pool_id);
|
||||
continue;
|
||||
}
|
||||
if (pool_id > max_pool_id)
|
||||
|
|
|
|||
|
|
@ -4529,7 +4529,7 @@ void Spell::SendLoot(ObjectGuid guid, LootType loottype, LockType lockType)
|
|||
sLog.outError("Spell::SendLoot unhandled locktype %u for GameObject trap (entry %u) for spell %u.", lockType, gameObjTarget->GetEntry(), m_spellInfo->Id);
|
||||
return;
|
||||
default:
|
||||
sLog.outError("Spell::SendLoot unhandled GameObject type %u (entry %u).", gameObjTarget->GetGoType(), gameObjTarget->GetEntry(), m_spellInfo->Id);
|
||||
sLog.outError("Spell::SendLoot unhandled GameObject type %u (entry %u) for spell %u.", gameObjTarget->GetGoType(), gameObjTarget->GetEntry(), m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1530,7 +1530,7 @@ void SpellMgr::LoadSpellBonuses()
|
|||
need_direct = true;
|
||||
|
||||
// Check if direct_bonus is needed in `spell_bonus_data`
|
||||
float direct_calc;
|
||||
float direct_calc = 0.0f;
|
||||
float direct_diff = 1000.0f; // for have big diff if no DB field value
|
||||
if (sbe.direct_damage)
|
||||
{
|
||||
|
|
@ -1550,7 +1550,7 @@ void SpellMgr::LoadSpellBonuses()
|
|||
}
|
||||
|
||||
// Check if dot_bonus is needed in `spell_bonus_data`
|
||||
float dot_calc;
|
||||
float dot_calc = 0.0f;
|
||||
float dot_diff = 1000.0f; // for have big diff if no DB field value
|
||||
if (sbe.dot_damage)
|
||||
{
|
||||
|
|
@ -1756,7 +1756,6 @@ struct DoSpellThreat
|
|||
if (ste.threat || ste.ap_bonus != 0.f)
|
||||
{
|
||||
const uint32 *targetA = spell->EffectImplicitTargetA;
|
||||
const uint32 *targetB = spell->EffectImplicitTargetB;
|
||||
if ((targetA[EFFECT_INDEX_1] && targetA[EFFECT_INDEX_1] != targetA[EFFECT_INDEX_0]) ||
|
||||
(targetA[EFFECT_INDEX_2] && targetA[EFFECT_INDEX_2] != targetA[EFFECT_INDEX_0]))
|
||||
sLog.outErrorDb("Spell %u listed in `spell_threat` has effects with different targets, threat may be assigned incorrectly", spell->Id);
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ World::~World()
|
|||
|
||||
m_weathers.clear();
|
||||
|
||||
CliCommandHolder* command;
|
||||
CliCommandHolder* command = NULL;
|
||||
while (cliCmdQueue.next(command))
|
||||
delete command;
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ WorldSession::~WorldSession()
|
|||
}
|
||||
|
||||
///- empty incoming packet queue
|
||||
WorldPacket* packet;
|
||||
WorldPacket* packet = NULL;
|
||||
while(_recvQueue.next(packet))
|
||||
delete packet;
|
||||
}
|
||||
|
|
@ -202,7 +202,7 @@ bool WorldSession::Update(PacketFilter& updater)
|
|||
{
|
||||
///- Retrieve packets from the receive queue and call the appropriate handlers
|
||||
/// not process packets if socket already closed
|
||||
WorldPacket* packet;
|
||||
WorldPacket* packet = NULL;
|
||||
while (m_Socket && !m_Socket->IsClosed() && _recvQueue.next(packet, updater))
|
||||
{
|
||||
/*#if 1
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ namespace Movement
|
|||
Result_NextCycle = 0x04,
|
||||
Result_NextSegment = 0x08,
|
||||
};
|
||||
#pragma region fields
|
||||
friend class PacketBuilder;
|
||||
protected:
|
||||
MySpline spline;
|
||||
|
|
@ -87,7 +86,6 @@ namespace Movement
|
|||
void _Finalize();
|
||||
void _Interrupt() { splineflags.done = true;}
|
||||
|
||||
#pragma endregion
|
||||
public:
|
||||
|
||||
void Initialize(const MoveSplineInitArgs&);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ public:
|
|||
ModesEnd
|
||||
};
|
||||
|
||||
#pragma region fields
|
||||
protected:
|
||||
ControlArray points;
|
||||
|
||||
|
|
@ -84,10 +83,9 @@ protected:
|
|||
|
||||
void UninitializedSpline() const { MANGOS_ASSERT(false);}
|
||||
|
||||
#pragma endregion
|
||||
public:
|
||||
|
||||
explicit SplineBase() : m_mode(UninitializedMode), index_lo(0), index_hi(0), cyclic(false) {}
|
||||
explicit SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false) {}
|
||||
|
||||
/** Caclulates the position for given segment Idx, and percent of segment length t
|
||||
@param t - percent of segment length, assumes that t in range [0, 1]
|
||||
|
|
@ -138,13 +136,11 @@ class Spline : public SplineBase
|
|||
public:
|
||||
typedef length_type LengthType;
|
||||
typedef std::vector<length_type> LengthArray;
|
||||
#pragma region fields
|
||||
protected:
|
||||
|
||||
LengthArray lengths;
|
||||
|
||||
index_type computeIndexInBounds(length_type length) const;
|
||||
#pragma endregion
|
||||
public:
|
||||
|
||||
explicit Spline(){}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12020"
|
||||
#define REVISION_NR "12021"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue