<?php

namespace loyalsoft;

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

    const _Empty = 0;                                                           // 空
    //
    const Task = 100;
    const Task_plot = 101;                                                      # 任务 剧情任务
    const Task_Daily = 102;                                                     # 任务 每日任务
    //
    const Call = 200;
    const Call_Warrior = 201;                                                   # 召唤 战士
    const Call_Magician = 202;                                                  # 召唤 法师
    const Call_Archer = 203;                                                    # 召唤 射手
    //
    const Bag = 300;
    const Bag_Weapon = 301;                                                     # 背包 武器
    const Bag_Kotodama = 302;                                                   # 背包 言灵
    const Bag_Fragment = 303;                                                   # 背包 碎片
    const Bag_Material = 304;                                                   # 背包 材料
    const Bag_TaskCard = 305;                                                   # 背包 任务卡
    const Bag_Consume = 306;                                                    # 背包 消耗类(蓝屏 血瓶 卷轴等)
    //
    const Ranking = 400;
    const Ranking_PowerReward = 401;                                            # 排行榜 战力榜奖励
    const Ranking_ClearanceReward = 402;                                        # 排行榜 通关榜奖励
    #
    const Mail_New = 500;                                                       # 邮件 新邮件
    const Notice_New = 600;                                                     # 公告 新公告
    const Arena_FreeTimes = 700;                                                # 竞技场 可进入
    #
    const Gift = 800;                                                           # 礼包
    const Gift_Day = 801;                                                       # 每日礼包
    #
    const Role = 900;                                                           # 角色模块
    const Role_Attribute = 901;                                                 # 角色  属性(有新的可升级的道具)
    const Role_YanLing = 902;                                                   # 角色 有新言灵
    const Role_Weapon = 903;                                                    # 角色 有新武器

}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * 包裹--获得新的任务卡
     */
    public static function OnBag_new_TaskCard() {
        ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Bag_TaskCard;
    }

    /**
     * 包裹--获得新的消耗性道具
     */
    public static function OnBag_new_Consume() {
        ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Bag_Consume;
    }

// </editor-fold>

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

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

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

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

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

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

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

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

}
