Sync with L2JServer Feb 7th 2015.
This commit is contained in:
@@ -22,6 +22,7 @@ import hellbound.HellboundEngine;
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -29,7 +30,6 @@ import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
|
||||
/**
|
||||
* Manages Amaskari's and minions' chat and some skill usage.
|
||||
@@ -78,7 +78,7 @@ public final class Amaskari extends AbstractNpcAI
|
||||
{
|
||||
if (event.equalsIgnoreCase("stop_toggle"))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, AMASKARI_NPCSTRING_ID[2]);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, AMASKARI_NPCSTRING_ID[2]);
|
||||
((L2MonsterInstance) npc).clearAggroList();
|
||||
((L2MonsterInstance) npc).getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
npc.setIsInvul(false);
|
||||
@@ -88,11 +88,11 @@ public final class Amaskari extends AbstractNpcAI
|
||||
{
|
||||
if (getRandom(100) > 20)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, MINIONS_NPCSTRING_ID[2]);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, MINIONS_NPCSTRING_ID[2]);
|
||||
}
|
||||
else if (getRandom(100) > 40)
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, MINIONS_NPCSTRING_ID[3]);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, MINIONS_NPCSTRING_ID[3]);
|
||||
}
|
||||
startQuestTimer("onspawn_msg", (getRandom(8) + 1) * 30000, npc, null);
|
||||
}
|
||||
@@ -104,12 +104,12 @@ public final class Amaskari extends AbstractNpcAI
|
||||
{
|
||||
if ((npc.getId() == AMASKARI) && (getRandom(1000) < 25))
|
||||
{
|
||||
broadcastNpcSay(npc, Say2.NPC_ALL, AMASKARI_NPCSTRING_ID[0]);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, AMASKARI_NPCSTRING_ID[0]);
|
||||
for (L2MonsterInstance minion : ((L2MonsterInstance) npc).getMinionList().getSpawnedMinions())
|
||||
{
|
||||
if ((minion != null) && !minion.isDead() && (getRandom(10) == 0))
|
||||
{
|
||||
broadcastNpcSay(minion, Say2.NPC_ALL, MINIONS_NPCSTRING_ID[0]);
|
||||
broadcastNpcSay(minion, ChatType.NPC_GENERAL, MINIONS_NPCSTRING_ID[0]);
|
||||
minion.setCurrentHp(minion.getCurrentHp() - (minion.getCurrentHp() / 5));
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ public final class Amaskari extends AbstractNpcAI
|
||||
final L2MonsterInstance master = ((L2MonsterInstance) npc).getLeader();
|
||||
if ((master != null) && !master.isDead())
|
||||
{
|
||||
broadcastNpcSay(master, Say2.NPC_ALL, AMASKARI_NPCSTRING_ID[1]);
|
||||
broadcastNpcSay(master, ChatType.NPC_GENERAL, AMASKARI_NPCSTRING_ID[1]);
|
||||
final BuffInfo info = master.getEffectList().getBuffInfoBySkillId(BUFF_ID);
|
||||
if ((info != null) && (info.getSkill().getAbnormalLvl() == 3) && master.isInvul())
|
||||
{
|
||||
@@ -145,7 +145,7 @@ public final class Amaskari extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(master, Say2.NPC_ALL, AMASKARI_NPCSTRING_ID[3]);
|
||||
broadcastNpcSay(master, ChatType.NPC_GENERAL, AMASKARI_NPCSTRING_ID[3]);
|
||||
// master.doCast(INVINCIBILITY.getSkill())
|
||||
master.setIsInvul(true);
|
||||
startQuestTimer("stop_toggle", 10000, master, null);
|
||||
@@ -161,7 +161,7 @@ public final class Amaskari extends AbstractNpcAI
|
||||
{
|
||||
if (getRandom(1000) > 300)
|
||||
{
|
||||
broadcastNpcSay(minion, Say2.NPC_ALL, MINIONS_NPCSTRING_ID[1]);
|
||||
broadcastNpcSay(minion, ChatType.NPC_GENERAL, MINIONS_NPCSTRING_ID[1]);
|
||||
}
|
||||
HellboundEngine.getInstance().updateTrust(30, true);
|
||||
minion.deleteMe();
|
||||
|
Reference in New Issue
Block a user