static void Postfix(ref PhotonPlayer newPhotonPlayer) { if (PhotonNetwork.isMasterClient && ModMessageHelper.Instance.GetPlayerMods(newPhotonPlayer).Contains(ModMessageHelper.Instance.GetModName("Max_Players"))) { ModMessage.SendRPC("Dragon.Max_Players", "Max_Players.SendRoleLeads", newPhotonPlayer, new object[] { Global.roleleads }); } }
static void Postfix(ref PhotonPlayer newPhotonPlayer) { if (PhotonNetwork.isMasterClient && ModMessageHelper.Instance.GetPlayerMods(newPhotonPlayer).Contains(ModMessageHelper.Instance.GetModName("PacifistLabel"))) { ModMessage.SendRPC("Dragon.PacifistLabel", "Pacifist_Label.RecievePacifistRunInfo", newPhotonPlayer, new object[] { PLServer.Instance.PacifistRun.GetDecrypted() }); } }
static void Postfix(ref PhotonPlayer newPhotonPlayer) { if (PhotonNetwork.isMasterClient && ModMessageHelper.Instance.GetPlayerMods(newPhotonPlayer).Contains(ModMessageHelper.Instance.GetModName("InsaneFire"))) { ModMessage.SendRPC("Dragon.InsaneFire", "InsaneFire.O2Rate", newPhotonPlayer, new object[] { Global.O2Consumption }); } }
public void Send(ModMessage message) { if (HasHandlerFor(message.TargetModID, message.Name)) { IssueTargetedBroadcast(message); } }
public void Broadcast(ModMessage message) { if (HasHandlerFor("*", message.Name)) { IssueBroadcast(message); } }
public static async Task <HttpResponseMessage> Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = "Getmessage")] HttpRequest req) { try { string requestBody = await new StreamReader(req.Body).ReadToEndAsync(); ModMessage modelojson = JsonConvert.DeserializeObject <ModMessage>(requestBody); string Orvarstring = "este"; string Orvarstring1 = "es"; string Orvarstring2 = "un"; string Orvarstring3 = "mensaje"; string Orvarstring4 = "secreto"; int VarContM = 0; string Avarstring = modelojson.message[0].ToString(); string Avarstring1 = modelojson.message[1].ToString(); string Avarstring2 = modelojson.message[2].ToString(); string Avarstring3 = modelojson.message[3].ToString(); string Avarstring4 = modelojson.message[4].ToString(); if (Orvarstring == Avarstring) { VarContM = VarContM + 1; } if (Orvarstring1 == Avarstring1) { VarContM = VarContM + 1; } if (Orvarstring2 == Avarstring2) { VarContM = VarContM + 1; } if (Orvarstring3 == Avarstring3) { VarContM = VarContM + 1; } if (Orvarstring4 == Avarstring4) { VarContM = VarContM + 1; } if (VarContM > 2) { var messagers = new { message = $"este es un mensaje secreto" }; return(Settings.Response(HttpStatusCode.OK, messagers)); } var message = new { message = $"Mensaje Secreto Errado, Minimo Deben Concidir 3 Partes" }; return(Settings.Response(HttpStatusCode.NotFound, message)); } catch (Exception ex) { var message = new { message = $"Se ha presentado un error en el algoritmo, por favor contactar a su administrador" }; return(Settings.Response(HttpStatusCode.InternalServerError, message)); } }
/** * 剧情副本-->玩家确认或拒绝进入 服务器通知回调 */ public static void PlayerConfirmResultCB(ModMessage notifyMsg) { StoryDungeonRpcPlayerConfirmResultNotifyWraper notifyPBWraper = new StoryDungeonRpcPlayerConfirmResultNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (PlayerConfirmResultCBDelegate != null) { PlayerConfirmResultCBDelegate(notifyPBWraper); } }
/** *玩家模块-->移动检测 服务器通知回调 */ public static void MoveCheckCB(ModMessage notifyMsg) { HumanRpcMoveCheckNotifyWraper notifyPBWraper = new HumanRpcMoveCheckNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (MoveCheckCBDelegate != null) { MoveCheckCBDelegate(notifyPBWraper); } }
/** * 剧情副本-->等待玩家确认是否选择进入 服务器通知回调 */ public static void WaitForConfirmationCB(ModMessage notifyMsg) { StoryDungeonRpcWaitForConfirmationNotifyWraper notifyPBWraper = new StoryDungeonRpcWaitForConfirmationNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (WaitForConfirmationCBDelegate != null) { WaitForConfirmationCBDelegate(notifyPBWraper); } }
/** *活动日常-->降妖除魔刷新Npc 服务器通知回调 */ public static void SubdueMonsterRefreshCB(ModMessage notifyMsg) { ActivityScheduleRpcSubdueMonsterRefreshNotifyWraper notifyPBWraper = new ActivityScheduleRpcSubdueMonsterRefreshNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (SubdueMonsterRefreshCBDelegate != null) { SubdueMonsterRefreshCBDelegate(notifyPBWraper); } }
/** *活动 风暴-->重置报名 服务器通知回调 */ public static void ResetSignUpNotifyCB(ModMessage notifyMsg) { ActivityStormRpcResetSignUpNotifyNotifyWraper notifyPBWraper = new ActivityStormRpcResetSignUpNotifyNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (ResetSignUpNotifyCBDelegate != null) { ResetSignUpNotifyCBDelegate(notifyPBWraper); } }
/** *一v一-->战斗结果Notify 叶青给我我就给客户端 服务器通知回调 */ public static void ACTResultNotifyCB(ModMessage notifyMsg) { OneVSOneRpcACTResultNotifyNotifyWraper notifyPBWraper = new OneVSOneRpcACTResultNotifyNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (ACTResultNotifyCBDelegate != null) { ACTResultNotifyCBDelegate(notifyPBWraper); } }
/** *事件模块-->ObjStopMove 服务器通知回调 */ public static void StopMoveCB(ModMessage notifyMsg) { EventRpcStopMoveNotifyWraper notifyPBWraper = new EventRpcStopMoveNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (StopMoveCBDelegate != null) { StopMoveCBDelegate(notifyPBWraper); } }
/** *帮派-->同步帮会副本创建 服务器通知回调 */ public static void RpcSyncNoticeOfCreateGuildDungeonCB(ModMessage notifyMsg) { GuildRpcRpcSyncNoticeOfCreateGuildDungeonNotifyWraper notifyPBWraper = new GuildRpcRpcSyncNoticeOfCreateGuildDungeonNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (RpcSyncNoticeOfCreateGuildDungeonCBDelegate != null) { RpcSyncNoticeOfCreateGuildDungeonCBDelegate(notifyPBWraper); } }
/** *帮派-->同步帮会战是否开启 服务器通知回调 */ public static void SyncNoticeOfOpenGuildWarCB(ModMessage notifyMsg) { GuildRpcSyncNoticeOfOpenGuildWarNotifyWraper notifyPBWraper = new GuildRpcSyncNoticeOfOpenGuildWarNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (SyncNoticeOfOpenGuildWarCBDelegate != null) { SyncNoticeOfOpenGuildWarCBDelegate(notifyPBWraper); } }
/** *帮派-->被邀请提示 服务器通知回调 */ public static void BeInvitedNoticeCB(ModMessage notifyMsg) { GuildRpcBeInvitedNoticeNotifyWraper notifyPBWraper = new GuildRpcBeInvitedNoticeNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (BeInvitedNoticeCBDelegate != null) { BeInvitedNoticeCBDelegate(notifyPBWraper); } }
/** *帮派-->同步帮会公告修改 服务器通知回调 */ public static void SyncNoticeOfChangeAnnouncementCB(ModMessage notifyMsg) { GuildRpcSyncNoticeOfChangeAnnouncementNotifyWraper notifyPBWraper = new GuildRpcSyncNoticeOfChangeAnnouncementNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (SyncNoticeOfChangeAnnouncementCBDelegate != null) { SyncNoticeOfChangeAnnouncementCBDelegate(notifyPBWraper); } }
/** *登录模块-->被踢下线 服务器通知回调 */ public static void KickOffCB(ModMessage notifyMsg) { LoginRpcKickOffNotifyWraper notifyPBWraper = new LoginRpcKickOffNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (KickOffCBDelegate != null) { KickOffCBDelegate(notifyPBWraper); } }
/** *战斗-->聊天 服务器通知回调 */ public static void TalkCB(ModMessage notifyMsg) { ZhanDouRpcTalkNotifyWraper notifyPBWraper = new ZhanDouRpcTalkNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (TalkCBDelegate != null) { TalkCBDelegate(notifyPBWraper); } }
/** *活动 风暴-->超时消息主推 服务器通知回调 */ public static void TimeOutMessageCB(ModMessage notifyMsg) { ActivityStormRpcTimeOutMessageNotifyWraper notifyPBWraper = new ActivityStormRpcTimeOutMessageNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (TimeOutMessageCBDelegate != null) { TimeOutMessageCBDelegate(notifyPBWraper); } }
/** *场景模块-->玩家离开视野 服务器通知回调 */ public static void DeletePlayerCB(ModMessage notifyMsg) { SceneRpcDeletePlayerNotifyWraper notifyPBWraper = new SceneRpcDeletePlayerNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (DeletePlayerCBDelegate != null) { DeletePlayerCBDelegate(notifyPBWraper); } }
/** *活动日常-->江洋大盗被开启通知 服务器通知回调 */ public static void ThiefBeOpenedCB(ModMessage notifyMsg) { ActivityScheduleRpcThiefBeOpenedNotifyWraper notifyPBWraper = new ActivityScheduleRpcThiefBeOpenedNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (ThiefBeOpenedCBDelegate != null) { ThiefBeOpenedCBDelegate(notifyPBWraper); } }
/** *场景模块-->新物体 服务器通知回调 */ public static void NewObjCB(ModMessage notifyMsg) { SceneRpcNewObjNotifyWraper notifyPBWraper = new SceneRpcNewObjNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (NewObjCBDelegate != null) { NewObjCBDelegate(notifyPBWraper); } }
/** *战斗-->战斗开始 服务器通知回调 */ public static void StartCB(ModMessage notifyMsg) { FightRpcStartNotifyWraper notifyPBWraper = new FightRpcStartNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (StartCBDelegate != null) { StartCBDelegate(notifyPBWraper); } }
/** *好友-->好友上下线 服务器通知回调 */ public static void FriendOnlineOfflineCB(ModMessage notifyMsg) { FriendRpcOnlineOfflineNotifyWraper notifyPBWraper = new FriendRpcOnlineOfflineNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (FriendOnlineOfflineCBDelegate != null) { FriendOnlineOfflineCBDelegate(notifyPBWraper); } }
/** *战斗-->玩家信息 服务器通知回调 */ public static void PlayerCB(ModMessage notifyMsg) { FightRpcPlayerNotifyWraper notifyPBWraper = new FightRpcPlayerNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (PlayerCBDelegate != null) { PlayerCBDelegate(notifyPBWraper); } }
/** *事件模块-->Boss死亡 服务器通知回调 */ public static void BossDiedCB(ModMessage notifyMsg) { EventRpcBossDiedNotifyWraper notifyPBWraper = new EventRpcBossDiedNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (BossDiedCBDelegate != null) { BossDiedCBDelegate(notifyPBWraper); } }
/** *进出副本模块-->打开副本通知 服务器通知回调 */ public static void OpenCB(ModMessage notifyMsg) { DungeonRpcOpenNotifyWraper notifyPBWraper = new DungeonRpcOpenNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (OpenCBDelegate != null) { OpenCBDelegate(notifyPBWraper); } }
/** *战斗-->动作 服务器通知回调 */ public static void ActionCB(ModMessage notifyMsg) { FightRpcActionNotifyWraper notifyPBWraper = new FightRpcActionNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (ActionCBDelegate != null) { ActionCBDelegate(notifyPBWraper); } }
/** *活动 风暴-->加入离开notify 服务器通知回调 */ public static void JoinLevevNotifyCB(ModMessage notifyMsg) { ActivityStormRpcJoinLevevNotifyNotifyWraper notifyPBWraper = new ActivityStormRpcJoinLevevNotifyNotifyWraper(); notifyPBWraper.FromMemoryStream(notifyMsg.protoMS); if (JoinLevevNotifyCBDelegate != null) { JoinLevevNotifyCBDelegate(notifyPBWraper); } }