mirror of
https://github.com/mangosfour/server.git
synced 2025-12-20 07:37:02 +00:00
Merge commit 'origin/master' into 320
This commit is contained in:
commit
02f9416963
11 changed files with 118 additions and 38 deletions
|
|
@ -446,7 +446,7 @@ void Channel::List(Player* player)
|
|||
size_t pos = data.wpos();
|
||||
data << uint32(0); // size of list, placeholder
|
||||
|
||||
bool gmInWhoList = sWorld.getConfig(CONFIG_GM_IN_WHO_LIST) || player->GetSession()->GetSecurity() > SEC_PLAYER;
|
||||
uint32 gmLevelInWhoList = sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST);
|
||||
|
||||
uint32 count = 0;
|
||||
for(PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
||||
|
|
@ -455,7 +455,8 @@ void Channel::List(Player* player)
|
|||
|
||||
// PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
|
||||
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
|
||||
if (plr && ( plr->GetSession()->GetSecurity() == SEC_PLAYER || (gmInWhoList && plr->IsVisibleGloballyFor(player))))
|
||||
if (plr && (player->GetSession()->GetSecurity() > SEC_PLAYER || plr->GetSession()->GetSecurity() <= gmLevelInWhoList) &&
|
||||
plr->IsVisibleGloballyFor(player))
|
||||
{
|
||||
data << uint64(i->first);
|
||||
data << uint8(i->second.flags); // flags seems to be changed...
|
||||
|
|
|
|||
|
|
@ -157,9 +157,8 @@ bool ChatHandler::HandleGMListIngameCommand(const char* /*args*/)
|
|||
HashMapHolder<Player>::MapType::const_iterator itr = m.begin();
|
||||
for(; itr != m.end(); ++itr)
|
||||
{
|
||||
if (itr->second->GetSession()->GetSecurity() > SEC_PLAYER &&
|
||||
(itr->second->isGameMaster() || sWorld.getConfig(CONFIG_GM_IN_GM_LIST)) &&
|
||||
(!m_session || itr->second->IsVisibleGloballyFor(m_session->GetPlayer())) )
|
||||
if ((itr->second->isGameMaster() || itr->second->GetSession()->GetSecurity() <= sWorld.getConfig(CONFIG_GM_LEVEL_IN_GM_LIST)) &&
|
||||
(!m_session || itr->second->IsVisibleGloballyFor(m_session->GetPlayer())))
|
||||
{
|
||||
if(first)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
|
|||
uint32 team = _player->GetTeam();
|
||||
uint32 security = GetSecurity();
|
||||
bool allowTwoSideWhoList = sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
|
||||
bool gmInWhoList = sWorld.getConfig(CONFIG_GM_IN_WHO_LIST);
|
||||
uint32 gmLevelInWhoList = sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST);
|
||||
|
||||
WorldPacket data( SMSG_WHO, 50 ); // guess size
|
||||
data << clientcount; // clientcount place holder
|
||||
|
|
@ -166,7 +166,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
|
|||
continue;
|
||||
|
||||
// player can see MODERATOR, GAME MASTER, ADMINISTRATOR only if CONFIG_GM_IN_WHO_LIST
|
||||
if ((itr->second->GetSession()->GetSecurity() > SEC_PLAYER && !gmInWhoList))
|
||||
if ((itr->second->GetSession()->GetSecurity() > gmLevelInWhoList))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ void SocialMgr::GetFriendInfo(Player *player, uint32 friendGUID, FriendInfo &fri
|
|||
uint32 team = player->GetTeam();
|
||||
AccountTypes security = player->GetSession()->GetSecurity();
|
||||
bool allowTwoSideWhoList = sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
|
||||
bool gmInWhoList = sWorld.getConfig(CONFIG_GM_IN_WHO_LIST) || security > SEC_PLAYER;
|
||||
AccountTypes gmLevelInWhoList = AccountTypes (sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST));
|
||||
|
||||
PlayerSocialMap::iterator itr = player->GetSocial()->m_playerSocialMap.find(friendGUID);
|
||||
if(itr != player->GetSocial()->m_playerSocialMap.end())
|
||||
|
|
@ -197,10 +197,10 @@ void SocialMgr::GetFriendInfo(Player *player, uint32 friendGUID, FriendInfo &fri
|
|||
|
||||
// PLAYER see his team only and PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
|
||||
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
|
||||
if( pFriend && pFriend->GetName() &&
|
||||
( security > SEC_PLAYER ||
|
||||
( pFriend->GetTeam() == team || allowTwoSideWhoList ) &&
|
||||
( pFriend->GetSession()->GetSecurity() == SEC_PLAYER || gmInWhoList && pFriend->IsVisibleGloballyFor(player) )))
|
||||
if (pFriend && pFriend->GetName() &&
|
||||
(security > SEC_PLAYER ||
|
||||
(pFriend->GetTeam() == team || allowTwoSideWhoList) && (pFriend->GetSession()->GetSecurity() <= gmLevelInWhoList)) &&
|
||||
pFriend->IsVisibleGloballyFor(player))
|
||||
{
|
||||
friendInfo.Status = FRIEND_STATUS_ONLINE;
|
||||
if(pFriend->isAFK())
|
||||
|
|
@ -271,7 +271,7 @@ void SocialMgr::BroadcastToFriendListers(Player *player, WorldPacket *packet)
|
|||
uint32 team = player->GetTeam();
|
||||
AccountTypes security = player->GetSession()->GetSecurity();
|
||||
uint32 guid = player->GetGUIDLow();
|
||||
bool gmInWhoList = sWorld.getConfig(CONFIG_GM_IN_WHO_LIST);
|
||||
AccountTypes gmLevelInWhoList = AccountTypes(sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST));
|
||||
bool allowTwoSideWhoList = sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
|
||||
|
||||
for(SocialMap::const_iterator itr = m_socialMap.begin(); itr != m_socialMap.end(); ++itr)
|
||||
|
|
@ -283,10 +283,10 @@ void SocialMgr::BroadcastToFriendListers(Player *player, WorldPacket *packet)
|
|||
|
||||
// PLAYER see his team only and PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
|
||||
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
|
||||
if( pFriend && pFriend->IsInWorld() &&
|
||||
( pFriend->GetSession()->GetSecurity() > SEC_PLAYER ||
|
||||
( pFriend->GetTeam() == team || allowTwoSideWhoList ) &&
|
||||
(security == SEC_PLAYER || gmInWhoList && player->IsVisibleGloballyFor(pFriend) )))
|
||||
if (pFriend && pFriend->IsInWorld() &&
|
||||
(pFriend->GetSession()->GetSecurity() > SEC_PLAYER ||
|
||||
(pFriend->GetTeam() == team || allowTwoSideWhoList) && security <= gmLevelInWhoList) &&
|
||||
player->IsVisibleGloballyFor(pFriend))
|
||||
{
|
||||
pFriend->GetSession()->SendPacket(packet);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3670,6 +3670,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
// Special cases of non existing auras handling
|
||||
if(m_spellInfo->excludeCasterAuraSpell == 61988)
|
||||
{
|
||||
// Avenging Wrath Marker
|
||||
if(m_caster->HasAura(61987))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
}
|
||||
|
|
@ -3696,8 +3697,19 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
// Target aura req check if need
|
||||
if(m_spellInfo->targetAuraSpell && !target->HasAura(m_spellInfo->targetAuraSpell))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
if(m_spellInfo->excludeTargetAuraSpell && target->HasAura(m_spellInfo->excludeTargetAuraSpell))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
if(m_spellInfo->excludeTargetAuraSpell)
|
||||
{
|
||||
// Special cases of non existing auras handling
|
||||
if (m_spellInfo->excludeTargetAuraSpell == 61988)
|
||||
{
|
||||
// Avenging Wrath Marker
|
||||
if (target->HasAura(61987))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
|
||||
}
|
||||
else if (target->HasAura(m_spellInfo->excludeTargetAuraSpell))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
}
|
||||
|
||||
if(target != m_caster)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1199,12 +1199,19 @@ void Spell::EffectDummy(uint32 i)
|
|||
}
|
||||
return;
|
||||
}
|
||||
case 32826:
|
||||
case 32826: // Polymorph Cast Visual
|
||||
{
|
||||
if ( unitTarget && unitTarget->GetTypeId() == TYPEID_UNIT )
|
||||
{
|
||||
//Polymorph Cast Visual Rank 1
|
||||
const uint32 spell_list[6] = {32813, 32816, 32817, 32818, 32819, 32820};
|
||||
const uint32 spell_list[6] = {
|
||||
32813, // Squirrel Form
|
||||
32816, // Giraffe Form
|
||||
32817, // Serpent Form
|
||||
32818, // Dragonhawk Form
|
||||
32819, // Worgen Form
|
||||
32820 // Sheep Form
|
||||
};
|
||||
unitTarget->CastSpell( unitTarget, spell_list[urand(0, 5)], true);
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -797,8 +797,8 @@ void World::LoadConfigSettings(bool reload)
|
|||
m_configs[CONFIG_GM_CHAT] = sConfig.GetIntDefault("GM.Chat", 2);
|
||||
m_configs[CONFIG_GM_WISPERING_TO] = sConfig.GetIntDefault("GM.WhisperingTo", 2);
|
||||
|
||||
m_configs[CONFIG_GM_IN_GM_LIST] = sConfig.GetBoolDefault("GM.InGMList", false);
|
||||
m_configs[CONFIG_GM_IN_WHO_LIST] = sConfig.GetBoolDefault("GM.InWhoList", false);
|
||||
m_configs[CONFIG_GM_LEVEL_IN_GM_LIST] = sConfig.GetIntDefault("GM.InGMList.Level", SEC_ADMINISTRATOR);
|
||||
m_configs[CONFIG_GM_LEVEL_IN_WHO_LIST] = sConfig.GetIntDefault("GM.InWhoList.Level", SEC_ADMINISTRATOR);
|
||||
m_configs[CONFIG_GM_LOG_TRADE] = sConfig.GetBoolDefault("GM.LogTrade", false);
|
||||
|
||||
m_configs[CONFIG_START_GM_LEVEL] = sConfig.GetIntDefault("GM.StartLevel", 1);
|
||||
|
|
|
|||
|
|
@ -136,8 +136,8 @@ enum WorldConfigs
|
|||
CONFIG_GM_ACCEPT_TICKETS,
|
||||
CONFIG_GM_CHAT,
|
||||
CONFIG_GM_WISPERING_TO,
|
||||
CONFIG_GM_IN_GM_LIST,
|
||||
CONFIG_GM_IN_WHO_LIST,
|
||||
CONFIG_GM_LEVEL_IN_GM_LIST,
|
||||
CONFIG_GM_LEVEL_IN_WHO_LIST,
|
||||
CONFIG_GM_LOG_TRADE,
|
||||
CONFIG_START_GM_LEVEL,
|
||||
CONFIG_GM_LOWER_SECURITY,
|
||||
|
|
|
|||
|
|
@ -872,15 +872,19 @@ Channel.SilentlyGMJoin = 0
|
|||
# 0 (disable)
|
||||
# 1 (enable)
|
||||
#
|
||||
# GM.InGMList
|
||||
# Is GM showed in GM list (if visible) in non-GM state (.gm off)
|
||||
# Default: 0 (false)
|
||||
# 1 (true)
|
||||
# GM.InGMList.Level
|
||||
# Max GM level showed in GM list (if visible) in non-GM state (.gm off)
|
||||
# 0 (only players)
|
||||
# 1 (only moderators)
|
||||
# 2 (only gamemasters)
|
||||
# Default: 3 (anyone)
|
||||
#
|
||||
# GM.InWhoList
|
||||
# Is GM showed in who list (if visible).
|
||||
# Default: 0 (false)
|
||||
# 1 (true)
|
||||
# GM.InWhoList.Level
|
||||
# Max GM level showed in who list (if visible).
|
||||
# 0 (only players)
|
||||
# 1 (only moderators)
|
||||
# 2 (only gamemasters)
|
||||
# Default: 3 (anyone)
|
||||
#
|
||||
# GM.LogTrade
|
||||
# Include GM trade and trade slot enchanting operations in GM log if it enable
|
||||
|
|
@ -908,8 +912,8 @@ GM.Visible = 2
|
|||
GM.AcceptTickets = 2
|
||||
GM.Chat = 2
|
||||
GM.WhisperingTo = 2
|
||||
GM.InGMList = 0
|
||||
GM.InWhoList = 0
|
||||
GM.InGMList.Level = 3
|
||||
GM.InWhoList.Level = 3
|
||||
GM.LogTrade = 1
|
||||
GM.StartLevel = 1
|
||||
GM.LowerSecurity = 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8183"
|
||||
#define REVISION_NR "8186"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue