Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
22689acb20
|
@ -129,7 +129,7 @@ local passivityList = {
|
|||
BattleUtil.RandomAction(f1, function ()
|
||||
local arr = BattleUtil.ChooseTarget(role, 10001)
|
||||
if arr[1] then
|
||||
arr[1]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f3, propertyList[pro1], floor(role:GetRoleData(propertyList[pro2]) * f2), 1))
|
||||
arr[1]:AddBuff(Buff.Create(role, BuffName.PropertyChange, f3, propertyList[pro2], floor(role:GetRoleData(propertyList[pro1]) * f2), 1))
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -194,12 +194,12 @@ function BattleUtil.ApplyDamage(atkRole, defRole, damage, bCrit, damageType, isD
|
|||
atkRole.Event:DispatchEvent(BattleEventName.RoleDamage, defRole, damage, bCrit, finalDmg, damageType)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeDamaged, atkRole, damage, bCrit, finalDmg, damageType)
|
||||
if bCrit then
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleCrit, defRole)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeCrit, atkRole)
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleCrit, defRole, damage, bCrit, finalDmg, damageType)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeCrit, atkRole, damage, bCrit, finalDmg, damageType)
|
||||
end
|
||||
if not isDot then
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleHit, defRole)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeHit, atkRole)
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleHit, defRole, damage, bCrit, finalDmg, damageType)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleBeHit, atkRole, damage, bCrit, finalDmg, damageType)
|
||||
end
|
||||
end
|
||||
return finalDmg
|
||||
|
|
|
@ -17,4 +17,5 @@ public interface GlobalGm {
|
|||
int SET_TOWER_NUMBER = 14;//设置试炼副本进入层数
|
||||
int TREASURE_SCORE = 15;//生成孙龙宝藏积分
|
||||
|
||||
int MONSTER_JUMP = 16;//跳到兽潮层
|
||||
}
|
||||
|
|
|
@ -210,6 +210,9 @@ public class GMRequestHandler extends BaseHandler{
|
|||
case GlobalGm.SET_TOWER_NUMBER:
|
||||
MapLogic.getInstance().setTower(iSession.getUid(),prarm1);
|
||||
break;
|
||||
case GlobalGm.MONSTER_JUMP:
|
||||
cUser.getMapManager().setLastMonsterAttack(prarm1);
|
||||
break;
|
||||
case GlobalGm.TREASURE_SCORE:
|
||||
treasureScore(iSession,prarm1);
|
||||
break;
|
||||
|
|
|
@ -256,9 +256,10 @@ public class GlobalDataManaager {
|
|||
user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_REFRESH,0);
|
||||
FriendLogic.getInstance().refreshState(session);
|
||||
int sendDays = user.getPlayerInfoManager().getSendDays();
|
||||
int differentDays = TimeUtils.differentDaysByHour(System.currentTimeMillis(), user.getPlayerInfoManager().getLoginTime(), 5);
|
||||
PlayerLogic.getInstance().sendTestWelfareMail(user,sendDays,sendDays+differentDays);
|
||||
user.getPlayerInfoManager().setSendDays(sendDays+differentDays);
|
||||
int differentDays = TimeUtils.differentDaysByHour( user.getPlayerInfoManager().getLoginTime(),System.currentTimeMillis(), 5);
|
||||
int days = sendDays + differentDays;
|
||||
PlayerLogic.getInstance().sendTestWelfareMail(user,sendDays+1,sendDays+differentDays);
|
||||
user.getPlayerInfoManager().setSendDays(days);
|
||||
// MapLogic.getInstance().towerAutoReset(session,fBuilder);
|
||||
if(fBuilder!=null){
|
||||
fBuilder.setSignInInfo(CommonProto.SignInInfo.newBuilder().setDays(user.getPlayerInfoManager().getSign()+1).setState(user.getPlayerInfoManager().getSignTotay()).build());
|
||||
|
|
|
@ -29,6 +29,7 @@ public interface ActivityType {
|
|||
int FORCESTANDARD = 12;//战力达标
|
||||
int DAILY_RECHARGE = 13;//每日充值
|
||||
int RECHARGE_SUM_DAY = 14;//累计充值天数
|
||||
int EXCHANGEANDDROP = 15;//限时兑换活动
|
||||
int SECURT_EXPERT = 16;// 秘境达人
|
||||
int ARENA_EXPERT = 17;// 竞技达人
|
||||
int UP_EXPERT = 18;// 进阶达人
|
||||
|
@ -40,7 +41,4 @@ public interface ActivityType {
|
|||
int RECHARGE_NUM = 24;//累计充值
|
||||
|
||||
|
||||
|
||||
// int EXCHANGEANDDROP = 15;//限时兑换活动
|
||||
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ public enum ActivityTypeEnum {
|
|||
FORCESTANDARD(ActivityType.FORCESTANDARD, ForceStandardActivity::new),
|
||||
DAILY_RECHARGE(ActivityType.DAILY_RECHARGE, DailyRechargeActivity::new),
|
||||
RECHARGE_SUM(ActivityType.RECHARGE_SUM_DAY, RechargeSumDayActivity::new),
|
||||
EXCHANGEANDDROP(ActivityType.EXCHANGEANDDROP, DefaultEmptyActivity::new),
|
||||
SECURT_EXPERT(ActivityType.SECURT_EXPERT, SecretExpectRankActivity::new),
|
||||
ARENA_EXPERT(ActivityType.ARENA_EXPERT, AreanaExpectRankActivity::new),
|
||||
UP_EXPERT(ActivityType.UP_EXPERT, HeroUpExpectRankActivity::new),
|
||||
|
|
|
@ -51,7 +51,7 @@ public class UserManager {
|
|||
initPlayer(user,openId);
|
||||
UserManager.addUser(user);
|
||||
MongoUtil.getInstence().getMyMongoTemplate().save(user);
|
||||
PlayerLogic.getInstance().sendTestWelfareMail(user,1,2);
|
||||
PlayerLogic.getInstance().sendTestWelfareMail(user,1,1);
|
||||
return user;
|
||||
}
|
||||
|
||||
|
|
|
@ -508,6 +508,14 @@ public class CombatLogic {
|
|||
|
||||
SAdventureConfig sAdventureConfig = SAdventureConfig.getConfig().get(arenaID);
|
||||
int[][][] invasionBoss = sAdventureConfig.getInvasionBoss();
|
||||
Set<Integer> arenaIDs = adventureStateInfoMap.keySet();
|
||||
int arenaIndex = MathUtils.randomInt(arenaIDs.size());
|
||||
arenaID = arenaIDs.iterator().next();
|
||||
Iterator<Integer> iterator = arenaIDs.iterator();
|
||||
int j=arenaIndex;
|
||||
while (iterator.hasNext() && j-->0){
|
||||
arenaID = iterator.next();
|
||||
}
|
||||
AdventureStateInfo adventureStateInfo = adventureStateInfoMap.get(arenaID);
|
||||
int bossGroupID =0;
|
||||
int level = adventureStateInfo.getLevel();
|
||||
|
|
|
@ -52,8 +52,11 @@ public class MailLogic {
|
|||
return mailList;
|
||||
}
|
||||
List<Mail> cMailList = new CopyOnWriteArrayList<>();
|
||||
for (Map.Entry<String,Mail> entry :mailMap.entrySet()){
|
||||
Mail cMail = entry.getValue();
|
||||
Iterator<Map.Entry<String, Mail>> iterator = mailMap.entrySet().iterator();
|
||||
|
||||
while (iterator.hasNext()){
|
||||
Map.Entry<String, Mail> next = iterator.next();
|
||||
Mail cMail = next.getValue();
|
||||
int nowTime = (int)(TimeUtils.now()/1000);
|
||||
if (cMail.getEffectiveTime() != 0 && (nowTime - cMail.getSendTime()) > cMail.getEffectiveTime()){
|
||||
mailManager.removeMail(cMail.getId());
|
||||
|
|
|
@ -458,7 +458,7 @@ public class PlayerLogic {
|
|||
|
||||
public void sendTestWelfareMail(User user,int sendDay,int duration) throws Exception {
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("welfare_activity_daily_title");
|
||||
for(;sendDay<duration;sendDay++){
|
||||
for(;sendDay<=duration;sendDay++){
|
||||
STestWelfare sTestWelfare = STestWelfare.testWelfareMap.get(sendDay);
|
||||
if(sTestWelfare == null){
|
||||
return;
|
||||
|
|
|
@ -424,6 +424,7 @@ public class CBean2Proto {
|
|||
CommonProto.AdventureBossSimpleInfo.newBuilder().setArenaId(adventureStateInfo.getPosition())
|
||||
.setBossGroupId(adventureBoss.getBossGroupId())
|
||||
.setRemainTime(remainTime)
|
||||
.setBossId(adventureBoss.getBossId())
|
||||
.build()
|
||||
);
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue