mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-26 00:36:17 +00:00
Fixed: getMission returns a mission instead of NULL
This commit is contained in:
parent
5f1da53bd9
commit
26e76f796a
1 changed files with 16 additions and 15 deletions
|
@ -78,26 +78,27 @@ void CAdminProperties::updateCSRJournal( CCharacter * user, CMission * mission,u
|
||||||
///TODO NICO test no list
|
///TODO NICO test no list
|
||||||
}
|
}
|
||||||
|
|
||||||
CMission * CAdminProperties::getMission( uint indexInJournal ) const
|
CMission* CAdminProperties::getMission(uint indexInJournal) const
|
||||||
{
|
{
|
||||||
/// todo mission
|
if (!_Data) return NULL;
|
||||||
/*
|
|
||||||
if ( !_Data ) return NULL;
|
|
||||||
CCharacter * user = PlayerManager.getChar( _Data->MissionUser );
|
|
||||||
if ( !user )
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
CMission * mission = NULL;
|
|
||||||
if ( indexInJournal < user->getMissions().size() )
|
|
||||||
return (CMission*) user->getMissions()[indexInJournal];
|
|
||||||
|
|
||||||
indexInJournal-= MaxSoloMissionCount;
|
CCharacter *user = PlayerManager.getChar(_Data->MissionUser);
|
||||||
|
if (!user)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
CMission *mission = NULL;
|
||||||
|
if (indexInJournal < user->getMissions().size())
|
||||||
|
return (CMission*)user->getMissions()[indexInJournal];
|
||||||
|
|
||||||
|
/*
|
||||||
|
indexInJournal -= MaxSoloMissionCount;
|
||||||
CTeam * team = TeamManager.getTeam( user->getTeamId() );
|
CTeam * team = TeamManager.getTeam( user->getTeamId() );
|
||||||
if (team )
|
if (team)
|
||||||
{
|
{
|
||||||
if ( indexInJournal < team->getMissions().size() )
|
if ( indexInJournal < team->getMissions().size() )
|
||||||
return (CMission*) team->getMissions()[indexInJournal];
|
return (CMission*) team->getMissions()[indexInJournal];
|
||||||
}
|
}
|
||||||
|
|
||||||
indexInJournal-= ( MaxGroupMissionCount);
|
indexInJournal-= ( MaxGroupMissionCount);
|
||||||
CGuild * guild = user->getGuild();
|
CGuild * guild = user->getGuild();
|
||||||
if (guild )
|
if (guild )
|
||||||
|
@ -105,6 +106,6 @@ CMission * CAdminProperties::getMission( uint indexInJournal ) const
|
||||||
if ( indexInJournal < guild->getMissions().size() )
|
if ( indexInJournal < guild->getMissions().size() )
|
||||||
return(CMission*) guild->getMissions()[indexInJournal];
|
return(CMission*) guild->getMissions()[indexInJournal];
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue