mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22: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
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue