Esempio n. 1
0
    public string buildPhrase()
    {
        string phrase = "";

        switch (action)
        {
        case ActionType.Kill:
            phrase += "Mata";
            break;

        case ActionType.Visit:
            phrase += "Ve a";
            break;

        case ActionType.Talk:
            phrase += "Habla con";
            break;

        case ActionType.GetItem:
            phrase += "Consigue";
            break;

        default:
            break;
        }
        phrase += " ";

        switch (type)
        {
        case ActorType.NPC:
            if (idType == IdType.Template)
            {
                NPCTemplate data = NPCTemplate.get(id);
                phrase += data.name;
            }
            else
            {
                NPCData data = NPC.get(id);
                phrase += data.name;
            }
            break;

        case ActorType.Item:
            ItemData item = Item.get(id);
            phrase += item.name;
            break;
        }
        phrase += " ";

        if (quantity > 1)
        {
            phrase += currentQuantity + "/" + quantity;
        }
        return(phrase);
    }
Esempio n. 2
0
    public string buildPhrase()
    {
        string phrase = "";

        switch (action)
        {
        case ActionType.Kill:
            phrase += LanguageManager.get("TASK_KILL");
            break;

        case ActionType.Visit:
            phrase += LanguageManager.get("TASK_VISIT");
            break;

        case ActionType.Talk:
            phrase += LanguageManager.get("TASK_TALK");
            break;

        case ActionType.GetItem:
            phrase += LanguageManager.get("TASK_GET_ITEM");
            break;

        default:
            break;
        }
        phrase += " ";

        switch (type)
        {
        case ActorType.NPC:
            if (idType == IdType.Template)
            {
                NPCTemplate data = NPCTemplate.get(id);
                phrase += data.name;
            }
            else
            {
                NPCData data = NPC.get(id);
                phrase += data.name;
            }
            break;

        case ActorType.Item:
            ItemData item = Item.get(id);
            phrase += item.name;
            break;
        }
        phrase += " ";

        if (quantity > 1)
        {
            phrase += currentQuantity + "/" + quantity;
        }
        return(phrase);
    }
Esempio n. 3
0
    public static NPCData fillById(NPCData.creatureTemplate id, int level)
    {
        int         _id      = (int)id;
        NPCData     npc      = new NPCData();
        NPCTemplate template = NPCTemplate.get(_id);

        npc.name        = template.name;
        npc.template    = _id;
        npc.race        = template.creatureRace;
        npc.subRace     = template.creatureSubRace;
        npc.level       = level;
        npc.health      = template.healthBase * level;
        npc.isAggresive = template.isAgressive;

        return(npc);
    }