Changed: Minor changes

--HG--
branch : develop
This commit is contained in:
kervala 2016-01-01 16:08:11 +01:00
parent cf8ed540a7
commit 03eaa9181a

View file

@ -329,10 +329,12 @@ void CGuildMemberModule::_inviteCharacterInGuild(CGuildCharProxy& invitor, CGuil
/// check guild and invited member allegiances compatibilities /// check guild and invited member allegiances compatibilities
CGuild::TAllegiances guildAllegiance, invitedAllegiance; CGuild::TAllegiances guildAllegiance, invitedAllegiance;
guildAllegiance = guild->getAllegiance(); guildAllegiance = guild->getAllegiance();
CCharacter * invitedChar = PlayerManager.getChar(target.getId()); CCharacter * invitedChar = PlayerManager.getChar(target.getId());
if( invitedChar == 0 ) return; if (invitedChar == NULL) return;
invitedAllegiance = invitedChar->getAllegiance(); invitedAllegiance = invitedChar->getAllegiance();
if( invitedAllegiance.first != guildAllegiance.first && invitedAllegiance.first != PVP_CLAN::Neutral )
if (invitedAllegiance.first != guildAllegiance.first && invitedAllegiance.first != PVP_CLAN::Neutral)
{ {
SM_STATIC_PARAMS_2( params, STRING_MANAGER::player, STRING_MANAGER::faction ); SM_STATIC_PARAMS_2( params, STRING_MANAGER::player, STRING_MANAGER::faction );
params[0].setEIdAIAlias( target.getId(), CAIAliasTranslator::getInstance()->getAIAlias( target.getId()) ); params[0].setEIdAIAlias( target.getId(), CAIAliasTranslator::getInstance()->getAIAlias( target.getId()) );
@ -340,7 +342,8 @@ void CGuildMemberModule::_inviteCharacterInGuild(CGuildCharProxy& invitor, CGuil
invitor.sendSystemMessage("GUILD_ICOMPATIBLE_ALLEGIANCE",params); invitor.sendSystemMessage("GUILD_ICOMPATIBLE_ALLEGIANCE",params);
return; return;
} }
if( invitedAllegiance.second != guildAllegiance.second && invitedAllegiance.second != PVP_CLAN::Neutral )
if (invitedAllegiance.second != guildAllegiance.second && invitedAllegiance.second != PVP_CLAN::Neutral)
{ {
SM_STATIC_PARAMS_2( params, STRING_MANAGER::player, STRING_MANAGER::faction ); SM_STATIC_PARAMS_2( params, STRING_MANAGER::player, STRING_MANAGER::faction );
params[0].setEIdAIAlias( target.getId(), CAIAliasTranslator::getInstance()->getAIAlias( target.getId()) ); params[0].setEIdAIAlias( target.getId(), CAIAliasTranslator::getInstance()->getAIAlias( target.getId()) );