public void Announcement(string[] @Params, TPlayObject PlayObject) { string sGuildName = @Params.Length > 0 ? @Params[0] : ""; TGUild Guild; string sHumanName; int nPoint; if ((sGuildName == "") || ((sGuildName != "") && (sGuildName[0] == '?'))) { PlayObject.SysMsg("查看行会争霸赛结果。", TMsgColor.c_Red, TMsgType.t_Hint); PlayObject.SysMsg(String.Format("命令格式: @{0} 行会名称", this.Attributes.Name), TMsgColor.c_Red, TMsgType.t_Hint); return; } if (!PlayObject.m_PEnvir.m_boFight3Zone) { PlayObject.SysMsg("此命令不能在当前地图中使用!!!", TMsgColor.c_Red, TMsgType.t_Hint); return; } Guild = GuildManager.FindGuild(sGuildName); if (Guild != null) { UserEngine.CryCry(Grobal2.RM_CRY, PlayObject.m_PEnvir, PlayObject.m_nCurrX, PlayObject.m_nCurrY, 1000, M2Share.g_Config.btCryMsgFColor, M2Share.g_Config.btCryMsgBColor, String.Format(" - %s 行会争霸赛结果: ", Guild.sGuildName)); for (int I = 0; I < Guild.TeamFightDeadList.Count; I++) { nPoint = HUtil32.ObjectToInt(Guild.TeamFightDeadList[I]); sHumanName = Guild.TeamFightDeadList[I]; UserEngine.CryCry(Grobal2.RM_CRY, PlayObject.m_PEnvir, PlayObject.m_nCurrX, PlayObject.m_nCurrY, 1000, M2Share.g_Config.btCryMsgFColor, M2Share.g_Config.btCryMsgBColor, String.Format(" - %s : %d 分/死亡%d次。 ", sHumanName, HUtil32.HiWord(nPoint), HUtil32.LoWord(nPoint))); } } UserEngine.CryCry(Grobal2.RM_CRY, PlayObject.m_PEnvir, PlayObject.m_nCurrX, PlayObject.m_nCurrY, 1000, M2Share.g_Config.btCryMsgFColor, M2Share.g_Config.btCryMsgBColor, String.Format(" - [%s] : %d 分。", Guild.sGuildName, Guild.nContestPoint)); UserEngine.CryCry(Grobal2.RM_CRY, PlayObject.m_PEnvir, PlayObject.m_nCurrX, PlayObject.m_nCurrY, 1000, M2Share.g_Config.btCryMsgFColor, M2Share.g_Config.btCryMsgBColor, "------------------------------------"); }
/// <summary> /// 对象转Int32 /// </summary> /// <param name="src"></param> /// <returns></returns> public static int ToInt(this object src) { return(HUtil32.ObjectToInt(src)); }
/// <summary> /// 取对象HashCode /// </summary> /// <param name="obj"></param> /// <returns></returns> public virtual Int32 Parse(object obj) { return(HUtil32.ObjectToInt(obj)); }