Fixed some format arg type/value pairs. Other warnings.

This commit is contained in:
VladimirMangos 2008-11-01 23:53:35 +03:00
parent 715df4e28c
commit 8563b88859
15 changed files with 30 additions and 26 deletions

View file

@ -997,7 +997,7 @@ bool BattleGround::DelCreature(uint32 type)
Creature *cr = HashMapHolder<Creature>::Find(m_BgCreatures[type]);
if(!cr)
{
sLog.outError("Can't find creature guid: %u",m_BgCreatures[type]);
sLog.outError("Can't find creature guid: %u",GUID_LOPART(m_BgCreatures[type]));
return false;
}
cr->CleanupsBeforeDelete();
@ -1011,7 +1011,7 @@ bool BattleGround::DelObject(uint32 type)
GameObject *obj = HashMapHolder<GameObject>::Find(m_BgObjects[type]);
if(!obj)
{
sLog.outError("Can't find gobject guid: %u",m_BgObjects[type]);
sLog.outError("Can't find gobject guid: %u",GUID_LOPART(m_BgObjects[type]));
return false;
}
obj->SetRespawnTime(0); // not save respawn time

View file

@ -104,7 +104,7 @@ void BattleGroundBE::AddPlayer(Player *plr)
m_PlayerScores[plr->GetGUID()] = sc;
}
void BattleGroundBE::RemovePlayer(Player *plr, uint64 guid)
void BattleGroundBE::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
{
}

View file

@ -556,7 +556,7 @@ void BattleGroundEY::RespawnFlagAfterDrop()
if(obj)
obj->Delete();
else
sLog.outError("BattleGroundEY: Unknown dropped flag guid: %u",GetDroppedFlagGUID());
sLog.outError("BattleGroundEY: Unknown dropped flag guid: %u",GUID_LOPART(GetDroppedFlagGUID()));
SetDroppedFlagGUID(0);
}
@ -741,7 +741,8 @@ void BattleGroundEY::EventTeamCapturedPoint(Player *Source, uint32 Point)
WorldSafeLocsEntry const *sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[Point].GraveYardId);
if(!sg || !AddSpiritGuide(Point, sg->x, sg->y, sg->z, 3.124139f, Team))
sLog.outError("BatteGroundEY: Failed to spawn spirit guide! point: %u, team: u, graveyard_id: %u", Point, Team, m_CapturingPointTypes[Point].GraveYardId);
sLog.outError("BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u",
Point, Team, m_CapturingPointTypes[Point].GraveYardId);
UpdatePointsIcons(Team, Point);
UpdatePointsCount(Team);

View file

@ -341,7 +341,7 @@ void BattleGroundQueue::Update(uint32 bgTypeId, uint32 queue_id)
/*** BATTLEGROUND QUEUE EVENTS ***/
/*********************************************************/
bool BGQueueInviteEvent::Execute(uint64 /*e_time*/, uint32 p_time)
bool BGQueueInviteEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
Player* plr = objmgr.GetPlayer( m_PlayerGuid );

View file

@ -98,7 +98,7 @@ void BattleGroundRL::AddPlayer(Player *plr)
m_PlayerScores[plr->GetGUID()] = sc;
}
void BattleGroundRL::RemovePlayer(Player *plr, uint64 guid)
void BattleGroundRL::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
{
}

View file

@ -198,7 +198,7 @@ void BattleGroundWS::RespawnFlagAfterDrop(uint32 team)
if(obj)
obj->Delete();
else
sLog.outError("unknown droped flag bg, guid: %u",GetDroppedFlagGUID(team));
sLog.outError("unknown droped flag bg, guid: %u",GUID_LOPART(GetDroppedFlagGUID(team)));
SetDroppedFlagGUID(0,team);
}

View file

@ -749,7 +749,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
SendNotification(LANG_GM_ON);
std::string IP_str = GetRemoteAddress();
sLog.outChar("Account: %d (IP: %s) Login Character:[%s] (guid:%u)",GetAccountId(),IP_str.c_str(),pCurrChar->GetName() ,pCurrChar->GetGUID());
sLog.outChar("Account: %d (IP: %s) Login Character:[%s] (guid:%u)",
GetAccountId(),IP_str.c_str(),pCurrChar->GetName() ,pCurrChar->GetGUIDLow());
m_playerLoading = false;
delete holder;

View file

