Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
5ef6a8debc
|
@ -12,7 +12,7 @@ public class EspecialEquip extends PropertyItem {
|
||||||
super();
|
super();
|
||||||
super.setId(KeyGenUtils.produceIdByModule(UUIDEnum.ESPECIAL_EQUIP, uid));
|
super.setId(KeyGenUtils.produceIdByModule(UUIDEnum.ESPECIAL_EQUIP, uid));
|
||||||
super.setEquipId(equipTid);
|
super.setEquipId(equipTid);
|
||||||
this.star = 8;
|
this.star = 3;
|
||||||
}
|
}
|
||||||
public EspecialEquip() {
|
public EspecialEquip() {
|
||||||
this.setRootCollection(User._COLLECTION_NAME);
|
this.setRootCollection(User._COLLECTION_NAME);
|
||||||
|
|
|
@ -735,6 +735,7 @@ public class ItemUtil {
|
||||||
}
|
}
|
||||||
StringBuilder reward = new StringBuilder();
|
StringBuilder reward = new StringBuilder();
|
||||||
List<CommonProto.Equip> equipList = new CopyOnWriteArrayList<>();
|
List<CommonProto.Equip> equipList = new CopyOnWriteArrayList<>();
|
||||||
|
List<CommonProto.Equip> especialEquip = new CopyOnWriteArrayList<>();
|
||||||
for (Map.Entry<Integer, Integer> entry : equipMap.entrySet()) {
|
for (Map.Entry<Integer, Integer> entry : equipMap.entrySet()) {
|
||||||
int itemType = SItem.getsItemMap().get(entry.getKey()).getItemType();
|
int itemType = SItem.getsItemMap().get(entry.getKey()).getItemType();
|
||||||
if(itemType!=GlobalItemType.EQUIP){
|
if(itemType!=GlobalItemType.EQUIP){
|
||||||
|
@ -750,7 +751,7 @@ public class ItemUtil {
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
addEquip(user, entry.getKey(), equipList);
|
addEquip(user, entry.getKey(), equipList,especialEquip);
|
||||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserItemEvent,reason,GlobalsDef.addReason,entry.getKey(),1,-1);
|
KtEventUtils.onKtEvent(user, ParamEventBean.UserItemEvent,reason,GlobalsDef.addReason,entry.getKey(),1,-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -760,6 +761,7 @@ public class ItemUtil {
|
||||||
MailLogic.getInstance().sendMail(user.getId(), title, content, reward.toString(), nowTime, Global.MAIL_EFFECTIVE_TIME);
|
MailLogic.getInstance().sendMail(user.getId(), title, content, reward.toString(), nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||||
}
|
}
|
||||||
dropBuilder.addAllEquipId(equipList);
|
dropBuilder.addAllEquipId(equipList);
|
||||||
|
dropBuilder.addAllEspecialEquipId(especialEquip);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addSoulEquip(User user, Map<Integer, Integer> equipMap, CommonProto.Drop.Builder dropBuilder,int reason) throws Exception {
|
public static void addSoulEquip(User user, Map<Integer, Integer> equipMap, CommonProto.Drop.Builder dropBuilder,int reason) throws Exception {
|
||||||
|
@ -794,7 +796,7 @@ public class ItemUtil {
|
||||||
return reward.toString();
|
return reward.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addEquip(User user,int equipId ,List<CommonProto.Equip> equipList) throws Exception {
|
private static void addEquip(User user,int equipId ,List<CommonProto.Equip> equipList,List<CommonProto.Equip> especialEquipList) throws Exception {
|
||||||
EquipManager equipManager = user.getEquipManager();
|
EquipManager equipManager = user.getEquipManager();
|
||||||
int itemType = SItem.getsItemMap().get(equipId).getItemType();
|
int itemType = SItem.getsItemMap().get(equipId).getItemType();
|
||||||
if(itemType==GlobalItemType.EQUIP){
|
if(itemType==GlobalItemType.EQUIP){
|
||||||
|
@ -809,6 +811,7 @@ public class ItemUtil {
|
||||||
}
|
}
|
||||||
}else if(itemType==GlobalItemType.ESPECIAL_EQUIP){
|
}else if(itemType==GlobalItemType.ESPECIAL_EQUIP){
|
||||||
EspecialEquip especialEquip = new EspecialEquip(user.getId(),equipId);
|
EspecialEquip especialEquip = new EspecialEquip(user.getId(),equipId);
|
||||||
|
especialEquipList.add(CBean2Proto.getEquipProto(especialEquip));
|
||||||
equipManager.addEspecialEquip(user,especialEquip);
|
equipManager.addEspecialEquip(user,especialEquip);
|
||||||
}else if(itemType==GlobalItemType.SOUL_MARK){
|
}else if(itemType==GlobalItemType.SOUL_MARK){
|
||||||
SoulEquip soulEquip = new SoulEquip(user.getId(),equipId);
|
SoulEquip soulEquip = new SoulEquip(user.getId(),equipId);
|
||||||
|
|
Loading…
Reference in New Issue