You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
1.4 KiB

using ProtoCSStruct;
using Sog;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Game
{
/// <summary>
/// 活动榜
/// </summary>
public class ActRankTigger
{
private static Action<PlayerOnGame, int, bool>[] m_actRank_Event = new Action<PlayerOnGame, int, bool>[((int)ActRankType.Size)];
public static void RegisterAll()
{
m_actRank_Event[(int)ActRankType.None] = TiggerNone;
m_actRank_Event[(int)ActRankType.MainlandLevel] = TiggerMainLand;
}
/// <summary>
/// 单个触发
/// </summary>
/// <param name="player"></param>
/// <param name="type"></param>
public static void TiggerActRank(PlayerOnGame player, ActRankType type, int score, bool updateData = false) => m_actRank_Event[(int)type](player, score, updateData);
//整体触发
public static void TiggerNone(PlayerOnGame player, int num, bool updateData = false)
{
TraceLog.Error("PopBagCondition.TiggerNone select none player:{0}", player.UserID);
}
public static void TiggerMainLand(PlayerOnGame player, int mainland, bool updateData = false)
{
if (mainland <= 0) return;
TraceLog.Trace("PopBagCondition.TiggerMainLand select player:{0} mainlan:{1}", player.UserID, mainland);
}
}
}