Bläddra i källkod

英雄升星校验当前出战的英雄是否为升星英雄

cyzhao 10 månader sedan
förälder
incheckning
174826e204
1 ändrade filer med 4 tillägg och 2 borttagningar
  1. 4 2
      Gameserver/App/process/HeroProc.php

+ 4 - 2
Gameserver/App/process/HeroProc.php

@@ -70,9 +70,11 @@ class HeroProc {
         $ins_hero = new Ins_Hero(ctx()->heros->Dic->$heroId);
         $ins_hero->Id = $nextHeroId;                     
         ctx()->heros->Dic->$nextHeroId = $ins_hero;
-        
+        if(ctx()->heros->CurrentHeroId == $heroId){
+            ctx()->heros->CurrentHeroId = $nextHeroId;
+        }
         StlUtil::dictRemove(ctx()->heros->Dic, $heroId);
-                
+                             
         UserProc::updateUserInfo();
         return Resp::ok(array(                   
                     'store' => ctx()->store,