神将置换

back_recharge
duhui 2023-02-16 18:00:33 +08:00
parent ce53589c72
commit 100749d81a
1 changed files with 3 additions and 0 deletions

View File

@ -2254,6 +2254,9 @@ public class HeroLogic {
*/
public void heroChange(ISession iSession, String heroID1, String heroID2, int itemId) throws Exception {
User user = UserManager.getUser(iSession.getUid());
if (heroID1.equals(heroID2)){
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE,"英雄相同,不能置换");
}
SHeroChange change = SHeroChange.map.get(itemId);
if (change == null){
throw new ErrorCodeException(ErrorCode.CFG_NULL,"道具不存在:"+itemId);