[12150] Drop arena point distribution, implement currency week count reset.

- Fix missing currency load.
- Some cleanup.

Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
This commit is contained in:
Yaki Khadafi 2012-08-30 12:20:06 +03:00 committed by Antz
parent 7177f4cc07
commit 8e5d609e1e
21 changed files with 166 additions and 220 deletions

View file

@ -21,7 +21,7 @@
DROP TABLE IF EXISTS `character_db_version`; DROP TABLE IF EXISTS `character_db_version`;
CREATE TABLE `character_db_version` ( CREATE TABLE `character_db_version` (
`required_12141_01_characters_character_currencies` bit(1) default NULL `required_12150_01_characters_saved_variables` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
-- --
@ -1725,7 +1725,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `saved_variables`; DROP TABLE IF EXISTS `saved_variables`;
CREATE TABLE `saved_variables` ( CREATE TABLE `saved_variables` (
`NextArenaPointDistributionTime` bigint(40) UNSIGNED NOT NULL DEFAULT '0', `NextCurrenciesResetTime` bigint(40) UNSIGNED NOT NULL DEFAULT '0',
`NextDailyQuestResetTime` bigint(40) unsigned NOT NULL default '0', `NextDailyQuestResetTime` bigint(40) unsigned NOT NULL default '0',
`NextWeeklyQuestResetTime` bigint(40) unsigned NOT NULL default '0', `NextWeeklyQuestResetTime` bigint(40) unsigned NOT NULL default '0',
`NextMonthlyQuestResetTime` bigint(40) unsigned NOT NULL default '0', `NextMonthlyQuestResetTime` bigint(40) unsigned NOT NULL default '0',

View file

@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) default NULL, `version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL,
`cache_id` int(10) default '0', `cache_id` int(10) default '0',
`required_12141_02_mangos_mangos_command` bit(1) default NULL `required_12150_01_mangos_mangos_string` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
-- --
@ -3897,12 +3897,6 @@ INSERT INTO `mangos_string` VALUES
(738,'Arenas are set to normal playercount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (738,'Arenas are set to normal playercount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(739,'Battlegrounds are set to 1v0 for debugging.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (739,'Battlegrounds are set to 1v0 for debugging.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(740,'Battlegrounds are set to normal playercount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (740,'Battlegrounds are set to normal playercount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(741,'Flushing Arena points based on team ratings, this may take a few minutes. Please stand by...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(742,'Distributing arena points to players...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(743,'Finished setting arena points for online players.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(744,'Modifying played count, arena points etc. for loaded arena teams, sending updated stats to online players...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(745,'Modification done.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(746,'Done flushing Arena points.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(750,'Not enough players. This game will close in %u mins.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (750,'Not enough players. This game will close in %u mins.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(751,'Not enough players. This game will close in %u seconds.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (751,'Not enough players. This game will close in %u seconds.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(752,'Only the Alliance can use that portal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (752,'Only the Alliance can use that portal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),

View file

@ -0,0 +1,4 @@
ALTER TABLE character_db_version CHANGE COLUMN required_12141_01_characters_character_currencies required_12150_01_characters_saved_variables bit;
ALTER TABLE `saved_variables` CHANGE COLUMN `NextArenaPointDistributionTime` `NextCurrenciesResetTime` bigint(40) unsigned NOT NULL DEFAULT '0';
UPDATE `saved_variables` SET `NextCurrenciesResetTime` = 0;

View file

@ -0,0 +1,3 @@
ALTER TABLE db_version CHANGE COLUMN required_12141_02_mangos_mangos_command required_12150_01_mangos_mangos_string bit;
DELETE FROM `mangos_string` WHERE `entry` BETWEEN 741 AND 746;

View file

@ -552,33 +552,6 @@ bool ArenaTeam::HaveMember(ObjectGuid guid) const
return false; return false;
} }
uint32 ArenaTeam::GetPoints(uint32 MemberRating)
{
// returns how many points would be awarded with this team type with this rating
float points;
uint32 rating = MemberRating + 150 < m_stats.rating ? MemberRating : m_stats.rating;
if (rating <= 1500)
{
// As of Season 6 and later, all teams below 1500 rating will earn points as if they were a 1500 rated team
if (sWorld.getConfig(CONFIG_UINT32_ARENA_SEASON_ID) >= 6)
rating = 1500;
points = (float)rating * 0.22f + 14.0f;
}
else
points = 1511.26f / (1.0f + 1639.28f * exp(-0.00412f * (float)rating));
// type penalties for <5v5 teams
if (m_Type == ARENA_TYPE_2v2)
points *= 0.76f;
else if (m_Type == ARENA_TYPE_3v3)
points *= 0.88f;
return (uint32) points;
}
float ArenaTeam::GetChanceAgainst(uint32 own_rating, uint32 enemy_rating) float ArenaTeam::GetChanceAgainst(uint32 own_rating, uint32 enemy_rating)
{ {
// returns the chance to win against a team with the given rating, used in the rating adjustment calculation // returns the chance to win against a team with the given rating, used in the rating adjustment calculation
@ -715,35 +688,6 @@ void ArenaTeam::MemberWon(Player* plr, uint32 againstRating)
} }
} }
void ArenaTeam::UpdateArenaPointsHelper(std::map<uint32, uint32>& PlayerPoints)
{
// called after a match has ended and the stats are already modified
// helper function for arena point distribution (this way, when distributing, no actual calculation is required, just a few comparisons)
// 10 played games per week is a minimum
if (m_stats.games_week < 10)
return;
// to get points, a player has to participate in at least 30% of the matches
uint32 min_plays = (uint32) ceil(m_stats.games_week * 0.3);
for (MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
// the player participated in enough games, update his points
uint32 points_to_add = 0;
if (itr->games_week >= min_plays)
points_to_add = GetPoints(itr->personal_rating);
// OBSOLETE : CharacterDatabase.PExecute("UPDATE arena_team_member SET points_to_add = '%u' WHERE arenateamid = '%u' AND guid = '%u'", points_to_add, m_TeamId, itr->guid);
std::map<uint32, uint32>::iterator plr_itr = PlayerPoints.find(itr->guid.GetCounter());
if (plr_itr != PlayerPoints.end())
{
// check if there is already more points
if (plr_itr->second < points_to_add)
PlayerPoints[itr->guid.GetCounter()] = points_to_add;
}
else
PlayerPoints[itr->guid.GetCounter()] = points_to_add;
}
}
void ArenaTeam::SaveToDB() void ArenaTeam::SaveToDB()
{ {
// save team and member stats to db // save team and member stats to db

View file

@ -192,7 +192,6 @@ class ArenaTeam
void Stats(WorldSession* session); void Stats(WorldSession* session);
void InspectStats(WorldSession* session, ObjectGuid guid); void InspectStats(WorldSession* session, ObjectGuid guid);
uint32 GetPoints(uint32 MemberRating);
float GetChanceAgainst(uint32 own_rating, uint32 enemy_rating); float GetChanceAgainst(uint32 own_rating, uint32 enemy_rating);
int32 WonAgainst(uint32 againstRating); int32 WonAgainst(uint32 againstRating);
void MemberWon(Player* plr, uint32 againstRating); void MemberWon(Player* plr, uint32 againstRating);
@ -200,8 +199,6 @@ class ArenaTeam
void MemberLost(Player* plr, uint32 againstRating); void MemberLost(Player* plr, uint32 againstRating);
void OfflineMemberLost(ObjectGuid guid, uint32 againstRating); void OfflineMemberLost(ObjectGuid guid, uint32 againstRating);
void UpdateArenaPointsHelper(std::map<uint32, uint32>& PlayerPoints);
void NotifyStatsChanged(); void NotifyStatsChanged();
void FinishWeek(); void FinishWeek();

View file

@ -777,6 +777,7 @@ void BattleGround::EndBattleGround(Team winner)
plr->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, member->personal_rating); plr->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, member->personal_rating);
winner_arena_team->MemberWon(plr, loser_rating); winner_arena_team->MemberWon(plr, loser_rating);
plr->ModifyCurrencyCount(CURRENCY_CONQUEST_ARENA_META, sWorld.getConfig(CONFIG_UINT32_CURRENCY_ARENA_CONQUEST_POINTS_REWARD));
if (member) if (member)
{ {
@ -817,9 +818,6 @@ void BattleGround::EndBattleGround(Team winner)
if (isArena() && isRated() && winner_arena_team && loser_arena_team) if (isArena() && isRated() && winner_arena_team && loser_arena_team)
{ {
// update arena points only after increasing the player's match count!
// obsolete: winner_arena_team->UpdateArenaPointsHelper();
// obsolete: loser_arena_team->UpdateArenaPointsHelper();
// save the stat changes // save the stat changes
winner_arena_team->SaveToDB(); winner_arena_team->SaveToDB();
loser_arena_team->SaveToDB(); loser_arena_team->SaveToDB();

View file

@ -1125,7 +1125,7 @@ void BGQueueRemoveEvent::Abort(uint64 /*e_time*/)
/*** BATTLEGROUND MANAGER ***/ /*** BATTLEGROUND MANAGER ***/
/*********************************************************/ /*********************************************************/
BattleGroundMgr::BattleGroundMgr() : m_AutoDistributionTimeChecker(0), m_ArenaTesting(false) BattleGroundMgr::BattleGroundMgr() : m_ArenaTesting(false)
{ {
for (uint8 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; ++i) for (uint8 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; ++i)
m_BattleGrounds[i].clear(); m_BattleGrounds[i].clear();
@ -1198,21 +1198,6 @@ void BattleGroundMgr::Update(uint32 diff)
else else
m_NextRatingDiscardUpdate -= diff; m_NextRatingDiscardUpdate -= diff;
} }
if (sWorld.getConfig(CONFIG_BOOL_ARENA_AUTO_DISTRIBUTE_POINTS))
{
if (m_AutoDistributionTimeChecker < diff)
{
if (sWorld.GetGameTime() > m_NextAutoDistributionTime)
{
DistributeArenaPoints();
m_NextAutoDistributionTime = time_t(m_NextAutoDistributionTime + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_UINT32_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS));
CharacterDatabase.PExecute("UPDATE saved_variables SET NextArenaPointDistributionTime = '" UI64FMTD "'", uint64(m_NextAutoDistributionTime));
}
m_AutoDistributionTimeChecker = 600000; // check 10 minutes
}
else
m_AutoDistributionTimeChecker -= diff;
}
} }
void BattleGroundMgr::BuildBattleGroundStatusPacket(WorldPacket* data, BattleGround* bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, ArenaType arenatype) void BattleGroundMgr::BuildBattleGroundStatusPacket(WorldPacket* data, BattleGround* bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, ArenaType arenatype)
@ -1718,76 +1703,6 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
sLog.outString(">> Loaded %u battlegrounds", count); sLog.outString(">> Loaded %u battlegrounds", count);
} }
void BattleGroundMgr::InitAutomaticArenaPointDistribution()
{
if (sWorld.getConfig(CONFIG_BOOL_ARENA_AUTO_DISTRIBUTE_POINTS))
{
DEBUG_LOG("Initializing Automatic Arena Point Distribution");
QueryResult* result = CharacterDatabase.Query("SELECT NextArenaPointDistributionTime FROM saved_variables");
if (!result)
{
DEBUG_LOG("Battleground: Next arena point distribution time not found in SavedVariables, reseting it now.");
m_NextAutoDistributionTime = time_t(sWorld.GetGameTime() + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_UINT32_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS));
CharacterDatabase.PExecute("INSERT INTO saved_variables (NextArenaPointDistributionTime) VALUES ('" UI64FMTD "')", uint64(m_NextAutoDistributionTime));
}
else
{
m_NextAutoDistributionTime = time_t((*result)[0].GetUInt64());
delete result;
}
DEBUG_LOG("Automatic Arena Point Distribution initialized.");
}
}
void BattleGroundMgr::DistributeArenaPoints()
{
// used to distribute arena points based on last week's stats
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_START);
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_ONLINE_START);
// temporary structure for storing maximum points to add values for all players
std::map<uint32, uint32> PlayerPoints;
// at first update all points for all team members
for (ObjectMgr::ArenaTeamMap::iterator team_itr = sObjectMgr.GetArenaTeamMapBegin(); team_itr != sObjectMgr.GetArenaTeamMapEnd(); ++team_itr)
{
if (ArenaTeam* at = team_itr->second)
{
at->UpdateArenaPointsHelper(PlayerPoints);
}
}
// cycle that gives points to all players
for (std::map<uint32, uint32>::iterator plr_itr = PlayerPoints.begin(); plr_itr != PlayerPoints.end(); ++plr_itr)
{
// update to database
CharacterDatabase.PExecute("UPDATE characters SET arenaPoints = arenaPoints + '%u' WHERE guid = '%u'", plr_itr->second, plr_itr->first);
// add points if player is online
//if (Player* pl = sObjectMgr.GetPlayer(ObjectGuid(HIGHGUID_PLAYER, plr_itr->first)))
// pl->ModifyArenaPoints(plr_itr->second);
}
PlayerPoints.clear();
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_ONLINE_END);
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_TEAM_START);
for (ObjectMgr::ArenaTeamMap::iterator titr = sObjectMgr.GetArenaTeamMapBegin(); titr != sObjectMgr.GetArenaTeamMapEnd(); ++titr)
{
if (ArenaTeam* at = titr->second)
{
at->FinishWeek(); // set played this week etc values to 0 in memory, too
at->SaveToDB(); // save changes
at->NotifyStatsChanged(); // notify the players of the changes
}
}
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_TEAM_END);
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_END);
}
void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket* data, ObjectGuid guid, Player* plr, BattleGroundTypeId bgTypeId, uint8 fromWhere) void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket* data, ObjectGuid guid, Player* plr, BattleGroundTypeId bgTypeId, uint8 fromWhere)
{ {
if (!plr) if (!plr)

View file

@ -36,7 +36,6 @@ typedef UNORDERED_MAP<uint32, BattleGroundTypeId> BattleMastersMap;
typedef UNORDERED_MAP<uint32, BattleGroundEventIdx> CreatureBattleEventIndexesMap; typedef UNORDERED_MAP<uint32, BattleGroundEventIdx> CreatureBattleEventIndexesMap;
typedef UNORDERED_MAP<uint32, BattleGroundEventIdx> GameObjectBattleEventIndexesMap; typedef UNORDERED_MAP<uint32, BattleGroundEventIdx> GameObjectBattleEventIndexesMap;
#define BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY 86400 // seconds in a day
#define COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME 10 #define COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME 10
struct GroupQueueInfo; // type predefinition struct GroupQueueInfo; // type predefinition
@ -235,8 +234,6 @@ class BattleGroundMgr
uint32 GetRatingDiscardTimer() const; uint32 GetRatingDiscardTimer() const;
uint32 GetPrematureFinishTime() const; uint32 GetPrematureFinishTime() const;
void InitAutomaticArenaPointDistribution();
void DistributeArenaPoints();
void ToggleArenaTesting(); void ToggleArenaTesting();
void ToggleTesting(); void ToggleTesting();
@ -289,8 +286,6 @@ class BattleGroundMgr
typedef std::set<uint32> ClientBattleGroundIdSet; typedef std::set<uint32> ClientBattleGroundIdSet;
ClientBattleGroundIdSet m_ClientBattleGroundIds[MAX_BATTLEGROUND_TYPE_ID][MAX_BATTLEGROUND_BRACKETS]; // the instanceids just visible for the client ClientBattleGroundIdSet m_ClientBattleGroundIds[MAX_BATTLEGROUND_TYPE_ID][MAX_BATTLEGROUND_BRACKETS]; // the instanceids just visible for the client
uint32 m_NextRatingDiscardUpdate; uint32 m_NextRatingDiscardUpdate;
time_t m_NextAutoDistributionTime;
uint32 m_AutoDistributionTimeChecker;
bool m_ArenaTesting; bool m_ArenaTesting;
bool m_Testing; bool m_Testing;
}; };

View file

@ -104,6 +104,7 @@ bool LoginQueryHolder::Initialize()
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADGLYPHS, "SELECT spec, slot, glyph FROM character_glyphs WHERE guid='%u'", m_guid.GetCounter()); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADGLYPHS, "SELECT spec, slot, glyph FROM character_glyphs WHERE guid='%u'", m_guid.GetCounter());
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADMAILS, "SELECT id,messageType,sender,receiver,subject,body,expire_time,deliver_time,money,cod,checked,stationery,mailTemplateId,has_items FROM mail WHERE receiver = '%u' ORDER BY id DESC", m_guid.GetCounter()); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADMAILS, "SELECT id,messageType,sender,receiver,subject,body,expire_time,deliver_time,money,cod,checked,stationery,mailTemplateId,has_items FROM mail WHERE receiver = '%u' ORDER BY id DESC", m_guid.GetCounter());
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADMAILEDITEMS, "SELECT data, text, mail_id, item_guid, item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE receiver = '%u'", m_guid.GetCounter()); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADMAILEDITEMS, "SELECT data, text, mail_id, item_guid, item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE receiver = '%u'", m_guid.GetCounter());
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADCURRENCIES, "SELECT id, totalCount, weekCount, seasonCount, flags FROM character_currencies WHERE guid = '%u'", m_guid.GetCounter());
return res; return res;
} }

View file

@ -821,7 +821,6 @@ ChatCommand* ChatHandler::getCommandTable()
{ "cometome", SEC_ADMINISTRATOR, false, &ChatHandler::HandleComeToMeCommand, "", NULL }, { "cometome", SEC_ADMINISTRATOR, false, &ChatHandler::HandleComeToMeCommand, "", NULL },
{ "damage", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDamageCommand, "", NULL }, { "damage", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDamageCommand, "", NULL },
{ "combatstop", SEC_GAMEMASTER, false, &ChatHandler::HandleCombatStopCommand, "", NULL }, { "combatstop", SEC_GAMEMASTER, false, &ChatHandler::HandleCombatStopCommand, "", NULL },
{ "flusharenapoints", SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL },
{ "repairitems", SEC_GAMEMASTER, true, &ChatHandler::HandleRepairitemsCommand, "", NULL }, { "repairitems", SEC_GAMEMASTER, true, &ChatHandler::HandleRepairitemsCommand, "", NULL },
{ "stable", SEC_ADMINISTRATOR, false, &ChatHandler::HandleStableCommand, "", NULL }, { "stable", SEC_ADMINISTRATOR, false, &ChatHandler::HandleStableCommand, "", NULL },
{ "waterwalk", SEC_GAMEMASTER, false, &ChatHandler::HandleWaterwalkCommand, "", NULL }, { "waterwalk", SEC_GAMEMASTER, false, &ChatHandler::HandleWaterwalkCommand, "", NULL },

View file

@ -592,7 +592,6 @@ class MANGOS_DLL_SPEC ChatHandler
bool HandleRespawnCommand(char* args); bool HandleRespawnCommand(char* args);
bool HandleComeToMeCommand(char* args); bool HandleComeToMeCommand(char* args);
bool HandleCombatStopCommand(char* args); bool HandleCombatStopCommand(char* args);
bool HandleFlushArenaPointsCommand(char* args);
bool HandleRepairitemsCommand(char* args); bool HandleRepairitemsCommand(char* args);
bool HandleStableCommand(char* args); bool HandleStableCommand(char* args);
bool HandleWaterwalkCommand(char* args); bool HandleWaterwalkCommand(char* args);

View file

@ -736,12 +736,12 @@ enum MangosStrings
LANG_DEBUG_ARENA_OFF = 738, LANG_DEBUG_ARENA_OFF = 738,
LANG_DEBUG_BG_ON = 739, LANG_DEBUG_BG_ON = 739,
LANG_DEBUG_BG_OFF = 740, LANG_DEBUG_BG_OFF = 740,
LANG_DIST_ARENA_POINTS_START = 741, // = 741, not used
LANG_DIST_ARENA_POINTS_ONLINE_START = 742, // = 742, not used
LANG_DIST_ARENA_POINTS_ONLINE_END = 743, // = 743, not used
LANG_DIST_ARENA_POINTS_TEAM_START = 744, // = 744, not used
LANG_DIST_ARENA_POINTS_TEAM_END = 745, // = 745, not used
LANG_DIST_ARENA_POINTS_END = 746, // = 746, not used
// = 747, not used // = 747, not used
// = 748, not used // = 748, not used
// = 749, not used // = 749, not used

View file

@ -7130,12 +7130,6 @@ bool ChatHandler::HandleSendMessageCommand(char* args)
return true; return true;
} }
bool ChatHandler::HandleFlushArenaPointsCommand(char* /*args*/)
{
sBattleGroundMgr.DistributeArenaPoints();
return true;
}
bool ChatHandler::HandleModifyGenderCommand(char* args) bool ChatHandler::HandleModifyGenderCommand(char* args)
{ {
if (!*args) if (!*args)

View file

@ -720,8 +720,8 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
InitRunes(); InitRunes();
SetUInt32Value(PLAYER_FIELD_COINAGE, sWorld.getConfig(CONFIG_UINT32_START_PLAYER_MONEY)); SetUInt32Value(PLAYER_FIELD_COINAGE, sWorld.getConfig(CONFIG_UINT32_START_PLAYER_MONEY));
SetCurrencyCount(CURRENCY_HONOR_POINTS,sWorld.getConfig(CONFIG_UINT32_START_HONOR_POINTS)); SetCurrencyCount(CURRENCY_HONOR_POINTS,sWorld.getConfig(CONFIG_UINT32_CURRENCY_START_HONOR_POINTS));
SetCurrencyCount(CURRENCY_CONQUEST_POINTS, sWorld.getConfig(CONFIG_UINT32_START_CONQUEST_POINTS)); SetCurrencyCount(CURRENCY_CONQUEST_POINTS, sWorld.getConfig(CONFIG_UINT32_CURRENCY_START_CONQUEST_POINTS));
// Played time // Played time
m_Last_tick = time(NULL); m_Last_tick = time(NULL);
@ -23190,7 +23190,7 @@ uint32 Player::GetCurrencyWeekCap(CurrencyTypesEntry const * currency) const
switch (currency->ID) switch (currency->ID)
{ {
case CURRENCY_CONQUEST_POINTS: case CURRENCY_CONQUEST_POINTS:
cap = sWorld.getConfig(CONFIG_UINT32_CONQUEST_POINTS_DEFAULT_WEEK_CAP); cap = sWorld.getConfig(CONFIG_UINT32_CURRENCY_CONQUEST_POINTS_DEFAULT_WEEK_CAP);
break; break;
} }
@ -23425,3 +23425,14 @@ void Player::SetCurrencyFlags(uint32 currencyId, uint8 flags)
itr->second.state = PLAYERCURRENCY_CHANGED; itr->second.state = PLAYERCURRENCY_CHANGED;
} }
void Player::ResetCurrencyWeekCounts()
{
for (PlayerCurrenciesMap::iterator itr = m_currencies.begin(); itr != m_currencies.end(); ++itr)
{
itr->second.weekCount = 0;
itr->second.state = PLAYERCURRENCY_CHANGED;
}
WorldPacket data(SMSG_WEEKLY_RESET_CURRENCY, 0);
SendDirectMessage(&data);
}

View file

@ -1984,6 +1984,7 @@ class MANGOS_DLL_SPEC Player : public Unit
void SetCurrencyCount(uint32 id, uint32 count); void SetCurrencyCount(uint32 id, uint32 count);
void SendCurrencyWeekCap(uint32 id) const; void SendCurrencyWeekCap(uint32 id) const;
void SetCurrencyFlags(uint32 currencyId, uint8 flags); void SetCurrencyFlags(uint32 currencyId, uint8 flags);
void ResetCurrencyWeekCounts();
/*********************************************************/ /*********************************************************/
/*** PVP SYSTEM ***/ /*** PVP SYSTEM ***/

View file

@ -35,6 +35,7 @@
#include "SkillDiscovery.h" #include "SkillDiscovery.h"
#include "AccountMgr.h" #include "AccountMgr.h"
#include "AchievementMgr.h" #include "AchievementMgr.h"
#include "ArenaTeam.h"
#include "AuctionHouseMgr.h" #include "AuctionHouseMgr.h"
#include "ObjectMgr.h" #include "ObjectMgr.h"
#include "CreatureEventAIMgr.h" #include "CreatureEventAIMgr.h"
@ -95,6 +96,7 @@ World::World()
m_startTime = m_gameTime; m_startTime = m_gameTime;
m_maxActiveSessionCount = 0; m_maxActiveSessionCount = 0;
m_maxQueuedSessionCount = 0; m_maxQueuedSessionCount = 0;
m_NextCurrencyReset = 0;
m_NextDailyQuestReset = 0; m_NextDailyQuestReset = 0;
m_NextWeeklyQuestReset = 0; m_NextWeeklyQuestReset = 0;
@ -596,9 +598,13 @@ void World::LoadConfigSettings(bool reload)
setConfigMinMax(CONFIG_UINT32_START_PLAYER_MONEY, "StartPlayerMoney", 0, 0, MAX_MONEY_AMOUNT); setConfigMinMax(CONFIG_UINT32_START_PLAYER_MONEY, "StartPlayerMoney", 0, 0, MAX_MONEY_AMOUNT);
setConfig(CONFIG_UINT32_START_HONOR_POINTS, "StartHonorPoints", 0); setConfigMinMax(CONFIG_UINT32_CURRENCY_RESET_TIME_HOUR, "Currency.ResetHour", 6, 0, 23);
setConfig(CONFIG_UINT32_CONQUEST_POINTS_DEFAULT_WEEK_CAP, "ConquestPointsDefaultWeekCap", 1350 * 100); // with precision setConfigMinMax(CONFIG_UINT32_CURRENCY_RESET_TIME_WEEK_DAY, "Currency.ResetWeekDay", 3, 0, 6);
setConfig(CONFIG_UINT32_START_CONQUEST_POINTS, "StartConquestPoints", 0); setConfigMin(CONFIG_UINT32_CURRENCY_RESET_INTERVAL, "Currency.ResetInterval", 7, 1);
setConfig(CONFIG_UINT32_CURRENCY_START_CONQUEST_POINTS, "Currency.StartConquestPoints", 0);
setConfig(CONFIG_UINT32_CURRENCY_START_HONOR_POINTS, "Currency.StartHonorPoints", 0);
setConfig(CONFIG_UINT32_CURRENCY_CONQUEST_POINTS_DEFAULT_WEEK_CAP, "Currency.ConquestPointsDefaultWeekCap", 1350 * 100); // with precision
setConfig(CONFIG_UINT32_CURRENCY_ARENA_CONQUEST_POINTS_REWARD, "Currency.ConquestPointsArenaReward", 120 * 100); // with precision
setConfig(CONFIG_BOOL_ALL_TAXI_PATHS, "AllFlightPaths", false); setConfig(CONFIG_BOOL_ALL_TAXI_PATHS, "AllFlightPaths", false);
@ -747,8 +753,6 @@ void World::LoadConfigSettings(bool reload)
setConfig(CONFIG_UINT32_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH, "BattleGround.PremadeGroupWaitForMatch", 30 * MINUTE * IN_MILLISECONDS); setConfig(CONFIG_UINT32_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH, "BattleGround.PremadeGroupWaitForMatch", 30 * MINUTE * IN_MILLISECONDS);
setConfig(CONFIG_UINT32_ARENA_MAX_RATING_DIFFERENCE, "Arena.MaxRatingDifference", 150); setConfig(CONFIG_UINT32_ARENA_MAX_RATING_DIFFERENCE, "Arena.MaxRatingDifference", 150);
setConfig(CONFIG_UINT32_ARENA_RATING_DISCARD_TIMER, "Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILLISECONDS); setConfig(CONFIG_UINT32_ARENA_RATING_DISCARD_TIMER, "Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILLISECONDS);
setConfig(CONFIG_BOOL_ARENA_AUTO_DISTRIBUTE_POINTS, "Arena.AutoDistributePoints", false);
setConfig(CONFIG_UINT32_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS, "Arena.AutoDistributeInterval", 7);
setConfig(CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_JOIN, "Arena.QueueAnnouncer.Join", false); setConfig(CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_JOIN, "Arena.QueueAnnouncer.Join", false);
setConfig(CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_EXIT, "Arena.QueueAnnouncer.Exit", false); setConfig(CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_EXIT, "Arena.QueueAnnouncer.Exit", false);
setConfig(CONFIG_UINT32_ARENA_SEASON_ID, "Arena.ArenaSeason.ID", 1); setConfig(CONFIG_UINT32_ARENA_SEASON_ID, "Arena.ArenaSeason.ID", 1);
@ -1380,7 +1384,6 @@ void World::SetInitialWorldSettings()
///- Initialize Battlegrounds ///- Initialize Battlegrounds
sLog.outString("Starting BattleGround System"); sLog.outString("Starting BattleGround System");
sBattleGroundMgr.CreateInitialBattleGrounds(); sBattleGroundMgr.CreateInitialBattleGrounds();
sBattleGroundMgr.InitAutomaticArenaPointDistribution();
///- Initialize Outdoor PvP ///- Initialize Outdoor PvP
sLog.outString("Starting Outdoor PvP System"); sLog.outString("Starting Outdoor PvP System");
@ -1393,6 +1396,9 @@ void World::SetInitialWorldSettings()
sLog.outString("Deleting expired bans..."); sLog.outString("Deleting expired bans...");
LoginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); LoginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate");
sLog.outString("Calculate next currency reset time...");
InitCurrencyResetTime();
sLog.outString("Calculate next daily quest reset time..."); sLog.outString("Calculate next daily quest reset time...");
InitDailyQuestResetTime(); InitDailyQuestResetTime();
@ -1494,6 +1500,10 @@ void World::Update(uint32 diff)
if (m_gameTime > m_NextMonthlyQuestReset) if (m_gameTime > m_NextMonthlyQuestReset)
ResetMonthlyQuests(); ResetMonthlyQuests();
/// Handle monthly quests reset time
if (m_gameTime > m_NextCurrencyReset)
ResetCurrencyWeekCounts();
/// <ul><li> Handle auctions when the timer has passed /// <ul><li> Handle auctions when the timer has passed
if (m_timers[WUPDATE_AUCTIONS].Passed()) if (m_timers[WUPDATE_AUCTIONS].Passed())
{ {
@ -2132,6 +2142,44 @@ void World::SetMonthlyQuestResetTime(bool initialize)
CharacterDatabase.PExecute("UPDATE saved_variables SET NextMonthlyQuestResetTime = '" UI64FMTD "'", uint64(m_NextMonthlyQuestReset)); CharacterDatabase.PExecute("UPDATE saved_variables SET NextMonthlyQuestResetTime = '" UI64FMTD "'", uint64(m_NextMonthlyQuestReset));
} }
void World::InitCurrencyResetTime()
{
QueryResult* result = CharacterDatabase.Query("SELECT `NextCurrenciesResetTime` FROM `saved_variables`");
if (!result)
m_NextCurrencyReset = time_t(time(NULL)); // game time not yet init
else
m_NextCurrencyReset = time_t((*result)[0].GetUInt64());
// re-init case or not exists
if (!m_NextCurrencyReset)
{
// generate time by config
time_t curTime = time(NULL);
tm localTm = *localtime(&curTime);
int week_day_offset = localTm.tm_wday - int(getConfig(CONFIG_UINT32_CURRENCY_RESET_TIME_WEEK_DAY));
// current week reset time
localTm.tm_hour = getConfig(CONFIG_UINT32_CURRENCY_RESET_TIME_HOUR);
localTm.tm_min = 0;
localTm.tm_sec = 0;
time_t nextWeekResetTime = mktime(&localTm);
nextWeekResetTime -= week_day_offset * DAY;
// next reset time before current moment
if (curTime >= nextWeekResetTime)
nextWeekResetTime += getConfig(CONFIG_UINT32_CURRENCY_RESET_INTERVAL) * DAY;
// normalize reset time
m_NextCurrencyReset = m_NextCurrencyReset < curTime ? nextWeekResetTime - getConfig(CONFIG_UINT32_CURRENCY_RESET_INTERVAL) * DAY : nextWeekResetTime;
}
if (!result)
CharacterDatabase.PExecute("INSERT INTO `saved_variables` (`NextCurrenciesResetTime`) VALUES ('" UI64FMTD "')", uint64(m_NextCurrencyReset));
else
delete result;
}
void World::ResetDailyQuests() void World::ResetDailyQuests()
{ {
DETAIL_LOG("Daily quests reset for all characters."); DETAIL_LOG("Daily quests reset for all characters.");
@ -2168,6 +2216,29 @@ void World::ResetMonthlyQuests()
SetMonthlyQuestResetTime(false); SetMonthlyQuestResetTime(false);
} }
void World::ResetCurrencyWeekCounts()
{
CharacterDatabase.Execute("UPDATE `character_currencies` SET `weekCount` = 0");
for (SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
if (itr->second->GetPlayer())
itr->second->GetPlayer()->ResetCurrencyWeekCounts();
for(ObjectMgr::ArenaTeamMap::iterator titr = sObjectMgr.GetArenaTeamMapBegin(); titr != sObjectMgr.GetArenaTeamMapEnd(); ++titr)
{
if (ArenaTeam * at = titr->second)
{
at->FinishWeek(); // set played this week etc values to 0 in memory, too
at->SaveToDB(); // save changes
at->NotifyStatsChanged(); // notify the players of the changes
}
}
m_NextCurrencyReset = time_t(m_NextCurrencyReset + DAY * sWorld.getConfig(CONFIG_UINT32_CURRENCY_RESET_INTERVAL));
CharacterDatabase.PExecute("UPDATE saved_variables SET `NextCurrenciesResetTime` = '" UI64FMTD "'", uint64(m_NextCurrencyReset));
}
void World::SetPlayerLimit(int32 limit, bool needUpdate) void World::SetPlayerLimit(int32 limit, bool needUpdate)
{ {
if (limit < -SEC_ADMINISTRATOR) if (limit < -SEC_ADMINISTRATOR)

View file

@ -108,8 +108,13 @@ enum eConfigUInt32Values
CONFIG_UINT32_START_PLAYER_LEVEL, CONFIG_UINT32_START_PLAYER_LEVEL,
CONFIG_UINT32_START_HEROIC_PLAYER_LEVEL, CONFIG_UINT32_START_HEROIC_PLAYER_LEVEL,
CONFIG_UINT32_START_PLAYER_MONEY, CONFIG_UINT32_START_PLAYER_MONEY,
CONFIG_UINT32_START_HONOR_POINTS, CONFIG_UINT32_CURRENCY_START_HONOR_POINTS,
CONFIG_UINT32_START_CONQUEST_POINTS, CONFIG_UINT32_CURRENCY_START_CONQUEST_POINTS,
CONFIG_UINT32_CURRENCY_CONQUEST_POINTS_DEFAULT_WEEK_CAP,
CONFIG_UINT32_CURRENCY_ARENA_CONQUEST_POINTS_REWARD,
CONFIG_UINT32_CURRENCY_RESET_TIME_HOUR,
CONFIG_UINT32_CURRENCY_RESET_INTERVAL,
CONFIG_UINT32_CURRENCY_RESET_TIME_WEEK_DAY,
CONFIG_UINT32_INSTANCE_RESET_TIME_HOUR, CONFIG_UINT32_INSTANCE_RESET_TIME_HOUR,
CONFIG_UINT32_INSTANCE_UNLOAD_DELAY, CONFIG_UINT32_INSTANCE_UNLOAD_DELAY,
CONFIG_UINT32_MAX_SPELL_CASTS_IN_CHAIN, CONFIG_UINT32_MAX_SPELL_CASTS_IN_CHAIN,
@ -168,7 +173,6 @@ enum eConfigUInt32Values
CONFIG_UINT32_BATTLEGROUND_QUEUE_ANNOUNCER_JOIN, CONFIG_UINT32_BATTLEGROUND_QUEUE_ANNOUNCER_JOIN,
CONFIG_UINT32_ARENA_MAX_RATING_DIFFERENCE, CONFIG_UINT32_ARENA_MAX_RATING_DIFFERENCE,
CONFIG_UINT32_ARENA_RATING_DISCARD_TIMER, CONFIG_UINT32_ARENA_RATING_DISCARD_TIMER,
CONFIG_UINT32_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS,
CONFIG_UINT32_ARENA_SEASON_ID, CONFIG_UINT32_ARENA_SEASON_ID,
CONFIG_UINT32_ARENA_SEASON_PREVIOUS_ID, CONFIG_UINT32_ARENA_SEASON_PREVIOUS_ID,
CONFIG_UINT32_CLIENTCACHE_VERSION, CONFIG_UINT32_CLIENTCACHE_VERSION,
@ -187,7 +191,6 @@ enum eConfigUInt32Values
CONFIG_UINT32_GUID_RESERVE_SIZE_CREATURE, CONFIG_UINT32_GUID_RESERVE_SIZE_CREATURE,
CONFIG_UINT32_GUID_RESERVE_SIZE_GAMEOBJECT, CONFIG_UINT32_GUID_RESERVE_SIZE_GAMEOBJECT,
CONFIG_UINT32_MIN_LEVEL_FOR_RAID, CONFIG_UINT32_MIN_LEVEL_FOR_RAID,
CONFIG_UINT32_CONQUEST_POINTS_DEFAULT_WEEK_CAP,
CONFIG_UINT32_VALUE_COUNT CONFIG_UINT32_VALUE_COUNT
}; };
@ -324,7 +327,6 @@ enum eConfigBoolValues
CONFIG_BOOL_SKILL_FAIL_POSSIBLE_FISHINGPOOL, CONFIG_BOOL_SKILL_FAIL_POSSIBLE_FISHINGPOOL,
CONFIG_BOOL_BATTLEGROUND_CAST_DESERTER, CONFIG_BOOL_BATTLEGROUND_CAST_DESERTER,
CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_START, CONFIG_BOOL_BATTLEGROUND_QUEUE_ANNOUNCER_START,
CONFIG_BOOL_ARENA_AUTO_DISTRIBUTE_POINTS,
CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_JOIN, CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_JOIN,
CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_EXIT, CONFIG_BOOL_ARENA_QUEUE_ANNOUNCER_EXIT,
CONFIG_BOOL_OUTDOORPVP_SI_ENABLED, CONFIG_BOOL_OUTDOORPVP_SI_ENABLED,
@ -594,9 +596,11 @@ class World
// callback for UpdateRealmCharacters // callback for UpdateRealmCharacters
void _UpdateRealmCharCount(QueryResult* resultCharCount, uint32 accountId); void _UpdateRealmCharCount(QueryResult* resultCharCount, uint32 accountId);
void InitCurrencyResetTime();
void InitDailyQuestResetTime(); void InitDailyQuestResetTime();
void InitWeeklyQuestResetTime(); void InitWeeklyQuestResetTime();
void SetMonthlyQuestResetTime(bool initialize = true); void SetMonthlyQuestResetTime(bool initialize = true);
void ResetCurrencyWeekCounts();
void ResetDailyQuests(); void ResetDailyQuests();
void ResetWeeklyQuests(); void ResetWeeklyQuests();
void ResetMonthlyQuests(); void ResetMonthlyQuests();
@ -664,7 +668,8 @@ class World
// CLI command holder to be thread safe // CLI command holder to be thread safe
ACE_Based::LockedQueue<CliCommandHolder*, ACE_Thread_Mutex> cliCmdQueue; ACE_Based::LockedQueue<CliCommandHolder*, ACE_Thread_Mutex> cliCmdQueue;
// next daily quests reset time // scheduled reset times
time_t m_NextCurrencyReset;
time_t m_NextDailyQuestReset; time_t m_NextDailyQuestReset;
time_t m_NextWeeklyQuestReset; time_t m_NextWeeklyQuestReset;
time_t m_NextMonthlyQuestReset; time_t m_NextMonthlyQuestReset;

View file

@ -537,18 +537,6 @@ LogColors = ""
# If you want to start with one silver, use for example 100 (100 copper = 1 silver) # If you want to start with one silver, use for example 100 (100 copper = 1 silver)
# Default: 0 # Default: 0
# #
# StartHonorPoints
# Amount of honor that new players will start with
# Default: 0
#
# StartConquestPoints
# Amount of conquest points that new players will start with
# Default: 0
#
# ConquestPointsDefaultWeekCap
# Amount of conquest points that player can earn per week
# Default: 135000 (with precision)
#
# InstantLogout # InstantLogout
# Enable or disable instant logout for security level (0..4) or high (NOT in combat/while dueling/while falling) # Enable or disable instant logout for security level (0..4) or high (NOT in combat/while dueling/while falling)
# Default: 1 (Mods/GMs/Admins) # Default: 1 (Mods/GMs/Admins)
@ -779,9 +767,6 @@ MaxPlayerLevel = 85
StartPlayerLevel = 1 StartPlayerLevel = 1
StartHeroicPlayerLevel = 55 StartHeroicPlayerLevel = 55
StartPlayerMoney = 0 StartPlayerMoney = 0
StartHonorPoints = 0
StartConquestPoints = 0
ConquestPointsDefaultWeekCap = 135000
InstantLogout = 1 InstantLogout = 1
DisableWaterBreath = 4 DisableWaterBreath = 4
AllFlightPaths = 0 AllFlightPaths = 0
@ -1484,15 +1469,6 @@ BattleGround.PremadeGroupWaitForMatch = 1800000
# Default: 600000 (10 minutes, recommended) # Default: 600000 (10 minutes, recommended)
# 0 (disable) # 0 (disable)
# #
# Arena.AutoDistributePoints
# Set if arena points should be distributed automatically, or by GM command
# Default: 0 (disable) (recommended): use gm command or sql query to distribute the points
# 1 (enable) arena points are distributed automatically
#
# Arena.AutoDistributeInterval
# How often should the distribution take place
# If automatic distribution is enabled in days
# Default: 7 (weekly)
# #
# Arena.QueueAnnouncer.Join # Arena.QueueAnnouncer.Join
# Enable arena queue announcer posting to chat at join # Enable arena queue announcer posting to chat at join
@ -1524,8 +1500,6 @@ BattleGround.PremadeGroupWaitForMatch = 1800000
Arena.MaxRatingDifference = 150 Arena.MaxRatingDifference = 150
Arena.RatingDiscardTimer = 600000 Arena.RatingDiscardTimer = 600000
Arena.AutoDistributePoints = 0
Arena.AutoDistributeInterval = 7
Arena.QueueAnnouncer.Join = 0 Arena.QueueAnnouncer.Join = 0
Arena.QueueAnnouncer.Exit = 0 Arena.QueueAnnouncer.Exit = 0
Arena.ArenaSeason.ID = 1 Arena.ArenaSeason.ID = 1
@ -1677,3 +1651,44 @@ SOAP.Port = 7878
CharDelete.Method = 0 CharDelete.Method = 0
CharDelete.MinLevel = 0 CharDelete.MinLevel = 0
CharDelete.KeepDays = 30 CharDelete.KeepDays = 30
###################################################################################################################
# CURRENCIES
#
# Currency.StartHonorPoints
# Amount of honor that new players will start with
# Default: 0 (with precision)
#
# Currency.StartConquestPoints
# Amount of conquest points that new players will start with
# Default: 0 (with precision)
#
# Currency.ResetInterval
# How often should currency week count reset (days)
# Default: 7 (weekly)
#
# Currency.ResetWeekDay
# Week day when currency week count is reset (0..6) 0 == Sunday
# Default: 3 (Wednesday)
#
# Currency.ResetHour
# Hour of a day when currency week count is reset (0..23)
# Default: 6
#
# Currency.ConquestPointsDefaultWeekCap
# Amount of conquest points that player can earn per week
# Default: 135000 (with precision)
#
# Currency.ConquestPointsArenaReward
# Amount of conquest points rewarded by winning arenas
# Default: 12000 (with precision)
#
###################################################################################################################
Currency.StartHonorPoints = 0
Currency.StartConquestPoints = 0
Currency.ResetInterval = 7
Currency.ResetWeekDay = 3
Currency.ResetHour = 6
Currency.ConquestPointsDefaultWeekCap = 135000
Currency.ConquestPointsArenaReward = 12000

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "12149" #define REVISION_NR "12150"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__ #ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__ #define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_12141_01_characters_character_currencies" #define REVISION_DB_CHARACTERS "required_12150_01_characters_saved_variables"
#define REVISION_DB_MANGOS "required_12141_02_mangos_mangos_command" #define REVISION_DB_MANGOS "required_12150_01_mangos_mangos_string"
#define REVISION_DB_REALMD "required_12112_01_realmd_account_access" #define REVISION_DB_REALMD "required_12112_01_realmd_account_access"
#endif // __REVISION_SQL_H__ #endif // __REVISION_SQL_H__