102 lines
2.1 KiB
C#
Raw Normal View History

2025-05-18 01:04:31 +08:00
// ***********************************************************************
// Assembly : Unity
// Author : Kimch
// Created : 2018-2-8
// Description : 帮会历史的数据
// Last Modified By : Kimch
// Last Modified On :
// ***********************************************************************
// <copyright file= "GuildHistory" company=""></copyright>
// <summary></summary>
// ***********************************************************************
namespace G
{
public class GuildHistory
{
public enum GUILDHISTORY_TYPE
{
TYPE_INVALID = -1,
TYPE_KICK = 0,
TYPE_LEAVE,
TYPE_JOIN,
TYPE_GUILDLEVELUP,
TYPE_MAX,
}
public GuildHistory()
{
CleanUp();
}
public void CleanUp()
{
historyType = (int)GUILDHISTORY_TYPE.TYPE_INVALID;
historyTime = -1;
_historyText = new string[GUILHISTORY_TEXTNUM];
for (int i = 0; i < _historyText.Length; i++)
{
_historyText[i] = "";
}
}
public bool IsValid()
{
return historyType != (int)GUILDHISTORY_TYPE.TYPE_INVALID;
}
public int historyType
{
get;
set;
}
public int historyTime
{
get;
set;
}
public const int GUILHISTORY_TEXTNUM = 5;
private string[] _historyText;
public string[] historyText
{
get { return _historyText; }
set { _historyText = value; }
}
public static string GetTypeDic(int nHistoryType)
{
switch ((GUILDHISTORY_TYPE)nHistoryType)
{
case GUILDHISTORY_TYPE.TYPE_KICK:
return "#{10457}";
case GUILDHISTORY_TYPE.TYPE_LEAVE:
return "#{10458}";
case GUILDHISTORY_TYPE.TYPE_JOIN:
return "#{10459}";
case GUILDHISTORY_TYPE.TYPE_GUILDLEVELUP:
return "#{10460}";
default:
return "";
}
}
public static int GetTypeTextCount(int nHistoryType)
{
switch ((GUILDHISTORY_TYPE)nHistoryType)
{
case GUILDHISTORY_TYPE.TYPE_KICK:
return 2;
case GUILDHISTORY_TYPE.TYPE_LEAVE:
return 1;
case GUILDHISTORY_TYPE.TYPE_JOIN:
return 1;
case GUILDHISTORY_TYPE.TYPE_GUILDLEVELUP:
return 0;
default:
return 0;
}
}
}
}