mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[9386] Store some config values in Rate emun.
This commit is contained in:
parent
6e5b74e0ca
commit
5368751c13
33 changed files with 163 additions and 164 deletions
|
|
@ -625,9 +625,9 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
|
|||
|
||||
MaNGOS::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED,achievement->ID);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> say_do(say_builder);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> > say_worker(GetPlayer(),sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> > say_worker(GetPlayer(),sWorld.getRate(RATE_LISTEN_RANGE_SAY),say_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> >, WorldTypeMapContainer > message(say_worker);
|
||||
cell.Visit(p, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY));
|
||||
cell.Visit(p, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getRate(RATE_LISTEN_RANGE_SAY));
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_ACHIEVEMENT_EARNED, 8+4+8);
|
||||
|
|
@ -635,7 +635,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
|
|||
data << uint32(achievement->ID);
|
||||
data << uint32(secsToTimeBitFields(time(NULL)));
|
||||
data << uint32(0);
|
||||
GetPlayer()->SendMessageToSetInRange(&data, sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY), true);
|
||||
GetPlayer()->SendMessageToSetInRange(&data, sWorld.getRate(RATE_LISTEN_RANGE_SAY), true);
|
||||
}
|
||||
|
||||
void AchievementMgr::SendCriteriaUpdate(uint32 id, CriteriaProgress const* progress)
|
||||
|
|
@ -1900,7 +1900,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaRequirements()
|
|||
|
||||
uint32 count = 0;
|
||||
uint32 disabled_count = 0;
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
|
|
@ -2023,7 +2023,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
|
|
@ -2066,7 +2066,7 @@ void AchievementGlobalMgr::LoadRewards()
|
|||
}
|
||||
|
||||
uint32 count = 0;
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2176,7 +2176,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ AggressorAI::UpdateAI(const uint32 /*diff*/)
|
|||
bool
|
||||
AggressorAI::IsVisible(Unit *pl) const
|
||||
{
|
||||
return m_creature->IsWithinDist(pl,sWorld.getConfig(CONFIG_SIGHT_MONSTER))
|
||||
return m_creature->IsWithinDist(pl,sWorld.getRate(RATE_SIGHT_MONSTER))
|
||||
&& pl->isVisibleForOrDetect(m_creature,m_creature,true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ void AuctionHouseMgr::LoadAuctionItems()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1660,7 +1660,7 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2050,7 +2050,7 @@ void BattleGroundMgr::LoadBattleMastersEntry()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2148,7 +2148,7 @@ void BattleGroundMgr::LoadBattleEventIndexes()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
|
|||
|
|
@ -580,9 +580,9 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
|
|||
|
||||
MaNGOS::EmoteChatBuilder emote_builder(*GetPlayer(), text_emote, emoteNum, unit);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::EmoteChatBuilder > emote_do(emote_builder);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::EmoteChatBuilder > > emote_worker(GetPlayer(), sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE), emote_do);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::EmoteChatBuilder > > emote_worker(GetPlayer(), sWorld.getRate(RATE_LISTEN_RANGE_TEXTEMOTE), emote_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::EmoteChatBuilder > >, WorldTypeMapContainer> message(emote_worker);
|
||||
cell.Visit(p, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
|
||||
cell.Visit(p, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getRate(RATE_LISTEN_RANGE_TEXTEMOTE));
|
||||
|
||||
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE, text_emote, 0, unit);
|
||||
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ void Creature::DoFleeToGetAssistance()
|
|||
if (!getVictim())
|
||||
return;
|
||||
|
||||
float radius = sWorld.getConfig(CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS);
|
||||
float radius = sWorld.getRate(RATE_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS);
|
||||
if (radius >0)
|
||||
{
|
||||
Creature* pCreature = NULL;
|
||||
|
|
@ -1509,7 +1509,7 @@ void Creature::CallAssistance()
|
|||
{
|
||||
SetNoCallAssistance(true);
|
||||
|
||||
float radius = sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS);
|
||||
float radius = sWorld.getRate(RATE_CREATURE_FAMILY_ASSISTANCE_RADIUS);
|
||||
if(radius > 0)
|
||||
{
|
||||
std::list<Creature*> assistList;
|
||||
|
|
|
|||
|
|
@ -1136,7 +1136,7 @@ void CreatureEventAI::UpdateAI(const uint32 diff)
|
|||
|
||||
bool CreatureEventAI::IsVisible(Unit *pl) const
|
||||
{
|
||||
return m_creature->IsWithinDist(pl,(float)sWorld.getConfig(CONFIG_SIGHT_MONSTER))
|
||||
return m_creature->IsWithinDist(pl,sWorld.getRate(RATE_SIGHT_MONSTER))
|
||||
&& pl->isVisibleForOrDetect(m_creature,m_creature,true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts(bool check_entry_use)
|
|||
sLog.outString("Loading EventAI Texts additional data...");
|
||||
if (result)
|
||||
{
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
uint32 count = 0;
|
||||
|
||||
do
|
||||
|
|
@ -159,7 +159,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons(bool check_entry_use)
|
|||
QueryResult *result = WorldDatabase.Query("SELECT id, position_x, position_y, position_z, orientation, spawntimesecs FROM creature_ai_summons");
|
||||
if (result)
|
||||
{
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
uint32 Count = 0;
|
||||
|
||||
do
|
||||
|
|
@ -253,7 +253,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
|||
"FROM creature_ai_scripts");
|
||||
if (result)
|
||||
{
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
uint32 Count = 0;
|
||||
|
||||
do
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ void GMTicketMgr::LoadGMTickets()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ void GameEventMgr::LoadFromDB()
|
|||
uint32 count = 0;
|
||||
|
||||
{
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
++count;
|
||||
|
|
@ -187,7 +187,7 @@ void GameEventMgr::LoadFromDB()
|
|||
else
|
||||
{
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
|
@ -233,7 +233,7 @@ void GameEventMgr::LoadFromDB()
|
|||
else
|
||||
{
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
|
@ -281,7 +281,7 @@ void GameEventMgr::LoadFromDB()
|
|||
else
|
||||
{
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
|
@ -338,7 +338,7 @@ void GameEventMgr::LoadFromDB()
|
|||
else
|
||||
{
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
|
@ -382,7 +382,7 @@ void GameEventMgr::LoadFromDB()
|
|||
else
|
||||
{
|
||||
|
||||
barGoLink bar2( result->GetRowCount() );
|
||||
barGoLink bar2( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ void Group::GroupLoot(const uint64& playerGUID, Loot *loot, Creature *creature)
|
|||
continue;
|
||||
if ( i->AllowedForPlayer(member) )
|
||||
{
|
||||
if (member->IsWithinDist(creature, sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE), false))
|
||||
if (member->IsWithinDist(creature, sWorld.getRate(RATE_GROUP_XP_DISTANCE), false))
|
||||
{
|
||||
r->playerVote[member->GetGUID()] = NOT_EMITED_YET;
|
||||
++r->totalPlayersRolling;
|
||||
|
|
@ -615,7 +615,7 @@ void Group::NeedBeforeGreed(const uint64& playerGUID, Loot *loot, Creature *crea
|
|||
|
||||
if (playerToRoll->CanUseItem(item) && i->AllowedForPlayer(playerToRoll) )
|
||||
{
|
||||
if (playerToRoll->IsWithinDist(creature, sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE), false))
|
||||
if (playerToRoll->IsWithinDist(creature, sWorld.getRate(RATE_GROUP_XP_DISTANCE), false))
|
||||
{
|
||||
r->playerVote[playerToRoll->GetGUID()] = NOT_EMITED_YET;
|
||||
++r->totalPlayersRolling;
|
||||
|
|
@ -663,7 +663,7 @@ void Group::MasterLoot(const uint64& playerGUID, Loot* /*loot*/, Creature *creat
|
|||
if (!looter->IsInWorld())
|
||||
continue;
|
||||
|
||||
if (looter->IsWithinDist(creature, sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE), false))
|
||||
if (looter->IsWithinDist(creature, sWorld.getRate(RATE_GROUP_XP_DISTANCE), false))
|
||||
{
|
||||
data << looter->GetGUID();
|
||||
++real_count;
|
||||
|
|
@ -675,7 +675,7 @@ void Group::MasterLoot(const uint64& playerGUID, Loot* /*loot*/, Creature *creat
|
|||
for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
Player *looter = itr->getSource();
|
||||
if (looter->IsWithinDist(creature, sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE), false))
|
||||
if (looter->IsWithinDist(creature, sWorld.getRate(RATE_GROUP_XP_DISTANCE), false))
|
||||
looter->GetSession()->SendPacket(&data);
|
||||
}
|
||||
}
|
||||
|
|
@ -1374,7 +1374,7 @@ void Group::UpdateLooterGuid( Creature* creature, bool ifneed )
|
|||
{
|
||||
// not update if only update if need and ok
|
||||
Player* looter = ObjectAccessor::FindPlayer(guid_itr->guid);
|
||||
if(looter && looter->IsWithinDist(creature, sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE), false))
|
||||
if(looter && looter->IsWithinDist(creature, sWorld.getRate(RATE_GROUP_XP_DISTANCE), false))
|
||||
return;
|
||||
}
|
||||
++guid_itr;
|
||||
|
|
@ -1387,7 +1387,7 @@ void Group::UpdateLooterGuid( Creature* creature, bool ifneed )
|
|||
{
|
||||
if(Player* pl = ObjectAccessor::FindPlayer(itr->guid))
|
||||
{
|
||||
if (pl->IsWithinDist(creature, sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE), false))
|
||||
if (pl->IsWithinDist(creature, sWorld.getRate(RATE_GROUP_XP_DISTANCE), false))
|
||||
{
|
||||
bool refresh = pl->GetLootGUID() == creature->GetGUID();
|
||||
|
||||
|
|
@ -1408,7 +1408,7 @@ void Group::UpdateLooterGuid( Creature* creature, bool ifneed )
|
|||
{
|
||||
if(Player* pl = ObjectAccessor::FindPlayer(itr->guid))
|
||||
{
|
||||
if (pl->IsWithinDist(creature, sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE), false))
|
||||
if (pl->IsWithinDist(creature, sWorld.getRate(RATE_GROUP_XP_DISTANCE), false))
|
||||
{
|
||||
bool refresh = pl->GetLootGUID()==creature->GetGUID();
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ void GuardAI::UpdateAI(const uint32 /*diff*/)
|
|||
|
||||
bool GuardAI::IsVisible(Unit *pl) const
|
||||
{
|
||||
return m_creature->IsWithinDist(pl,sWorld.getConfig(CONFIG_SIGHT_GUARDER))
|
||||
return m_creature->IsWithinDist(pl,sWorld.getRate(RATE_SIGHT_GUARDER))
|
||||
&& pl->isVisibleForOrDetect(m_creature,m_creature,true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@ void InstanceSaveManager::LoadResetTimes()
|
|||
continue;
|
||||
|
||||
// the reset_delay must be at least one day
|
||||
uint32 period = (mapDiff->resetTime / DAY * sWorld.getRate(RATE_INSTANCE_RESET_TIME)) * DAY;
|
||||
uint32 period = uint32(mapDiff->resetTime / DAY * sWorld.getRate(RATE_INSTANCE_RESET_TIME)) * DAY;
|
||||
|
||||
time_t t = GetResetTimeFor(mapid,difficulty);
|
||||
if(!t)
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ void LoadRandomEnchantmentsTable()
|
|||
|
||||
if (result)
|
||||
{
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
|
|||
Player* playerGroup = itr->getSource();
|
||||
if(!playerGroup)
|
||||
continue;
|
||||
if (player->IsWithinDistInMap(playerGroup,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
|
||||
if (player->IsWithinDistInMap(playerGroup,sWorld.getRate(RATE_GROUP_XP_DISTANCE),false))
|
||||
playersNear.push_back(playerGroup);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ void LootStore::LoadLootTable()
|
|||
|
||||
if (result)
|
||||
{
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -816,7 +816,7 @@ LootStoreItem const * LootTemplate::LootGroup::Roll() const
|
|||
{
|
||||
if (!ExplicitlyChanced.empty()) // First explicitly chanced entries are checked
|
||||
{
|
||||
float Roll = rand_chance();
|
||||
float Roll = rand_chance_f();
|
||||
|
||||
for (uint32 i=0; i<ExplicitlyChanced.size(); ++i) //check each explicitly chanced entry in the template and modify its chance based on quality.
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1440,21 +1440,21 @@ void WorldObject::MonsterSay(const char* text, uint32 language, uint64 TargetGui
|
|||
{
|
||||
WorldPacket data(SMSG_MESSAGECHAT, 200);
|
||||
BuildMonsterChat(&data,CHAT_MSG_MONSTER_SAY,text,language,GetName(),TargetGuid);
|
||||
SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),true);
|
||||
SendMessageToSetInRange(&data,sWorld.getRate(RATE_LISTEN_RANGE_SAY),true);
|
||||
}
|
||||
|
||||
void WorldObject::MonsterYell(const char* text, uint32 language, uint64 TargetGuid)
|
||||
{
|
||||
WorldPacket data(SMSG_MESSAGECHAT, 200);
|
||||
BuildMonsterChat(&data,CHAT_MSG_MONSTER_YELL,text,language,GetName(),TargetGuid);
|
||||
SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),true);
|
||||
SendMessageToSetInRange(&data,sWorld.getRate(RATE_LISTEN_RANGE_YELL),true);
|
||||
}
|
||||
|
||||
void WorldObject::MonsterTextEmote(const char* text, uint64 TargetGuid, bool IsBossEmote)
|
||||
{
|
||||
WorldPacket data(SMSG_MESSAGECHAT, 200);
|
||||
BuildMonsterChat(&data,IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE,text,LANG_UNIVERSAL,GetName(),TargetGuid);
|
||||
SendMessageToSetInRange(&data,sWorld.getConfig(IsBossEmote ? CONFIG_LISTEN_RANGE_YELL : CONFIG_LISTEN_RANGE_TEXTEMOTE),true);
|
||||
SendMessageToSetInRange(&data,sWorld.getRate(IsBossEmote ? RATE_LISTEN_RANGE_YELL : RATE_LISTEN_RANGE_TEXTEMOTE),true);
|
||||
}
|
||||
|
||||
void WorldObject::MonsterWhisper(const char* text, uint64 receiver, bool IsBossWhisper)
|
||||
|
|
@ -1503,9 +1503,9 @@ void WorldObject::MonsterSay(int32 textId, uint32 language, uint64 TargetGuid)
|
|||
|
||||
MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_SAY, textId,language,TargetGuid);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getRate(RATE_LISTEN_RANGE_SAY),say_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
|
||||
cell.Visit(p, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY));
|
||||
cell.Visit(p, message, *GetMap(), *this, sWorld.getRate(RATE_LISTEN_RANGE_SAY));
|
||||
}
|
||||
|
||||
void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid)
|
||||
|
|
@ -1516,7 +1516,7 @@ void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid)
|
|||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
float range = sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL);
|
||||
float range = sWorld.getRate(RATE_LISTEN_RANGE_YELL);
|
||||
|
||||
MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build);
|
||||
|
|
@ -1546,7 +1546,7 @@ void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossE
|
|||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
float range = sWorld.getConfig(IsBossEmote ? CONFIG_LISTEN_RANGE_YELL : CONFIG_LISTEN_RANGE_TEXTEMOTE);
|
||||
float range = sWorld.getRate(IsBossEmote ? RATE_LISTEN_RANGE_YELL : RATE_LISTEN_RANGE_TEXTEMOTE);
|
||||
|
||||
MaNGOS::MonsterChatBuilder say_build(*this, IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE, textId,LANG_UNIVERSAL,TargetGuid);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build);
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ void ObjectMgr::LoadCreatureLocales()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -343,7 +343,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -407,7 +407,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -1054,7 +1054,7 @@ void ObjectMgr::LoadCreatures()
|
|||
if (GetMapDifficultyData(i,Difficulty(k)))
|
||||
spawnMasks[i] |= (1 << k);
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -1246,7 +1246,7 @@ void ObjectMgr::LoadGameobjects()
|
|||
if (GetMapDifficultyData(i,Difficulty(k)))
|
||||
spawnMasks[i] |= (1 << k);
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -1414,7 +1414,7 @@ void ObjectMgr::LoadCreatureRespawnTimes()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -1456,7 +1456,7 @@ void ObjectMgr::LoadGameobjectRespawnTimes()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -1587,7 +1587,7 @@ void ObjectMgr::LoadItemLocales()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2106,7 +2106,7 @@ void ObjectMgr::LoadItemRequiredTarget()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2210,7 +2210,7 @@ void ObjectMgr::LoadPetLevelInfo()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2324,7 +2324,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
exit(1);
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2416,7 +2416,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
}
|
||||
else
|
||||
{
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2485,7 +2485,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
}
|
||||
else
|
||||
{
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2544,7 +2544,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
}
|
||||
else
|
||||
{
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2603,7 +2603,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
exit(1);
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2699,7 +2699,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
exit(1);
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2822,7 +2822,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
exit(1);
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -3011,7 +3011,7 @@ void ObjectMgr::LoadGuilds()
|
|||
// 0 1 2 3 4
|
||||
QueryResult *guildBankTabRightsResult = CharacterDatabase.Query("SELECT guildid,TabId,rid,gbright,SlotPerDay FROM guild_bank_right ORDER BY guildid ASC, TabId ASC");
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -3080,7 +3080,7 @@ void ObjectMgr::LoadArenaTeams()
|
|||
"SELECT arenateamid,member.guid,played_week,wons_week,played_season,wons_season,personal_rating,name,class "
|
||||
"FROM arena_team_member member LEFT JOIN characters chars on member.guid = chars.guid ORDER BY member.arenateamid ASC");
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -3124,7 +3124,7 @@ void ObjectMgr::LoadGroups()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -3159,7 +3159,7 @@ void ObjectMgr::LoadGroups()
|
|||
{
|
||||
Group* group = NULL; // used as cached pointer for avoid relookup group for each member
|
||||
|
||||
barGoLink bar2( result->GetRowCount() );
|
||||
barGoLink bar2( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
bar2.step();
|
||||
|
|
@ -3225,7 +3225,7 @@ void ObjectMgr::LoadGroups()
|
|||
{
|
||||
Group* group = NULL; // used as cached pointer for avoid relookup group for each member
|
||||
|
||||
barGoLink bar2( result->GetRowCount() );
|
||||
barGoLink bar2( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
bar2.step();
|
||||
|
|
@ -3340,7 +3340,7 @@ void ObjectMgr::LoadQuests()
|
|||
// create multimap previous quest for each existed quest
|
||||
// some quests can have many previous maps set by NextQuestId in previous quest
|
||||
// for example set of race quests can lead to single not race specific quest
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar((int) result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
|
|
@ -3968,7 +3968,7 @@ void ObjectMgr::LoadQuestLocales()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -4112,7 +4112,7 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -4502,7 +4502,7 @@ void ObjectMgr::LoadItemTexts()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
Field* fields;
|
||||
do
|
||||
|
|
@ -4584,7 +4584,7 @@ void ObjectMgr::LoadPageTextLocales()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -4678,7 +4678,7 @@ void ObjectMgr::LoadGossipText()
|
|||
|
||||
int cic;
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -4745,7 +4745,7 @@ void ObjectMgr::LoadNpcTextLocales()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -4818,7 +4818,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
|
|||
//delitems << "DELETE FROM item_instance WHERE guid IN ( ";
|
||||
//delmails << "DELETE FROM mail WHERE id IN ( "
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
uint32 count = 0;
|
||||
Field *fields;
|
||||
|
||||
|
|
@ -4917,7 +4917,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar((int) result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -4982,7 +4982,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -5026,7 +5026,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -5212,7 +5212,7 @@ void ObjectMgr::LoadGraveyardZones()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -5430,7 +5430,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -5883,7 +5883,7 @@ void ObjectMgr::LoadGameObjectLocales()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -6188,7 +6188,7 @@ void ObjectMgr::LoadExplorationBaseXP()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -6237,7 +6237,7 @@ void ObjectMgr::LoadPetNames()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -6316,7 +6316,7 @@ void ObjectMgr::LoadCorpses()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -6365,7 +6365,7 @@ void ObjectMgr::LoadReputationOnKill()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -6442,7 +6442,7 @@ void ObjectMgr::LoadPointsOfInterest()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -6496,7 +6496,7 @@ void ObjectMgr::LoadQuestPOI()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -6559,7 +6559,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -6648,7 +6648,7 @@ void ObjectMgr::LoadWeatherZoneChances()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -6788,7 +6788,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map,char const* table)
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -6889,7 +6889,7 @@ void ObjectMgr::LoadReservedPlayersNames()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar((int) result->GetRowCount() );
|
||||
|
||||
Field* fields;
|
||||
do
|
||||
|
|
@ -7203,7 +7203,7 @@ bool ObjectMgr::LoadMangosStrings(DatabaseType& db, char const* table, int32 min
|
|||
|
||||
uint32 count = 0;
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -7303,7 +7303,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar((int) result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -7690,7 +7690,7 @@ void ObjectMgr::LoadGameTele()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -7818,7 +7818,7 @@ void ObjectMgr::LoadMailLevelRewards()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar((int) result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -7888,7 +7888,7 @@ void ObjectMgr::LoadTrainerSpell()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
std::set<uint32> talentIds;
|
||||
|
||||
|
|
@ -8001,7 +8001,7 @@ void ObjectMgr::LoadVendors()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
uint32 count = 0;
|
||||
do
|
||||
|
|
@ -8047,7 +8047,7 @@ void ObjectMgr::LoadNpcTextId()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar((int) result->GetRowCount() );
|
||||
|
||||
uint32 count = 0;
|
||||
uint32 guid,textid;
|
||||
|
|
@ -8099,7 +8099,7 @@ void ObjectMgr::LoadGossipMenu()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
|
|
@ -8177,7 +8177,7 @@ void ObjectMgr::LoadGossipMenuItems()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
|
|
@ -8423,7 +8423,7 @@ void ObjectMgr::LoadScriptNames()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
uint32 count = 0;
|
||||
|
||||
do
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ void PetAI::UpdateAI(const uint32 diff)
|
|||
|
||||
bool PetAI::_isVisible(Unit *u) const
|
||||
{
|
||||
return m_creature->IsWithinDist(u,sWorld.getConfig(CONFIG_SIGHT_GUARDER))
|
||||
return m_creature->IsWithinDist(u,sWorld.getRate(RATE_SIGHT_GUARDER))
|
||||
&& u->isVisibleForOrDetect(m_creature,m_creature,true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14905,7 +14905,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
time_t logoutTime = time_t(fields[23].GetUInt64());
|
||||
|
||||
// since last logout (in seconds)
|
||||
uint64 time_diff = uint64(now - logoutTime);
|
||||
uint32 time_diff = uint32(now - logoutTime);
|
||||
|
||||
// set value, including drunk invisibility detection
|
||||
// calculate sobering. after 15 minutes logged out, the player will be sober again
|
||||
|
|
@ -17129,21 +17129,21 @@ void Player::Say(const std::string& text, const uint32 language)
|
|||
{
|
||||
WorldPacket data(SMSG_MESSAGECHAT, 200);
|
||||
BuildPlayerChat(&data, CHAT_MSG_SAY, text, language);
|
||||
SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),true);
|
||||
SendMessageToSetInRange(&data,sWorld.getRate(RATE_LISTEN_RANGE_SAY),true);
|
||||
}
|
||||
|
||||
void Player::Yell(const std::string& text, const uint32 language)
|
||||
{
|
||||
WorldPacket data(SMSG_MESSAGECHAT, 200);
|
||||
BuildPlayerChat(&data, CHAT_MSG_YELL, text, language);
|
||||
SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),true);
|
||||
SendMessageToSetInRange(&data,sWorld.getRate(RATE_LISTEN_RANGE_YELL),true);
|
||||
}
|
||||
|
||||
void Player::TextEmote(const std::string& text)
|
||||
{
|
||||
WorldPacket data(SMSG_MESSAGECHAT, 200);
|
||||
BuildPlayerChat(&data, CHAT_MSG_EMOTE, text, LANG_UNIVERSAL);
|
||||
SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),true, !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT) );
|
||||
SendMessageToSetInRange(&data,sWorld.getRate(RATE_LISTEN_RANGE_TEXTEMOTE),true, !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT) );
|
||||
}
|
||||
|
||||
void Player::Whisper(const std::string& text, uint32 language,uint64 receiver)
|
||||
|
|
@ -19839,7 +19839,7 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
|
|||
|
||||
bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const
|
||||
{
|
||||
if (pRewardSource->IsWithinDistInMap(this,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE)))
|
||||
if (pRewardSource->IsWithinDistInMap(this,sWorld.getRate(RATE_GROUP_XP_DISTANCE)))
|
||||
return true;
|
||||
|
||||
if (isAlive())
|
||||
|
|
@ -19849,7 +19849,7 @@ bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const
|
|||
if (!corpse)
|
||||
return false;
|
||||
|
||||
return pRewardSource->IsWithinDistInMap(corpse,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE));
|
||||
return pRewardSource->IsWithinDistInMap(corpse,sWorld.getRate(RATE_GROUP_XP_DISTANCE));
|
||||
}
|
||||
|
||||
uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ void PoolManager::LoadFromDB()
|
|||
|
||||
uint32 count = 0;
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
do
|
||||
{
|
||||
++count;
|
||||
|
|
@ -456,7 +456,7 @@ void PoolManager::LoadFromDB()
|
|||
else
|
||||
{
|
||||
|
||||
barGoLink bar2(result->GetRowCount());
|
||||
barGoLink bar2((int)result->GetRowCount());
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
|
@ -518,7 +518,7 @@ void PoolManager::LoadFromDB()
|
|||
else
|
||||
{
|
||||
|
||||
barGoLink bar2(result->GetRowCount());
|
||||
barGoLink bar2((int)result->GetRowCount());
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
|
@ -587,7 +587,7 @@ void PoolManager::LoadFromDB()
|
|||
else
|
||||
{
|
||||
|
||||
barGoLink bar2( result->GetRowCount() );
|
||||
barGoLink bar2( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ void LoadSkillDiscoveryTable()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
std::ostringstream ssNonDiscoverableEntries;
|
||||
std::set<uint32> reportedReqSpells;
|
||||
|
|
@ -177,7 +177,7 @@ uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player)
|
|||
full_chance += item_iter->chance;
|
||||
|
||||
float rate = full_chance / 100.0f;
|
||||
float roll = rand_chance() * rate; // roll now in range 0..full_chance
|
||||
float roll = rand_chance_f() * rate; // roll now in range 0..full_chance
|
||||
|
||||
for(SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ void LoadSkillExtraItemTable()
|
|||
|
||||
if (result)
|
||||
{
|
||||
barGoLink bar(result->GetRowCount());
|
||||
barGoLink bar((int)result->GetRowCount());
|
||||
|
||||
do
|
||||
{
|
||||
|
|
|
|||
|
|
@ -805,7 +805,7 @@ void SpellMgr::LoadSpellTargetPositions()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -893,7 +893,7 @@ void SpellMgr::LoadSpellProcEvents()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
uint32 customProc = 0;
|
||||
do
|
||||
{
|
||||
|
|
@ -985,7 +985,7 @@ void SpellMgr::LoadSpellProcItemEnchant()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -1050,7 +1050,7 @@ void SpellMgr::LoadSpellBonusess()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
|
@ -1182,7 +1182,7 @@ void SpellMgr::LoadSpellElixirs()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -1232,7 +1232,7 @@ void SpellMgr::LoadSpellThreats()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -1923,7 +1923,7 @@ void SpellMgr::LoadSpellChains()
|
|||
|
||||
uint32 count = 0;
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
|
|
@ -2131,7 +2131,7 @@ void SpellMgr::LoadSpellLearnSpells()
|
|||
|
||||
uint32 count = 0;
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void MapManager::LoadTransports()
|
|||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
|
|||
|
|
@ -906,9 +906,9 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
if (pVictim->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
if(spellProto && IsDamageToThreatSpell(spellProto))
|
||||
pVictim->AddThreat(this, damage*2, (cleanDamage && cleanDamage->hitOutCome == MELEE_HIT_CRIT), damageSchoolMask, spellProto);
|
||||
pVictim->AddThreat(this, float(damage*2), (cleanDamage && cleanDamage->hitOutCome == MELEE_HIT_CRIT), damageSchoolMask, spellProto);
|
||||
else
|
||||
pVictim->AddThreat(this, damage, (cleanDamage && cleanDamage->hitOutCome == MELEE_HIT_CRIT), damageSchoolMask, spellProto);
|
||||
pVictim->AddThreat(this, float(damage), (cleanDamage && cleanDamage->hitOutCome == MELEE_HIT_CRIT), damageSchoolMask, spellProto);
|
||||
}
|
||||
else // victim is a player
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ void WaypointManager::Load()
|
|||
// 6 7 8 9 10 11 12 13 14 15
|
||||
"waittime, emote, spell, textid1, textid2, textid3, textid4, textid5, id, point FROM creature_movement");
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar( (int)result->GetRowCount() );
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
|
|
|
|||
|
|
@ -546,8 +546,20 @@ void World::LoadConfigSettings(bool reload)
|
|||
rate_values[RATE_DURABILITY_LOSS_BLOCK] = 0.0f;
|
||||
}
|
||||
|
||||
///- Read other configuration items from the config file
|
||||
rate_values[RATE_LISTEN_RANGE_SAY] = sConfig.GetFloatDefault("ListenRange.Say", 25);
|
||||
rate_values[RATE_LISTEN_RANGE_YELL] = sConfig.GetFloatDefault("ListenRange.Yell", 300);
|
||||
rate_values[RATE_LISTEN_RANGE_TEXTEMOTE] = sConfig.GetFloatDefault("ListenRange.TextEmote", 25);
|
||||
|
||||
rate_values[RATE_GROUP_XP_DISTANCE] = sConfig.GetFloatDefault("MaxGroupXPDistance", 74);
|
||||
/// \todo Add MonsterSight and GuarderSight (with meaning) in mangosd.conf or put them as define
|
||||
rate_values[RATE_SIGHT_GUARDER] = sConfig.GetFloatDefault("GuarderSight", 50);
|
||||
rate_values[RATE_SIGHT_MONSTER] = sConfig.GetFloatDefault("MonsterSight", 50);
|
||||
|
||||
rate_values[RATE_CREATURE_FAMILY_ASSISTANCE_RADIUS] = sConfig.GetFloatDefault("CreatureFamilyAssistanceRadius",10);
|
||||
rate_values[RATE_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS] = sConfig.GetFloatDefault("CreatureFamilyFleeAssistanceRadius",30);
|
||||
|
||||
|
||||
///- Read other configuration items from the config file
|
||||
m_configs[CONFIG_COMPRESSION] = sConfig.GetIntDefault("Compression", 1);
|
||||
if(m_configs[CONFIG_COMPRESSION] < 1 || m_configs[CONFIG_COMPRESSION] > 9)
|
||||
{
|
||||
|
|
@ -596,11 +608,6 @@ void World::LoadConfigSettings(bool reload)
|
|||
else
|
||||
m_configs[CONFIG_SOCKET_SELECTTIME] = sConfig.GetIntDefault("SocketSelectTime", DEFAULT_SOCKET_SELECT_TIME);
|
||||
|
||||
m_configs[CONFIG_GROUP_XP_DISTANCE] = sConfig.GetIntDefault("MaxGroupXPDistance", 74);
|
||||
/// \todo Add MonsterSight and GuarderSight (with meaning) in mangosd.conf or put them as define
|
||||
m_configs[CONFIG_SIGHT_MONSTER] = sConfig.GetIntDefault("MonsterSight", 50);
|
||||
m_configs[CONFIG_SIGHT_GUARDER] = sConfig.GetIntDefault("GuarderSight", 50);
|
||||
|
||||
if(reload)
|
||||
{
|
||||
uint32 val = sConfig.GetIntDefault("GameType", 0);
|
||||
|
|
@ -912,8 +919,6 @@ void World::LoadConfigSettings(bool reload)
|
|||
|
||||
m_configs[CONFIG_EVENT_ANNOUNCE] = sConfig.GetIntDefault("Event.Announce",0);
|
||||
|
||||
m_configs[CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS] = sConfig.GetIntDefault("CreatureFamilyFleeAssistanceRadius",30);
|
||||
m_configs[CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS] = sConfig.GetIntDefault("CreatureFamilyAssistanceRadius",10);
|
||||
m_configs[CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY] = sConfig.GetIntDefault("CreatureFamilyAssistanceDelay",1500);
|
||||
m_configs[CONFIG_CREATURE_FAMILY_FLEE_DELAY] = sConfig.GetIntDefault("CreatureFamilyFleeDelay",7000);
|
||||
|
||||
|
|
@ -955,10 +960,6 @@ void World::LoadConfigSettings(bool reload)
|
|||
m_configs[CONFIG_DECLINED_NAMES_USED] =
|
||||
(m_configs[CONFIG_REALM_ZONE] == REALM_ZONE_RUSSIAN) ? true : sConfig.GetBoolDefault("DeclinedNames", false);
|
||||
|
||||
m_configs[CONFIG_LISTEN_RANGE_SAY] = sConfig.GetIntDefault("ListenRange.Say", 25);
|
||||
m_configs[CONFIG_LISTEN_RANGE_TEXTEMOTE] = sConfig.GetIntDefault("ListenRange.TextEmote", 25);
|
||||
m_configs[CONFIG_LISTEN_RANGE_YELL] = sConfig.GetIntDefault("ListenRange.Yell", 300);
|
||||
|
||||
m_configs[CONFIG_BATTLEGROUND_CAST_DESERTER] = sConfig.GetBoolDefault("Battleground.CastDeserter", true);
|
||||
m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.Enable", false);
|
||||
m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.PlayerOnly", false);
|
||||
|
|
|
|||
|
|
@ -91,9 +91,6 @@ enum WorldConfigs
|
|||
CONFIG_INTERVAL_CHANGEWEATHER,
|
||||
CONFIG_PORT_WORLD,
|
||||
CONFIG_SOCKET_SELECTTIME,
|
||||
CONFIG_GROUP_XP_DISTANCE,
|
||||
CONFIG_SIGHT_MONSTER,
|
||||
CONFIG_SIGHT_GUARDER,
|
||||
CONFIG_GAME_TYPE,
|
||||
CONFIG_REALM_ZONE,
|
||||
CONFIG_ALLOW_TWO_SIDE_ACCOUNTS,
|
||||
|
|
@ -166,8 +163,6 @@ enum WorldConfigs
|
|||
CONFIG_CHATFLOOD_MESSAGE_DELAY,
|
||||
CONFIG_CHATFLOOD_MUTE_TIME,
|
||||
CONFIG_EVENT_ANNOUNCE,
|
||||
CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS,
|
||||
CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS,
|
||||
CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY,
|
||||
CONFIG_CREATURE_FAMILY_FLEE_DELAY,
|
||||
CONFIG_WORLD_BOSS_LEVEL_DIFF,
|
||||
|
|
@ -195,9 +190,6 @@ enum WorldConfigs
|
|||
CONFIG_INSTANT_LOGOUT,
|
||||
CONFIG_ALL_TAXI_PATHS,
|
||||
CONFIG_DECLINED_NAMES_USED,
|
||||
CONFIG_LISTEN_RANGE_SAY,
|
||||
CONFIG_LISTEN_RANGE_TEXTEMOTE,
|
||||
CONFIG_LISTEN_RANGE_YELL,
|
||||
CONFIG_SKILL_MILLING,
|
||||
CONFIG_BATTLEGROUND_CAST_DESERTER,
|
||||
CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE,
|
||||
|
|
@ -285,6 +277,16 @@ enum Rates
|
|||
RATE_DURABILITY_LOSS_PARRY,
|
||||
RATE_DURABILITY_LOSS_ABSORB,
|
||||
RATE_DURABILITY_LOSS_BLOCK,
|
||||
//{ TODO: store float config values (not only rates), need rename to more generic name
|
||||
RATE_SIGHT_GUARDER,
|
||||
RATE_SIGHT_MONSTER,
|
||||
RATE_LISTEN_RANGE_SAY,
|
||||
RATE_LISTEN_RANGE_YELL,
|
||||
RATE_LISTEN_RANGE_TEXTEMOTE,
|
||||
RATE_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS,
|
||||
RATE_CREATURE_FAMILY_ASSISTANCE_RADIUS,
|
||||
RATE_GROUP_XP_DISTANCE,
|
||||
//}
|
||||
MAX_RATES
|
||||
};
|
||||
|
||||
|
|
@ -472,20 +474,9 @@ class World
|
|||
float getRate(Rates rate) const { return rate_values[rate]; }
|
||||
|
||||
/// Set a server configuration element (see #WorldConfigs)
|
||||
void setConfig(uint32 index,uint32 value)
|
||||
{
|
||||
if(index<CONFIG_VALUE_COUNT)
|
||||
m_configs[index]=value;
|
||||
}
|
||||
|
||||
void setConfig(WorldConfigs index,uint32 value) { m_configs[index]=value; }
|
||||
/// Get a server configuration element (see #WorldConfigs)
|
||||
uint32 getConfig(uint32 index) const
|
||||
{
|
||||
if(index<CONFIG_VALUE_COUNT)
|
||||
return m_configs[index];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
uint32 getConfig(WorldConfigs index) const { return m_configs[index]; }
|
||||
|
||||
/// Are we on a "Player versus Player" server?
|
||||
bool IsPvPRealm() { return (getConfig(CONFIG_GAME_TYPE) == REALM_TYPE_PVP || getConfig(CONFIG_GAME_TYPE) == REALM_TYPE_RPPVP || getConfig(CONFIG_GAME_TYPE) == REALM_TYPE_FFA_PVP); }
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
#if COMPILER == COMPILER_MICROSOFT
|
||||
# pragma warning(disable:4996) // 'function': was declared deprecated
|
||||
#ifndef __SHOW_STUPID_WARNINGS__
|
||||
# pragma warning(disable:4244) // 'argument' : conversion from 'type1' to 'type2', possible loss of data
|
||||
//# pragma warning(disable:4244) // 'argument' : conversion from 'type1' to 'type2', possible loss of data
|
||||
# pragma warning(disable:4355) // 'this' : used in base member initializer list
|
||||
#endif // __SHOW_STUPID_WARNINGS__
|
||||
#endif // __GNUC__
|
||||
|
|
|
|||
|
|
@ -56,6 +56,11 @@ double rand_chance (void)
|
|||
return mtRand->randExc (100.0);
|
||||
}
|
||||
|
||||
float rand_chance_f(void)
|
||||
{
|
||||
return (float)mtRand->randExc (100.0);
|
||||
}
|
||||
|
||||
Tokens StrSplit(const std::string &src, const std::string &sep)
|
||||
{
|
||||
Tokens r;
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ MANGOS_DLL_SPEC float rand_norm_f(void);
|
|||
* With an FPU, there is usually no difference in performance between float and double. */
|
||||
MANGOS_DLL_SPEC double rand_chance(void);
|
||||
|
||||
MANGOS_DLL_SPEC float rand_chance_f(void);
|
||||
|
||||
/* Return true if a random roll fits in the specified chance (range 0-100). */
|
||||
inline bool roll_chance_f(float chance)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9385"
|
||||
#define REVISION_NR "9386"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue