Beispiel #1
0
CCharacter* CMap::GetCharInMap( unsigned int id )
{
    CMonster* monster = GetMonsterInMap( id );
    if(monster!=NULL)
        return (CCharacter*) monster;
    CPlayer* player = GetPlayerInMap( id );
    if(player!=NULL)
        return (CCharacter*) player;
    return NULL;
}
Beispiel #2
0
CCharacter* CMap::GetCharInMap( unsigned int id )
{
    CMonster* monster = GetMonsterInMap( id );
    if(monster!=NULL)
    {
        //LMA: Setting montype for CCharacter too.
        CCharacter* temp_char=(CCharacter*) monster;
        temp_char->char_montype=monster->montype;
        temp_char->char_owner=monster->owner;
        //return (CCharacter*) monster;
        return temp_char;
    }
    CPlayer* player = GetPlayerInMap( id );
    if(player!=NULL)
        return (CCharacter*) player;
    return NULL;
}