Fix act for scripts that reset to initial state after some time
This commit is contained in:
@@ -19,6 +19,6 @@
|
|||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
function hit() {
|
function act() {
|
||||||
rm.weakenAreaBoss(6090001, "The light at the altar appeases the hatred of the Snow Witch. The force of the Witch has weakened.");
|
rm.weakenAreaBoss(6090001, "The light at the altar appeases the hatred of the Snow Witch. The force of the Witch has weakened.");
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,6 @@
|
|||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
function hit() {
|
function act() {
|
||||||
rm.weakenAreaBoss(6090001, "The light at the altar appeases the hatred of the Snow Witch. The force of the Witch has weakened.");
|
rm.weakenAreaBoss(6090001, "The light at the altar appeases the hatred of the Snow Witch. The force of the Witch has weakened.");
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,6 @@
|
|||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
function hit() {
|
function act() {
|
||||||
rm.weakenAreaBoss(6090001, "The light at the altar appeases the hatred of the Snow Witch. The force of the Witch has weakened.");
|
rm.weakenAreaBoss(6090001, "The light at the altar appeases the hatred of the Snow Witch. The force of the Witch has weakened.");
|
||||||
}
|
}
|
||||||
@@ -270,8 +270,11 @@ public class Reactor extends AbstractMapObject {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state = stats.getNextState(state, b);
|
|
||||||
if (stats.getNextState(state, b) == -1) {//end of reactor
|
this.state = stats.getNextState(state, b);
|
||||||
|
byte nextState = stats.getNextState(state, b);
|
||||||
|
boolean isInEndState = nextState < this.state;
|
||||||
|
if (isInEndState) {//end of reactor
|
||||||
if (reactorType < 100) {//reactor broken
|
if (reactorType < 100) {//reactor broken
|
||||||
if (delay > 0) {
|
if (delay > 0) {
|
||||||
map.destroyReactor(getObjectId());
|
map.destroyReactor(getObjectId());
|
||||||
|
|||||||
Reference in New Issue
Block a user