mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7330] Code warnings and style cleanups. Some bugs fixes.
1) comparison singed and unsigned values 2) redundent includes 3) wrong constructor :-part field initilization 4) unused not-/*name*/-guarded args in template/virtual functions that not required like args. 5) explicitly list not implemented achievement types. Also bugs fixed: 1) Drop wrong phase mask 0 check in WorldObject::InSamePhase. 2) ArenaTeamMember::ModifyPersonalRating incorrect work with move points in negative with infinity values in result. 3) ArenaTeam::SaveToDB code send uint64 value to string with arg format %u.
This commit is contained in:
parent
373af9905d
commit
9b3daf3933
26 changed files with 211 additions and 141 deletions
|
|
@ -280,7 +280,7 @@ void AuctionHouseMgr::LoadAuctionItems()
|
|||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded 0 auction items");
|
||||
return;
|
||||
}
|
||||
|
|
@ -331,7 +331,7 @@ void AuctionHouseMgr::LoadAuctions()
|
|||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
|
||||
return;
|
||||
}
|
||||
|
|
@ -344,7 +344,7 @@ void AuctionHouseMgr::LoadAuctions()
|
|||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
|
||||
return;
|
||||
}
|
||||
|
|
@ -354,7 +354,7 @@ void AuctionHouseMgr::LoadAuctions()
|
|||
{
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
sLog.outString("");
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
|
||||
return;
|
||||
}
|
||||
|
|
@ -573,22 +573,22 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
|
|||
|
||||
ItemPrototype const *proto = item->GetProto();
|
||||
|
||||
if (itemClass != (0xffffffff) && proto->Class != itemClass)
|
||||
if (itemClass != 0xffffffff && proto->Class != itemClass)
|
||||
continue;
|
||||
|
||||
if (itemSubClass != (0xffffffff) && proto->SubClass != itemSubClass)
|
||||
if (itemSubClass != 0xffffffff && proto->SubClass != itemSubClass)
|
||||
continue;
|
||||
|
||||
if (inventoryType != (0xffffffff) && proto->InventoryType != inventoryType)
|
||||
if (inventoryType != 0xffffffff && proto->InventoryType != inventoryType)
|
||||
continue;
|
||||
|
||||
if (quality != (0xffffffff) && proto->Quality != quality)
|
||||
if (quality != 0xffffffff && proto->Quality != quality)
|
||||
continue;
|
||||
|
||||
if( levelmin != (0x00) && (proto->RequiredLevel < levelmin || levelmax != (0x00) && proto->RequiredLevel > levelmax ) )
|
||||
if (levelmin != 0x00 && (proto->RequiredLevel < levelmin || (levelmax != 0x00 && proto->RequiredLevel > levelmax)))
|
||||
continue;
|
||||
|
||||
if( usable != (0x00) && player->CanUseItem( item ) != EQUIP_ERR_OK )
|
||||
if (usable != 0x00 && player->CanUseItem( item ) != EQUIP_ERR_OK)
|
||||
continue;
|
||||
|
||||
std::string name = proto->Name1;
|
||||
|
|
@ -606,10 +606,10 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
|
|||
}
|
||||
}
|
||||
|
||||
if( !wsearchedname.empty() && !Utf8FitTo(name, wsearchedname) )
|
||||
if (!wsearchedname.empty() && !Utf8FitTo(name, wsearchedname) )
|
||||
continue;
|
||||
|
||||
if ((count < 50) && (totalcount >= listfrom))
|
||||
if (count < 50 && totalcount >= listfrom)
|
||||
{
|
||||
++count;
|
||||
Aentry->BuildAuctionInfo(data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue