神将置换
parent
ce53589c72
commit
100749d81a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue