Сообщений: 1,314
Тем: 38
Зарегистрирован: Mar 2010
Репутация:
7,002
akioharu, Лучше бы в паблик кинул.
Так только больше вопросов и недопонимания будет
Сообщений: 450
Тем: 24
Зарегистрирован: Feb 2010
Репутация:
139
Horizon Написал:вот с форума AXE. мб поможет
Код:
Index: src/gameserver/controllers/PlayerController.java
===================================================================
--- src/gameserver/controllers/PlayerController.java (revision 149)
+++ /src/gameserver/controllers/PlayerController.java (working copy)
@@ -25,6 +25,7 @@
import gameserver.controllers.attack.AttackUtil;
import gameserver.dataholders.DataManager;
import gameserver.model.EmotionType;
+import gameserver.model.Race;
import gameserver.model.TaskId;
import gameserver.model.alliance.PlayerAllianceEvent;
import gameserver.model.gameobjects.Creature;
@@ -85,6 +86,7 @@
import gameserver.utils.ThreadPoolManager;
import gameserver.world.World;
import gameserver.world.zone.ZoneInstance;
+import gameserver.world.zone.ZoneName;
/**
* This class is for controlling players.
@@ -212,6 +214,7 @@
public void onEnterZone(ZoneInstance zoneInstance)
{
QuestEngine.getInstance().onEnterZone(new QuestEnv(null, this.getOwner(), 0, 0), zoneInstance.getTemplate().getName());
+ checkAbyssMainFortress(zoneInstance);
}
/**
@@ -223,7 +226,41 @@
{
}
-
+ private void checkAbyssMainFortress(ZoneInstance zoneInstance)
+ {
+ Player player = getOwner();
+
+ if(player.getLifeStats().isAlreadyDead() || player.isGM())
+ return;
+
+ // Prevent enemy players from entering the main Abyss fortress Zone.
+ // TODO: Instead of using zone, need to build a precise shield globe.
+ Race race = player.getCommonData().getRace();
+ ZoneName zone = zoneInstance.getTemplate().getName();
+
+ boolean isAsmoBase = (zone == ZoneName.PRIMUM_TRAINING_CAMP_400010000 ||
+ zone == ZoneName.PRIMUM_WHARF_400010000 ||
+ zone == ZoneName.RUSSET_PLAZA_400010000 ||
+ zone == ZoneName.PRIMUM_PLAZA_400010000 ||
+ zone == ZoneName.NOBELIUM_FRAGMENT_400010000 ||
+ zone == ZoneName.BROKEN_NOBELIUM_400010000 ||
+ zone == ZoneName.PRIMUM_FORTRESS_400010000);
+
+ boolean isElyosBase = (zone == ZoneName.WAREHOUSE_CONSTRUCTION_SITE_400010000 ||
+ zone == ZoneName.WEATHERED_CRAG_400010000 ||
+ zone == ZoneName.TEMINON_WHARF_400010000 ||
+ zone == ZoneName.LATIS_PLAZA_400010000 ||
+ zone == ZoneName.TEMINON_FORTRESS_400010000 ||
+ zone == ZoneName.TEMINONS_LEAP_400010000 ||
+ zone == ZoneName.TEMINON_TRAINING_CAMP_400010000);
+
+ if ((race == Race.ELYOS && isAsmoBase) || (race == Race.ASMODIANS && isElyosBase))
+ {
+ die();
+ }
+
+ }
+
/**
* Set zone instance as null (Where no zones defined)
*/
код построен неверно, точнее не так, код то верный но щиты будут убивать и тех кто пехом будет заходить в крепы..
Bloomers --> ??? --> Profit