Merged with released L2J-Unity files.

This commit is contained in:
mobiusdev
2016-06-12 01:34:09 +00:00
parent e003e87887
commit 635557f5da
18352 changed files with 3245113 additions and 2892959 deletions

View File

@@ -0,0 +1,4 @@
<html><body>
My Lord!<br>
This area is secure, sir!<br>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>
How dare our foolish enemies attack our castle!<br>
I shall go now and strangle them all with my bare hands!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Lord, please let us show them our full force!
</body></html>

View File

@@ -0,0 +1,84 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.others.CastleSiegeManager;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import ai.AbstractNpcAI;
/**
* Castle Siege Manager AI.
* @author St3eT
*/
public final class CastleSiegeManager extends AbstractNpcAI
{
// NPCs
private static final int[] SIEGE_MANAGER =
{
35104, // Gludio Castle
35146, // Dion Castle
35188, // Giran Castle
35232, // Oren Castle
35278, // Aden Castle
35320, // Innadril Castle
35367, // Goddard Castle
35513, // Rune Castle
35559, // Schuttgart Castle
};
private CastleSiegeManager()
{
addFirstTalkId(SIEGE_MANAGER);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = null;
if (player.isClanLeader() && (player.getClanId() == npc.getCastle().getOwnerId()))
{
if (isInSiege(npc))
{
htmltext = "CastleSiegeManager.html";
}
else
{
htmltext = "CastleSiegeManager-01.html";
}
}
else if (isInSiege(npc))
{
htmltext = "CastleSiegeManager-02.html";
}
else
{
npc.getCastle().getSiege().listRegisterClan(player);
}
return htmltext;
}
private boolean isInSiege(L2Npc npc)
{
return npc.getCastle().getSiege().isInProgress();
}
public static void main(String[] args)
{
new CastleSiegeManager();
}
}