Jump to content
  • 0

disable heal on mobs


Napster321

Question

Recommended Posts

  • 0

// We should not heal Npcs
					if(target instanceof L2NpcInstance)
						continue;

		// We should not heal Monsters
					if(target instanceof L2MonsterInstance)
						continue;	

		// We should not heal Raidboss
					if(target instanceof L2RaidBossInstance)
						continue;	

		// We should not heal Grandboss
					if(target instanceof L2GrandBossInstance)
						continue;	

 

I added that after

for(L2Object target2 : targets)
	{
		target = (L2Character) target2;

And it doesnt work

Link to comment
Share on other sites

  • 0

so u will need to make more checks, find anythin that is related to Heal and find other checks where Heal is stopped coz target isnt ok.

Link to comment
Share on other sites

  • 0
L2Character target = null;

 

for(L2Object target2 : targets)

{

target = (L2Character) target2;

The L2Character in that case means that the player targets a Character?

Link to comment
Share on other sites

  • 0

The L2Character in that case means that the player targets a Character?

L2Character is L2PcInstance, L2SummonInstance, L2MonsterInstance, L2RaidBossInstance, L2GrandBossInstance so its everything i think, this code is good but its still not working.

Link to comment
Share on other sites

  • 0

// We should not heal Npcs
					if(target instanceof L2NpcInstance)
						continue;

		// We should not heal Monsters
					if(target instanceof L2MonsterInstance)
						continue;	

		// We should not heal Raidboss
					if(target instanceof L2RaidBossInstance)
						continue;	

		// We should not heal Grandboss
					if(target instanceof L2GrandBossInstance)
						continue;	

 

it seems fine,dnk what is wrong in your pack.

try to make a topic in their forum.

Link to comment
Share on other sites

  • 0
Index: com/l2jfrozen/gameserver/handler/skillhandlers/Heal.java
===================================================================
--- com/l2jfrozen/gameserver/handler/skillhandlers/Heal.java	(revision 948)
+++ com/l2jfrozen/gameserver/handler/skillhandlers/Heal.java	(working copy)
@@ -25,8 +25,11 @@
import com.l2jfrozen.gameserver.model.L2Object;
import com.l2jfrozen.gameserver.model.L2Skill;
import com.l2jfrozen.gameserver.model.L2Skill.SkillType;
+import com.l2jfrozen.gameserver.model.actor.instance.L2GrandBossInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2DoorInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2RaidBossInstance;
import com.l2jfrozen.gameserver.network.SystemMessageId;
import com.l2jfrozen.gameserver.network.serverpackets.StatusUpdate;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
@@ -90,6 +93,13 @@
			// We should not heal walls and door
			if(target instanceof L2DoorInstance)
				continue;
+				
+            if (target instanceof L2RaidBossInstance) 
+                continue; 
+            if (target instanceof L2GrandBossInstance) 
+                continue; 
+            if (target instanceof L2MonsterInstance) 
+                continue; 				

			// Player holding a cursed weapon can't be healed and can't heal
			if(target != activeChar)

Link to comment
Share on other sites

  • 0

Index: com/l2jfrozen/gameserver/handler/skillhandlers/Heal.java
===================================================================
--- com/l2jfrozen/gameserver/handler/skillhandlers/Heal.java	(revision 948)
+++ com/l2jfrozen/gameserver/handler/skillhandlers/Heal.java	(working copy)
@@ -25,8 +25,11 @@
import com.l2jfrozen.gameserver.model.L2Object;
import com.l2jfrozen.gameserver.model.L2Skill;
import com.l2jfrozen.gameserver.model.L2Skill.SkillType;
+import com.l2jfrozen.gameserver.model.actor.instance.L2GrandBossInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2DoorInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2RaidBossInstance;
import com.l2jfrozen.gameserver.network.SystemMessageId;
import com.l2jfrozen.gameserver.network.serverpackets.StatusUpdate;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
@@ -90,6 +93,13 @@
			// We should not heal walls and door
			if(target instanceof L2DoorInstance)
				continue;
+				
+            if (target instanceof L2RaidBossInstance) 
+                continue; 
+            if (target instanceof L2GrandBossInstance) 
+                continue; 
+            if (target instanceof L2MonsterInstance) 
+                continue; 				

			// Player holding a cursed weapon can't be healed and can't heal
			if(target != activeChar)

he already posted that code,he got it.

but still,it doesn't works.

Link to comment
Share on other sites

  • 0

It doesnt work

First try with NON-GM Character

Second, try all heals skills (Battle Heal,Greater Heal,Greater Battle Heal) and feedback. May be the data has problems

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...