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.
38 lines
949 B
38 lines
949 B
namespace Game
|
|
{
|
|
|
|
public class ActivityUtils
|
|
{
|
|
public static void RegisterAll()
|
|
{
|
|
TimeTrigger.Register();
|
|
AbstractActivity.Register();
|
|
}
|
|
//活动是否再当前区服是否有效
|
|
public static bool IsActivityValid(int realmId, int actId)
|
|
{
|
|
var desc = ActivityDescMgr.Instance.GetConfig(actId);
|
|
if (desc == null)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if (desc.severOpenMin != 0 && desc.severOpenMax != 0)
|
|
{
|
|
return realmId >= desc.severOpenMin && realmId <= desc.severOpenMax;
|
|
}
|
|
|
|
if (desc.severOpenMin != 0)
|
|
{
|
|
return realmId >= desc.severOpenMin;
|
|
}
|
|
|
|
if (desc.severOpenMax != 0)
|
|
{
|
|
return realmId >= desc.severOpenMax;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|