return summon recycle timer when declined
This commit is contained in:
@@ -244,6 +244,10 @@ public enum PowersManager {
|
|||||||
if (playerCharacter == null)
|
if (playerCharacter == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if(playerCharacter.getRecycleTimers().containsKey(msg.getPowerUsedID())){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
boolean CSRCast = false;
|
boolean CSRCast = false;
|
||||||
|
|
||||||
if(msg.getPowerUsedID() == 430628895) {
|
if(msg.getPowerUsedID() == 430628895) {
|
||||||
@@ -1501,7 +1505,7 @@ public enum PowersManager {
|
|||||||
// Handle Accepting or Denying a summons.
|
// Handle Accepting or Denying a summons.
|
||||||
// set timer based on summon type.
|
// set timer based on summon type.
|
||||||
boolean wentThrough = false;
|
boolean wentThrough = false;
|
||||||
if (msg.accepted())
|
if (msg.accepted()) {
|
||||||
// summons accepted, let's move the player if within time
|
// summons accepted, let's move the player if within time
|
||||||
if (source.isAlive()) {
|
if (source.isAlive()) {
|
||||||
|
|
||||||
@@ -1547,14 +1551,14 @@ public enum PowersManager {
|
|||||||
duration = 45000; // Belgosh Summons, 45 seconds
|
duration = 45000; // Belgosh Summons, 45 seconds
|
||||||
|
|
||||||
boolean enemiesNear = false;
|
boolean enemiesNear = false;
|
||||||
for(AbstractWorldObject awo : WorldGrid.getObjectsInRangePartial(pc.loc,MBServerStatics.CHARACTER_LOAD_RANGE, MBServerStatics.MASK_PLAYER)){
|
for (AbstractWorldObject awo : WorldGrid.getObjectsInRangePartial(pc.loc, MBServerStatics.CHARACTER_LOAD_RANGE, MBServerStatics.MASK_PLAYER)) {
|
||||||
PlayerCharacter playerCharacter = (PlayerCharacter)awo;
|
PlayerCharacter playerCharacter = (PlayerCharacter) awo;
|
||||||
if(!playerCharacter.guild.getNation().equals(pc.guild.getNation())){
|
if (!playerCharacter.guild.getNation().equals(pc.guild.getNation())) {
|
||||||
enemiesNear = true;
|
enemiesNear = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(enemiesNear && !pc.isInSafeZone())
|
if (enemiesNear && !pc.isInSafeZone())
|
||||||
duration += 60000;
|
duration += 60000;
|
||||||
|
|
||||||
// Teleport to summoners location
|
// Teleport to summoners location
|
||||||
@@ -1565,7 +1569,10 @@ public enum PowersManager {
|
|||||||
timers.put("Summon", jc);
|
timers.put("Summon", jc);
|
||||||
wentThrough = true;
|
wentThrough = true;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
// recycle summons power
|
||||||
|
finishRecycleTime(428523680, source, true);
|
||||||
|
}
|
||||||
// Summons failed
|
// Summons failed
|
||||||
if (!wentThrough)
|
if (!wentThrough)
|
||||||
// summons refused. Let's be nice and reset recycle timer
|
// summons refused. Let's be nice and reset recycle timer
|
||||||
|
|||||||
Reference in New Issue
Block a user