diff options
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index e7ae690c5be..3eea183617f 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -268,7 +268,7 @@ Player::Player (WorldSession *session): Unit() m_divider = 0; m_ExtraFlags = 0; - + // players always accept if(GetSession()->GetSecurity() == SEC_PLAYER) SetAcceptWhispers(true); @@ -1580,13 +1580,13 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati { GetSession()->SendNotification(LANG_NO_ENTER_CHAMPIONS_HALL); return false; - } + } if(mapid == 450 && GetTeam() == ALLIANCE) { GetSession()->SendNotification(LANG_NO_ENTER_HALL_OF_LEGENDS); return false; - } + } // client without expansion support if(GetSession()->Expansion() < mEntry->Expansion()) @@ -6198,7 +6198,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvpt { // Check if allowed to receive it in current map uint8 MapType = sWorld.getConfig(CONFIG_PVP_TOKEN_MAP_TYPE); - if( (MapType == 1 && !InBattleGround() && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP)) + if( (MapType == 1 && !InBattleGround() && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP)) || (MapType == 2 && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP)) || (MapType == 3 && !InBattleGround()) ) return true; @@ -7988,7 +7988,7 @@ void Player::SendInitWorldStates(bool forceZone, uint32 forceZoneId) data << uint32(2474) << uint32(50); //: ally / horde slider percentage, 100 for ally, 0 for horde // show only in direct vicinity! data << uint32(2473) << uint32(0); //: ally / horde slider display // show only in direct vicinity! data << uint32(0x9a8) << uint32(0x0); // 20 // show the neutral stadium icon // 2472 - data << uint32(0x9a7) << uint32(0x0); // 21 // show the ally stadium icon // 2471 + data << uint32(0x9a7) << uint32(0x0); // 21 // show the ally stadium icon // 2471 data << uint32(0x9a6) << uint32(0x1); // 22 // show the horde stadium icon // 2470 } } @@ -8081,7 +8081,7 @@ void Player::SendInitWorldStates(bool forceZone, uint32 forceZoneId) data << uint32(0x9e1) << uint32(0x0); // 10 //2529 data << uint32(0x9e0) << uint32(0x0); // 11 data << uint32(0x9df) << uint32(0x0); // 12 - data << uint32(0xa5d) << uint32(0x1); // 13 //2653 + data << uint32(0xa5d) << uint32(0x1); // 13 //2653 data << uint32(0xa5c) << uint32(0x0); // 14 //2652 east beacon neutral data << uint32(0xa5b) << uint32(0x1); // 15 horde data << uint32(0xa5a) << uint32(0x0); // 16 ally @@ -8097,7 +8097,7 @@ void Player::SendInitWorldStates(bool forceZone, uint32 forceZoneId) data << uint32(0xa00) << uint32(0x0); // 26 // 2560 data << uint32(0x9ff) << uint32(0x1); // 27 data << uint32(0x9fe) << uint32(0x0); // 28 - data << uint32(0x9fd) << uint32(0x0); // 29 + data << uint32(0x9fd) << uint32(0x0); // 29 data << uint32(0x9fc) << uint32(0x1); // 30 data << uint32(0x9fb) << uint32(0x0); // 31 data << uint32(0xa62) << uint32(0x0); // 32 // 2658 @@ -15478,7 +15478,7 @@ void Player::SaveToDB() // save pet (hunter pet level and experience and all type pets health/mana). if(Pet* pet = GetPet()) pet->SavePetToDB(PET_SAVE_AS_CURRENT); - + //to prevent access to DB we should cache some data, which is used very often CachePlayerInfoMap::iterator _iter = objmgr.m_mPlayerInfoMap.find(GetGUIDLow()); if(_iter != objmgr.m_mPlayerInfoMap.end())//skip new players @@ -19072,13 +19072,13 @@ void Player::RemovePossess(bool attack) target->GetMotionMaster()->Clear(); target->GetMotionMaster()->MoveTargetedHome(); } - } + } else { target->GetMotionMaster()->Clear(); target->GetMotionMaster()->MoveTargetedHome(); } - + // Add high amount of threat on the player if(attack) target->AddThreat(this, 1000000.0f); @@ -19219,4 +19219,3 @@ void Player::UpdateCharmedAI() Attack(target, true); } } - |