Changeset 44 for trunk/src/game/Player.cpp
- Timestamp:
- 11/19/08 13:27:40 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Player.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 … … 54 56 #include "BattleGround.h" 55 57 #include "BattleGroundMgr.h" 58 #include "OutdoorPvP.h" 59 #include "OutdoorPvPMgr.h" 56 60 #include "ArenaTeam.h" 57 61 #include "Chat.h" … … 59 63 #include "Spell.h" 60 64 #include "SocialMgr.h" 61 #include " IRCClient.h"65 #include "GameEvent.h" 62 66 63 67 #include <cmath> … … 580 584 581 585 // set starting level 582 if(GetSession()->GetSecurity() >= SEC_MODERATOR) 583 SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_GM_START_LEVEL) ); //ImpConfig 584 else 585 SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_START_PLAYER_LEVEL) ); 586 // set starting gold 587 SetUInt32Value( PLAYER_FIELD_COINAGE, sWorld.PlayerStartGold()*10000 ); 588 589 // set starting honor 590 SetUInt32Value( PLAYER_FIELD_HONOR_CURRENCY, sWorld.getConfig(CONFIG_PLAYER_START_HONOR) ); 591 592 // set starting arena pts 593 SetUInt32Value( PLAYER_FIELD_ARENA_CURRENCY, sWorld.getConfig(CONFIG_PLAYER_START_ARENAPTS) ); 594 595 // start with every map explored 596 if(sWorld.getConfig(CONFIG_START_ALL_EXPLORED)) 597 { 598 for (uint8 i=0; i<64; i++) 599 SetFlag(PLAYER_EXPLORED_ZONES_1+i,0xFFFFFFFF); 600 } 586 if(GetSession()->GetSecurity() >= SEC_MODERATOR) 587 SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_GM_START_LEVEL) ); 588 else 589 SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_START_PLAYER_LEVEL) ); 590 // set starting gold 591 SetUInt32Value( PLAYER_FIELD_COINAGE, sWorld.getConfig(CONFIG_PLAYER_START_GOLD)*10000 ); 592 593 // set starting honor 594 SetUInt32Value( PLAYER_FIELD_HONOR_CURRENCY, sWorld.getConfig(CONFIG_PLAYER_START_HONOR) ); 595 596 // set starting arena pts 597 SetUInt32Value( PLAYER_FIELD_ARENA_CURRENCY, sWorld.getConfig(CONFIG_PLAYER_START_ARENAPTS) ); 598 599 // start with every map explored 600 if(sWorld.getConfig(CONFIG_START_ALL_EXPLORED)) 601 { 602 for (uint8 i=0; i<64; i++) 603 SetFlag(PLAYER_EXPLORED_ZONES_1+i,0xFFFFFFFF); 604 } 605 606 //Reputations if "StartAllReputation" is enabled, -- TODO: Fix this in a better way 607 if(sWorld.getConfig(CONFIG_START_ALL_REP)) 608 { 609 SetFactionReputation(sFactionStore.LookupEntry(942),42999); 610 SetFactionReputation(sFactionStore.LookupEntry(935),42999); 611 SetFactionReputation(sFactionStore.LookupEntry(936),42999); 612 SetFactionReputation(sFactionStore.LookupEntry(1011),42999); 613 SetFactionReputation(sFactionStore.LookupEntry(970),42999); 614 SetFactionReputation(sFactionStore.LookupEntry(967),42999); 615 SetFactionReputation(sFactionStore.LookupEntry(989),42999); 616 SetFactionReputation(sFactionStore.LookupEntry(932),42999); 617 SetFactionReputation(sFactionStore.LookupEntry(934),42999); 618 SetFactionReputation(sFactionStore.LookupEntry(1038),42999); 619 SetFactionReputation(sFactionStore.LookupEntry(1077),42999); 620 621 // Factions depending on team, like cities and some more stuff 622 switch(GetTeam()) 623 { 624 case ALLIANCE: 625 SetFactionReputation(sFactionStore.LookupEntry(72),42999); 626 SetFactionReputation(sFactionStore.LookupEntry(47),42999); 627 SetFactionReputation(sFactionStore.LookupEntry(69),42999); 628 SetFactionReputation(sFactionStore.LookupEntry(930),42999); 629 SetFactionReputation(sFactionStore.LookupEntry(730),42999); 630 SetFactionReputation(sFactionStore.LookupEntry(978),42999); 631 SetFactionReputation(sFactionStore.LookupEntry(54),42999); 632 SetFactionReputation(sFactionStore.LookupEntry(946),42999); 633 break; 634 case HORDE: 635 SetFactionReputation(sFactionStore.LookupEntry(76),42999); 636 SetFactionReputation(sFactionStore.LookupEntry(68),42999); 637 SetFactionReputation(sFactionStore.LookupEntry(81),42999); 638 SetFactionReputation(sFactionStore.LookupEntry(911),42999); 639 SetFactionReputation(sFactionStore.LookupEntry(729),42999); 640 SetFactionReputation(sFactionStore.LookupEntry(941),42999); 641 SetFactionReputation(sFactionStore.LookupEntry(530),42999); 642 SetFactionReputation(sFactionStore.LookupEntry(947),42999); 643 break; 644 default: 645 break; 646 } 647 } 601 648 602 649 // Played time … … 1453 1500 } 1454 1501 1502 if((GetSession()->GetSecurity() < SEC_GAMEMASTER) && !sWorld.IsAllowedMap(mapid)) 1503 { 1504 sLog.outError("Player %s tried to enter a forbidden map", GetName()); 1505 return false; 1506 } 1507 1455 1508 // preparing unsummon pet if lost (we must get pet before teleportation or will not find it later) 1456 1509 Pet* pet = GetPet(); … … 1718 1771 m_items[i]->AddToWorld(); 1719 1772 } 1720 if(sIRC.ajoin == 1)1721 sIRC.AutoJoinChannel(this);1722 1773 } 1723 1774 … … 1810 1861 if (recentCast) 1811 1862 { 1812 // MangosUpdates Mana in intervals of 2s, which is correct1863 // Trinity Updates Mana in intervals of 2s, which is correct 1813 1864 addvalue = GetFloatValue(PLAYER_FIELD_MOD_MANA_REGEN_INTERRUPT) * ManaIncreaseRate * 2.00f; 1814 1865 } … … 2130 2181 GetSession()->SendPacket(&data); 2131 2182 2132 SetUInt32Value(PLAYER_NEXT_LEVEL_XP, MaNGOS::XP::xp_to_level(level));2183 SetUInt32Value(PLAYER_NEXT_LEVEL_XP, Trinity::XP::xp_to_level(level)); 2133 2184 2134 2185 //update level, max level of skills … … 2150 2201 UpdateAllStats(); 2151 2202 2152 if((sIRC.BOTMASK & 64) != 0)2153 {2154 char temp [5];2155 sprintf(temp, "%u", level);2156 std::string plevel = temp;2157 std::string pname = GetName();2158 std::string ircchan = "#";2159 ircchan += sIRC._irc_chan[sIRC.Status].c_str();2160 sIRC.Send_IRC_Channel(ircchan, "\00311["+pname+"] : Has Reached Level: "+plevel, true);2161 }2162 2163 2203 if(sWorld.getConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when leveling up 2164 UpdateSkillsToMaxSkillsForLevel();2204 UpdateSkillsToMaxSkillsForLevel(); 2165 2205 2166 2206 // set current level health and mana/energy to maximum after applying all mods. … … 2221 2261 2222 2262 SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL) ); 2223 SetUInt32Value(PLAYER_NEXT_LEVEL_XP, MaNGOS::XP::xp_to_level(getLevel()));2263 SetUInt32Value(PLAYER_NEXT_LEVEL_XP, Trinity::XP::xp_to_level(getLevel())); 2224 2264 2225 2265 UpdateMaxSkills (); … … 3122 3162 uint32 cost = 0; 3123 3163 3124 if(!no_cost )3164 if(!no_cost && !sWorld.getConfig(CONFIG_NO_RESET_TALENT_COST)) 3125 3165 { 3126 3166 cost = resetTalentsCost(); … … 3637 3677 CharacterDatabase.PExecute("DELETE FROM character_pet WHERE owner = '%u'",guid); 3638 3678 CharacterDatabase.PExecute("DELETE FROM character_pet_declinedname WHERE owner = '%u'",guid); 3639 CharacterDatabase.PExecute("DELETE FROM has_logged_in_before WHERE guid = %u",guid);3640 3679 CharacterDatabase.CommitTransaction(); 3641 3680 … … 3762 3801 DestroyZoneLimitedItem( true, GetZoneId()); 3763 3802 3764 if( sWorld.getConfig(CONFIG_DISABLE_RES_SICKNESS) ||!applySickness || getLevel() <= 10)3803 if(!applySickness || getLevel() <= 10) 3765 3804 return; 3766 3805 … … 4835 4874 4836 4875 uint32 plevel = getLevel(); // if defense than pVictim == attacker 4837 uint32 greylevel = MaNGOS::XP::GetGrayLevel(plevel);4876 uint32 greylevel = Trinity::XP::GetGrayLevel(plevel); 4838 4877 uint32 moblevel = pVictim->getLevelForTarget(this); 4839 4878 if(moblevel < greylevel) … … 5216 5255 { 5217 5256 // prevent crash when a bad coord is sent by the client 5218 if(! MaNGOS::IsValidMapCoord(x,y,z,orientation))5257 if(!Trinity::IsValidMapCoord(x,y,z,orientation)) 5219 5258 { 5220 5259 sLog.outDebug("Player::SetPosition(%f, %f, %f, %f, %d) .. bad coordinates for player %d!",x,y,z,orientation,teleport,GetGUIDLow()); … … 5816 5855 { 5817 5856 // for grey creature kill received 20%, in other case 100. 5818 int32 percent = (!for_quest && (creatureOrQuestLevel <= MaNGOS::XP::GetGrayLevel(getLevel()))) ? 20 : 100;5857 int32 percent = (!for_quest && (creatureOrQuestLevel <= Trinity::XP::GetGrayLevel(getLevel()))) ? 20 : 100; 5819 5858 5820 5859 int32 repMod = GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN); … … 6054 6093 ApplyModUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, uint32(honor), true); 6055 6094 6056 if( sWorld.getConfig(CONFIG_PVP_TOKEN_ENABLE) && pvptoken ) 6057 { 6058 if(!uVictim || uVictim == this || uVictim->HasAuraType(SPELL_AURA_NO_PVP_CREDIT)) 6059 return true; 6060 6061 if(uVictim->GetTypeId() == TYPEID_PLAYER) 6062 { 6063 // Check if allowed to receive it in current map 6064 uint8 MapType = sWorld.getConfig(CONFIG_PVP_TOKEN_MAP_TYPE); 6065 if(MapType == 1 && !InBattleGround() && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP) || MapType == 2 && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP) || MapType == 3 && !InBattleGround()) 6066 return true; 6067 6068 uint32 noSpaceForCount = 0; 6069 uint32 itemId = sWorld.getConfig(CONFIG_PVP_TOKEN_ID); 6070 int32 count = sWorld.getConfig(CONFIG_PVP_TOKEN_COUNT); 6071 6072 // check space and find places 6073 ItemPosCountVec dest; 6074 uint8 msg = CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, itemId, count, &noSpaceForCount ); 6075 if( msg != EQUIP_ERR_OK ) // convert to possible store amount 6076 count = noSpaceForCount; 6077 6078 if( count == 0 || dest.empty()) // can't add any 6079 { 6080 // -- TODO: Send to mailbox if no space 6081 ChatHandler(this).PSendSysMessage("You don't have any space in your bags for a token."); 6082 return true; 6083 } 6084 6085 Item* item = StoreNewItem( dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId)); 6086 SendNewItem(item,count,true,false); 6087 ChatHandler(this).PSendSysMessage("You have been awarded a token for slaying another player."); 6088 } 6089 } 6095 if( sWorld.getConfig(CONFIG_PVP_TOKEN_ENABLE) && pvptoken ) 6096 { 6097 if(!uVictim || uVictim == this || uVictim->HasAuraType(SPELL_AURA_NO_PVP_CREDIT)) 6098 return true; 6099 6100 if(uVictim->GetTypeId() == TYPEID_PLAYER) 6101 { 6102 // Check if allowed to receive it in current map 6103 uint8 MapType = sWorld.getConfig(CONFIG_PVP_TOKEN_MAP_TYPE); 6104 if( (MapType == 1 && !InBattleGround() && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP)) 6105 || (MapType == 2 && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP)) 6106 || (MapType == 3 && !InBattleGround()) ) 6107 return true; 6108 6109 uint32 noSpaceForCount = 0; 6110 uint32 itemId = sWorld.getConfig(CONFIG_PVP_TOKEN_ID); 6111 int32 count = sWorld.getConfig(CONFIG_PVP_TOKEN_COUNT); 6112 6113 // check space and find places 6114 ItemPosCountVec dest; 6115 uint8 msg = CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, itemId, count, &noSpaceForCount ); 6116 if( msg != EQUIP_ERR_OK ) // convert to possible store amount 6117 count = noSpaceForCount; 6118 6119 if( count == 0 || dest.empty()) // can't add any 6120 { 6121 // -- TODO: Send to mailbox if no space 6122 ChatHandler(this).PSendSysMessage("You don't have any space in your bags for a token."); 6123 return true; 6124 } 6125 6126 Item* item = StoreNewItem( dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId)); 6127 SendNewItem(item,count,true,false); 6128 ChatHandler(this).PSendSysMessage("You have been awarded a token for slaying another player."); 6129 } 6130 } 6090 6131 6091 6132 return true; … … 6240 6281 void Player::UpdateZone(uint32 newZone) 6241 6282 { 6283 uint32 oldZoneId = m_zoneUpdateId; 6242 6284 m_zoneUpdateId = newZone; 6243 6285 m_zoneUpdateTimer = ZONE_UPDATE_INTERVAL; … … 6249 6291 if(!zone) 6250 6292 return; 6293 6294 // inform outdoor pvp 6295 if(oldZoneId != m_zoneUpdateId) 6296 { 6297 sOutdoorPvPMgr.HandlePlayerLeaveZone(this, oldZoneId); 6298 sOutdoorPvPMgr.HandlePlayerEnterZone(this, m_zoneUpdateId); 6299 } 6251 6300 6252 6301 if (sWorld.getConfig(CONFIG_WEATHER)) … … 6381 6430 } 6382 6431 } 6432 } 6433 6434 bool Player::IsOutdoorPvPActive() 6435 { 6436 return (isAlive() && !HasInvisibilityAura() && !HasStealthAura() && (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP) || sWorld.IsPvPRealm()) && !HasUnitMovementFlag(MOVEMENTFLAG_FLYING2) && !isInFlight()); 6383 6437 } 6384 6438 … … 6457 6511 duel->opponent->ClearComboPoints(); 6458 6512 6459 // Honor points after duel (the winner) - ImpConfig 6460 if(sWorld.getConfig(CONFIG_HONOR_AFTER_DUEL > 0)) 6461 { 6462 uint32 amount = sWorld.getConfig(CONFIG_HONOR_AFTER_DUEL); 6463 duel->opponent->RewardHonor(NULL,1,amount); 6464 } 6513 // Honor points after duel (the winner) - ImpConfig 6514 if(uint32 amount = sWorld.getConfig(CONFIG_HONOR_AFTER_DUEL)) 6515 duel->opponent->RewardHonor(NULL,1,amount); 6465 6516 6466 6517 //cleanups … … 7484 7535 } 7485 7536 7486 void Player::SendInitWorldStates( )7537 void Player::SendInitWorldStates(bool forceZone, uint32 forceZoneId) 7487 7538 { 7488 7539 // data depends on zoneid/mapid... … … 7490 7541 uint16 NumberOfFields = 0; 7491 7542 uint32 mapid = GetMapId(); 7492 uint32 zoneid = GetZoneId(); 7543 uint32 zoneid; 7544 if(forceZone) 7545 zoneid = forceZoneId; 7546 else 7547 zoneid = GetZoneId(); 7548 OutdoorPvP * pvp = sOutdoorPvPMgr.GetOutdoorPvPToZoneId(zoneid); 7493 7549 uint32 areaid = GetAreaId(); 7494 7550 sLog.outDebug("Sending SMSG_INIT_WORLD_STATES to Map:%u, Zone: %u", mapid, zoneid); … … 7515 7571 NumberOfFields = 6; 7516 7572 break; 7573 case 139: 7574 NumberOfFields = 39; 7575 break; 7576 case 1377: 7577 NumberOfFields = 13; 7578 break; 7517 7579 case 2597: 7518 7580 NumberOfFields = 81; … … 7526 7588 break; 7527 7589 case 3483: 7528 NumberOfFields = 22; 7590 NumberOfFields = 25; 7591 break; 7592 case 3518: 7593 NumberOfFields = 37; 7529 7594 break; 7530 7595 case 3519: … … 7575 7640 case 1537: 7576 7641 case 2257: 7642 break; 7643 case 139: // EPL 7644 { 7645 if(pvp && pvp->GetTypeId() == OUTDOOR_PVP_EP) 7646 pvp->FillInitialWorldStates(data); 7647 else 7648 { 7649 data << uint32(0x97a) << uint32(0x0); // 10 2426 7650 data << uint32(0x917) << uint32(0x0); // 11 2327 7651 data << uint32(0x918) << uint32(0x0); // 12 2328 7652 data << uint32(0x97b) << uint32(0x32); // 13 2427 7653 data << uint32(0x97c) << uint32(0x32); // 14 2428 7654 data << uint32(0x933) << uint32(0x1); // 15 2355 7655 data << uint32(0x946) << uint32(0x0); // 16 2374 7656 data << uint32(0x947) << uint32(0x0); // 17 2375 7657 data << uint32(0x948) << uint32(0x0); // 18 2376 7658 data << uint32(0x949) << uint32(0x0); // 19 2377 7659 data << uint32(0x94a) << uint32(0x0); // 20 2378 7660 data << uint32(0x94b) << uint32(0x0); // 21 2379 7661 data << uint32(0x932) << uint32(0x0); // 22 2354 7662 data << uint32(0x934) << uint32(0x0); // 23 2356 7663 data << uint32(0x935) << uint32(0x0); // 24 2357 7664 data << uint32(0x936) << uint32(0x0); // 25 2358 7665 data << uint32(0x937) << uint32(0x0); // 26 2359 7666 data << uint32(0x938) << uint32(0x0); // 27 2360 7667 data << uint32(0x939) << uint32(0x1); // 28 2361 7668 data << uint32(0x930) << uint32(0x1); // 29 2352 7669 data << uint32(0x93a) << uint32(0x0); // 30 2362 7670 data << uint32(0x93b) << uint32(0x0); // 31 2363 7671 data << uint32(0x93c) << uint32(0x0); // 32 2364 7672 data << uint32(0x93d) << uint32(0x0); // 33 2365 7673 data << uint32(0x944) << uint32(0x0); // 34 2372 7674 data << uint32(0x945) << uint32(0x0); // 35 2373 7675 data << uint32(0x931) << uint32(0x1); // 36 2353 7676 data << uint32(0x93e) << uint32(0x0); // 37 2366 7677 data << uint32(0x931) << uint32(0x1); // 38 2367 ?? grey horde not in dbc! send for consistency's sake, and to match field count 7678 data << uint32(0x940) << uint32(0x0); // 39 2368 7679 data << uint32(0x941) << uint32(0x0); // 7 2369 7680 data << uint32(0x942) << uint32(0x0); // 8 2370 7681 data << uint32(0x943) << uint32(0x0); // 9 2371 7682 } 7683 } 7684 break; 7685 case 1377: // Silithus 7686 { 7687 if(pvp && pvp->GetTypeId() == OUTDOOR_PVP_SI) 7688 pvp->FillInitialWorldStates(data); 7689 else 7690 { 7691 // states are always shown 7692 data << uint32(2313) << uint32(0x0); // 7 ally silityst gathered 7693 data << uint32(2314) << uint32(0x0); // 8 horde silityst gathered 7694 data << uint32(2317) << uint32(0x0); // 9 max silithyst 7695 } 7696 // dunno about these... aq opening event maybe? 7697 data << uint32(2322) << uint32(0x0); // 10 sandworm N 7698 data << uint32(2323) << uint32(0x0); // 11 sandworm S 7699 data << uint32(2324) << uint32(0x0); // 12 sandworm SW 7700 data << uint32(2325) << uint32(0x0); // 13 sandworm E 7701 } 7577 7702 break; 7578 7703 case 2597: // AV … … 7747 7872 } 7748 7873 break; 7874 // any of these needs change! the client remembers the prev setting! 7875 // ON EVERY ZONE LEAVE, RESET THE OLD ZONE'S WORLD STATE, BUT AT LEAST THE UI STUFF! 7749 7876 case 3483: // Hellfire Peninsula 7750 data << uint32(0x9ba) << uint32(0x1); // 10 7751 data << uint32(0x9b9) << uint32(0x1); // 11 7752 data << uint32(0x9b5) << uint32(0x0); // 12 7753 data << uint32(0x9b4) << uint32(0x1); // 13 7754 data << uint32(0x9b3) << uint32(0x0); // 14 7755 data << uint32(0x9b2) << uint32(0x0); // 15 7756 data << uint32(0x9b1) << uint32(0x1); // 16 7757 data << uint32(0x9b0) << uint32(0x0); // 17 7758 data << uint32(0x9ae) << uint32(0x0); // 18 horde pvp objectives captured 7759 data << uint32(0x9ac) << uint32(0x0); // 19 7760 data << uint32(0x9a8) << uint32(0x0); // 20 7761 data << uint32(0x9a7) << uint32(0x0); // 21 7762 data << uint32(0x9a6) << uint32(0x1); // 22 7877 { 7878 if(pvp && pvp->GetTypeId() == OUTDOOR_PVP_HP) 7879 pvp->FillInitialWorldStates(data); 7880 else 7881 { 7882 data << uint32(0x9ba) << uint32(0x1); // 10 // add ally tower main gui icon // maybe should be sent only on login? 7883 data << uint32(0x9b9) << uint32(0x1); // 11 // add horde tower main gui icon // maybe should be sent only on login? 7884 data << uint32(0x9b5) << uint32(0x0); // 12 // show neutral broken hill icon // 2485 7885 data << uint32(0x9b4) << uint32(0x1); // 13 // show icon above broken hill // 2484 7886 data << uint32(0x9b3) << uint32(0x0); // 14 // show ally broken hill icon // 2483 7887 data << uint32(0x9b2) << uint32(0x0); // 15 // show neutral overlook icon // 2482 7888 data << uint32(0x9b1) << uint32(0x1); // 16 // show the overlook arrow // 2481 7889 data << uint32(0x9b0) << uint32(0x0); // 17 // show ally overlook icon // 2480 7890 data << uint32(0x9ae) << uint32(0x0); // 18 // horde pvp objectives captured // 2478 7891 data << uint32(0x9ac) << uint32(0x0); // 19 // ally pvp objectives captured // 2476 7892 data << uint32(2475) << uint32(100); //: ally / horde slider grey area // show only in direct vicinity! 7893 data << uint32(2474) << uint32(50); //: ally / horde slider percentage, 100 for ally, 0 for horde // show only in direct vicinity! 7894 data << uint32(2473) << uint32(0); //: ally / horde slider display // show only in direct vicinity! 7895 data << uint32(0x9a8) << uint32(0x0); // 20 // show the neutral stadium icon // 2472 7896 data << uint32(0x9a7) << uint32(0x0); // 21 // show the ally stadium icon // 2471 7897 data << uint32(0x9a6) << uint32(0x1); // 22 // show the horde stadium icon // 2470 7898 } 7899 } 7900 break; 7901 case 3518: 7902 { 7903 if(pvp && pvp->GetTypeId() == OUTDOOR_PVP_NA) 7904 pvp->FillInitialWorldStates(data); 7905 else 7906 { 7907 data << uint32(2503) << uint32(0x0); // 10 7908 data << uint32(2502) << uint32(0x0); // 11 7909 data << uint32(2493) << uint32(0x0); // 12 7910 data << uint32(2491) << uint32(0x0); // 13 7911 7912 data << uint32(2495) << uint32(0x0); // 14 7913 data << uint32(2494) << uint32(0x0); // 15 7914 data << uint32(2497) << uint32(0x0); // 16 7915 7916 data << uint32(2762) << uint32(0x0); // 17 7917 data << uint32(2662) << uint32(0x0); // 18 7918 data << uint32(2663) << uint32(0x0); // 19 7919 data << uint32(2664) << uint32(0x0); // 20 7920 7921 data << uint32(2760) << uint32(0x0); // 21 7922 data << uint32(2670) << uint32(0x0); // 22 7923 data << uint32(2668) << uint32(0x0); // 23 7924 data << uint32(2669) << uint32(0x0); // 24 7925 7926 data << uint32(2761) << uint32(0x0); // 25 7927 data << uint32(2667) << uint32(0x0); // 26 7928 data << uint32(2665) << uint32(0x0); // 27 7929 data << uint32(2666) << uint32(0x0); // 28 7930 7931 data << uint32(2763) << uint32(0x0); // 29 7932 data << uint32(2659) << uint32(0x0); // 30 7933 data << uint32(2660) << uint32(0x0); // 31 7934 data << uint32(2661) << uint32(0x0); // 32 7935 7936 data << uint32(2671) << uint32(0x0); // 33 7937 data << uint32(2676) << uint32(0x0); // 34 7938 data << uint32(2677) << uint32(0x0); // 35 7939 data << uint32(2672) << uint32(0x0); // 36 7940 data << uint32(2673) << uint32(0x0); // 37 7941 } 7942 } 7763 7943 break; 7764 7944 case 3519: // Terokkar Forest 7765 data << uint32(0xa41) << uint32(0x0); // 10 7766 data << uint32(0xa40) << uint32(0x14); // 11 7767 data << uint32(0xa3f) << uint32(0x0); // 12 7768 data << uint32(0xa3e) << uint32(0x0); // 13 7769 data << uint32(0xa3d) << uint32(0x5); // 14 7770 data << uint32(0xa3c) << uint32(0x0); // 15 7771 data << uint32(0xa87) << uint32(0x0); // 16 7772 data << uint32(0xa86) << uint32(0x0); // 17 7773 data << uint32(0xa85) << uint32(0x0); // 18 7774 data << uint32(0xa84) << uint32(0x0); // 19 7775 data << uint32(0xa83) << uint32(0x0); // 20 7776 data << uint32(0xa82) << uint32(0x0); // 21 7777 data << uint32(0xa81) << uint32(0x0); // 22 7778 data << uint32(0xa80) << uint32(0x0); // 23 7779 data << uint32(0xa7e) << uint32(0x0); // 24 7780 data << uint32(0xa7d) << uint32(0x0); // 25 7781 data << uint32(0xa7c) << uint32(0x0); // 26 7782 data << uint32(0xa7b) << uint32(0x0); // 27 7783 data << uint32(0xa7a) << uint32(0x0); // 28 7784 data << uint32(0xa79) << uint32(0x0); // 29 7785 data << uint32(0x9d0) << uint32(0x5); // 30 7786 data << uint32(0x9ce) << uint32(0x0); // 31 7787 data << uint32(0x9cd) << uint32(0x0); // 32 7788 data << uint32(0x9cc) << uint32(0x0); // 33 7789 data << uint32(0xa88) << uint32(0x0); // 34 7790 data << uint32(0xad0) << uint32(0x0); // 35 7791 data << uint32(0xacf) << uint32(0x1); // 36 7945 { 7946 if(pvp && pvp->GetTypeId() == OUTDOOR_PVP_TF) 7947 pvp->FillInitialWorldStates(data); 7948 else 7949 { 7950 data << uint32(0xa41) << uint32(0x0); // 10 // 2625 capture bar pos 7951 data << uint32(0xa40) << uint32(0x14); // 11 // 2624 capture bar neutral 7952 data << uint32(0xa3f) << uint32(0x0); // 12 // 2623 show capture bar 7953 data << uint32(0xa3e) << uint32(0x0); // 13 // 2622 horde towers controlled 7954 data << uint32(0xa3d) << uint32(0x5); // 14 // 2621 ally towers controlled 7955 data << uint32(0xa3c) << uint32(0x0); // 15 // 2620 show towers controlled 7956 data << uint32(0xa88) << uint32(0x0); // 16 // 2696 SE Neu 7957 data << uint32(0xa87) << uint32(0x0); // 17 // SE Horde 7958 data << uint32(0xa86) << uint32(0x0); // 18 // SE Ally 7959 data << uint32(0xa85) << uint32(0x0); // 19 //S Neu 7960 data << uint32(0xa84) << uint32(0x0); // 20 S Horde 7961 data << uint32(0xa83) << uint32(0x0); // 21 S Ally 7962 data << uint32(0xa82) << uint32(0x0); // 22 NE Neu 7963 data << uint32(0xa81) << uint32(0x0); // 23 NE Horde 7964 data << uint32(0xa80) << uint32(0x0); // 24 NE Ally 7965 data << uint32(0xa7e) << uint32(0x0); // 25 // 2686 N Neu 7966 data << uint32(0xa7d) << uint32(0x0); // 26 N Horde 7967 data << uint32(0xa7c) << uint32(0x0); // 27 N Ally 7968 data << uint32(0xa7b) << uint32(0x0); // 28 NW Ally 7969 data << uint32(0xa7a) << uint32(0x0); // 29 NW Horde 7970 data << uint32(0xa79) << uint32(0x0); // 30 NW Neutral 7971 data << uint32(0x9d0) << uint32(0x5); // 31 // 2512 locked time remaining seconds first digit 7972 data << uint32(0x9ce) << uint32(0x0); // 32 // 2510 locked time remaining seconds second digit 7973 data << uint32(0x9cd) << uint32(0x0); // 33 // 2509 locked time remaining minutes 7974 data << uint32(0x9cc) << uint32(0x0); // 34 // 2508 neutral locked time show 7975 data << uint32(0xad0) << uint32(0x0); // 35 // 2768 horde locked time show 7976 data << uint32(0xacf) << uint32(0x1); // 36 // 2767 ally locked time show 7977 } 7978 } 7792 7979 break; 7793 7980 case 3521: // Zangarmarsh 7794 data << uint32(0x9e1) << uint32(0x0); // 10 7795 data << uint32(0x9e0) << uint32(0x0); // 11 7796 data << uint32(0x9df) << uint32(0x0); // 12 7797 data << uint32(0xa5d) << uint32(0x1); // 13 7798 data << uint32(0xa5c) << uint32(0x0); // 14 7799 data << uint32(0xa5b) << uint32(0x1); // 15 7800 data << uint32(0xa5a) << uint32(0x0); // 16 7801 data << uint32(0xa59) << uint32(0x1); // 17 7802 data << uint32(0xa58) << uint32(0x0); // 18 7803 data << uint32(0xa57) << uint32(0x0); // 19 7804 data << uint32(0xa56) << uint32(0x0); // 20 7805 data << uint32(0xa55) << uint32(0x1); // 21 7806 data << uint32(0xa54) << uint32(0x0); // 22 7807 data << uint32(0x9e7) << uint32(0x0); // 23 7808 data << uint32(0x9e6) << uint32(0x0); // 24 7809 data << uint32(0x9e5) << uint32(0x0); // 25 7810 data << uint32(0xa00) << uint32(0x0); // 26 7811 data << uint32(0x9ff) << uint32(0x1); // 27 7812 data << uint32(0x9fe) << uint32(0x0); // 28 7813 data << uint32(0x9fd) << uint32(0x0); // 29 7814 data << uint32(0x9fc) << uint32(0x1); // 30 7815 data << uint32(0x9fb) << uint32(0x0); // 31 7816 data << uint32(0xa62) << uint32(0x0); // 32 7817 data << uint32(0xa61) << uint32(0x1); // 33 7818 data << uint32(0xa60) << uint32(0x1); // 34 7819 data << uint32(0xa5f) << uint32(0x0); // 35 7981 { 7982 if(pvp && pvp->GetTypeId() == OUTDOOR_PVP_ZM) 7983 pvp->FillInitialWorldStates(data); 7984 else 7985 { 7986 data << uint32(0x9e1) << uint32(0x0); // 10 //2529 7987 data << uint32(0x9e0) << uint32(0x0); // 11 7988 data << uint32(0x9df) << uint32(0x0); // 12 7989 data << uint32(0xa5d) << uint32(0x1); // 13 //2653 7990 data << uint32(0xa5c) << uint32(0x0); // 14 //2652 east beacon neutral 7991 data << uint32(0xa5b) << uint32(0x1); // 15 horde 7992 data << uint32(0xa5a) << uint32(0x0); // 16 ally 7993 data << uint32(0xa59) << uint32(0x1); // 17 // 2649 Twin spire graveyard horde 12??? 7994 data << uint32(0xa58) << uint32(0x0); // 18 ally 14 ??? 7995 data << uint32(0xa57) << uint32(0x0); // 19 neutral 7??? 7996 data << uint32(0xa56) << uint32(0x0); // 20 // 2646 west beacon neutral 7997 data << uint32(0xa55) << uint32(0x1); // 21 horde 7998 data << uint32(0xa54) << uint32(0x0); // 22 ally 7999 data << uint32(0x9e7) << uint32(0x0); // 23 // 2535 8000 data << uint32(0x9e6) << uint32(0x0); // 24 8001 data << uint32(0x9e5) << uint32(0x0); // 25 8002 data << uint32(0xa00) << uint32(0x0); // 26 // 2560 8003 data << uint32(0x9ff) << uint32(0x1); // 27 8004 data << uint32(0x9fe) << uint32(0x0); // 28 8005 data << uint32(0x9fd) << uint32(0x0); // 29 8006 data << uint32(0x9fc) << uint32(0x1); // 30 8007 data << uint32(0x9fb) << uint32(0x0); // 31 8008 data << uint32(0xa62) << uint32(0x0); // 32 // 2658 8009 data << uint32(0xa61) << uint32(0x1); // 33 8010 data << uint32(0xa60) << uint32(0x1); // 34 8011 data << uint32(0xa5f) << uint32(0x0); // 35 8012 } 8013 } 7820 8014 break; 7821 8015 case 3698: // Nagrand Arena … … 7885 8079 WorldPacket data(MSG_TALENT_WIPE_CONFIRM, (8+4)); 7886 8080 data << uint64(guid); 7887 data << uint32(resetTalentsCost()); 7888 if(sWorld.getConfig(CONFIG_NO_RESET_TALENT_COST)) 7889 data << uint32(0); 7890 else 7891 data << uint32(resetTalentsCost()); 8081 uint32 cost = sWorld.getConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : resetTalentsCost(); 8082 data << cost; 8083 data << cost; 7892 8084 GetSession()->SendPacket( &data ); 7893 8085 } … … 11908 12100 { 11909 12101 11910 if ( qInfo->HasFlag( QUEST_ MANGOS_FLAGS_DELIVER ) )12102 if ( qInfo->HasFlag( QUEST_TRINITY_FLAGS_DELIVER ) ) 11911 12103 { 11912 12104 for(int i = 0; i < QUEST_OBJECTIVES_COUNT; i++) … … 11917 12109 } 11918 12110 11919 if ( qInfo->HasFlag(QUEST_ MANGOS_FLAGS_KILL_OR_CAST | QUEST_MANGOS_FLAGS_SPEAKTO) )12111 if ( qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST | QUEST_TRINITY_FLAGS_SPEAKTO) ) 11920 12112 { 11921 12113 for(int i = 0; i < QUEST_OBJECTIVES_COUNT; i++) … … 11929 12121 } 11930 12122 11931 if ( qInfo->HasFlag( QUEST_ MANGOS_FLAGS_EXPLORATION_OR_EVENT ) && !q_status.m_explored )12123 if ( qInfo->HasFlag( QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT ) && !q_status.m_explored ) 11932 12124 return false; 11933 12125 11934 if ( qInfo->HasFlag( QUEST_ MANGOS_FLAGS_TIMED ) && q_status.m_timer == 0 )12126 if ( qInfo->HasFlag( QUEST_TRINITY_FLAGS_TIMED ) && q_status.m_timer == 0 ) 11935 12127 return false; 11936 12128 … … 11959 12151 return false; 11960 12152 11961 if (pQuest->HasFlag( QUEST_ MANGOS_FLAGS_DELIVER) )12153 if (pQuest->HasFlag( QUEST_TRINITY_FLAGS_DELIVER) ) 11962 12154 for(int i = 0; i < QUEST_OBJECTIVES_COUNT; i++) 11963 12155 if( pQuest->ReqItemId[i] && pQuest->ReqItemCount[i] && !HasItemCount(pQuest->ReqItemId[i],pQuest->ReqItemCount[i]) ) … … 11985 12177 11986 12178 // prevent receive reward with quest items in bank 11987 if ( pQuest->HasFlag( QUEST_ MANGOS_FLAGS_DELIVER ) )12179 if ( pQuest->HasFlag( QUEST_TRINITY_FLAGS_DELIVER ) ) 11988 12180 { 11989 12181 for(int i = 0; i < QUEST_OBJECTIVES_COUNT; i++) … … 12062 12254 questStatusData.m_explored = false; 12063 12255 12064 if ( pQuest->HasFlag( QUEST_ MANGOS_FLAGS_DELIVER ) )12256 if ( pQuest->HasFlag( QUEST_TRINITY_FLAGS_DELIVER ) ) 12065 12257 { 12066 12258 for(int i = 0; i < QUEST_OBJECTIVES_COUNT; i++) … … 12068 12260 } 12069 12261 12070 if ( pQuest->HasFlag(QUEST_ MANGOS_FLAGS_KILL_OR_CAST | QUEST_MANGOS_FLAGS_SPEAKTO) )12262 if ( pQuest->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST | QUEST_TRINITY_FLAGS_SPEAKTO) ) 12071 12263 { 12072 12264 for(int i = 0; i < QUEST_OBJECTIVES_COUNT; i++) … … 12081 12273 12082 12274 uint32 qtime = 0; 12083 if( pQuest->HasFlag( QUEST_ MANGOS_FLAGS_TIMED ) )12275 if( pQuest->HasFlag( QUEST_TRINITY_FLAGS_TIMED ) ) 12084 12276 { 12085 12277 uint32 limittime = pQuest->GetLimitTime(); … … 12545 12737 bool Player::SatisfyQuestTimed( Quest const* qInfo, bool msg ) 12546 12738 { 12547 if ( (find(m_timedquests.begin(), m_timedquests.end(), qInfo->GetQuestId()) != m_timedquests.end()) && qInfo->HasFlag(QUEST_ MANGOS_FLAGS_TIMED) )12739 if ( (find(m_timedquests.begin(), m_timedquests.end(), qInfo->GetQuestId()) != m_timedquests.end()) && qInfo->HasFlag(QUEST_TRINITY_FLAGS_TIMED) ) 12548 12740 { 12549 12741 if( msg ) … … 12770 12962 if( status == QUEST_STATUS_NONE || status == QUEST_STATUS_INCOMPLETE || status == QUEST_STATUS_COMPLETE ) 12771 12963 { 12772 if( qInfo->HasFlag( QUEST_ MANGOS_FLAGS_TIMED ) )12964 if( qInfo->HasFlag( QUEST_TRINITY_FLAGS_TIMED ) ) 12773 12965 m_timedquests.erase(qInfo->GetQuestId()); 12774 12966 } … … 12783 12975 } 12784 12976 12785 // not used in MaNGOS, but used in scripting code12977 // not used in TrinIty, but used in scripting code 12786 12978 uint32 Player::GetReqKillOrCastCurrentCount(uint32 quest_id, int32 entry) 12787 12979 { … … 12799 12991 void Player::AdjustQuestReqItemCount( Quest const* pQuest ) 12800 12992 { 12801 if ( pQuest->HasFlag( QUEST_ MANGOS_FLAGS_DELIVER ) )12993 if ( pQuest->HasFlag( QUEST_TRINITY_FLAGS_DELIVER ) ) 12802 12994 { 12803 12995 for(int i = 0; i < QUEST_OBJECTIVES_COUNT; i++) … … 12847 13039 } 12848 13040 12849 //not used in mangosd, function for external script library13041 //not used in Trinityd, function for external script library 12850 13042 void Player::GroupEventHappens( uint32 questId, WorldObject const* pEventObject ) 12851 13043 { … … 12879 13071 12880 13072 Quest const* qInfo = objmgr.GetQuestTemplate(questid); 12881 if( !qInfo || !qInfo->HasFlag( QUEST_ MANGOS_FLAGS_DELIVER ) )13073 if( !qInfo || !qInfo->HasFlag( QUEST_TRINITY_FLAGS_DELIVER ) ) 12882 13074 continue; 12883 13075 … … 12916 13108 if ( !qInfo ) 12917 13109 continue; 12918 if( !qInfo->HasFlag( QUEST_ MANGOS_FLAGS_DELIVER ) )13110 if( !qInfo->HasFlag( QUEST_TRINITY_FLAGS_DELIVER ) ) 12919 13111 continue; 12920 13112 … … 12963 13155 if( q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->GetType() == QUEST_TYPE_RAID)) 12964 13156 { 12965 if( qInfo->HasFlag( QUEST_ MANGOS_FLAGS_KILL_OR_CAST) )13157 if( qInfo->HasFlag( QUEST_TRINITY_FLAGS_KILL_OR_CAST) ) 12966 13158 { 12967 13159 for (int j = 0; j < QUEST_OBJECTIVES_COUNT; j++) … … 13019 13211 if ( q_status.m_status == QUEST_STATUS_INCOMPLETE ) 13020 13212 { 13021 if( qInfo->HasFlag( QUEST_ MANGOS_FLAGS_KILL_OR_CAST ) )13213 if( qInfo->HasFlag( QUEST_TRINITY_FLAGS_KILL_OR_CAST ) ) 13022 13214 { 13023 13215 for (int j = 0; j < QUEST_OBJECTIVES_COUNT; j++) … … 13086 13278 if ( q_status.m_status == QUEST_STATUS_INCOMPLETE ) 13087 13279 { 13088 if( qInfo->HasFlag( QUEST_ MANGOS_FLAGS_KILL_OR_CAST | QUEST_MANGOS_FLAGS_SPEAKTO ) )13280 if( qInfo->HasFlag( QUEST_TRINITY_FLAGS_KILL_OR_CAST | QUEST_TRINITY_FLAGS_SPEAKTO ) ) 13089 13281 { 13090 13282 for (int j = 0; j < QUEST_OBJECTIVES_COUNT; j++) … … 13226 13418 uint32 questid = pQuest->GetQuestId(); 13227 13419 sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid ); 13420 gameeventmgr.HandleQuestComplete(questid); 13228 13421 WorldPacket data( SMSG_QUESTGIVER_QUEST_COMPLETE, (4+4+4+4+4+4+pQuest->GetRewItemsCount()*8) ); 13229 13422 data << questid; … … 13609 13802 m_movementInfo.t_o = fields[23].GetFloat(); 13610 13803 13611 if( ! MaNGOS::IsValidMapCoord(13804 if( !Trinity::IsValidMapCoord( 13612 13805 GetPositionX()+m_movementInfo.t_x,GetPositionY()+m_movementInfo.t_y, 13613 13806 GetPositionZ()+m_movementInfo.t_z,GetOrientation()+m_movementInfo.t_o) || … … 14223 14416 } 14224 14417 14225 std::string subject = GetSession()->Get MangosString(LANG_NOT_EQUIPPED_ITEM);14418 std::string subject = GetSession()->GetTrinityString(LANG_NOT_EQUIPPED_ITEM); 14226 14419 14227 14420 WorldSession::SendMailTo(this, MAIL_NORMAL, MAIL_STATIONERY_GM, GetGUIDLow(), GetGUIDLow(), subject, 0, &mi, 0, 0, MAIL_CHECK_MASK_NONE); … … 14388 14581 time_t quest_time = time_t(fields[4].GetUInt64()); 14389 14582 14390 if( pQuest->HasFlag( QUEST_ MANGOS_FLAGS_TIMED ) && !GetQuestRewardStatus(quest_id) && questStatusData.m_status != QUEST_STATUS_NONE )14583 if( pQuest->HasFlag( QUEST_TRINITY_FLAGS_TIMED ) && !GetQuestRewardStatus(quest_id) && questStatusData.m_status != QUEST_STATUS_NONE ) 14391 14584 { 14392 14585 AddTimedQuest( quest_id ); … … 16213 16406 std::list<Unit*> stealthedUnits; 16214 16407 16215 CellPair p( MaNGOS::ComputeCellPair(GetPositionX(),GetPositionY()));16408 CellPair p(Trinity::ComputeCellPair(GetPositionX(),GetPositionY())); 16216 16409 Cell cell(p); 16217 16410 cell.data.Part.reserved = ALL_DISTRICT; 16218 16411 cell.SetNoCreate(); 16219 16412 16220 MaNGOS::AnyStealthedCheck u_check;16221 MaNGOS::UnitListSearcher<MaNGOS::AnyStealthedCheck > searcher(stealthedUnits, u_check);16222 16223 TypeContainerVisitor< MaNGOS::UnitListSearcher<MaNGOS::AnyStealthedCheck >, WorldTypeMapContainer > world_unit_searcher(searcher);16224 TypeContainerVisitor< MaNGOS::UnitListSearcher<MaNGOS::AnyStealthedCheck >, GridTypeMapContainer > grid_unit_searcher(searcher);16413 Trinity::AnyStealthedCheck u_check; 16414 Trinity::UnitListSearcher<Trinity::AnyStealthedCheck > searcher(stealthedUnits, u_check); 16415 16416 TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyStealthedCheck >, WorldTypeMapContainer > world_unit_searcher(searcher); 16417 TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyStealthedCheck >, GridTypeMapContainer > grid_unit_searcher(searcher); 16225 16418 16226 16419 CellLock<GridReadGuard> cell_lock(cell, p); … … 16242 16435 m_clientGUIDs.insert((*i)->GetGUID()); 16243 16436 16244 #ifdef MANGOS_DEBUG16437 #ifdef TRINITY_DEBUG 16245 16438 if((sLog.getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES)==0) 16246 16439 sLog.outDebug("Object %u (Type: %u) is detected in stealth by player %u. Distance = %f",(*i)->GetGUIDLow(),(*i)->GetTypeId(),GetGUIDLow(),GetDistance(*i)); … … 17105 17298 m_clientGUIDs.erase(target->GetGUID()); 17106 17299 17107 #ifdef MANGOS_DEBUG17300 #ifdef TRINITY_DEBUG 17108 17301 if((sLog.getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES)==0) 17109 17302 sLog.outDebug("Object %u (Type: %u) out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target)); … … 17119 17312 m_clientGUIDs.insert(target->GetGUID()); 17120 17313 17121 #ifdef MANGOS_DEBUG17314 #ifdef TRINITY_DEBUG 17122 17315 if((sLog.getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES)==0) 17123 17316 sLog.outDebug("Object %u (Type: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target)); … … 17158 17351 m_clientGUIDs.erase(target->GetGUID()); 17159 17352 17160 #ifdef MANGOS_DEBUG17353 #ifdef TRINITY_DEBUG 17161 17354 if((sLog.getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES)==0) 17162 17355 sLog.outDebug("Object %u (Type: %u, Entry: %u) is out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target)); … … 17173 17366 UpdateVisibilityOf_helper(m_clientGUIDs,target); 17174 17367 17175 #ifdef MANGOS_DEBUG17368 #ifdef TRINITY_DEBUG 17176 17369 if((sLog.getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES)==0) 17177 17370 sLog.outDebug("Object %u (Type: %u, Entry: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target)); … … 17822 18015 } 17823 18016 18017 OutdoorPvP * Player::GetOutdoorPvP() const 18018 { 18019 return sOutdoorPvPMgr.GetOutdoorPvPToZoneId(GetZoneId()); 18020 } 18021 17824 18022 bool Player::HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item const* ignoreItem) 17825 18023 { … … 17962 18160 if(member_with_max_level) 17963 18161 { 17964 xp = PvP ? 0 : MaNGOS::XP::Gain(member_with_max_level, pVictim);18162 xp = PvP ? 0 : Trinity::XP::Gain(member_with_max_level, pVictim); 17965 18163 17966 18164 // skip in check PvP case (for speed, not used) 17967 18165 bool is_raid = PvP ? false : sMapStore.LookupEntry(GetMapId())->IsRaid() && pGroup->isRaidGroup(); 17968 18166 bool is_dungeon = PvP ? false : sMapStore.LookupEntry(GetMapId())->IsDungeon(); 17969 float group_rate = MaNGOS::XP::xp_in_group_rate(count,is_raid);18167 float group_rate = Trinity::XP::xp_in_group_rate(count,is_raid); 17970 18168 17971 18169 for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) … … 18014 18212 else // if (!pGroup) 18015 18213 { 18016 xp = PvP ? 0 : MaNGOS::XP::Gain(this, pVictim);18214 xp = PvP ? 0 : Trinity::XP::Gain(this, pVictim); 18017 18215 18018 18216 // honor can be in PvP and !PvP (racial leader) cases