@ -79,7 +79,8 @@ bool Corpse::Create( uint32 guidlow, Player *owner, uint32 mapid, float x, float
if(!IsPositionValid())
{
sLog.outError("ERROR: Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %d Y: ^%d)",guidlow,owner->GetName(),x,y);
sLog.outError("ERROR: Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
guidlow,owner->GetName(),x,y);
return false;
}
@ -196,7 +197,8 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
if(!IsPositionValid())
{
sLog.outError("ERROR: Corpse (guidlow %d, owner %d) not created. Suggested coordinates isn't valid (X: %d Y: ^%d)",GetGUIDLow(),GUID_LOPART(GetOwnerGUID()),GetPositionX(),GetPositionY());
sLog.outError("ERROR: Corpse (guidlow %d, owner %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUIDLow(),GUID_LOPART(GetOwnerGUID()),GetPositionX(),GetPositionY());
return false;
}

View file

@ -2861,12 +2861,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
std::string show = show_str;
uint32 Maxpoint;
sLog.outDebug("DEBUG: HandleWpShowCommand: lowguid: %u", lowguid);
sLog.outDebug("DEBUG: HandleWpShowCommand: Habe creature: %ld", target );
sLog.outDebug("DEBUG: HandleWpShowCommand: wpshow - show: %s", show_str);
//PSendSysMessage("wpshow - show: %s", show);
sLog.outDebug("DEBUG: HandleWpShowCommand: lowguid: %u show: %s", lowguid, show_str);
// Show info for the selected waypoint
if(show == "info")
@ -2887,7 +2882,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
QueryResult *result =
WorldDatabase.PQuery( "SELECT id, point, waittime, emote, spell, text1, text2, text3, text4, text5, model1, model2 FROM creature_movement WHERE wpguid = %u",
target->GetGUID() );
target->GetGUIDLow() );
if(!result)
{
// Since we compare float values, we have to deal with

View file

@ -268,7 +268,8 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const
if( chance != 0 && chance < 0.000001f ) // loot with low chance
{
sLog.outErrorDb("Table '%s' entry %d item %d: low chance (%d) - skipped", store.GetName(), entry, itemid, chance);
sLog.outErrorDb("Table '%s' entry %d item %d: low chance (%f) - skipped",
store.GetName(), entry, itemid, chance);
return false;
}
}

View file

@ -132,7 +132,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
wstrToLower(str[i]);
sLog.outDebug("String %u: %s", i, str[i].c_str());
sLog.outDebug("String %u: %s", i, temp.c_str());
}
std::wstring wplayer_name;
@ -966,7 +966,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
(fabs(rotateDy) > atEntry->box_y/2 + delta) ||
(fabs(dz) > atEntry->box_z/2 + delta) )
{
sLog.outDebug("Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %u 1/2 box Z: %u rotate dX: %f rotate dY: %f dZ:%f), ignore Area Trigger ID: %u",
sLog.outDebug("Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotate dX: %f rotate dY: %f dZ:%f), ignore Area Trigger ID: %u",
pl->GetName(), pl->GetGUIDLow(), atEntry->box_x/2, atEntry->box_y/2, atEntry->box_z/2, rotateDx, rotateDy, dz, Trigger_ID);
return;
}

View file

@ -186,6 +186,7 @@ MotionMaster::MoveChase(Unit* target, float dist, float angle)
if(i_owner->GetTypeId()==TYPEID_PLAYER)
{
DEBUG_LOG("Player (GUID: %u) chase to %s (GUID: %u)",
i_owner->GetGUIDLow(),
target->GetTypeId()==TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId()==TYPEID_PLAYER ? i_owner->GetGUIDLow() : ((Creature*)i_owner)->GetDBTableGUIDLow() );
Mutate(new TargetedMovementGenerator<Player>(*target,dist,angle));

View file

@ -137,14 +137,15 @@ void WorldSession::SendTrainerList( uint64 guid,std::string strTitle )
if (!ci)
{
sLog.outDebug( "WORLD: SendTrainerList - (%u) NO CREATUREINFO! (GUID: %u)", uint32(GUID_LOPART(guid)), guid );
sLog.outDebug( "WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!",GUID_LOPART(guid) );
return;
}
TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
if(!trainer_spells)
{
sLog.outDebug( "WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)", guid, unit->GetEntry());
sLog.outDebug( "WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)",
GUID_LOPART(guid), unit->GetEntry());
return;
}

View file

@ -185,7 +185,8 @@ bool Pet::LoadPetFromDB( Unit* owner, uint32 petentry, uint32 petnumber, bool cu
if(!IsPositionValid())
{
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %d Y: ^%d)", GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
delete result;
return false;
}
@ -202,7 +203,7 @@ bool Pet::LoadPetFromDB( Unit* owner, uint32 petentry, uint32 petnumber, bool cu
delete result;
return true;
}
if(getPetType()==HUNTER_PET || getPetType()==SUMMON_PET && cinfo->type == CREATURE_TYPE_DEMON && owner->getClass() == CLASS_WARLOCK)
if(getPetType()==HUNTER_PET || (getPetType()==SUMMON_PET && cinfo->type == CREATURE_TYPE_DEMON && owner->getClass() == CLASS_WARLOCK))
m_charmInfo->SetPetNumber(pet_number, true);
else
m_charmInfo->SetPetNumber(pet_number, false);

View file

@ -100,7 +100,8 @@ bool SqlQueryHolder::SetQuery(size_t index, const char *sql)
if(m_queries[index].first != NULL)
{
sLog.outError("Attempt assign query to holder index (%u) where other query stored (Old: [%s] New: [%s])",index,m_queries.size(),m_queries[index].first,sql);
sLog.outError("Attempt assign query to holder index (%u) where other query stored (Old: [%s] New: [%s])",
index,m_queries[index].first,sql);
return false;
}