Browse Source

玩家升级

makela 2 weeks ago
parent
commit
7169db2e6c
4 changed files with 14 additions and 30 deletions
  1. 0 18
      project/model/currency.lua
  2. 2 2
      project/model/player.lua
  3. 1 1
      project/model/rechargemod.lua
  4. 11 9
      project/model/role.lua

+ 0 - 18
project/model/currency.lua

@@ -14,24 +14,6 @@ local table_insert = table.insert
 local statistics_list = {
     CURRENCY_ID_COINS, 
     CURRENCY_ID_STM,
-    CURRENCY_ID_RELIC_SCORE,
-    CURRENCY_ID_RELIC_COIN,
-    CURRENCY_ID_EQUIP_COIN,
-    CURRENCY_ID_DIA,
-    CURRENCY_ID_IRON,
-    CURRENCY_ID_WOOD,
-    CURRENCY_ID_ROLE_EXP,
-    CURRENCY_ID_EXP_STONE,
-    CURRENCY_ID_EXP_BOOK,
-    CURRENCY_ID_TALENT_STONE,
-    CURRENCY_ID_WEAPON_SCROLL,
-    CURRENCY_ID_JEWELRY_SCROLL,
-    CURRENCY_ID_WRISTER_SCROLL,
-    CURRENCY_ID_CUIRASS_SCROLL,
-    CURRENCY_ID_BELT_SCROLL,
-    CURRENCY_ID_SHOE_SCROLL,
-    CURRENCY_ID_DRAW_COIN,
-    CURRENCY_ID_DRAW_COIN2,
 }
 
 local _M = schema.new(MODULE_NAME, {

+ 2 - 2
project/model/player.lua

@@ -280,7 +280,7 @@ local function enter(args)
   character.throw_exception = throw_exception
   local first = false
   if character.nickname then
-    if character.channel == "shengtian" then
+    if character.login_args.channel== "shengtian" then
         shengtian = shengtian or require "service.loginserver.shengtian"
         local content = {
             account = character.account,
@@ -299,7 +299,7 @@ local function enter(args)
         return { errno=STD_ERR.PLYAER_DUPLICATION_NAME}
     end
     character.set_nickname(name)
-    if character.channel == "shengtian" then
+    if character.login_args.channel== "shengtian" then
         shengtian = shengtian or require "service.loginserver.shengtian"
         local content = {
             account = character.account,

+ 1 - 1
project/model/rechargemod.lua

@@ -279,7 +279,7 @@ function recharge.get_orderid(character, giftid)
         time = now
     }
 
-    if character.channel == "shengtian" then
+    if character.login_args.channel== "shengtian" then
         shengtian = shengtian or require "service.loginserver.shengtian"
         local content = {
             fuse_uid = character.account,

+ 11 - 9
project/model/role.lua

@@ -69,15 +69,17 @@ function MODULE.monitor(character)
 
     character.monitor("role_level", function(_, pre, cur)
         shengtian = shengtian or require "service.loginserver.shengtian"
-        local content = {
-            account = character.account,
-            uid = character.uid,
-            name = character.nickname,
-            server = character.sid,
-            level = character.level,
-            power = character.power,
-        }
-        shengtian.upload(2, content)
+        if character.login_args.channel== "shengtian" then
+            local content = {
+                account = character.account,
+                uid = character.uid,
+                name = character.nickname,
+                server = character.sid,
+                level = character.level,
+                power = character.power,
+            }
+            shengtian.upload(2, content)
+        end
     end)
 end