Changeset 34 for trunk/src

Show
Ignore:
Timestamp:
11/19/08 13:25:37 (17 years ago)
Author:
yumileroy
Message:

[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.

Original author: XTZGZoReX
Date: 2008-10-10 13:37:21-05:00

Location:
trunk/src
Files:
17 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/BattleGround.h

    r9 r34  
    3232    SOUND_HORDE_WINS                = 8454, 
    3333    SOUND_ALLIANCE_WINS             = 8455, 
    34     SOUND_BG_START                  = 3439 
     34    SOUND_BG_START                  = 3439, 
     35    SOUND_BG_START_L70ETC                       = 11803, 
    3536}; 
    3637 
  • trunk/src/game/BattleGroundAB.cpp

    r9 r34  
    2626#include "MapManager.h" 
    2727#include "Language.h" 
     28#include "World.h" 
    2829#include "Util.h" 
    2930 
     
    108109            DoorOpen(BG_AB_OBJECT_GATE_H); 
    109110 
    110             PlaySoundToAll(SOUND_BG_START); 
     111            if(sWorld.getConfig(CONFIG_BG_START_MUSIC)) 
     112                        { 
     113                                PlaySoundToAll(SOUND_BG_START); 
     114                                PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC 
     115                        } 
     116                        else 
     117                                PlaySoundToAll(SOUND_BG_START); 
    111118            SetStatus(STATUS_IN_PROGRESS); 
    112119 
  • trunk/src/game/BattleGroundEY.cpp

    r9 r34  
    2626#include "MapManager.h" 
    2727#include "Language.h" 
     28#include "World.h" 
    2829#include "Util.h" 
    2930 
     
    100101            SendMessageToAll(GetMangosString(LANG_BG_EY_BEGIN)); 
    101102 
    102             PlaySoundToAll(SOUND_BG_START); 
     103            if(sWorld.getConfig(CONFIG_BG_START_MUSIC)) 
     104            { 
     105                PlaySoundToAll(SOUND_BG_START); 
     106                PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC 
     107            } 
     108            else 
     109                PlaySoundToAll(SOUND_BG_START); 
    103110            SetStatus(STATUS_IN_PROGRESS); 
    104111 
  • trunk/src/game/BattleGroundWS.cpp

    r9 r34  
    2626#include "MapManager.h" 
    2727#include "Language.h" 
     28#include "World.h" 
    2829 
    2930BattleGroundWS::BattleGroundWS() 
     
    9899            SendMessageToAll(GetMangosString(LANG_BG_WS_BEGIN)); 
    99100 
    100             PlaySoundToAll(SOUND_BG_START); 
     101            if(sWorld.getConfig(CONFIG_BG_START_MUSIC)) 
     102            { 
     103                PlaySoundToAll(SOUND_BG_START); 
     104                PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC - Custom config 
     105            } 
     106            else 
     107                PlaySoundToAll(SOUND_BG_START); 
    101108            SetStatus(STATUS_IN_PROGRESS); 
    102109 
  • trunk/src/game/CharacterHandler.cpp

    r28 r34  
    733733        sWorld.ShutdownMsg(true,pCurrChar); 
    734734 
     735        if(sWorld.getConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when logging in 
     736                pCurrChar->UpdateSkillsToMaxSkillsForLevel(); 
     737 
     738        //ImpConfig - Check if player has logged in before 
     739        QueryResult *result = CharacterDatabase.PQuery("SELECT guid FROM has_logged_in_before WHERE guid = %u",pCurrChar->GetGUIDLow()); 
     740        if(!result) 
     741        { 
     742        sLog.outBasic("Character '%s' logging in for first time, applying skills and stuff",pCurrChar->GetName()); 
     743        CharacterDatabase.PExecute("INSERT INTO has_logged_in_before VALUES (%u)",pCurrChar->GetGUIDLow()); 
     744 
     745        //Reputations if "StartAllReputation" is enabled, -- TODO: Fix this in a better way 
     746        if(sWorld.getConfig(CONFIG_START_ALL_REP)) 
     747        { 
     748                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(942),42999); 
     749                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(935),42999); 
     750                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(936),42999); 
     751                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1011),42999); 
     752                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(970),42999); 
     753                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(967),42999); 
     754                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(989),42999); 
     755                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(932),42999); 
     756                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(934),42999); 
     757                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1038),42999); 
     758                pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1077),42999); 
     759 
     760                // Factions depending on team, like cities and some more stuff 
     761                switch(pCurrChar->GetTeam()) 
     762                { 
     763                case ALLIANCE: 
     764                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(72),42999); 
     765                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(47),42999); 
     766                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(69),42999); 
     767                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(930),42999); 
     768                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(730),42999); 
     769                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(978),42999); 
     770                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(54),42999); 
     771                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(946),42999); 
     772                        break; 
     773                case HORDE: 
     774                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(76),42999); 
     775                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(68),42999); 
     776                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(81),42999); 
     777                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(911),42999); 
     778                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(729),42999); 
     779                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(941),42999); 
     780                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(530),42999); 
     781                        pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(947),42999); 
     782                        break; 
     783                } 
     784        } 
     785        } 
     786        else 
     787                sLog.outBasic("Character '%s' has logged in before",pCurrChar->GetName()); 
     788 
     789        if(sWorld.getConfig(CONFIG_START_ALL_TAXI)) 
     790                pCurrChar->SetTaxiCheater(true); 
     791 
     792 
    735793    if(pCurrChar->isGameMaster()) 
    736794        SendNotification(LANG_GM_ON); 
  • trunk/src/game/MiscHandler.cpp

    r28 r34  
    296296    } 
    297297 
    298     //instant logout in taverns/cities or on taxi 
    299     if(GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight()) 
     298    //instant logout in taverns/cities or on taxi or if its enabled in mangosd.conf 
     299    if(GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() || sWorld.getConfig(CONFIG_INSTANT_LOGOUT)) 
    300300    { 
    301301        LogoutPlayer(true); 
     
    575575    if(newZone != _player->GetZoneId()) 
    576576        GetPlayer()->SendInitWorldStates();                 // only if really enters to new zone, not just area change, works strange... 
     577 
     578        // AntiCheat.GMIsland 
     579        if(sWorld.getConfig(CONFIG_KICK_FROM_GMISLAND)) 
     580        { 
     581                if(newZone == 876 && GetPlayer()->GetSession()->GetSecurity() == SEC_PLAYER) 
     582                        _player->TeleportTo(13,0,0,0,0); 
     583        } 
    577584 
    578585    GetPlayer()->UpdateZone(newZone); 
  • trunk/src/game/ObjectMgr.cpp

    r28 r34  
    20822082        QueryResult *result = WorldDatabase.Query("SELECT race, class, Spell, Active FROM playercreateinfo_spell"); 
    20832083 
     2084        QueryResult *result = NULL; 
     2085        if(sWorld.getConfig(CONFIG_START_ALL_SPELLS)) 
     2086                result = WorldDatabase.Query("SELECT race, class, Spell, Active FROM playercreateinfo_spell_custom"); 
     2087        else 
     2088                result = WorldDatabase.Query("SELECT race, class, Spell, Active FROM playercreateinfo_spell"); 
     2089 
    20842090        uint32 count = 0; 
    20852091 
     
    20902096            sLog.outString(); 
    20912097            sLog.outString( ">> Loaded %u player create spells", count ); 
    2092             sLog.outErrorDb( "Error loading `playercreateinfo_spell` table or empty table."); 
     2098            sLog.outErrorDb( "Error loading player starting spells or empty table."); 
    20932099        } 
    20942100        else 
  • trunk/src/game/Player.cpp

    r28 r34  
    579579 
    580580    // set starting level 
    581     SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_START_PLAYER_LEVEL) ); 
     581        if(GetSession()->GetSecurity() >= SEC_MODERATOR) 
     582                SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_GM_START_LEVEL) ); //ImpConfig 
     583        else 
     584                SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_START_PLAYER_LEVEL) ); 
     585        // set starting gold 
     586        SetUInt32Value( PLAYER_FIELD_COINAGE, sWorld.PlayerStartGold()*10000 ); 
     587 
     588        // set starting honor 
     589        SetUInt32Value( PLAYER_FIELD_HONOR_CURRENCY, sWorld.getConfig(CONFIG_PLAYER_START_HONOR) ); 
     590 
     591        // set starting arena pts 
     592        SetUInt32Value( PLAYER_FIELD_ARENA_CURRENCY, sWorld.getConfig(CONFIG_PLAYER_START_ARENAPTS) ); 
     593 
     594        // start with every map explored 
     595        if(sWorld.getConfig(CONFIG_START_ALL_EXPLORED)) 
     596        { 
     597                for (uint8 i=0; i<64; i++) 
     598                        SetFlag(PLAYER_EXPLORED_ZONES_1+i,0xFFFFFFFF); 
     599        } 
    582600 
    583601    // Played time 
     
    755773        return; 
    756774 
    757     //if have water breath , then remove bar 
    758     if(waterbreath || isGameMaster() || !isAlive()) 
     775    //if players is GM, have waterbreath, dead or breathing is disabled 
     776    if(sWorld.getConfig(CONFIG_DISABLE_BREATHING) || waterbreath || isGameMaster() || !isAlive()) 
    759777    { 
    760778        StopMirrorTimer(BREATH_TIMER); 
     
    21282146 
    21292147    UpdateAllStats(); 
     2148 
     2149    if(sWorld.getConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when leveling up 
     2150    UpdateSkillsToMaxSkillsForLevel(); 
    21302151 
    21312152    // set current level health and mana/energy to maximum after applying all mods. 
     
    36023623    CharacterDatabase.PExecute("DELETE FROM character_pet WHERE owner = '%u'",guid); 
    36033624    CharacterDatabase.PExecute("DELETE FROM character_pet_declinedname WHERE owner = '%u'",guid); 
     3625    CharacterDatabase.PExecute("DELETE FROM has_logged_in_before WHERE guid = %u",guid); 
    36043626    CharacterDatabase.CommitTransaction(); 
    36053627 
     
    37263748    DestroyZoneLimitedItem( true, GetZoneId()); 
    37273749 
    3728     if(!applySickness || getLevel() <= 10) 
     3750    if(sWorld.getConfig(CONFIG_DISABLE_RES_SICKNESS) || !applySickness || getLevel() <= 10) 
    37293751        return; 
    37303752 
     
    58985920///and the size of the group for which the honor is divided 
    58995921///An exact honor value can also be given (overriding the calcs) 
    5900 bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor) 
     5922bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvptoken) 
    59015923{ 
    59025924    // 'Inactive' this aura prevents the player from gaining honor points and battleground tokens 
     
    60176039 
    60186040    ApplyModUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, uint32(honor), true); 
     6041 
     6042        if( sWorld.getConfig(CONFIG_PVP_TOKEN_ENABLE) && pvptoken ) 
     6043        { 
     6044                if(!uVictim || uVictim == this || uVictim->HasAuraType(SPELL_AURA_NO_PVP_CREDIT)) 
     6045                        return true; 
     6046 
     6047                if(uVictim->GetTypeId() == TYPEID_PLAYER) 
     6048                { 
     6049                        // Check if allowed to receive it in current map 
     6050                        uint8 MapType = sWorld.getConfig(CONFIG_PVP_TOKEN_MAP_TYPE); 
     6051                        if(MapType == 1 && !InBattleGround() && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP) || MapType == 2 && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP) || MapType == 3 && !InBattleGround()) 
     6052                                return true; 
     6053 
     6054                        uint32 noSpaceForCount = 0; 
     6055                        uint32 itemId = sWorld.getConfig(CONFIG_PVP_TOKEN_ID); 
     6056                        int32 count = sWorld.getConfig(CONFIG_PVP_TOKEN_COUNT); 
     6057 
     6058                        // check space and find places 
     6059                        ItemPosCountVec dest; 
     6060                        uint8 msg = CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, itemId, count, &noSpaceForCount ); 
     6061                        if( msg != EQUIP_ERR_OK )   // convert to possible store amount 
     6062                                count = noSpaceForCount; 
     6063 
     6064                        if( count == 0 || dest.empty()) // can't add any 
     6065                        { 
     6066                                // -- TODO: Send to mailbox if no space 
     6067                                ChatHandler(this).PSendSysMessage("You don't have any space in your bags for a token."); 
     6068                                return true; 
     6069                        } 
     6070 
     6071                        Item* item = StoreNewItem( dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId)); 
     6072                        SendNewItem(item,count,true,false); 
     6073                        ChatHandler(this).PSendSysMessage("You have been awarded a token for slaying another player."); 
     6074                } 
     6075        } 
     6076 
    60196077    return true; 
    60206078} 
     
    63846442    else if(duel->opponent->GetComboTarget()==GetPetGUID()) 
    63856443        duel->opponent->ClearComboPoints(); 
     6444 
     6445        // Honor points after duel (the winner) - ImpConfig 
     6446        if(sWorld.getConfig(CONFIG_HONOR_AFTER_DUEL > 0)) 
     6447        { 
     6448                uint32 amount = sWorld.getConfig(CONFIG_HONOR_AFTER_DUEL); 
     6449                duel->opponent->RewardHonor(NULL,1,amount); 
     6450        } 
    63866451 
    63876452    //cleanups 
     
    78077872    data << uint64(guid); 
    78087873    data << uint32(resetTalentsCost()); 
     7874        if(sWorld.getConfig(CONFIG_NO_RESET_TALENT_COST)) 
     7875                data << uint32(0); 
     7876        else 
     7877                data << uint32(resetTalentsCost()); 
    78097878    GetSession()->SendPacket( &data ); 
    78107879} 
     
    1789617965 
    1789717966                // honor can be in PvP and !PvP (racial leader) cases (for alive) 
    17898                 if(pGroupGuy->isAlive() && pGroupGuy->RewardHonor(pVictim,count) && pGroupGuy==this) 
     17967                if(pGroupGuy->isAlive() && pGroupGuy->RewardHonor(pVictim,count, -1, true) && pGroupGuy==this) 
    1789917968                    honored_kill = true; 
    1790017969 
     
    1793418003 
    1793518004        // honor can be in PvP and !PvP (racial leader) cases 
    17936         if(RewardHonor(pVictim,1)) 
     18005        if(RewardHonor(pVictim,1, -1, true)) 
    1793718006            honored_kill = true; 
    1793818007 
  • trunk/src/game/Player.h

    r28 r34  
    17231723        void UpdateArenaFields(); 
    17241724        void UpdateHonorFields(); 
    1725         bool RewardHonor(Unit *pVictim, uint32 groupsize, float honor = -1); 
     1725        bool RewardHonor(Unit *pVictim, uint32 groupsize, float honor = -1, bool pvptoken = false); 
    17261726        uint32 GetHonorPoints() { return GetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY); } 
    17271727        uint32 GetArenaPoints() { return GetUInt32Value(PLAYER_FIELD_ARENA_CURRENCY); } 
  • trunk/src/game/World.cpp

    r28 r34  
    6363volatile uint32 World::m_worldLoopCounter = 0; 
    6464 
     65float World::m_PlayerStartGold = 0; // starting gold 
    6566float World::m_MaxVisibleDistanceForCreature  = DEFAULT_VISIBILITY_DISTANCE; 
    6667float World::m_MaxVisibleDistanceForPlayer    = DEFAULT_VISIBILITY_DISTANCE; 
     
    769770    m_configs[CONFIG_LISTEN_RANGE_YELL]      = sConfig.GetIntDefault("ListenRange.Yell", 300); 
    770771 
     772        m_PlayerStartGold = sConfig.GetFloatDefault("PlayerStart.Gold", 0); 
     773        if(m_PlayerStartGold < 0) 
     774                m_PlayerStartGold = 0; 
     775 
     776        if(m_PlayerStartGold > MAX_MONEY_AMOUNT) 
     777                m_PlayerStartGold = MAX_MONEY_AMOUNT; 
     778 
     779        m_configs[CONFIG_PLAYER_START_HONOR] = sConfig.GetIntDefault("PlayerStart.HonorPoints", 0); 
     780        if(m_configs[CONFIG_PLAYER_START_HONOR] < 0) 
     781                m_configs[CONFIG_PLAYER_START_HONOR] = 0; 
     782 
     783        m_configs[CONFIG_PLAYER_START_ARENAPTS] = sConfig.GetIntDefault("PlayerStart.ArenaPoints", 0); 
     784        if(m_configs[CONFIG_PLAYER_START_ARENAPTS] < 0) 
     785                m_configs[CONFIG_PLAYER_START_ARENAPTS] = 0; 
     786 
     787        m_configs[CONFIG_GM_START_LEVEL] = sConfig.GetIntDefault("GamemasterStartLevel", 70); 
     788        if(m_configs[CONFIG_GM_START_LEVEL] < 1) 
     789                m_configs[CONFIG_GM_START_LEVEL] = 1; 
     790 
     791        m_configs[CONFIG_INSTANT_LOGOUT] = sConfig.GetBoolDefault("PlayerInstantLogout", false); 
     792        m_configs[CONFIG_BG_START_MUSIC] = sConfig.GetBoolDefault("MusicInBattleground", false); 
     793        m_configs[CONFIG_START_ALL_SPELLS] = sConfig.GetBoolDefault("PlayerStart.AllSpells", false); 
     794        // Leaving GM queue option out for now, it's not 100% functional with the ACE patch 
     795        //m_configs[CONFIG_QUEUE_FOR_GM] = sConfig.GetBoolDefault("EnableQueueForGMs", false); 
     796        m_configs[CONFIG_HONOR_AFTER_DUEL] = sConfig.GetIntDefault("HonorPointsAfterDuel", 0); 
     797        if(m_configs[CONFIG_HONOR_AFTER_DUEL] < 0) 
     798                m_configs[CONFIG_HONOR_AFTER_DUEL]= 0; 
     799        m_configs[CONFIG_KICK_FROM_GMISLAND] = sConfig.GetBoolDefault("AntiCheat.GMIsland", false); 
     800        m_configs[CONFIG_START_ALL_EXPLORED] = sConfig.GetBoolDefault("PlayerStart.MapsExplored", false); 
     801        m_configs[CONFIG_DISABLE_BREATHING] = sConfig.GetBoolDefault("DisableWaterBreath", false); 
     802        m_configs[CONFIG_DISABLE_RES_SICKNESS] = sConfig.GetBoolDefault("DisableResurrectSickness", false); 
     803        m_configs[CONFIG_START_ALL_REP] = sConfig.GetBoolDefault("PlayerStart.AllReputation", false); 
     804        m_configs[CONFIG_ALWAYS_MAXSKILL] = sConfig.GetBoolDefault("AlwaysMaxWeaponSkill", false); 
     805        m_configs[CONFIG_START_ALL_TAXI] = sConfig.GetBoolDefault("PlayerStart.AllFlightPaths", false); 
     806        m_configs[CONFIG_PVP_TOKEN_ENABLE] = sConfig.GetBoolDefault("PvPToken.Enable", false); 
     807        m_configs[CONFIG_PVP_TOKEN_MAP_TYPE] = sConfig.GetIntDefault("PvPToken.MapAllowType", 4); 
     808        m_configs[CONFIG_PVP_TOKEN_ID] = sConfig.GetIntDefault("PvPToken.ItemID", 29434); 
     809        m_configs[CONFIG_PVP_TOKEN_COUNT] = sConfig.GetIntDefault("PvPToken.ItemCount", 1); 
     810        if(m_configs[CONFIG_PVP_TOKEN_COUNT] < 1) 
     811                m_configs[CONFIG_PVP_TOKEN_COUNT] = 1; 
     812        m_configs[CONFIG_NO_RESET_TALENT_COST] = sConfig.GetBoolDefault("NoResetTalentsCost", false); 
    771813 
    772814    m_configs[CONFIG_ARENA_MAX_RATING_DIFFERENCE] = sConfig.GetIntDefault("Arena.MaxRatingDifference", 0); 
  • trunk/src/game/World.h

    r28 r34  
    154154    CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP, 
    155155    CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE, 
     156 
     157        CONFIG_PLAYER_START_HONOR, 
     158        CONFIG_PLAYER_START_ARENAPTS, 
     159        CONFIG_GM_START_LEVEL, 
     160        CONFIG_INSTANT_LOGOUT, 
     161        CONFIG_BG_START_MUSIC, 
     162        CONFIG_START_ALL_SPELLS, 
     163        CONFIG_QUEUE_FOR_GM, 
     164        CONFIG_HONOR_AFTER_DUEL, 
     165        CONFIG_KICK_FROM_GMISLAND, 
     166        CONFIG_START_ALL_EXPLORED, 
     167        CONFIG_DISABLE_BREATHING, 
     168        CONFIG_DISABLE_RES_SICKNESS, 
     169        CONFIG_START_ALL_REP, 
     170        CONFIG_ALWAYS_MAXSKILL, 
     171        CONFIG_START_ALL_TAXI, 
     172        CONFIG_PVP_TOKEN_ENABLE, 
     173        CONFIG_PVP_TOKEN_MAP_TYPE, 
     174        CONFIG_PVP_TOKEN_ID, 
     175        CONFIG_PVP_TOKEN_COUNT, 
     176        CONFIG_NO_RESET_TALENT_COST, 
     177 
    156178    CONFIG_THREAT_RADIUS, 
    157179    CONFIG_DECLINED_NAMES_USED, 
     
    458480        bool IsScriptScheduled() const { return !m_scriptSchedule.empty(); } 
    459481 
     482        static float PlayerStartGold() { return m_PlayerStartGold; } 
     483 
    460484        // for max speed access 
    461485        static float GetMaxVisibleDistanceForCreature() { return m_MaxVisibleDistanceForCreature; } 
     
    513537        uint32 m_ShutdownMask; 
    514538 
     539        static float m_PlayerStartGold; 
     540 
    515541        // for max speed access 
    516542        static float m_MaxVisibleDistanceForCreature; 
  • trunk/src/game/WorldSession.cpp

    r28 r34  
    280280            // give honor to all attackers from set like group case 
    281281            for(std::set<Player*>::const_iterator itr = aset.begin(); itr != aset.end(); ++itr) 
    282                 (*itr)->RewardHonor(_player,aset.size()); 
     282                (*itr)->RewardHonor(_player, aset.size(), -1, true); 
    283283 
    284284            // give bg rewards and update counters like kill by first from attackers 
  • trunk/src/trinitycore/Master.cpp

    r6 r34  
    240240    loginDatabase.PExecute("UPDATE realmlist SET color = 0, population = 0 WHERE id = '%d'",realmID); 
    241241 
     242        // Create table: has_logged_in_before - used for certain custom options 
     243        sLog.outBasic("ImpConfig: Creating/Checking table 'has_logged_in_before'..."); 
     244        CharacterDatabase.PExecute("CREATE TABLE IF NOT EXISTS `has_logged_in_before` (`guid` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`guid`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='ImpConfig check';"); 
     245        sLog.outBasic("ImpConfig: Done..."); 
     246 
    242247#ifdef WIN32 
    243248    if (sConfig.GetBoolDefault("Console.Enable", true) && (m_ServiceStatus == -1)/* need disable console in service mode*/) 
  • trunk/src/trinitycore/trinitycore.conf.dist

    r33 r34  
    10751075Network.TcpNodelay = 1 
    10761076 
    1077  
     1077################################################################################################################### 
     1078# CUSTOM SERVER OPTIONS 
     1079# 
     1080#       PlayerStart.Gold 
     1081#               Amount of gold that new players will start with. 
     1082#               If you want to start with silver, use for example 0.1 (for 10s) 
     1083#               Default: 0 
     1084# 
     1085#       PlayerStart.HonorPoints 
     1086#               Amount of honor that new players will start with 
     1087#               Default: 0 
     1088# 
     1089#       PlayerStart.ArenaPoints 
     1090#               Amount of arena points that new players will start with 
     1091#               Default: 0 
     1092# 
     1093#       PlayerStart.AllReputation 
     1094#               Players will start with most of the high level reputations that are needed for items, mounts etc. 
     1095#               If there are any reputation faction you want to be added, just tell me. 
     1096# 
     1097#       PlayerStart.AllSpells 
     1098#               If enabled, players will start with all their class spells (not talents). Useful for instant 70 servers. 
     1099#               You must import playercreateinfo_spell_custom.sql, it's included in the SQL folder. 
     1100#               Default: 0 - off 
     1101#                                1 - on 
     1102# 
     1103#       PlayerStart.MapsExplored 
     1104#               Players will start with all maps explored if enabled 
     1105# 
     1106#       PlayerStart.AllFlightPaths 
     1107#               Players will start with all flight paths (Note: ALL flight paths, not only player's team) 
     1108# 
     1109#       AntiCheat.GMIsland 
     1110#               If a player enters GM island, he will get teleported away. This will prevent cheaters from buying GM stuff 
     1111#               on servers with a GM mall. GM's will not get teleported away. 
     1112# 
     1113#       GamemasterStartLevel 
     1114#               GM starting level 
     1115#               Default: 70 Min,max: 1 - 255 
     1116# 
     1117#       PlayerInstantLogout 
     1118#               Enable or disable instant logout for all players (NOT in combat/while dueling/while falling) 
     1119#               Default: 0 - off 
     1120#                               1 - on 
     1121# 
     1122#       MusicInBattleground 
     1123#               If enabled, "L70ETC - Power of the horde" will be played when BG starts ;) 
     1124# 
     1125#       EnableQueueForGMs 
     1126#      NOTE: This option currently does not work due to ACE patch 
     1127#               GMs will also be added to the login queue (not gmlvl 3+) if enabled. Useful for GM servers. 
     1128#               Default: 0 - off 
     1129#                                1 - on 
     1130# 
     1131#       HonorPointsAfterDuel 
     1132#               The amount of honor points the duel winner will get after a duel. 
     1133#               Default: 0 - disable 
     1134# 
     1135#       DisableWaterBreath 
     1136#               Disable/enable waterbreathing for players 
     1137# 
     1138#       DisableResurrectSickness 
     1139#               Players wont get any resurrect sickness when speaking with a spirit healer if this is enabled+ 
     1140# 
     1141#       AlwaysMaxWeaponSkill 
     1142#               Players will automatically gain max weapon/defense skill when logging in, leveling up etc. 
     1143# 
     1144#       PvPToken.Enable 
     1145#               Enable/disable PvP Token System. Players will get a token after slaying another player that gives honor. 
     1146# 
     1147#       PvPToken.MapAllowType 
     1148#               Where players can receive the pvp token 
     1149#               4 - In all maps 
     1150#               3 - In battlegrounds only 
     1151#               2 - In FFA areas only (gurubashi arena etc) 
     1152#               1 - In battlegrounds AND FFA areas only 
     1153# 
     1154#       PvPToken.ItemID 
     1155#               The item players will get after killing someone if PvP Token system is enabled. 
     1156#               Default: 29434 - Badge of justice 
     1157# 
     1158#       PvPToken.ItemCount 
     1159#               Modify the item ID count - Default: 1 
     1160# 
     1161#       NoResetTalentsCost 
     1162#               Enable or disable no cost when reseting talents 
     1163# 
     1164################################################################################################################### 
     1165 
     1166PlayerStart.Gold = 0 
     1167PlayerStart.HonorPoints = 0 
     1168PlayerStart.ArenaPoints = 0 
     1169PlayerStart.AllReputation = 0 
     1170PlayerStart.AllSpells = 0 
     1171PlayerStart.MapsExplored = 0 
     1172PlayerStart.AllFlightPaths = 0 
     1173AntiCheat.GMIsland = 0 
     1174GamemasterStartLevel = 70 
     1175PlayerInstantLogout = 0 
     1176MusicInBattleground = 0 
     1177EnableQueueForGMs = 0 
     1178HonorPointsAfterDuel = 0 
     1179DisableWaterBreath = 0 
     1180DisableResurrectSickness = 0 
     1181AlwaysMaxWeaponSkill = 0 
     1182PvPToken.Enable = 0 
     1183PvPToken.MapAllowType = 4 
     1184PvPToken.ItemID = 29434 
     1185PvPToken.ItemCount = 1 
     1186NoResetTalentsCost = 0 
  • trunk/src/trinityrealm/AuthCodes.h

    r2 r34  
    6969// will only support WoW and WoW:TBC 2.4.3 client build 8606... 
    7070 
    71 #define EXPECTED_MANGOS_CLIENT_BUILD        {8606, 0} 
     71//#define EXPECTED_MANGOS_CLIENT_BUILD        {8606, 0} // - commented as builds are set in config 
    7272 
    7373#endif 
  • trunk/src/trinityrealm/AuthSocket.cpp

    r2 r34  
    370370    ///- Check if the client has one of the expected version numbers 
    371371    bool valid_version=false; 
    372     int accepted_versions[]=EXPECTED_MANGOS_CLIENT_BUILD; 
    373     for(int i=0;accepted_versions[i];i++) 
    374         if(ch->build==accepted_versions[i]) 
    375     { 
     372        int MinBuild = sConfig.GetIntDefault("MinBuild", 8606); 
     373        int MaxBuild = sConfig.GetIntDefault("MaxBuild", 8606); 
     374 
     375        if(ch->build >= MinBuild && ch->build <= MaxBuild) 
    376376        valid_version=true; 
    377377        break; 
    378378    } 
     379    else 
     380        valid_version=false; 
    379381 
    380382    /// <ul><li> if this is a valid version 
  • trunk/src/trinityrealm/trinityrealm.conf.dist

    r33 r34  
    115115WrongPass.BanTime = 600 
    116116WrongPass.BanType = 0 
     117 
     118################################################################################################################### 
     119# CLIENT BUILD OPTIONS 
     120# 
     121#       Client Builds: 
     122# 
     123#       MinBuild 
     124#               The minium client build allowed to connect 
     125# 
     126#       MaxBuild 
     127#               The maximum client build allowed to connect 
     128# 
     129################################################################################################################### 
     130 
     131MinBuild = 8606 
     132MaxBuild = 8606