Merge branch 'outpost_refactoring'

feature/core4-atys
Nuno 3 years ago committed by kaetemi
parent 5fe1c8b378
commit adf9719076
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -2436,7 +2436,7 @@ uint32 COutpost::computeSquadCountA(uint32 roundLevel) const
return (uint32)ceil((float)(roundLevel+1)/OutpostInTestFightSquadCount.get()); return (uint32)ceil((float)(roundLevel+1)/OutpostInTestFightSquadCount.get());
////// //////
return (uint32)ceil((float)(roundLevel+1)/1.5f); return (uint32)ceil((float)(roundLevel+1)/2.0f);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -2447,7 +2447,7 @@ uint32 COutpost::computeSquadCountB(uint32 roundLevel) const
return (uint32)floor((float)(roundLevel+1)/OutpostInTestFightSquadCount.get()); return (uint32)floor((float)(roundLevel+1)/OutpostInTestFightSquadCount.get());
////// //////
return (uint32)floor((float)(roundLevel+1)/1.5f); return (uint32)floor((float)(roundLevel+1)/2.0f);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

@ -19610,11 +19610,7 @@ void CCharacter::setOutpostAlias( uint32 id )
else else
{ {
if( _OutpostAlias != 0 ) if( _OutpostAlias != 0 )
{
sendDynamicSystemMessage( _Id, "OUTPOST_NO_MORE_IN_CONFLICT"); sendDynamicSystemMessage( _Id, "OUTPOST_NO_MORE_IN_CONFLICT");
if (getCurrentPVPZone() != CAIAliasTranslator::Invalid)
CPVPManager::getInstance()->enterPVPZone( this, getCurrentPVPZone() );
}
// _PropertyDatabase.setProp("CHARACTER_INFO:PVP_OUTPOST:ROUND_LVL_CUR", 0 ); // _PropertyDatabase.setProp("CHARACTER_INFO:PVP_OUTPOST:ROUND_LVL_CUR", 0 );
CBankAccessor_PLR::getCHARACTER_INFO().getPVP_OUTPOST().setROUND_LVL_CUR(_PropertyDatabase, 0 ); CBankAccessor_PLR::getCHARACTER_INFO().getPVP_OUTPOST().setROUND_LVL_CUR(_PropertyDatabase, 0 );
// _PropertyDatabase.setProp("CHARACTER_INFO:PVP_OUTPOST:ROUND_END_DATE", 0 ); // _PropertyDatabase.setProp("CHARACTER_INFO:PVP_OUTPOST:ROUND_END_DATE", 0 );
@ -19834,7 +19830,10 @@ void CCharacter::outpostSideChosen( bool neutral, OUTPOSTENUMS::TPVPSide side )
CGuild *guild = CGuildManager::getInstance()->getGuildFromId(_GuildId); CGuild *guild = CGuildManager::getInstance()->getGuildFromId(_GuildId);
if (!neutral || outpostInFire) if (neutral)
nlinfo("Player %s choose neutral", getName().toString().c_str());
if (!neutral)
{ {
// validate outpost alias // validate outpost alias
setOutpostAlias( _OutpostIdBeforeUserValidation ); setOutpostAlias( _OutpostIdBeforeUserValidation );
@ -19844,14 +19843,16 @@ void CCharacter::outpostSideChosen( bool neutral, OUTPOSTENUMS::TPVPSide side )
// he his guild owns the outpost he can only help his guild // he his guild owns the outpost he can only help his guild
if (_GuildId == outpost->getOwnerGuild()) if (_GuildId == outpost->getOwnerGuild())
{ {
nlinfo("Guildmate %s choose side Owner at OP %s", getName().toString().c_str(), CPrimitivesParser::aliasToString(_OutpostIdBeforeUserValidation).c_str());
setOutpostSide( OUTPOSTENUMS::OutpostOwner ); setOutpostSide( OUTPOSTENUMS::OutpostOwner );
_OutpostIdBeforeUserValidation = 0; _OutpostIdBeforeUserValidation = 0;
return; return;
} }
// he his guild attacks the outpost he can only help his guild // he his guild attacks the outpost he can only help his guild
if( _GuildId == COutpostManager::getInstance().getOutpostFromAlias( _OutpostIdBeforeUserValidation )->getAttackerGuild() ) if (_GuildId == COutpostManager::getInstance().getOutpostFromAlias(_OutpostIdBeforeUserValidation)->getAttackerGuild())
{ {
setOutpostSide( OUTPOSTENUMS::OutpostAttacker ); setOutpostSide( OUTPOSTENUMS::OutpostAttacker );
nlinfo("Guildmate %s choose side Attacker at OP %s", getName().toString().c_str(), CPrimitivesParser::aliasToString(_OutpostIdBeforeUserValidation).c_str());
_OutpostIdBeforeUserValidation = 0; _OutpostIdBeforeUserValidation = 0;
return; return;
} }
@ -19865,27 +19866,32 @@ void CCharacter::outpostSideChosen( bool neutral, OUTPOSTENUMS::TPVPSide side )
side = OUTPOSTENUMS::OutpostAttacker; side = OUTPOSTENUMS::OutpostAttacker;
} }
} }
else
// his guild doesn't participate in outpost conflict but player don't made a choice when op is under attack => random
if (neutral && outpostInFire)
{ {
// his guild doesn't participate in outpost conflict so he can choose the side he wants
if (side == OUTPOSTENUMS::OutpostOwner)
nlinfo("Player %s choose side Owner at OP %s", getName().toString().c_str(), CPrimitivesParser::aliasToString(_OutpostIdBeforeUserValidation).c_str());
if (side == OUTPOSTENUMS::OutpostAttacker)
nlinfo("Player %s choose side Attacker at OP %s", getName().toString().c_str(), CPrimitivesParser::aliasToString(_OutpostIdBeforeUserValidation).c_str());
setOutpostSide(side);
}
if (outpost->getName().substr(0, 14) == "outpost_nexus_") }
{ else if (outpostInFire)
nlinfo("Player are neutral in %s in fire : ", outpost->getName().c_str()); {
//setOutpostSide(OUTPOSTENUMS::UnknownPVPSide); if (outpost->getName().substr(0, 14) == "outpost_nexus_")
} {
else nlinfo("Player are neutral in %s in fire", outpost->getName().c_str());
{ setOutpostSide(OUTPOSTENUMS::UnknownPVPSide);
if (uint32(RandomGenerator.rand(1)) == 0)
setOutpostSide(OUTPOSTENUMS::OutpostOwner);
else
setOutpostSide(OUTPOSTENUMS::OutpostAttacker);
}
} }
else else
// his guild doesn't participate in outpost conflict so he can choose the side he wants {
setOutpostSide(side); setOutpostAlias(_OutpostIdBeforeUserValidation);
if (uint32(RandomGenerator.rand(1)) == 0)
setOutpostSide(OUTPOSTENUMS::OutpostOwner);
else
setOutpostSide(OUTPOSTENUMS::OutpostAttacker);
}
} }
_OutpostIdBeforeUserValidation = 0; _OutpostIdBeforeUserValidation = 0;

