173 lines
7.9 KiB
C#
173 lines
7.9 KiB
C#
using ProtoBuf;
|
||
using Thousandto.Plugins.Common;
|
||
using Thousandto.Code.Center;
|
||
using Thousandto.Code.Global;
|
||
using Thousandto.Cfg.Data;
|
||
|
||
namespace Thousandto.Code.Logic.Network
|
||
{
|
||
|
||
/// <summary>
|
||
/// 实现消息的回调方法
|
||
/// </summary>
|
||
public partial class HandleMsgResult : IHandleMsgResult
|
||
{
|
||
//进入副本返回
|
||
public void GS2U_ResEnterZone(MSG_zone.ResEnterZone result)
|
||
{
|
||
// 错误状态 0 为成功, 其它为错误
|
||
if (result.state == 0)
|
||
{
|
||
}
|
||
}
|
||
//询问玩家是否愿意进入副本
|
||
public void GS2U_ResTeamEnterZoneISOK(MSG_zone.ResTeamEnterZoneISOK result)
|
||
{
|
||
// GameCenter.PushFixEvent(UIEventDefine.UICopyTeamAskForm_OPEN, result);
|
||
//不弹界面直接同意
|
||
MSG_zone.ReqTeamAcceptEnterZone msg = new MSG_zone.ReqTeamAcceptEnterZone();
|
||
msg.modelId = result.modelId;
|
||
msg.ready = true;
|
||
msg.Send();
|
||
}
|
||
//
|
||
public void GS2U_ResTeamAcceptEnterZone(MSG_zone.ResTeamAcceptEnterZone result)
|
||
{
|
||
if (result.ready)
|
||
{
|
||
GameCenter.MsgPromptSystem.ShowPrompt(string.Format(Thousandto.Cfg.Data.DeclareMessageString.Get(Thousandto.Cfg.Data.DeclareMessageString.C_CROSS_MATCH_AGREE), result.rolename, result.modelId));
|
||
}
|
||
else
|
||
{
|
||
GameCenter.MsgPromptSystem.ShowPrompt(string.Format(Thousandto.Cfg.Data.DeclareMessageString.Get(Thousandto.Cfg.Data.DeclareMessageString.C_CROSS_MATCH_NOTAGREE), result.rolename, result.modelId));
|
||
}
|
||
}
|
||
//副本准备界面
|
||
public void GS2U_ResEnterZoneTeamInfo(MSG_zone.ResEnterZoneTeamInfo result){ }
|
||
//跨服匹配界面
|
||
public void GS2U_ResEnterCrossZoneReady(MSG_zone.ResEnterCrossZoneReady result)
|
||
{
|
||
GameCenter.PushFixEvent(LogicEventDefine.EID_EVENT_OPEN_CROSSMATCHPANEL, result);
|
||
GameCenter.PushFixEvent(UIEventDefine.UICopyMapForm_CLOSE);
|
||
GameCenter.PushFixEvent(UIEventDefine.UITeamForm_CLOSE);
|
||
}
|
||
//
|
||
public void GS2U_ResTeamEnterZoneFailure(MSG_zone.ResTeamEnterZoneFailure result)
|
||
{
|
||
if(result.type != 0)
|
||
{
|
||
GameCenter.MsgPromptSystem.ShowPrompt(string.Format(Thousandto.Cfg.Data.DeclareMessageString.Get(Thousandto.Cfg.Data.DeclareMessageString.C_COPYMAP_ENTER_NOTAGREE), result.roleName));
|
||
}
|
||
GameCenter.PushFixEvent(UIEventDefine.UICopyTeamPrepareForm_CLOSE);
|
||
}
|
||
|
||
public void GS2U_ResMatchFailure(MSG_zone.ResMatchFailure result)
|
||
{
|
||
GameCenter.PushFixEvent(LogicEventDefine.EID_EVENT_CLOSE_CROSSMATCHPANEL);
|
||
// GameCenter.PushFixEvent(UIEventDefine.UIWZLMMatchForm_CLOSE);
|
||
switch (result.reason)
|
||
{
|
||
//1,队友取消匹配。2,有队友掉线。3
|
||
case 1:
|
||
GameCenter.MsgPromptSystem.ShowPrompt(string.Format(Thousandto.Cfg.Data.DeclareMessageString.Get(Thousandto.Cfg.Data.DeclareMessageString.C_COPYMAP_MATCH_FAILED_CANEL), result.name));
|
||
break;
|
||
case 2:
|
||
GameCenter.MsgPromptSystem.ShowPrompt(string.Format(Thousandto.Cfg.Data.DeclareMessageString.Get(Thousandto.Cfg.Data.DeclareMessageString.C_COPYMAP_MATCH_FAILED_OUTLINE), result.name));
|
||
break;
|
||
}
|
||
}
|
||
|
||
//世界boss副本信息
|
||
public void GS2U_ResCloneStep(MSG_zone.ResCloneStep result)
|
||
{
|
||
//GameCenter.MapLogicSystem.OnMsgHandle(result);
|
||
}
|
||
public void GS2U_ResBuyEnterCloneTimes(MSG_zone.ResBuyEnterCloneTimes result)
|
||
{
|
||
//var cloneCfg = DeclareCloneMap.Get(result.cloneModelId);
|
||
//if (cloneCfg == null)
|
||
// return;
|
||
//var cloneGroup = GameCenter.CloneMapSystem.GetMapGroupData(cloneCfg.GroupId);
|
||
//if (cloneGroup.Type == CloneMapType.DailyActivity ||
|
||
// cloneGroup.Type == CloneMapType.StoryClone ||
|
||
// cloneGroup.Type == CloneMapType.DailyClone)
|
||
//{
|
||
// var cfg = cloneGroup.GetCurLevelCfg(0);
|
||
// if (cfg == null)
|
||
// return;
|
||
|
||
// var curLevel = GameCenter.VipLevelSystem.VipLevel;
|
||
// var vipCfg = GameCenter.VipLevelSystem.GetCfgDataByLevel(curLevel);
|
||
// if (vipCfg == null)
|
||
// {
|
||
// return;
|
||
// }
|
||
// int canAddCount = 0;
|
||
// int costGold = 0;
|
||
// if (cloneGroup.Type == CloneMapType.ManyPeopleClone)
|
||
// {
|
||
// canAddCount = vipCfg.Cfg.CloneManyPeople;
|
||
// var gCfg = DeclareGlobal.Get(1243);
|
||
// if (gCfg != null)
|
||
// {
|
||
// costGold = int.Parse(gCfg.Params);
|
||
// }
|
||
// }
|
||
// if (cloneGroup.Type == CloneMapType.DailyActivity)
|
||
// {
|
||
// canAddCount = vipCfg.Cfg.CloneTrial;
|
||
// var gCfg = DeclareGlobal.Get(1244);
|
||
// if (gCfg != null)
|
||
// {
|
||
// costGold = int.Parse(gCfg.Params);
|
||
// }
|
||
// }
|
||
// if (cloneGroup.Type == CloneMapType.StoryClone)
|
||
// {
|
||
// canAddCount = vipCfg.Cfg.CloneStoryNum;
|
||
// var gCfg = DeclareGlobal.Get(1270);
|
||
// if (gCfg != null)
|
||
// {
|
||
// costGold = int.Parse(gCfg.Params);
|
||
// }
|
||
// }
|
||
// if (cloneGroup.Type == CloneMapType.DailyClone)
|
||
// {
|
||
// canAddCount = vipCfg.Cfg.CloneExpNum;
|
||
// var gCfg = DeclareGlobal.Get(1277);
|
||
// if (gCfg != null)
|
||
// {
|
||
// costGold = int.Parse(gCfg.Params);
|
||
// }
|
||
// }
|
||
|
||
// GameCenter.MsgPromptSystem.CloseMsgBox();
|
||
// var canBuyCount = canAddCount - cloneGroup.BuTime;
|
||
// GameCenter.MsgPromptSystem.ShowMsgBox(string.Format(Thousandto.Cfg.Data.DeclareMessageString.Get(Thousandto.Cfg.Data.DeclareMessageString.C_COPYMAP_BUYCOUNT), costGold, canBuyCount, canAddCount, canBuyCount > 0 ? "00ff00" : "ff0000"), (code) =>
|
||
// {
|
||
// if (code == MsgBoxResultCode.Button2)
|
||
// {
|
||
// MSG_Vip.ReqBuyCloneTimes msg = new MSG_Vip.ReqBuyCloneTimes();
|
||
// msg.cloneId = cfg.Id;
|
||
// msg.num = 1;
|
||
// msg.Send();
|
||
// }
|
||
// });
|
||
//}
|
||
}
|
||
|
||
public void GS2U_G2PReqEnterZone(MSG_zone.G2PReqEnterZone result) { }
|
||
public void GS2U_G2PReqCrossZoneReadyZone(MSG_zone.G2PReqCrossZoneReadyZone result) { }
|
||
public void GS2U_P2GResCrossZoneReadyZone(MSG_zone.P2GResCrossZoneReadyZone result) { }
|
||
public void GS2U_P2GResEnterZone(MSG_zone.P2GResEnterZone result) { }
|
||
public void GS2U_P2GReqCancelCrossTag(MSG_zone.P2GReqCancelCrossTag result) { }
|
||
public void GS2U_G2PReqCancelMatch(MSG_zone.G2PReqCancelMatch result) { }
|
||
public void GS2U_P2GReqMatchSucceed(MSG_zone.P2GReqMatchSucceed result) { }
|
||
public void GS2U_P2GEnterOutlandWar(MSG_zone.P2GEnterOutlandWar result) {}
|
||
public void GS2U_ResBravePeakRecord( MSG_zone.ResBravePeakRecord result ) {}
|
||
public void GS2U_ResBravePeakSuccessOneFloorNotice( MSG_zone.ResBravePeakSuccessOneFloorNotice result ) {}
|
||
public void GS2U_ResBravePeakResultPanl(MSG_zone.ResBravePeakResultPanl result) { }
|
||
public void GS2U_ResBossStateResultPanl(MSG_zone.ResBossStateResultPanl result) { }
|
||
}
|
||
}
|