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

[svn] * Merge Temp dev SVN with Assembla.
* Changes include:

  • Implementation of w12x's Outdoor PvP and Game Event Systems.
  • Temporary removal of IRC Chat Bot (until infinite loop when disabled is fixed).
  • All mangos -> trinity (to convert your mangos_string table, please run mangos_string_to_trinity_string.sql).
  • Improved Config cleanup.
  • And many more changes.

Original author: Seline
Date: 2008-10-14 11:57:03-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/MiscHandler.cpp

    r39 r44  
    11/* 
    2  * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 
     2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 
     3 * 
     4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 
    35 * 
    46 * This program is free software; you can redistribute it and/or modify 
     
    911 * This program is distributed in the hope that it will be useful, 
    1012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
    1214 * GNU General Public License for more details. 
    1315 * 
    1416 * You should have received a copy of the GNU General Public License 
    1517 * along with this program; if not, write to the Free Software 
    16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
    1719 */ 
    1820 
     
    3840#include "Object.h" 
    3941#include "BattleGround.h" 
     42#include "OutdoorPvP.h" 
    4043#include "SpellAuras.h" 
    4144#include "Pet.h" 
     
    143146    wstrToLower(wguild_name); 
    144147 
    145     // client send in case not set max level value 100 but mangos support 255 max level, 
     148    // client send in case not set max level value 100 but Trinity support 255 max level, 
    146149    // update it to show GMs with characters after 100 level 
    147150    if(level_max >= 100) 
     
    297300    } 
    298301 
    299     //instant logout in taverns/cities or on taxi or if its enabled in mangosd.conf 
     302    //instant logout in taverns/cities or on taxi or if its enabled in Trinityd.conf 
    300303    if(GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() || sWorld.getConfig(CONFIG_INSTANT_LOGOUT)) 
    301304    { 
     
    563566            GetPlayer()->pvpInfo.endTimer = time(NULL);     // start toggle-off 
    564567    } 
     568 
     569    if(OutdoorPvP * pvp = _player->GetOutdoorPvP()) 
     570    { 
     571        pvp->HandlePlayerActivityChanged(_player); 
     572    } 
    565573} 
    566574 
     
    574582    sLog.outDetail("WORLD: Recvd ZONE_UPDATE: %u", newZone); 
    575583 
    576     if(newZone != _player->GetZoneId()) 
    577         GetPlayer()->SendInitWorldStates();                 // only if really enters to new zone, not just area change, works strange... 
    578  
    579         // AntiCheat.GMIsland 
    580         if(sWorld.getConfig(CONFIG_KICK_FROM_GMISLAND)) 
    581         { 
    582                 if(newZone == 876 && GetPlayer()->GetSession()->GetSecurity() == SEC_PLAYER) 
    583                         _player->TeleportTo(13,0,0,0,0); 
    584         } 
    585  
    586584    GetPlayer()->UpdateZone(newZone); 
     585 
     586    GetPlayer()->SendInitWorldStates(true,newZone); 
    587587} 
    588588 
     
    649649    sLog.outDebug( "WORLD: Received CMSG_ADD_FRIEND" ); 
    650650 
    651     std::string friendName  = GetMangosString(LANG_FRIEND_IGNORE_UNKNOWN); 
     651    std::string friendName  = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN); 
    652652    std::string friendNote; 
    653653    FriendsResult friendResult = FRIEND_NOT_FOUND; 
     
    741741    sLog.outDebug( "WORLD: Received CMSG_ADD_IGNORE" ); 
    742742 
    743     std::string IgnoreName = GetMangosString(LANG_FRIEND_IGNORE_UNKNOWN); 
     743    std::string IgnoreName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN); 
    744744    FriendsResult ignoreResult = FRIEND_IGNORE_NOT_FOUND; 
    745745    uint64 IgnoreGuid = 0; 
     
    10211021    } 
    10221022 
     1023    if(OutdoorPvP * pvp = GetPlayer()->GetOutdoorPvP()) 
     1024    { 
     1025        if(pvp->HandleAreaTrigger(_player, Trigger_ID)) 
     1026            return; 
     1027    } 
     1028 
    10231029    // NULL if all values default (non teleport trigger) 
    10241030    AreaTrigger const* at = objmgr.GetAreaTrigger(Trigger_ID); 
     
    10641070            // TODO: all this is probably wrong 
    10651071            if(missingItem) 
    1066                 SendAreaTriggerMessage(GetMangosString(LANG_LEVEL_MINREQUIRED_AND_ITEM), at->requiredLevel, objmgr.GetItemPrototype(missingItem)->Name1); 
     1072                SendAreaTriggerMessage(GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), at->requiredLevel, objmgr.GetItemPrototype(missingItem)->Name1); 
    10671073            else if(missingKey) 
    10681074                GetPlayer()->SendTransferAborted(at->target_mapId, TRANSFER_ABORT_DIFFICULTY2); 
     
    10701076                SendAreaTriggerMessage(at->requiredFailedText.c_str()); 
    10711077            else if(missingLevel) 
    1072                 SendAreaTriggerMessage(GetMangosString(LANG_LEVEL_MINREQUIRED), missingLevel); 
     1078                SendAreaTriggerMessage(GetTrinityString(LANG_LEVEL_MINREQUIRED), missingLevel); 
    10731079            return; 
    10741080        } 
     
    11511157 
    11521158        /// TODO 
    1153         must be need use in mangos 
     1159        must be need use in Trinity 
    11541160        We substract server Lags to move time ( AntiLags ) 
    11551161        for exmaple