Unhardcoded faction guards, fixed aggro and various improvements.
This commit is contained in:
@@ -10,10 +10,6 @@ EnableFactionSystem = False
|
||||
# Default: 85332,16199,-1252
|
||||
StartingLocation = 85332,16199,-1252
|
||||
|
||||
# Faction manager NPC ID.
|
||||
# Default: 500
|
||||
FactionManagerNpcId = 500
|
||||
|
||||
# Spawn location for faction manager NPC.
|
||||
# Default: 85712,15974,-1260,26808
|
||||
ManagerSpawnLocation = 85712,15974,-1260,26808
|
||||
@@ -47,14 +43,6 @@ EvilNameColor = 0000FF
|
||||
# Default: True
|
||||
EnableFactionGuards = True
|
||||
|
||||
# Good Guard NPC ID.
|
||||
# Default: 501
|
||||
GoodGuardNpcId = 501
|
||||
|
||||
# Evil Guard NPC ID.
|
||||
# Default: 502
|
||||
EvilGuardNpcId = 502
|
||||
|
||||
# Upon death, respawn at faction base.
|
||||
# Default: True
|
||||
RespawnAtFactionBase = True
|
||||
|
@@ -19,7 +19,6 @@ package custom.FactionSystem;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
@@ -32,9 +31,7 @@ import ai.AbstractNpcAI;
|
||||
public final class FactionSystem extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int MANAGER = Config.FACTION_MANAGER_NPCID;
|
||||
private static final int GOOD_GUARD = Config.FACTION_GOOD_GUARD_NPCID;
|
||||
private static final int EVIL_GUARD = Config.FACTION_EVIL_GUARD_NPCID;
|
||||
private static final int MANAGER = 500;
|
||||
// Other
|
||||
private static final String[] TEXTS =
|
||||
{
|
||||
@@ -49,7 +46,6 @@ public final class FactionSystem extends AbstractNpcAI
|
||||
addStartNpc(MANAGER);
|
||||
addTalkId(MANAGER);
|
||||
addFirstTalkId(MANAGER);
|
||||
addSeeCreatureId(EVIL_GUARD, GOOD_GUARD);
|
||||
|
||||
if (Config.FACTION_SYSTEM_ENABLED)
|
||||
{
|
||||
@@ -169,16 +165,6 @@ public final class FactionSystem extends AbstractNpcAI
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
|
||||
{
|
||||
if (Config.FACTION_SYSTEM_ENABLED && Config.FACTION_GUARDS_ENABLED && creature.isPlayer() && ((creature.getActingPlayer().isGood() && (npc.getId() == EVIL_GUARD)) || (creature.getActingPlayer().isEvil() && (npc.getId() == GOOD_GUARD))))
|
||||
{
|
||||
addAttackDesire(npc, creature);
|
||||
}
|
||||
return super.onSeeCreature(npc, creature, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new FactionSystem();
|
||||
|
Reference in New Issue
Block a user