Core/Cleanup:

* move repeating code into separate method for storing locale strings in ObjectMgr (copy/paste sucks, you know)
* fix 'signed/unsigned' warnings (at least in VS)
* fix some other warnings and cleanup relative code

--HG--
branch : trunk
This commit is contained in:
azazel
2010-08-26 15:54:56 +06:00
parent 6036166716
commit 5fa14f58dc
23 changed files with 195 additions and 379 deletions
@@ -352,7 +352,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
else if (go->GetGoType() == GAMEOBJECT_TYPE_FISHINGHOLE)
{ // The fishing hole used once more
go->AddUse(); // if the max usage is reached, will be despawned in next tick
if (go->GetUseCount() >= irand(go->GetGOInfo()->fishinghole.minSuccessOpens,go->GetGOInfo()->fishinghole.maxSuccessOpens))
if (go->GetUseCount() >= urand(go->GetGOInfo()->fishinghole.minSuccessOpens, go->GetGOInfo()->fishinghole.maxSuccessOpens))
{
go->SetLootState(GO_JUST_DEACTIVATED);
}
@@ -65,15 +65,15 @@ struct GossipText
struct PageTextLocale
{
std::vector<std::string> Text;
StringVector Text;
};
struct NpcTextLocale
{
NpcTextLocale() { Text_0.resize(8); Text_1.resize(8); }
std::vector<std::vector<std::string> > Text_0;
std::vector<std::vector<std::string> > Text_1;
std::vector<StringVector> Text_0;
std::vector<StringVector> Text_1;
};
#endif
@@ -484,7 +484,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4+(4+4)*count);
data << uint32(count); // count
for (int i = 0; i < count; ++i)
for (uint32 i = 0; i < count; ++i)
{
uint32 questId;
recv_data >> questId; // quest id