Exemplo n.º 1
0
        public void CommandChargeMoney(int consoleNetId, string charName, int money)
        {
            var charId = EM_Character.s_instance.GetCharIdByName(charName);

            if (charId == -1)
            {
                m_networkService.SendServerCommand(SC_ConsoleFail.Instance(consoleNetId, "角色名有误"));
                return;
            }
            GL_Wallet.s_instance.NotifyChargeMoney(charId, money);
            m_networkService.SendServerCommand(SC_ConsoleSuccess.Instance(consoleNetId));
        }
Exemplo n.º 2
0
        public void CommandGainCurrencyByName(int consoleNetId, string name, CurrencyType type, long dC)
        {
            var charId = EM_Character.s_instance.GetCharIdByName(name);

            if (charId == -1)
            {
                m_networkService.SendServerCommand(SC_ConsoleFail.Instance(consoleNetId, "角色名有误"));
                return;
            }
            var netId = EM_Character.s_instance.GetNetIdByCharId(charId);

            if (netId != -1)
            {
                GL_Wallet.s_instance.NotifyUpdateCurrencyOnline(netId, charId, type, dC);
            }
            else
            {
                GL_Wallet.s_instance.NotifyUpdateCurrencyOffline(charId, type, dC);
            }
            m_networkService.SendServerCommand(SC_ConsoleSuccess.Instance(consoleNetId));
        }