<?php

namespace loyalsoft;

/**
 * 枚举: 角标提示类型枚举
 */
class OperateEventType extends Enum {

    const _Empty = 0;                                                           // 空
    const Task = 1;
    const Task_plot = 2;                                                        // 任务 剧情任务
    const Task_Daily = 3;                                                       // 任务 每日任务
    const Call = 4;
    const Call_Warrior = 5;                                                     // 召唤 战士
    const Call_Magician = 6;                                                    // 召唤 法师
    const Call_Archer = 7;                                                      // 召唤 射手
    const Bag = 8;
    const Bag_Weapon = 9;                                                       // 背包 武器
    const Bag_Kotodama = 10;                                                     // 背包 言灵
    const Bag_Fragment = 11;                                                     // 背包 碎片
    const Bag_Material = 12;                                                     // 背包 材料
    const Ranking = 13;
    const Ranking_PowerReward = 14;                                             // 排行榜 战力榜奖励
    const Ranking_ClearanceReward = 15;                                         // 排行榜 通关榜奖励
    const Mail_New = 16;                                                        // 邮件 新邮件
    const Notice_New = 17;                                                      // 公告 新公告
    const Arena_FreeTimes = 18;                                                 // 竞技场 可进入
    const Gift = 19;                                                            // 礼包
    const Gift_Day = 20;                                                        // 每日礼包
    const Role = 21;                                                            // 角色模块
    const Role_Attribute = 22;                                                  // 角色  属性(有新的可升级的道具)
    const Role_YanLing = 23;                                                    // 角色 有新言灵
    const Role_Weapon = 24;                                                     // 角色 有新武器

}

/**
 * Description of CornerSignEventProc
 *
 * @author Administrator
 */
class CornerSignEventProc {
    // <editor-fold defaultstate="collapsed" desc="礼包">

    /**
     * 每日礼包提示
     */
    public static function OnNewDay() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Gift_Day;
    }

// </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="任务">

    /**
     * 剧情任务状态有更新(新增/完成)
     */
    public static function OnTask_Plot_new() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Task_plot;
    }

    /**
     * 每日任务状态有变动(完成)
     */
    public static function OnTask_Daily_new() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Task_Daily;
    }

// </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="言灵">

    /**
     * 言灵召唤状态,解锁新的战士
     */
    public static function OnCall_Warrior_new() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Call_Warrior;
    }

    /**
     * 言灵召唤状态,解锁新的法师
     */
    public static function OnCall_Magician_new() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Call_Magician;
    }

    /**
     * 言灵召唤状态,解锁新的射手
     */
    public static function OnCall_Archer_new() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Call_Archer;
    }

// </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="背包">

    /**
     * 包裹--获得新的武器
     */
    public static function OnBag_new_Weapon() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Bag_Weapon;
    }

    /**
     * 包裹--获得新的言灵
     */
    public static function OnBag_new_Yanling() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Bag_Kotodama;
    }

    /**
     * 包裹--获得新的碎片
     */
    public static function OnBag_new_Fragment() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Bag_Fragment;
    }

    /**
     * 包裹--获得新的材料
     */
    public static function OnBag_new_Material() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Bag_Material;
    }

// </editor-fold>

    /**
     * 排行榜--战力奖励状态有变化
     */
    public static function OnRanking_PowerReward_new() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Ranking_PowerReward;
    }

    /**
     * 排行榜--通关奖励状态有变化
     */
    public static function OnRanking_GageReward_new() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Ranking_ClearanceReward;
    }

    /**
     * 邮件系统--有新的邮件
     */
    public static function OnNewMails() {
        if (null != ctx()) {
            ctx()->privateState->cornerSignNotifications[] = OperateEventType::Mail_New;
            UserProc::updateUserInfo();
        }
    }

    /**
     * 公告有更新
     */
    public static function OnNotice_new() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Notice_New;
    }

    /**
     * 角色 属性(有新的可升级道具)
     */
    public static function OnRoleAttribute() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Role_Attribute;
    }

    /**
     * 角色 言灵(有新的可替换/装备言灵)
     */
    public static function OnRoleYanling() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Role_YanLing;
    }

    /**
     * 角色 武器(有新的可装备/替换武器)
     */
    public static function OnRoleWeapon() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Role_YanLing;
    }

    /**
     * AAA
     */
    public static function OnAAA() {
        ctx()->privateState->cornerSignNotifications[] = OperateEventType::Arena_FreeTimes;
    }

}
