public bool SetNpoId(int npo_id)
    {
        if (!_initialized)
        {
            return(false);
        }

        SpawnDataSource sds = PeCustomScene.Self.spawnData;

        if (sds.ContainMonster(npo_id))
        {
            MonsterSpawnPoint msp = sds.GetMonster(npo_id);
            if (msp.agent != null && msp.agent.entity != null)
            {
                npoEntity = msp.agent.entity;
            }
        }
        else if (sds.ContainNpc(npo_id))
        {
            NPCSpawnPoint nsp = sds.GetNpc(npo_id);
            if (nsp.agent != null && nsp.agent.entity != null)
            {
                npoEntity = nsp.agent.entity;
            }
        }

        if (npoEntity != null)
        {
            npoId = npo_id;

            npcSpeechBox.SetNpcInfo(npoEntity.ExtGetName(), npoEntity.ExtGetFaceIconBig());

            return(true);
        }
        else
        {
            npoId = -1;
            npcSpeechBox.SetNpcInfo("", "Null");
        }

        return(false);
    }
    public bool SetNpoId(int npo_id)
    {
        SpawnDataSource sds = PeCustomScene.Self.spawnData;

        if (sds.ContainMonster(npo_id))
        {
            MonsterSpawnPoint msp = sds.GetMonster(npo_id);
            if (msp.agent != null && msp.agent.entity != null)
            {
                npoEntity = msp.agent.entity;
            }
        }
        else if (sds.ContainNpc(npo_id))
        {
            NPCSpawnPoint nsp = sds.GetNpc(npo_id);
            if (nsp.agent != null && nsp.agent.entity != null)
            {
                npoEntity = nsp.agent.entity;
            }
        }

        if (npoEntity != null)
        {
            npoId = npo_id;

            npcDialogWnd.SetNPCInfo(npoEntity.ExtGetName(), npoEntity.ExtGetFaceIcon());

            refreshQuestsNow = true;

            return(true);
        }
        else
        {
            npoId = -1;
            npcDialogWnd.SetNPCInfo("", "Null");
        }

        return(false);
    }
Beispiel #3
0
 public void SpanwMonster(Monster m, MonsterSpawnPoint spawn)
 {
     spawn.Spawn(m);
 }
Beispiel #4
0
 public void SpawnAtRandom(Monster m)
 {
     MonsterSpawnPoint s = spawnPoints.RandomItem(x => x.CanSpawn());
 }