diff options
| author | XTZGZoReX <none@none> | 2008-10-10 13:37:21 -0500 |
|---|---|---|
| committer | XTZGZoReX <none@none> | 2008-10-10 13:37:21 -0500 |
| commit | 479fe8b767c833ae5055af31a800738ba8e597ad (patch) | |
| tree | 85c0f9a54fc581085702aa0916ecdf694b0b2b1d /src/game/CharacterHandler.cpp | |
| parent | ded2714f89267e10b99ba725353afefe37b71645 (diff) | |
[svn] * Removing useless data accidentally committed.
* Applying ImpConfig patch.
* Note: QUEUE_FOR_GM currently disabled as it's not compatible with the ACE patch. Anyone care to rewrite it?
* Note2: This is untested - I may have done some mistakes here and there. Will try to compile now.
--HG--
branch : trunk
Diffstat (limited to 'src/game/CharacterHandler.cpp')
| -rw-r--r-- | src/game/CharacterHandler.cpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index f6dc47e7b60..036de1e7399 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -732,6 +732,64 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder) if(sWorld.IsShutdowning())
sWorld.ShutdownMsg(true,pCurrChar);
+ if(sWorld.getConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when logging in
+ pCurrChar->UpdateSkillsToMaxSkillsForLevel();
+
+ //ImpConfig - Check if player has logged in before
+ QueryResult *result = CharacterDatabase.PQuery("SELECT guid FROM has_logged_in_before WHERE guid = %u",pCurrChar->GetGUIDLow());
+ if(!result)
+ {
+ sLog.outBasic("Character '%s' logging in for first time, applying skills and stuff",pCurrChar->GetName());
+ CharacterDatabase.PExecute("INSERT INTO has_logged_in_before VALUES (%u)",pCurrChar->GetGUIDLow());
+
+ //Reputations if "StartAllReputation" is enabled, -- TODO: Fix this in a better way
+ if(sWorld.getConfig(CONFIG_START_ALL_REP))
+ {
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(942),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(935),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(936),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1011),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(970),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(967),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(989),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(932),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(934),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1038),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1077),42999);
+
+ // Factions depending on team, like cities and some more stuff
+ switch(pCurrChar->GetTeam())
+ {
+ case ALLIANCE:
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(72),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(47),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(69),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(930),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(730),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(978),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(54),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(946),42999);
+ break;
+ case HORDE:
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(76),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(68),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(81),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(911),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(729),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(941),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(530),42999);
+ pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(947),42999);
+ break;
+ }
+ }
+ }
+ else
+ sLog.outBasic("Character '%s' has logged in before",pCurrChar->GetName());
+
+ if(sWorld.getConfig(CONFIG_START_ALL_TAXI))
+ pCurrChar->SetTaxiCheater(true);
+
+
if(pCurrChar->isGameMaster())
SendNotification(LANG_GM_ON);
|
