Exemplo n.º 1
0
 /**
  * 获取年费黄钻每日礼包领取状态
  *
  * @return
  */
 public int getYearYellowVipRewardState() {
   IntPropertyCacheSet propertySet =
       human.getPropertyManager().getIntPropertySet(PropertyType.HUMAN_INT_PROPERTY);
   int yellowVipLevel = propertySet.getPropertyValue(HumanIntProperty.YELLOW_VIP_LEVEL);
   int isYearYellowVip = propertySet.getPropertyValue(HumanIntProperty.IS_YEAR_YELLOW_VIP);
   if (yearVipDailyRewardState == YellowVipRewardState.HAS_GOT.getIndex()) {
     return yearVipDailyRewardState;
   } else if (isYearYellowVip > 0 && yellowVipLevel > 0) {
     return YellowVipRewardState.CAN_GET.getIndex();
   } else {
     return YellowVipRewardState.CANNOT_GET.getIndex();
   }
 }
Exemplo n.º 2
0
 public void resetDailyData() {
   IntPropertyCacheSet propertySet =
       human.getPropertyManager().getIntPropertySet(PropertyType.HUMAN_INT_PROPERTY);
   int yellowVipLevel = propertySet.getPropertyValue(HumanIntProperty.YELLOW_VIP_LEVEL);
   int isYearYellowVip = propertySet.getPropertyValue(HumanIntProperty.IS_YEAR_YELLOW_VIP);
   if (yellowVipLevel > 0) {
     dailyRewardState = YellowVipRewardState.CAN_GET.getIndex();
   } else {
     dailyRewardState = YellowVipRewardState.CANNOT_GET.getIndex();
   }
   if (isYearYellowVip > 0 && yellowVipLevel > 0) {
     yearVipDailyRewardState = YellowVipRewardState.CAN_GET.getIndex();
   } else {
     yearVipDailyRewardState = YellowVipRewardState.CANNOT_GET.getIndex();
   }
 }