mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[9330] Fixed msvc compile warnings.
This commit is contained in:
parent
a167fd98d2
commit
696cba9c37
20 changed files with 142 additions and 144 deletions
|
|
@ -304,7 +304,7 @@ void ObjectMgr::LoadCreatureLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.Name.size() <= idx)
|
||||
if((int32)data.Name.size() <= idx)
|
||||
data.Name.resize(idx+1);
|
||||
|
||||
data.Name[idx] = str;
|
||||
|
|
@ -316,7 +316,7 @@ void ObjectMgr::LoadCreatureLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.SubName.size() <= idx)
|
||||
if((int32)data.SubName.size() <= idx)
|
||||
data.SubName.resize(idx+1);
|
||||
|
||||
data.SubName[idx] = str;
|
||||
|
|
@ -373,7 +373,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.OptionText.size() <= idx)
|
||||
if((int32)data.OptionText.size() <= idx)
|
||||
data.OptionText.resize(idx+1);
|
||||
|
||||
data.OptionText[idx] = str;
|
||||
|
|
@ -385,7 +385,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.BoxText.size() <= idx)
|
||||
if((int32)data.BoxText.size() <= idx)
|
||||
data.BoxText.resize(idx+1);
|
||||
|
||||
data.BoxText[idx] = str;
|
||||
|
|
@ -437,7 +437,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.IconName.size() <= idx)
|
||||
if((int32)data.IconName.size() <= idx)
|
||||
data.IconName.resize(idx+1);
|
||||
|
||||
data.IconName[idx] = str;
|
||||
|
|
@ -1616,7 +1616,7 @@ void ObjectMgr::LoadItemLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.Name.size() <= idx)
|
||||
if((int32)data.Name.size() <= idx)
|
||||
data.Name.resize(idx+1);
|
||||
|
||||
data.Name[idx] = str;
|
||||
|
|
@ -1629,7 +1629,7 @@ void ObjectMgr::LoadItemLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.Description.size() <= idx)
|
||||
if((int32)data.Description.size() <= idx)
|
||||
data.Description.resize(idx+1);
|
||||
|
||||
data.Description[idx] = str;
|
||||
|
|
@ -3251,7 +3251,7 @@ void ObjectMgr::LoadGroups()
|
|||
|
||||
uint32 leaderGuidLow = fields[0].GetUInt32();
|
||||
uint32 mapId = fields[1].GetUInt32();
|
||||
uint32 diff = fields[4].GetUInt8();
|
||||
Difficulty diff = (Difficulty)fields[4].GetUInt8();
|
||||
|
||||
if(!group || GUID_LOPART(group->GetLeaderGUID()) != leaderGuidLow)
|
||||
{
|
||||
|
|
@ -3277,7 +3277,7 @@ void ObjectMgr::LoadGroups()
|
|||
if(diff >= (mapEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))
|
||||
{
|
||||
sLog.outErrorDb("Wrong dungeon difficulty use in group_instance table: %d", diff + 1);
|
||||
diff = 0; // default for both difficaly types
|
||||
diff = REGULAR_DIFFICULTY; // default for both difficaly types
|
||||
}
|
||||
|
||||
InstanceSave *save = sInstanceSaveMgr.AddInstanceSave(mapEntry->MapID, fields[2].GetUInt32(), Difficulty(diff), (time_t)fields[5].GetUInt64(), (fields[6].GetUInt32() == 0), true);
|
||||
|
|
@ -4006,7 +4006,7 @@ void ObjectMgr::LoadQuestLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.Title.size() <= idx)
|
||||
if((int32)data.Title.size() <= idx)
|
||||
data.Title.resize(idx+1);
|
||||
|
||||
data.Title[idx] = str;
|
||||
|
|
@ -4018,7 +4018,7 @@ void ObjectMgr::LoadQuestLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.Details.size() <= idx)
|
||||
if((int32)data.Details.size() <= idx)
|
||||
data.Details.resize(idx+1);
|
||||
|
||||
data.Details[idx] = str;
|
||||
|
|
@ -4030,7 +4030,7 @@ void ObjectMgr::LoadQuestLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.Objectives.size() <= idx)
|
||||
if((int32)data.Objectives.size() <= idx)
|
||||
data.Objectives.resize(idx+1);
|
||||
|
||||
data.Objectives[idx] = str;
|
||||
|
|
@ -4042,7 +4042,7 @@ void ObjectMgr::LoadQuestLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.OfferRewardText.size() <= idx)
|
||||
if((int32)data.OfferRewardText.size() <= idx)
|
||||
data.OfferRewardText.resize(idx+1);
|
||||
|
||||
data.OfferRewardText[idx] = str;
|
||||
|
|
@ -4054,7 +4054,7 @@ void ObjectMgr::LoadQuestLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.RequestItemsText.size() <= idx)
|
||||
if((int32)data.RequestItemsText.size() <= idx)
|
||||
data.RequestItemsText.resize(idx+1);
|
||||
|
||||
data.RequestItemsText[idx] = str;
|
||||
|
|
@ -4066,7 +4066,7 @@ void ObjectMgr::LoadQuestLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.EndText.size() <= idx)
|
||||
if((int32)data.EndText.size() <= idx)
|
||||
data.EndText.resize(idx+1);
|
||||
|
||||
data.EndText[idx] = str;
|
||||
|
|
@ -4078,7 +4078,7 @@ void ObjectMgr::LoadQuestLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.CompletedText.size() <= idx)
|
||||
if((int32)data.CompletedText.size() <= idx)
|
||||
data.CompletedText.resize(idx+1);
|
||||
|
||||
data.CompletedText[idx] = str;
|
||||
|
|
@ -4092,7 +4092,7 @@ void ObjectMgr::LoadQuestLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.ObjectiveText[k].size() <= idx)
|
||||
if((int32)data.ObjectiveText[k].size() <= idx)
|
||||
data.ObjectiveText[k].resize(idx+1);
|
||||
|
||||
data.ObjectiveText[k][idx] = str;
|
||||
|
|
@ -4623,7 +4623,7 @@ void ObjectMgr::LoadPageTextLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.Text.size() <= idx)
|
||||
if((int32)data.Text.size() <= idx)
|
||||
data.Text.resize(idx+1);
|
||||
|
||||
data.Text[idx] = str;
|
||||
|
|
@ -4785,7 +4785,7 @@ void ObjectMgr::LoadNpcTextLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.Text_0[j].size() <= idx)
|
||||
if((int32)data.Text_0[j].size() <= idx)
|
||||
data.Text_0[j].resize(idx+1);
|
||||
|
||||
data.Text_0[j][idx] = str0;
|
||||
|
|
@ -4797,7 +4797,7 @@ void ObjectMgr::LoadNpcTextLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.Text_1[j].size() <= idx)
|
||||
if((int32)data.Text_1[j].size() <= idx)
|
||||
data.Text_1[j].resize(idx+1);
|
||||
|
||||
data.Text_1[j][idx] = str1;
|
||||
|
|
@ -5858,7 +5858,7 @@ void ObjectMgr::LoadGameObjectLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.Name.size() <= idx)
|
||||
if((int32)data.Name.size() <= idx)
|
||||
data.Name.resize(idx+1);
|
||||
|
||||
data.Name[idx] = str;
|
||||
|
|
@ -5874,7 +5874,7 @@ void ObjectMgr::LoadGameObjectLocales()
|
|||
int idx = GetOrNewIndexForLocale(LocaleConstant(i));
|
||||
if(idx >= 0)
|
||||
{
|
||||
if(data.CastBarCaption.size() <= idx)
|
||||
if((int32)data.CastBarCaption.size() <= idx)
|
||||
data.CastBarCaption.resize(idx+1);
|
||||
|
||||
data.CastBarCaption[idx] = str;
|
||||
|
|
@ -7025,7 +7025,7 @@ int ObjectMgr::GetIndexForLocale( LocaleConstant loc )
|
|||
|
||||
LocaleConstant ObjectMgr::GetLocaleForIndex(int i)
|
||||
{
|
||||
if (i<0 || i>=m_LocalForIndex.size())
|
||||
if (i<0 || i>=(int32)m_LocalForIndex.size())
|
||||
return LOCALE_enUS;
|
||||
|
||||
return m_LocalForIndex[i];
|
||||
|
|
@ -7198,7 +7198,7 @@ bool ObjectMgr::LoadMangosStrings(DatabaseType& db, char const* table, int32 min
|
|||
if (idx >= 0)
|
||||
{
|
||||
// 0 -> default, idx in to idx+1
|
||||
if (data.Content.size() <= idx+1)
|
||||
if ((int32)data.Content.size() <= idx+1)
|
||||
data.Content.resize(idx+2);
|
||||
|
||||
data.Content[idx+1] = str;
|
||||
|
|
@ -7224,7 +7224,7 @@ const char *ObjectMgr::GetMangosString(int32 entry, int locale_idx) const
|
|||
// Content[0] always exist if exist MangosStringLocale
|
||||
if(MangosStringLocale const *msl = GetMangosStringLocale(entry))
|
||||
{
|
||||
if(msl->Content.size() > locale_idx+1 && !msl->Content[locale_idx+1].empty())
|
||||
if((int32)msl->Content.size() > locale_idx+1 && !msl->Content[locale_idx+1].empty())
|
||||
return msl->Content[locale_idx+1].c_str();
|
||||
else
|
||||
return msl->Content[0].c_str();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue