Advertisement
Fabbian

Template

Nov 15th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P Dream_GameServer
  3. Index: src/com/dream/game/model/actor/instance/L2NpcBufferInstance.java
  4. ===================================================================
  5. --- src/com/dream/game/model/actor/instance/L2NpcBufferInstance.java (revision 0)
  6. +++ src/com/dream/game/model/actor/instance/L2NpcBufferInstance.java (working copy)
  7. @@ -0,0 +1,49 @@
  8. +/*
  9. + * This program is free software: you can redistribute it and/or modify it under
  10. + * the terms of the GNU General Public License as published by the Free Software
  11. + * Foundation, either version 3 of the License, or (at your option) any later
  12. + * version.
  13. + *
  14. + * This program is distributed in the hope that it will be useful, but WITHOUT
  15. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  17. + * details.
  18. + *
  19. + * You should have received a copy of the GNU General Public License along with
  20. + * this program. If not, see <http://www.gnu.org/licenses/>.
  21. + */
  22. +package com.dream.game.model.actor.instance;
  23. +
  24. +import com.dream.game.manager.QuestManager;
  25. +import com.dream.game.model.quest.Quest;
  26. +import com.dream.game.templates.chars.L2NpcTemplate;
  27. +
  28. +public class L2NpcBufferInstance extends L2NpcInstance
  29. +{
  30. +
  31. + private Quest _quest = null;
  32. +
  33. + public L2NpcBufferInstance(int objectId, L2NpcTemplate template)
  34. + {
  35. + super(objectId, template);
  36. + }
  37. +
  38. + @Override
  39. + public void onAction(L2PcInstance player)
  40. + {
  41. + if (_quest == null)
  42. + {
  43. + _quest = QuestManager.getInstance().getQuest("50000_Buffer");
  44. + if (_quest == null)
  45. + {
  46. + super.onAction(player);
  47. + return;
  48. + }
  49. + _quest.addFirstTalkId(getNpcId());
  50. + _quest.addStartNpc(getNpcId());
  51. + _quest.addTalkId(getNpcId());
  52. + }
  53. + super.onAction(player);
  54. + }
  55. +
  56. +}
  57. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement