礼物升星
parent
e607cb442d
commit
da13ea697f
|
|
@ -29,8 +29,8 @@ public class Item extends MongoBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItemId(int itemId){
|
public void setItemId(int itemId){
|
||||||
updateString("itemId", itemId);
|
|
||||||
this.itemId = itemId;
|
this.itemId = itemId;
|
||||||
|
updateString("itemId", itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getItemNum() {
|
public long getItemNum() {
|
||||||
|
|
@ -38,8 +38,8 @@ public class Item extends MongoBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItemNum(long itemNum){
|
public void setItemNum(long itemNum){
|
||||||
updateString("itemNum", itemNum);
|
|
||||||
this.itemNum = itemNum;
|
this.itemNum = itemNum;
|
||||||
|
updateString("itemNum", itemNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getEndingTime() {
|
public int getEndingTime() {
|
||||||
|
|
@ -47,7 +47,7 @@ public class Item extends MongoBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEndingTime(int endingTime){
|
public void setEndingTime(int endingTime){
|
||||||
updateString("endingTime", endingTime);
|
|
||||||
this.endingTime = endingTime;
|
this.endingTime = endingTime;
|
||||||
|
updateString("endingTime", endingTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,6 @@ public class ItemManager extends MongoBase {
|
||||||
updateString("equipBookEnabled", equipBookEnabled);
|
updateString("equipBookEnabled", equipBookEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ItemManager() {
|
public ItemManager() {
|
||||||
this.setRootCollection(User._COLLECTION_NAME);
|
this.setRootCollection(User._COLLECTION_NAME);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -637,8 +637,9 @@ public class EquipLogic {
|
||||||
if (!cost){
|
if (!cost){
|
||||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||||
}
|
}
|
||||||
|
|
||||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, new int[][]{{giftId, 1}}, BIReason.GIFT_UP_STAR_GET);
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, new int[][]{{giftId, 1}}, BIReason.GIFT_UP_STAR_GET);
|
||||||
ItemUtil.itemCost(user, costList, BIReason.GIFT_EQUIP_UP_COST, 0);
|
ItemUtil.itemCost(user, costList, BIReason.GIFT_UP_STAR_COST, 0);
|
||||||
HeroInfoProto.GiftEquipUpStarResponse.Builder builder = HeroInfoProto.GiftEquipUpStarResponse.newBuilder().setDrop(drop);
|
HeroInfoProto.GiftEquipUpStarResponse.Builder builder = HeroInfoProto.GiftEquipUpStarResponse.newBuilder().setDrop(drop);
|
||||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GiftEquipUpStarResponse_VALUE, builder.build(), true);
|
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GiftEquipUpStarResponse_VALUE, builder.build(), true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1102,7 +1102,7 @@ public class ItemUtil {
|
||||||
switch (itemId){
|
switch (itemId){
|
||||||
case ReportUtil.COIN_ID:
|
case ReportUtil.COIN_ID:
|
||||||
if(type==1){
|
if(type==1){
|
||||||
item =ReportEventEnum.GET_COINS;
|
item = ReportEventEnum.GET_COINS;
|
||||||
}else{
|
}else{
|
||||||
item = ReportEventEnum.COST_COINS;
|
item = ReportEventEnum.COST_COINS;
|
||||||
}
|
}
|
||||||
|
|
@ -1122,7 +1122,8 @@ public class ItemUtil {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
item = ReportEventEnum.GET_ITEM;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportUtil.onReportEvent(user,item.getType(),itemNum,String.valueOf(reason));
|
ReportUtil.onReportEvent(user,item.getType(),itemNum,String.valueOf(reason));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue