宝物错误数据修改

back_recharge
lvxinran 2020-12-12 18:09:46 +08:00
parent 1f0f27727b
commit 1272ae01f8
1 changed files with 5 additions and 2 deletions

View File

@ -2087,7 +2087,7 @@ public class HeroLogic{
user.getUserMissionManager().onGameEvent(user,GameEvent.WEAR_EQUIP,equipInfoTmp.size());
}else if(type ==2){
for(String jId:equipIds){
wearJewel(hero,equipManager,jId);
wearJewel(user.getHeroManager(),hero,equipManager,jId);
}
}
@ -2104,13 +2104,16 @@ public class HeroLogic{
}
private void wearJewel(Hero hero,EquipManager equipManager,String equipId)throws Exception{
private void wearJewel(HeroManager heroManager,Hero hero,EquipManager equipManager,String equipId)throws Exception{
Jewel equip =(Jewel)equipManager.getEquipMap().get(equipId);
if( null == equip || null == hero ){
throw new ErrorCodeException(ErrorCode.HERO_EQUIP_ERR);
}
if(null!=equip.getHeroId()&&!equip.getHeroId().equals("")){
if(heroManager.getHero(equip.getHeroId())==null){
equip.setHeroId("");
}
return;
}