@ -84,13 +84,13 @@ void CPVPManager::tickUpdate()
{ {
// remove expired PVP propositions // remove expired PVP propositions
while( !_PVPChallengesAsked.empty() && _PVPChallengesAsked.front().ExpirationDate <= CTickEventHandler::getGameCycle() ) while( !_PVPChallengesAsked.empty() && _PVPChallengesAsked.front().ExpirationDate <= CTickEventHandler::getGameCycle() )
{ {
_PVPChallengesAsked.erase(_PVPChallengesAsked.begin() ); _PVPChallengesAsked.erase(_PVPChallengesAsked.begin() );
} }
// remove expired PVP zone leave time buffer // remove expired PVP zone leave time buffer
while( !_UsersLeavingPVPZone.empty() && _UsersLeavingPVPZone.front().first <= CTickEventHandler::getGameCycle() ) while( !_UsersLeavingPVPZone.empty() && _UsersLeavingPVPZone.front().first <= CTickEventHandler::getGameCycle() )
{ {
// remove from PVP zone // remove from PVP zone
CCharacter * user = PlayerManager.getChar( _UsersLeavingPVPZone.front().second ); CCharacter * user = PlayerManager.getChar( _UsersLeavingPVPZone.front().second );
@ -453,7 +453,7 @@ void CPVPManager::leavePVPZone( CCharacter * user )
// add user to leaving PVP zone users // add user to leaving PVP zone users
NLMISC::TGameCycle endDate = CTickEventHandler::getGameCycle() + PVPZoneLeaveBufferTime; NLMISC::TGameCycle endDate = CTickEventHandler::getGameCycle() + PVPZoneLeaveBufferTime;
_UsersLeavingPVPZone.push_back( make_pair( endDate, user->getEntityRowId() ) ); _UsersLeavingPVPZone.push_back( make_pair( endDate, user->getEntityRowId() ) );
#ifdef PVP_DEBUG #ifdef PVP_DEBUG
egs_pvpinfo("PVP_DEBUG: player %s has been added to _UsersLeavingPVPZone", user->getName().toString().c_str() ); egs_pvpinfo("PVP_DEBUG: player %s has been added to _UsersLeavingPVPZone", user->getName().toString().c_str() );
BOMB_IF( zone == NULL, "PVP_DEBUG: user was not in a PVP zone!", return ); BOMB_IF( zone == NULL, "PVP_DEBUG: user was not in a PVP zone!", return );
@ -553,7 +553,9 @@ void CPVPManager::enterPVPZone( CCharacter * user, TAIAlias pvpZoneAlias )
// check if he's re-entering into the same outpost // check if he's re-entering into the same outpost
if( pvpZoneAlias == oldZone->getAlias() ) if( pvpZoneAlias == oldZone->getAlias() )
{ {
#ifdef PVP_DEBUG
egs_pvpinfo("<CPVPManager::enterPVPZone> re-entering outpost %s",CPrimitivesParser::aliasToString(pvpZoneAlias).c_str()); egs_pvpinfo("<CPVPManager::enterPVPZone> re-entering outpost %s",CPrimitivesParser::aliasToString(pvpZoneAlias).c_str());
#endif // PVP_DEBUG
user->stopOutpostLeavingTimer(); user->stopOutpostLeavingTimer();
CCharacter::sendDynamicSystemMessage( user->getEntityRowId(), "PVP_ZONE_ENTER_BACK" ); CCharacter::sendDynamicSystemMessage( user->getEntityRowId(), "PVP_ZONE_ENTER_BACK" );
} }
@ -600,7 +602,9 @@ void CPVPManager::enterPVPZone( CCharacter * user, TAIAlias pvpZoneAlias )
else if( user->getEnterFlag() ) else if( user->getEnterFlag() )
{ {
// entering into an outpost zone // entering into an outpost zone
#ifdef PVP_DEBUG
egs_pvpinfo("<CPVPManager::enterPVPZone> entering outpost %s",CPrimitivesParser::aliasToString(pvpZoneAlias).c_str()); egs_pvpinfo("<CPVPManager::enterPVPZone> entering outpost %s",CPrimitivesParser::aliasToString(pvpZoneAlias).c_str());
#endif // PVP_DEBUG
user->outpostOpenChooseSideDialog( pvpZoneAlias ); user->outpostOpenChooseSideDialog( pvpZoneAlias );
user->setOutpostAliasBeforeUserValidation( pvpZoneAlias ); user->setOutpostAliasBeforeUserValidation( pvpZoneAlias );
} }
@ -697,7 +701,7 @@ void CPVPManager::askForPVPChallenge( const NLMISC::CEntityId & userId )
// global chat parameters // global chat parameters
SM_STATIC_PARAMS_1(params, STRING_MANAGER::player); SM_STATIC_PARAMS_1(params, STRING_MANAGER::player);
// get protagonists // get protagonists
CCharacter * user = PlayerManager.getChar( userId ); CCharacter * user = PlayerManager.getChar( userId );
if ( !user ) if ( !user )
@ -713,9 +717,9 @@ void CPVPManager::askForPVPChallenge( const NLMISC::CEntityId & userId )
} }
CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, user->getEntityRowId(), DSPropertyCELL ); CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, user->getEntityRowId(), DSPropertyCELL );
sint32 cell1 = mirrorCell; sint32 cell1 = mirrorCell;
CMirrorPropValueRO<TYPE_CELL> mirrorCell2( TheDataset, target->getEntityRowId(), DSPropertyCELL ); CMirrorPropValueRO<TYPE_CELL> mirrorCell2( TheDataset, target->getEntityRowId(), DSPropertyCELL );
sint32 cell2 = mirrorCell2; sint32 cell2 = mirrorCell2;
if (cell1 <= -2 || cell2 <= -2 ) if (cell1 <= -2 || cell2 <= -2 )
{ {
@ -728,7 +732,7 @@ void CPVPManager::askForPVPChallenge( const NLMISC::CEntityId & userId )
CPVPChallengeAsked entry; CPVPChallengeAsked entry;
entry.InvitedTeam = CTEAM::InvalidTeamId; entry.InvitedTeam = CTEAM::InvalidTeamId;
entry.Invitor = user->getEntityRowId(); entry.Invitor = user->getEntityRowId();
// user must not be in PVP // user must not be in PVP
if ( user->getPVPInterface().isValid() ) if ( user->getPVPInterface().isValid() )
{ {
@ -755,7 +759,7 @@ void CPVPManager::askForPVPChallenge( const NLMISC::CEntityId & userId )
params[0].setEIdAIAlias( target->getId(), CAIAliasTranslator::getInstance()->getAIAlias(target->getId()) ); params[0].setEIdAIAlias( target->getId(), CAIAliasTranslator::getInstance()->getAIAlias(target->getId()) );
CCharacter::sendDynamicSystemMessage( userId, "CHALLENGE_SAME_TEAM",params); CCharacter::sendDynamicSystemMessage( userId, "CHALLENGE_SAME_TEAM",params);
return; return;
} }
for ( list<CEntityId>::const_iterator it = teamUser->getTeamMembers().begin(); it != teamUser->getTeamMembers().end(); ++it ) for ( list<CEntityId>::const_iterator it = teamUser->getTeamMembers().begin(); it != teamUser->getTeamMembers().end(); ++it )
{ {
CCharacter * c = PlayerManager.getChar( *it ); CCharacter * c = PlayerManager.getChar( *it );
@ -820,11 +824,11 @@ void CPVPManager::askForPVPChallenge( const NLMISC::CEntityId & userId )
msgTargetEId = user->getTarget(); msgTargetEId = user->getTarget();
entry.InvitedUser = target->getEntityRowId(); entry.InvitedUser = target->getEntityRowId();
} }
// remove previous invitation, and check that user and target are not invited // remove previous invitation, and check that user and target are not invited
bool problem = false; bool problem = false;
TDataSetRow userRow = TheDataset.getDataSetRow( userId ); TDataSetRow userRow = TheDataset.getDataSetRow( userId );
for ( std::list< CPVPChallengeAsked >::iterator it = _PVPChallengesAsked.begin(); it != _PVPChallengesAsked.end(); ) for ( std::list< CPVPChallengeAsked >::iterator it = _PVPChallengesAsked.begin(); it != _PVPChallengesAsked.end(); )
{ {
@ -834,7 +838,7 @@ void CPVPManager::askForPVPChallenge( const NLMISC::CEntityId & userId )
// ignore same invitation // ignore same invitation
if ( (*it).InvitedUser == target->getEntityRowId() ) if ( (*it).InvitedUser == target->getEntityRowId() )
return; return;
// send cancel message to the previous invited // send cancel message to the previous invited
CMessage msgout( "IMPULSION_ID" ); CMessage msgout( "IMPULSION_ID" );
CEntityId receiverId; CEntityId receiverId;
@ -851,34 +855,34 @@ void CPVPManager::askForPVPChallenge( const NLMISC::CEntityId & userId )
} }
else else
receiverId = getEntityIdFromRow( (*it).InvitedUser ); receiverId = getEntityIdFromRow( (*it).InvitedUser );
msgout.serial( receiverId ); msgout.serial( receiverId );
CBitMemStream bms; CBitMemStream bms;
nlverify ( GenericMsgManager.pushNameToStream( "PVP_CHALLENGE:CANCEL_INVITATION", bms) ); nlverify ( GenericMsgManager.pushNameToStream( "PVP_CHALLENGE:CANCEL_INVITATION", bms) );
msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length());
sendMessageViaMirror( NLNET::TServiceId(receiverId.getDynamicId()), msgout ); sendMessageViaMirror( NLNET::TServiceId(receiverId.getDynamicId()), msgout );
//send chat infos //send chat infos
params[0].setEIdAIAlias( receiverId, CAIAliasTranslator::getInstance()->getAIAlias(receiverId) ); params[0].setEIdAIAlias( receiverId, CAIAliasTranslator::getInstance()->getAIAlias(receiverId) );
CCharacter::sendDynamicSystemMessage( userRow, "DUEL_YOU_CANCEL_INVITATION",params); CCharacter::sendDynamicSystemMessage( userRow, "DUEL_YOU_CANCEL_INVITATION",params);
// remove this proposition // remove this proposition
std::list< CPVPChallengeAsked >::iterator itErase = it; std::list< CPVPChallengeAsked >::iterator itErase = it;
++it; ++it;
_PVPChallengesAsked.erase(itErase); _PVPChallengesAsked.erase(itErase);
} }
else else
{ {
if ( (*it).InvitedUser == user->getEntityRowId() || ( user->getTeamId() != CTEAM::InvalidTeamId && (*it).InvitedTeam == user->getTeamId() ) ) if ( (*it).InvitedUser == user->getEntityRowId() || ( user->getTeamId() != CTEAM::InvalidTeamId && (*it).InvitedTeam == user->getTeamId() ) )
{ {
// user is already invited : he has to accept or refuse first // user is already invited : he has to accept or refuse first
CCharacter::sendDynamicSystemMessage( userId, "DUEL_ALREADY_INVITED",params); CCharacter::sendDynamicSystemMessage( userId, "DUEL_ALREADY_INVITED",params);
// dont bail out as we can enter in case "if ( (*it).Invitor == userId )" // dont bail out as we can enter in case "if ( (*it).Invitor == userId )"
problem = true; problem = true;
} }
if ( (*it).InvitedUser == target->getEntityRowId() || ( target->getTeamId() != CTEAM::InvalidTeamId && (*it).InvitedTeam == target->getTeamId() ) ) if ( (*it).InvitedUser == target->getEntityRowId() || ( target->getTeamId() != CTEAM::InvalidTeamId && (*it).InvitedTeam == target->getTeamId() ) )
{ {
// user is already invited : he has to accept or refuse first // user is already invited : he has to accept or refuse first
params[0].setEIdAIAlias( target->getId(), CAIAliasTranslator::getInstance()->getAIAlias(target->getId()) ); params[0].setEIdAIAlias( target->getId(), CAIAliasTranslator::getInstance()->getAIAlias(target->getId()) );
CCharacter::sendDynamicSystemMessage( userId, "DUEL_TARGET_ALREADY_INVITED",params); CCharacter::sendDynamicSystemMessage( userId, "DUEL_TARGET_ALREADY_INVITED",params);
@ -891,10 +895,10 @@ void CPVPManager::askForPVPChallenge( const NLMISC::CEntityId & userId )
// problem occured : bail out // problem occured : bail out
if ( problem ) if ( problem )
return; return;
entry.ExpirationDate = CTickEventHandler::getGameCycle() + DuelQueryDuration; entry.ExpirationDate = CTickEventHandler::getGameCycle() + DuelQueryDuration;
_PVPChallengesAsked.push_front( entry ); _PVPChallengesAsked.push_front( entry );
// tell invited player // tell invited player
params[0].setEIdAIAlias( userId, CAIAliasTranslator::getInstance()->getAIAlias(userId) ); params[0].setEIdAIAlias( userId, CAIAliasTranslator::getInstance()->getAIAlias(userId) );
uint32 txt = STRING_MANAGER::sendStringToClient( target->getEntityRowId(), "PVP_CHALLENGE_INVITATION", params ); uint32 txt = STRING_MANAGER::sendStringToClient( target->getEntityRowId(), "PVP_CHALLENGE_INVITATION", params );
@ -909,11 +913,11 @@ void CPVPManager::askForPVPChallenge( const NLMISC::CEntityId & userId )
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CPVPManager::acceptPVPChallenge( const NLMISC::CEntityId & userId ) void CPVPManager::acceptPVPChallenge( const NLMISC::CEntityId & userId )
{ {
BOMB_IF(IsRingShard,"acceptPVPChallenge() - not allowed on Ring shards because PVP Challenge requires non-ring GPMS",return); BOMB_IF(IsRingShard,"acceptPVPChallenge() - not allowed on Ring shards because PVP Challenge requires non-ring GPMS",return);
SM_STATIC_PARAMS_1(params, STRING_MANAGER::player); SM_STATIC_PARAMS_1(params, STRING_MANAGER::player);
CCharacter * invited = PlayerManager.getChar(userId ); CCharacter * invited = PlayerManager.getChar(userId );
if ( !invited ) if ( !invited )
{ {
nlwarning("<PVP>invalid user %s", userId.toString().c_str() ); nlwarning("<PVP>invalid user %s", userId.toString().c_str() );
@ -945,7 +949,7 @@ void CPVPManager::acceptPVPChallenge( const NLMISC::CEntityId & userId )
CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, c->getEntityRowId(), DSPropertyCELL ); CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, c->getEntityRowId(), DSPropertyCELL );
sint32 cell = mirrorCell; sint32 cell = mirrorCell;
if (cell <= -2 ) if (cell <= -2 )
{ {
CCharacter::sendDynamicSystemMessage( userId, "NO_CHALLENGE_HERE"); CCharacter::sendDynamicSystemMessage( userId, "NO_CHALLENGE_HERE");
@ -962,7 +966,7 @@ void CPVPManager::acceptPVPChallenge( const NLMISC::CEntityId & userId )
return; return;
} }
CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, invited->getEntityRowId(), DSPropertyCELL ); CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, invited->getEntityRowId(), DSPropertyCELL );
sint32 cell = mirrorCell; sint32 cell = mirrorCell;
if (cell <= -2 ) if (cell <= -2 )
{ {
CCharacter::sendDynamicSystemMessage( userId, "NO_CHALLENGE_HERE"); CCharacter::sendDynamicSystemMessage( userId, "NO_CHALLENGE_HERE");
@ -985,7 +989,7 @@ void CPVPManager::acceptPVPChallenge( const NLMISC::CEntityId & userId )
_PVPChallengesAsked.erase(it); _PVPChallengesAsked.erase(it);
return; return;
} }
// ignore deprecated invitation // ignore deprecated invitation
if ( invited->getPVPInterface().isValid() || invitor->getPVPInterface().isValid() ) if ( invited->getPVPInterface().isValid() || invitor->getPVPInterface().isValid() )
@ -1029,7 +1033,7 @@ void CPVPManager::acceptPVPChallenge( const NLMISC::CEntityId & userId )
} }
} }
CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, c->getEntityRowId(), DSPropertyCELL ); CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, c->getEntityRowId(), DSPropertyCELL );
sint32 cell = mirrorCell; sint32 cell = mirrorCell;
if (cell <= -2 ) if (cell <= -2 )
{ {
CCharacter::sendDynamicSystemMessage( userId, "NO_CHALLENGE_HERE"); CCharacter::sendDynamicSystemMessage( userId, "NO_CHALLENGE_HERE");
@ -1047,7 +1051,7 @@ void CPVPManager::acceptPVPChallenge( const NLMISC::CEntityId & userId )
return; return;
} }
CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, invitor->getEntityRowId(), DSPropertyCELL ); CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, invitor->getEntityRowId(), DSPropertyCELL );
sint32 cell = mirrorCell; sint32 cell = mirrorCell;
if (cell <= -2 ) if (cell <= -2 )
{ {
CCharacter::sendDynamicSystemMessage( userId, "NO_CHALLENGE_HERE"); CCharacter::sendDynamicSystemMessage( userId, "NO_CHALLENGE_HERE");
@ -1078,7 +1082,7 @@ void CPVPManager::refusePVPChallenge( const NLMISC::CEntityId & userId )
params[0].setEIdAIAlias( userId, CAIAliasTranslator::getInstance()->getAIAlias(userId) ); params[0].setEIdAIAlias( userId, CAIAliasTranslator::getInstance()->getAIAlias(userId) );
CTeam * team = TeamManager.getTeam( user->getTeamId() ); CTeam * team = TeamManager.getTeam( user->getTeamId() );
// find the proposition // find the proposition
for ( std::list< CPVPChallengeAsked >::iterator it = _PVPChallengesAsked.begin(); it != _PVPChallengesAsked.end();++it ) for ( std::list< CPVPChallengeAsked >::iterator it = _PVPChallengesAsked.begin(); it != _PVPChallengesAsked.end();++it )
{ {
@ -1101,7 +1105,7 @@ void CPVPManager::removePVPChallengeInvitor( const NLMISC::CEntityId & userId )
for ( std::list< CPVPChallengeAsked >::iterator it = _PVPChallengesAsked.begin(); it != _PVPChallengesAsked.end();++it ) for ( std::list< CPVPChallengeAsked >::iterator it = _PVPChallengesAsked.begin(); it != _PVPChallengesAsked.end();++it )
{ {
if ( (*it).Invitor == row ) if ( (*it).Invitor == row )
{ {
CEntityId msgId; CEntityId msgId;
if ( (*it).InvitedTeam != CTEAM::InvalidTeamId ) if ( (*it).InvitedTeam != CTEAM::InvalidTeamId )
{ {

Loading…
Cancel
Save