// Back to int now
honor = int32(honor_f);
// honor - for show honor points in log
@@ -15092,6 +15102,9 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
Unit::AuraEffectList const& ModXPPctAuras = GetAuraEffectsByType(SPELL_AURA_MOD_XP_QUEST_PCT);
for (Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin(); i != ModXPPctAuras.end(); ++i)
AddPctN(XP, (*i)->GetAmount());
if (GetSession()->IsPremium())
XP *= sWorld->getRate(RATE_XP_QUEST_PREMIUM);
int32 moneyRew = 0;
if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index 4faacc1..21503d1 100755
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -178,7 +178,8 @@ namespace Trinity
gain *= 2;
}
gain = uint32(gain * sWorld->getRate(RATE_XP_KILL));
// Check locked state for server
AccountTypes allowedAccountType = sWorld->GetPlayerSecurityLimit();
@@ -992,7 +1004,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
LoginDatabase.Execute(stmt);
// NOTE ATM the socket is single-threaded, have this in mind ...
From 3fd5a67867c883a3ceedb37a77c6d5ccab6f0f98 Mon Sep 17 00:00:00 2001 From: detonatorss zulhellwow@hotmail.com Date: Mon, 27 Feb 2012 14:56:08 +0100 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20sistema=20vip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
sql/updates/auth/Vip Account patch.sql | 8 ++++++++ src/server/authserver/Server/AuthSocket.cpp | 4 ++++ src/server/game/Entities/Player/Player.cpp | 17 +++++++++++++++-- src/server/game/Miscellaneous/Formulas.h | 3 ++- src/server/game/Server/WorldSession.cpp | 4 ++-- src/server/game/Server/WorldSession.h | 4 +++- src/server/game/Server/WorldSocket.cpp | 14 +++++++++++++- src/server/game/World/World.cpp | 7 +++++++ src/server/game/World/World.h | 4 ++++ .../Database/Implementation/LoginDatabase.cpp | 1 + .../shared/Database/Implementation/LoginDatabase.h | 1 + src/server/worldserver/worldserver.conf.dist | 18 ++++++++++++++++++ 12 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 sql/updates/auth/Vip Account patch.sql
diff --git a/sql/updates/auth/Vip Account patch.sql b/sql/updates/auth/Vip Account patch.sql new file mode 100644 index 0000000..df317ed --- /dev/null +++ b/sql/updates/auth/Vip Account patch.sql
@@ -0,0 +1,8 @@ +CREATE TABLE IF NOT EXISTS
account_premium
(id
int(11) NOT NULL default '0' COMMENT 'Account id',setdate
bigint(40) NOT NULL default '0',unsetdate
bigint(40) NOT NULL default '0',premium_type
tinyint(4) unsigned NOT NULL default '1',active
tinyint(4) NOT NULL default '1',PRIMARY KEY (
id
,setdate
) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Premium Accounts'; \ No newline at end of file diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index e1d77c6..84c82b8 100755 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -357,6 +357,10 @@ bool AuthSocket::_HandleLogonChallenge()// Verify that this IP is not in the ip_banned table LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS));
const std::string& ip_address = socket().getRemoteAddress(); PreparedStatement _stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP_BANNED); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index fffb1a6..b5abb8c 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -6872,7 +6872,9 @@ void Player::CheckAreaExploreAndOutdoor() { XP = uint32(sObjectMgr->GetBaseXP(p->area_level)_sWorld->getRate(RATE_XP_EXPLORE));
}
@@ -7242,7 +7244,15 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool pvpt AddPctN(honor_f, GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HONOR_GAIN_PCT)); }
// Back to int now honor = int32(honor_f); // honor - for show honor points in log @@ -15092,6 +15102,9 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, Unit::AuraEffectList const& ModXPPctAuras = GetAuraEffectsByType(SPELL_AURA_MOD_XP_QUEST_PCT); for (Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin(); i != ModXPPctAuras.end(); ++i) AddPctN(XP, (*i)->GetAmount());
int32 moneyRew = 0; if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index 4faacc1..21503d1 100755 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -178,7 +178,8 @@ namespace Trinity gain *= 2; }
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 211ca42..d071ddc 100755 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -88,9 +88,9 @@ bool WorldSessionFilter::Process(WorldPacket* packet) }
/// WorldSession constructor -WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter): +WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, bool ispremium,uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter): m_muteTime(mute_time), m_timeOutTime(0), _player(NULL), m_Socket(sock), -_security(sec), _accountId(id), m_expansion(expansion), _logoutTime(0), +_security(sec), _ispremium(ispremium),_accountId(id), m_expansion(expansion), _logoutTime(0), m_inQueue(false), m_playerLoading(false), m_playerLogout(false), m_playerRecentlyLogout(false), m_playerSave(false), m_sessionDbcLocale(sWorld->GetAvailableDbcLocale(locale)), diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index a18067f..0a2c6d1 100755 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -215,7 +215,7 @@ class CharacterCreateInfo class WorldSession { public:
@@ -243,6 +243,7 @@ class WorldSession void SendClientCacheVersion(uint32 version);
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 2c6098f..157aa5b 100755 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -778,6 +778,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) //uint8 expansion = 0; LocaleConstant locale; std::string account;
}
// Check locked state for server AccountTypes allowedAccountType = sWorld->GetPlayerSecurityLimit(); @@ -992,7 +1004,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) LoginDatabase.Execute(stmt);
// NOTE ATM the socket is single-threaded, have this in mind ...
ACE_NEW_RETURN (m_Session, WorldSession (id, this, AccountTypes(security), isPremium, expansion, mutetime, locale, recruiter, isRecruiter), -1);
m_Crypt.Init(&k);
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 45924db..31177ba 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -473,6 +473,13 @@ void World::LoadConfigSettings(bool reload) sLog->outError("Rate.RepairCost (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_REPAIRCOST]); rate_values[RATE_REPAIRCOST] = 0.0f; }
LOGIN_UPD_ACCOUNT_PREMIUM,
MAX_LOGINDATABASE_STATEMENTS, }; diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 7101341..7cc848b 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -2911,3 +2911,21 @@ PlayerDump.DisallowOverwrite = 1
+ +################################################################################################### +# VIP CONFIG +# +# Rate.XP.Kill.Premium +# Rate.XP.Quest.Premium +# Rate.XP.Explore.Premium +# Rate.Honor.Premium +# Descripcion: Modify Premium Rates. +# Default: 1 + +Rate.XP.Kill.Premium = 1 +Rate.XP.Quest.Premium = 1 +Rate.XP.Explore.Premium = 1 +Rate.Honor.Premium = 1 + +#
+
1.7.8.msysgit.0