|
|
@ -10708,6 +10708,7 @@ void CCharacter::acceptExchange(uint8 exchangeId)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CTeam * team = TeamManager.getRealTeam( _TeamId );
|
|
|
|
CTeam * team = TeamManager.getRealTeam( _TeamId );
|
|
|
|
|
|
|
|
CGuild* guild = CGuildManager::getInstance()->getGuildFromId( _GuildId );
|
|
|
|
if (_BotGift == NULL)
|
|
|
|
if (_BotGift == NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nlwarning("Player %s has no bot gift", _Id.toString().c_str());
|
|
|
|
nlwarning("Player %s has no bot gift", _Id.toString().c_str());
|
|
|
@ -10731,6 +10732,15 @@ void CCharacter::acceptExchange(uint8 exchangeId)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mission = team->getMissionByAlias( missionAlias );
|
|
|
|
mission = team->getMissionByAlias( missionAlias );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (type == MISSION_DESC::Guild)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (guild == NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
nlwarning("CCharacter::acceptExchange : character %s -> no guild",_Id.toString().c_str() );
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
mission = guild->getMissionByAlias( missionAlias );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
vector<CGameItemPtr> vect;
|
|
|
|
vector<CGameItemPtr> vect;
|
|
|
|
vector<CPetAnimal> exchangePlayerPets;
|
|
|
|
vector<CPetAnimal> exchangePlayerPets;
|
|
|
@ -10764,6 +10774,8 @@ void CCharacter::acceptExchange(uint8 exchangeId)
|
|
|
|
processMissionStepUserEvent( eventList,missionAlias,stepIndex );
|
|
|
|
processMissionStepUserEvent( eventList,missionAlias,stepIndex );
|
|
|
|
else if ( type == MISSION_DESC::Group )
|
|
|
|
else if ( type == MISSION_DESC::Group )
|
|
|
|
team->processTeamMissionStepEvent( eventList,missionAlias,stepIndex );
|
|
|
|
team->processTeamMissionStepEvent( eventList,missionAlias,stepIndex );
|
|
|
|
|
|
|
|
else if ( type == MISSION_DESC::Guild )
|
|
|
|
|
|
|
|
guild->processGuildMissionStepEvent( eventList,missionAlias,stepIndex );
|
|
|
|
eventList.pop_front();
|
|
|
|
eventList.pop_front();
|
|
|
|
for ( std::list< CMissionEvent* >::iterator it = eventList.begin(); it != eventList.end(); ++it )
|
|
|
|
for ( std::list< CMissionEvent* >::iterator it = eventList.begin(); it != eventList.end(); ++it )
|
|
|
|
processMissionEvent(*(*it));
|
|
|
|
processMissionEvent(*(*it));
|
|
|
@ -10783,6 +10795,8 @@ void CCharacter::acceptExchange(uint8 exchangeId)
|
|
|
|
processMissionStepUserEvent( eventList,missionAlias,stepIndex );
|
|
|
|
processMissionStepUserEvent( eventList,missionAlias,stepIndex );
|
|
|
|
else if ( type == MISSION_DESC::Group )
|
|
|
|
else if ( type == MISSION_DESC::Group )
|
|
|
|
team->processTeamMissionStepEvent( eventList,missionAlias,stepIndex );
|
|
|
|
team->processTeamMissionStepEvent( eventList,missionAlias,stepIndex );
|
|
|
|
|
|
|
|
else if ( type == MISSION_DESC::Guild )
|
|
|
|
|
|
|
|
guild->processGuildMissionStepEvent( eventList,missionAlias,stepIndex );
|
|
|
|
eventList.pop_front();
|
|
|
|
eventList.pop_front();
|
|
|
|
for ( std::list< CMissionEvent* >::iterator it = eventList.begin(); it != eventList.end(); ++it )
|
|
|
|
for ( std::list< CMissionEvent* >::iterator it = eventList.begin(); it != eventList.end(); ++it )
|
|
|
|
processMissionEvent(*(*it));
|
|
|
|
processMissionEvent(*(*it));
|
|
|
@ -11615,7 +11629,7 @@ bool CCharacter::processMissionEventList( std::list< CMissionEvent* > & eventLis
|
|
|
|
bool processed = false;
|
|
|
|
bool processed = false;
|
|
|
|
|
|
|
|
|
|
|
|
bool firstEvent = true;
|
|
|
|
bool firstEvent = true;
|
|
|
|
CGuild * guild = NULL;
|
|
|
|
CGuild * guild = CGuildManager::getInstance()->getGuildFromId( _GuildId );
|
|
|
|
while ( !eventList.empty() )
|
|
|
|
while ( !eventList.empty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool eventProcessed = false;
|
|
|
|
bool eventProcessed = false;
|
|
|
@ -11652,6 +11666,13 @@ bool CCharacter::processMissionEventList( std::list< CMissionEvent* > & eventLis
|
|
|
|
eventProcessed = team->processTeamMissionEvent(eventList, alias);
|
|
|
|
eventProcessed = team->processTeamMissionEvent(eventList, alias);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// THIRD - Check with guild missions (if event not already processed and char belongs to a guild)
|
|
|
|
|
|
|
|
if (!eventProcessed && (event.Restriction != CMissionEvent::NoGroup))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (guild != NULL)
|
|
|
|
|
|
|
|
eventProcessed = guild->processGuildMissionEvent(eventList, alias);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
processed |= eventProcessed;
|
|
|
|
processed |= eventProcessed;
|
|
|
|
|
|
|
|
|
|
|
|
// the first event of the list was processed, so we remove it.
|
|
|
|
// the first event of the list was processed, so we remove it.
|
|
|
|