Exemplo n.º 1
0
 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 });
     }
 }
Exemplo n.º 2
0
 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() });
     }
 }
Exemplo n.º 3
0
 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 });
     }
 }
Exemplo n.º 4
0
 public void Send(ModMessage message)
 {
     if (HasHandlerFor(message.TargetModID, message.Name))
     {
         IssueTargetedBroadcast(message);
     }
 }
Exemplo n.º 5
0
 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));
            }
        }
Exemplo n.º 7
0
    /**
     * 剧情副本-->玩家确认或拒绝进入 服务器通知回调
     */
    public static void PlayerConfirmResultCB(ModMessage notifyMsg)
    {
        StoryDungeonRpcPlayerConfirmResultNotifyWraper notifyPBWraper = new StoryDungeonRpcPlayerConfirmResultNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (PlayerConfirmResultCBDelegate != null)
        {
            PlayerConfirmResultCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 8
0
    /**
     *玩家模块-->移动检测 服务器通知回调
     */
    public static void MoveCheckCB(ModMessage notifyMsg)
    {
        HumanRpcMoveCheckNotifyWraper notifyPBWraper = new HumanRpcMoveCheckNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (MoveCheckCBDelegate != null)
        {
            MoveCheckCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 9
0
    /**
     * 剧情副本-->等待玩家确认是否选择进入 服务器通知回调
     */
    public static void WaitForConfirmationCB(ModMessage notifyMsg)
    {
        StoryDungeonRpcWaitForConfirmationNotifyWraper notifyPBWraper = new StoryDungeonRpcWaitForConfirmationNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (WaitForConfirmationCBDelegate != null)
        {
            WaitForConfirmationCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 10
0
    /**
     *活动日常-->降妖除魔刷新Npc 服务器通知回调
     */
    public static void SubdueMonsterRefreshCB(ModMessage notifyMsg)
    {
        ActivityScheduleRpcSubdueMonsterRefreshNotifyWraper notifyPBWraper = new ActivityScheduleRpcSubdueMonsterRefreshNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (SubdueMonsterRefreshCBDelegate != null)
        {
            SubdueMonsterRefreshCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 11
0
    /**
     *活动 风暴-->重置报名 服务器通知回调
     */
    public static void ResetSignUpNotifyCB(ModMessage notifyMsg)
    {
        ActivityStormRpcResetSignUpNotifyNotifyWraper notifyPBWraper = new ActivityStormRpcResetSignUpNotifyNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (ResetSignUpNotifyCBDelegate != null)
        {
            ResetSignUpNotifyCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 12
0
    /**
     *一v一-->战斗结果Notify 叶青给我我就给客户端 服务器通知回调
     */
    public static void ACTResultNotifyCB(ModMessage notifyMsg)
    {
        OneVSOneRpcACTResultNotifyNotifyWraper notifyPBWraper = new OneVSOneRpcACTResultNotifyNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (ACTResultNotifyCBDelegate != null)
        {
            ACTResultNotifyCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 13
0
    /**
     *事件模块-->ObjStopMove 服务器通知回调
     */
    public static void StopMoveCB(ModMessage notifyMsg)
    {
        EventRpcStopMoveNotifyWraper notifyPBWraper = new EventRpcStopMoveNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (StopMoveCBDelegate != null)
        {
            StopMoveCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 14
0
    /**
     *帮派-->同步帮会副本创建 服务器通知回调
     */
    public static void RpcSyncNoticeOfCreateGuildDungeonCB(ModMessage notifyMsg)
    {
        GuildRpcRpcSyncNoticeOfCreateGuildDungeonNotifyWraper notifyPBWraper = new GuildRpcRpcSyncNoticeOfCreateGuildDungeonNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (RpcSyncNoticeOfCreateGuildDungeonCBDelegate != null)
        {
            RpcSyncNoticeOfCreateGuildDungeonCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 15
0
    /**
     *帮派-->同步帮会战是否开启 服务器通知回调
     */
    public static void SyncNoticeOfOpenGuildWarCB(ModMessage notifyMsg)
    {
        GuildRpcSyncNoticeOfOpenGuildWarNotifyWraper notifyPBWraper = new GuildRpcSyncNoticeOfOpenGuildWarNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (SyncNoticeOfOpenGuildWarCBDelegate != null)
        {
            SyncNoticeOfOpenGuildWarCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 16
0
    /**
     *帮派-->被邀请提示 服务器通知回调
     */
    public static void BeInvitedNoticeCB(ModMessage notifyMsg)
    {
        GuildRpcBeInvitedNoticeNotifyWraper notifyPBWraper = new GuildRpcBeInvitedNoticeNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (BeInvitedNoticeCBDelegate != null)
        {
            BeInvitedNoticeCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 17
0
    /**
     *帮派-->同步帮会公告修改 服务器通知回调
     */
    public static void SyncNoticeOfChangeAnnouncementCB(ModMessage notifyMsg)
    {
        GuildRpcSyncNoticeOfChangeAnnouncementNotifyWraper notifyPBWraper = new GuildRpcSyncNoticeOfChangeAnnouncementNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (SyncNoticeOfChangeAnnouncementCBDelegate != null)
        {
            SyncNoticeOfChangeAnnouncementCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 18
0
    /**
     *登录模块-->被踢下线 服务器通知回调
     */
    public static void KickOffCB(ModMessage notifyMsg)
    {
        LoginRpcKickOffNotifyWraper notifyPBWraper = new LoginRpcKickOffNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (KickOffCBDelegate != null)
        {
            KickOffCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 19
0
    /**
     *战斗-->聊天 服务器通知回调
     */
    public static void TalkCB(ModMessage notifyMsg)
    {
        ZhanDouRpcTalkNotifyWraper notifyPBWraper = new ZhanDouRpcTalkNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (TalkCBDelegate != null)
        {
            TalkCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 20
0
    /**
     *活动 风暴-->超时消息主推 服务器通知回调
     */
    public static void TimeOutMessageCB(ModMessage notifyMsg)
    {
        ActivityStormRpcTimeOutMessageNotifyWraper notifyPBWraper = new ActivityStormRpcTimeOutMessageNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (TimeOutMessageCBDelegate != null)
        {
            TimeOutMessageCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 21
0
    /**
     *场景模块-->玩家离开视野 服务器通知回调
     */
    public static void DeletePlayerCB(ModMessage notifyMsg)
    {
        SceneRpcDeletePlayerNotifyWraper notifyPBWraper = new SceneRpcDeletePlayerNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (DeletePlayerCBDelegate != null)
        {
            DeletePlayerCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 22
0
    /**
     *活动日常-->江洋大盗被开启通知 服务器通知回调
     */
    public static void ThiefBeOpenedCB(ModMessage notifyMsg)
    {
        ActivityScheduleRpcThiefBeOpenedNotifyWraper notifyPBWraper = new ActivityScheduleRpcThiefBeOpenedNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (ThiefBeOpenedCBDelegate != null)
        {
            ThiefBeOpenedCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 23
0
    /**
     *场景模块-->新物体 服务器通知回调
     */
    public static void NewObjCB(ModMessage notifyMsg)
    {
        SceneRpcNewObjNotifyWraper notifyPBWraper = new SceneRpcNewObjNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (NewObjCBDelegate != null)
        {
            NewObjCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 24
0
    /**
     *战斗-->战斗开始 服务器通知回调
     */
    public static void StartCB(ModMessage notifyMsg)
    {
        FightRpcStartNotifyWraper notifyPBWraper = new FightRpcStartNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (StartCBDelegate != null)
        {
            StartCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 25
0
    /**
     *好友-->好友上下线 服务器通知回调
     */
    public static void FriendOnlineOfflineCB(ModMessage notifyMsg)
    {
        FriendRpcOnlineOfflineNotifyWraper notifyPBWraper = new FriendRpcOnlineOfflineNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (FriendOnlineOfflineCBDelegate != null)
        {
            FriendOnlineOfflineCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 26
0
    /**
     *战斗-->玩家信息 服务器通知回调
     */
    public static void PlayerCB(ModMessage notifyMsg)
    {
        FightRpcPlayerNotifyWraper notifyPBWraper = new FightRpcPlayerNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (PlayerCBDelegate != null)
        {
            PlayerCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 27
0
    /**
     *事件模块-->Boss死亡 服务器通知回调
     */
    public static void BossDiedCB(ModMessage notifyMsg)
    {
        EventRpcBossDiedNotifyWraper notifyPBWraper = new EventRpcBossDiedNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (BossDiedCBDelegate != null)
        {
            BossDiedCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 28
0
    /**
     *进出副本模块-->打开副本通知 服务器通知回调
     */
    public static void OpenCB(ModMessage notifyMsg)
    {
        DungeonRpcOpenNotifyWraper notifyPBWraper = new DungeonRpcOpenNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (OpenCBDelegate != null)
        {
            OpenCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 29
0
    /**
     *战斗-->动作 服务器通知回调
     */
    public static void ActionCB(ModMessage notifyMsg)
    {
        FightRpcActionNotifyWraper notifyPBWraper = new FightRpcActionNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (ActionCBDelegate != null)
        {
            ActionCBDelegate(notifyPBWraper);
        }
    }
Exemplo n.º 30
0
    /**
     *活动 风暴-->加入离开notify 服务器通知回调
     */
    public static void JoinLevevNotifyCB(ModMessage notifyMsg)
    {
        ActivityStormRpcJoinLevevNotifyNotifyWraper notifyPBWraper = new ActivityStormRpcJoinLevevNotifyNotifyWraper();

        notifyPBWraper.FromMemoryStream(notifyMsg.protoMS);
        if (JoinLevevNotifyCBDelegate != null)
        {
            JoinLevevNotifyCBDelegate(notifyPBWraper);
        }
    }