コード例 #1
0
    //注入奖励
    //添加新奖励类型时需要修改此方法
    public void addAwards(string type, Award[] awards)
    {
        AwardCache cache = AwardsCacheManager.getAwardCache(type);

        //设置奖励
        if (type == AWARDS_FUBEN_RES || type == AWARDS_FUBEN_OVER ||
            type == AWARDS_BATTLE || type == AWARDS_BOX ||
            type == AWARDS_PVP_DOUBLE || type == AWARDS_ACHIEVE ||
            type == AWARDS_HERO_ROAD || type == AWARDS_STAR_PRAY ||
            type == DIVINATION || type == AWARDS_INVITE_EVENT ||
            type == AWARDS_LADDER || type == AWARDS_LUCKY_CARD ||
            type == AWARDS_LUCKY_EQUIP || type == AWARDS_INVITE_SDKAWARD ||
            type == AWARDS_GUILD_WAR || type == AWARDS_MINERAL_WAR ||
            type == AWARDS_GODSWAR_GROUP || type == BOSS_INFO_AWARD || type == LASTBATTLE_AWARD || type == LASTBATTLE_BOSS_AWARD)
        {
            cache.setAwards(awards);
        }
        //添加奖励
        else
        {
        }
    }
コード例 #2
0
    public static void setAwards(string key, Award[] awads)
    {
        AwardCache cache = getAwardCache(key);

        cache.setAwards(awads);
    }