Esempio n. 1
0
    private bool LoadItemElement(SecurityElement element, out RoleRankFeatObject itemElement)
    {
        itemElement = new RoleRankFeatObject();
        string attribute = element.Attribute("Role_Rank");

        if (attribute != null)
        {
            itemElement.Role_Rank = StrParser.ParseDecInt(attribute, 0);
        }

        attribute = element.Attribute("Item_ID");
        if (attribute != null)
        {
            itemElement.Item_ID = StrParser.ParseDecInt(attribute, 0);
        }

        attribute = element.Attribute("Feat");
        if (attribute != null)
        {
            itemElement.Feat = StrParser.ParseDecInt(attribute, 0);
        }

        attribute = element.Attribute("General_Command_Modify");
        if (attribute != null)
        {
            itemElement.General_Command_Modify = StrParser.ParseDecInt(attribute, 0);
        }

        attribute = element.Attribute("General_Intelligence_Modify");
        if (attribute != null)
        {
            itemElement.General_Intelligence_Modify = StrParser.ParseDecInt(attribute, 0);
        }

        attribute = element.Attribute("General_Chivalrous_Modify");
        if (attribute != null)
        {
            itemElement.General_Chivalrous_Modify = StrParser.ParseDecInt(attribute, 0);
        }

        attribute = element.Attribute("Max_Life_Modify");
        if (attribute != null)
        {
            itemElement.Max_Life_Modify = StrParser.ParseDecInt(attribute, 0);
        }

        attribute = element.Attribute("Max_Ship_Num");
        if (attribute != null)
        {
            itemElement.Max_Ship_Num = StrParser.ParseDecInt(attribute, 0);
        }

        attribute = element.Attribute("General_Skill");
        if (attribute != null)
        {
            itemElement.General_Skill = StrParser.ParseDecInt(attribute, 0);
        }

        return(true);
    }
Esempio n. 2
0
    public bool GetRoleRankFeatObject(int mRole_Rank, out RoleRankFeatObject roleRankFeatObject)
    {
        roleRankFeatObject = null;

        if (!_mRoleRankFeatObjectDic.TryGetValue(mRole_Rank, out roleRankFeatObject))
        {
            return(false);
        }
        return(true);
    }