Pet Core NPC Buffer?
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: Pet Core NPC Buffer?
bug report:
If you log in for the first time, you can recieve buffs with no problem. if you relog, you can recieve buffs with no problem.
But, if you press on player or pet one time and then relog, you will not recieve buffs on your player by default. The npc will take the Adena, but you wont recieve buffs. You must press player or pet and then buff again.
SO: If you never press player/pet option, you wont have problems. BUT if you do press player/pet once, you will not recieve buffs once you relog again, unless you press Player/pet again.
If you log in for the first time, you can recieve buffs with no problem. if you relog, you can recieve buffs with no problem.
But, if you press on player or pet one time and then relog, you will not recieve buffs on your player by default. The npc will take the Adena, but you wont recieve buffs. You must press player or pet and then buff again.
SO: If you never press player/pet option, you wont have problems. BUT if you do press player/pet once, you will not recieve buffs once you relog again, unless you press Player/pet again.
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Pet Core NPC Buffer?
imo an own bypass should be done for pet buffs.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: Pet Core NPC Buffer?
it'd be cool if it were to get committed, since it's really useful 

-
- Posts: 915
- Joined: Thu Sep 03, 2009 6:36 pm
- Location: Israel
- Contact:
Re: Pet Core NPC Buffer?
Actually I was thinking something better, a new instance L2NpcPetBuffer inhereting L2NpcBuffer,
and simply using same bypasses on the player's getPet() always, and not on player
and simply using same bypasses on the player's getPet() always, and not on player
- JIV
- L2j Veteran
- Posts: 1882
- Joined: Sun Jan 06, 2008 8:17 pm
- Location: Slovakia
- Contact:
Re: Pet Core NPC Buffer?
and spawning two npc for buffs?
-
- Posts: 915
- Joined: Thu Sep 03, 2009 6:36 pm
- Location: Israel
- Contact:
Re: Pet Core NPC Buffer?
yes, one for players one for pets, less confusing imo
- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: Pet Core NPC Buffer?
nah, imo 1 npc is more than enough. looks more professional.
- Copyleft
- Posts: 253
- Joined: Fri Feb 01, 2008 9:39 pm
Re: Pet Core NPC Buffer?
can be done easier...
leave everything as it was before, but instead of applying effect on player, apply it on player's target. If player's target is not his pet, he will buff himself. If player's target is the pet, he will buff the pet.
leave everything as it was before, but instead of applying effect on player, apply it on player's target. If player's target is not his pet, he will buff himself. If player's target is the pet, he will buff the pet.

-
- Posts: 915
- Joined: Thu Sep 03, 2009 6:36 pm
- Location: Israel
- Contact:
Re: Pet Core NPC Buffer?
pretty sure the player has to be targetting npc for the menus etc :p
- denser
- Posts: 1392
- Joined: Wed May 30, 2007 9:13 pm
- Location: Russia
- Contact:
Re: Pet Core NPC Buffer?
i done remake scheme buffer by House - for pet and for player, with auto icons for buffs, command for reload buffs for editing. try to as soon as possible share it on your eyes) may be you interesting in it)
you can test it on my PvP server if you want) but it on russian, http://la2s.a42.ru - link)
you can test it on my PvP server if you want) but it on russian, http://la2s.a42.ru - link)
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
L2J - the place where glad to see you any time!
- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: Pet Core NPC Buffer?
uhm... well the thing is ... the current core npc buffer is kinda outdated and needs some cleanup 

-
- Posts: 915
- Joined: Thu Sep 03, 2009 6:36 pm
- Location: Israel
- Contact:
Re: Pet Core NPC Buffer?
feel free to post a new version
html editting isn't hard

- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: Pet Core NPC Buffer?
come on guys, pay some attention to this.
i vote for a committ if its working properly. I tested it and it works properly.
i vote for a committ if its working properly. I tested it and it works properly.
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Pet Core NPC Buffer?
I dont like the target thingie. I would be more for new own bypass for pet buff/heal/remove.
Code: Select all
Index: java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java===================================================================--- java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java (revision 4293)+++ java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java (working copy)@@ -23,7 +23,9 @@ import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.model.L2ItemInstance; import com.l2jserver.gameserver.model.L2Skill;+import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc;+import com.l2jserver.gameserver.model.actor.L2Summon; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;@@ -31,7 +33,6 @@ import com.l2jserver.gameserver.taskmanager.AttackStanceTaskManager; import com.l2jserver.gameserver.templates.chars.L2NpcTemplate; - public class L2NpcBufferInstance extends L2Npc { static final Logger _log = Logger.getLogger(L2NpcBufferInstance.class.getName());@@ -74,6 +75,20 @@ if (player == null || player.getLastFolkNPC() == null || player.getLastFolkNPC().getObjectId() != this.getObjectId()) return; + L2Character target = player;+ + if (command.startsWith("Pet"))+ {+ L2Summon pet = player.getPet();+ if (pet == null)+ {+ player.sendMessage("You do not have your pet summoned.");+ showChatWindow(player, 0); // 0 = main window+ return;+ }+ target = pet;+ }+ int npcId = getNpcId(); if (command.startsWith("Chat"))@@ -84,9 +99,9 @@ showChatWindow(player, val); }- else if (command.startsWith("Buff"))+ else if (command.startsWith("Buff") || command.startsWith("PetBuff")) {- String[] buffGroupArray = command.substring(5).split(" ");+ String[] buffGroupArray = command.substring(command.indexOf(" ") + 1).split(" "); for (String buffGroupList : buffGroupArray) {@@ -144,43 +159,43 @@ skill = SkillTable.getInstance().getInfo(skillId, skillLevel); if (skill != null)- skill.getEffects(player, player);+ skill.getEffects(player, target); }-+ showChatWindow(player, pageVal.get(player.getObjectId())); }- else if (command.startsWith("Heal"))+ else if (command.startsWith("Heal") || command.startsWith("PetHeal")) {- if (!player.isInCombat() && !AttackStanceTaskManager.getInstance().getAttackStanceTask(player))+ if (!target.isInCombat() && !AttackStanceTaskManager.getInstance().getAttackStanceTask(target)) {- String[] healArray = command.substring(5).split(" ");+ String[] healArray = command.substring(command.indexOf(" ") + 1).split(" "); for (String healType : healArray) { if (healType.equalsIgnoreCase("HP")) {- player.setCurrentHp(player.getMaxHp());+ target.setCurrentHp(target.getMaxHp()); } else if (healType.equalsIgnoreCase("MP")) {- player.setCurrentMp(player.getMaxMp());+ target.setCurrentMp(target.getMaxMp()); } else if (healType.equalsIgnoreCase("CP")) {- player.setCurrentCp(player.getMaxCp());+ target.setCurrentCp(target.getMaxCp()); } } }- showChatWindow(player, 0); // 0 = main window+ showChatWindow(player, pageVal.get(player.getObjectId())); }- else if (command.startsWith("RemoveBuffs"))+ else if (command.startsWith("RemoveBuffs") || command.startsWith("PetRemoveBuffs")) {- player.stopAllEffectsExceptThoseThatLastThroughDeath();- showChatWindow(player, 0); // 0 = main window+ target.stopAllEffectsExceptThoseThatLastThroughDeath();+ showChatWindow(player, pageVal.get(player.getObjectId())); } else { super.onBypassFeedback(player, command); } }-}\ No newline at end of file+}
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: Pet Core NPC Buffer?
shall I test your patch janiii ?