Changeset 44 for trunk/src/game/MiscHandler.cpp
- Timestamp:
- 11/19/08 13:27:40 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/MiscHandler.cpp
r39 r44 1 1 /* 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/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 … … 38 40 #include "Object.h" 39 41 #include "BattleGround.h" 42 #include "OutdoorPvP.h" 40 43 #include "SpellAuras.h" 41 44 #include "Pet.h" … … 143 146 wstrToLower(wguild_name); 144 147 145 // client send in case not set max level value 100 but mangossupport 255 max level,148 // client send in case not set max level value 100 but Trinity support 255 max level, 146 149 // update it to show GMs with characters after 100 level 147 150 if(level_max >= 100) … … 297 300 } 298 301 299 //instant logout in taverns/cities or on taxi or if its enabled in mangosd.conf302 //instant logout in taverns/cities or on taxi or if its enabled in Trinityd.conf 300 303 if(GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() || sWorld.getConfig(CONFIG_INSTANT_LOGOUT)) 301 304 { … … 563 566 GetPlayer()->pvpInfo.endTimer = time(NULL); // start toggle-off 564 567 } 568 569 if(OutdoorPvP * pvp = _player->GetOutdoorPvP()) 570 { 571 pvp->HandlePlayerActivityChanged(_player); 572 } 565 573 } 566 574 … … 574 582 sLog.outDetail("WORLD: Recvd ZONE_UPDATE: %u", newZone); 575 583 576 if(newZone != _player->GetZoneId())577 GetPlayer()->SendInitWorldStates(); // only if really enters to new zone, not just area change, works strange...578 579 // AntiCheat.GMIsland580 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 586 584 GetPlayer()->UpdateZone(newZone); 585 586 GetPlayer()->SendInitWorldStates(true,newZone); 587 587 } 588 588 … … 649 649 sLog.outDebug( "WORLD: Received CMSG_ADD_FRIEND" ); 650 650 651 std::string friendName = Get MangosString(LANG_FRIEND_IGNORE_UNKNOWN);651 std::string friendName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN); 652 652 std::string friendNote; 653 653 FriendsResult friendResult = FRIEND_NOT_FOUND; … … 741 741 sLog.outDebug( "WORLD: Received CMSG_ADD_IGNORE" ); 742 742 743 std::string IgnoreName = Get MangosString(LANG_FRIEND_IGNORE_UNKNOWN);743 std::string IgnoreName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN); 744 744 FriendsResult ignoreResult = FRIEND_IGNORE_NOT_FOUND; 745 745 uint64 IgnoreGuid = 0; … … 1021 1021 } 1022 1022 1023 if(OutdoorPvP * pvp = GetPlayer()->GetOutdoorPvP()) 1024 { 1025 if(pvp->HandleAreaTrigger(_player, Trigger_ID)) 1026 return; 1027 } 1028 1023 1029 // NULL if all values default (non teleport trigger) 1024 1030 AreaTrigger const* at = objmgr.GetAreaTrigger(Trigger_ID); … … 1064 1070 // TODO: all this is probably wrong 1065 1071 if(missingItem) 1066 SendAreaTriggerMessage(Get MangosString(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); 1067 1073 else if(missingKey) 1068 1074 GetPlayer()->SendTransferAborted(at->target_mapId, TRANSFER_ABORT_DIFFICULTY2); … … 1070 1076 SendAreaTriggerMessage(at->requiredFailedText.c_str()); 1071 1077 else if(missingLevel) 1072 SendAreaTriggerMessage(Get MangosString(LANG_LEVEL_MINREQUIRED), missingLevel);1078 SendAreaTriggerMessage(GetTrinityString(LANG_LEVEL_MINREQUIRED), missingLevel); 1073 1079 return; 1074 1080 } … … 1151 1157 1152 1158 /// TODO 1153 must be need use in mangos1159 must be need use in Trinity 1154 1160 We substract server Lags to move time ( AntiLags ) 1155 1161 for exmaple