Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reloadnpc didn't remove monster spawned by script #2530

Closed
Emistry opened this issue Aug 31, 2019 · 0 comments
Closed

reloadnpc didn't remove monster spawned by script #2530

Emistry opened this issue Aug 31, 2019 · 0 comments
Assignees
Labels
status:confirmed Issue is valid and can be reproduced type:bug Issue is a bug or describes an incorrect behavior that should be fixed

Comments

@Emistry
Copy link
Member

Emistry commented Aug 31, 2019

Describe the bug
monster that spawned by NPC script isn't removed.

To Reproduce
Steps to reproduce the behavior:

  1. Load the NPC script
testmap,50,50,5	script	EmistyRO	4_F_KAFRA1,{
	end;
	
	OnInit:
		monster("testmap", 0, 0, "Poring", PORING, 1, strnpcinfo(3)+"::OnInit");
		end;
}
  1. type @reloadnpc npc\filepath.txt mutiple times.
gm use @reloadnpc npc/filepath.txt
[Info]: HCP: File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
[Info]: HCP: Script loaded.
[Info]: HCP: '@reloadnpc npc/filepath.txt' was used
gm use @reloadnpc npc/filepath.txt
[Info]: HCP: File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
[Info]: HCP: Script loaded.
[Info]: HCP: '@reloadnpc npc/filepath.txt' was used
gm use @reloadnpc npc/filepath.txt
[Info]: HCP: File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
[Info]: HCP: Script loaded.
[Info]: HCP: '@reloadnpc npc/filepath.txt' was used
gm use @reloadnpc npc/filepath.txt
[Info]: HCP: File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
[Info]: HCP: Script loaded.
[Info]: HCP: '@reloadnpc npc/filepath.txt' was used
gm use @reloadnpc npc/filepath.txt
[Info]: HCP: File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
[Info]: HCP: Script loaded.
[Info]: HCP: '@reloadnpc npc/filepath.txt' was used
gm use @reloadnpc npc/filepath.txt
[Info]: HCP: File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
[Info]: HCP: Script loaded.
[Info]: HCP: '@reloadnpc npc/filepath.txt' was used

Expected behavior
monster that spawned by NPC script shall be removed since its' not permanent mob spawns.

Screenshots
img

System specs (please complete the following information):

  • OS: [e.g. windows 10 version 1809, macOS 10.14]
  • Hercules Version [e.g. v2019.08.25]
  • Mode: [renewal]
  • Packet version: [e.g. 20180620]
  • Client type: [e.g. RE]

Plugins used or source modifications
If you are using any plugins besides the ones that come bundled with Hercules,
please enumerate them here.

Additional context
Add any other context about the problem here. If the bug report is about a
crash, please attach the core/stack-dump or crash-log, if any.

@Emistry Emistry added type:bug Issue is a bug or describes an incorrect behavior that should be fixed status:confirmed Issue is valid and can be reproduced labels Aug 31, 2019
Kenpachi2k13 added a commit to Kenpachi2k13/Hercules that referenced this issue Nov 27, 2019
Mobs spawned by NPC will be removed on @reloadnpc.
Additionally OnUnload NPC label was added, to revert other changes made by NPC, For example set/removed mapflags or added mob drops.
Kenpachi2k13 added a commit to Kenpachi2k13/Hercules that referenced this issue Nov 27, 2019
Mobs spawned by NPC will be removed on @reloadnpc.
Additionally OnUnload NPC label was added, to revert other changes made by NPC, For example set/removed mapflags or added mob drops.
Kenpachi2k13 added a commit to Kenpachi2k13/Hercules that referenced this issue Dec 1, 2019
… NPC (non-permanent monster spawns) [Issue HerculesWS#2530]

Mobs spawned by NPC will be removed on @reloadnpc, @unloadnpc, and @unloadnpcfile.
Additionally OnNPCUnload NPC label was added, to revert other changes made by NPC. For example set/removed mapflags or added mob drops.
@Kenpachi2k13 Kenpachi2k13 self-assigned this Feb 1, 2020
MishimaHaruna pushed a commit to Kenpachi2k13/Hercules that referenced this issue Feb 9, 2020
… NPC (non-permanent monster spawns) [Issue HerculesWS#2530]

Mobs spawned by NPC will be removed on @reloadnpc, @unloadnpc, and @unloadnpcfile.
Additionally OnNPCUnload NPC label was added, to revert other changes made by NPC. For example set/removed mapflags or added mob drops.
MishimaHaruna added a commit that referenced this issue Feb 9, 2020
Change unload NPC behavior to kill mobs that were spawned by unloaded NPC (non-permanent monster spawns) [Issue #2530]
@MishimaHaruna MishimaHaruna added this to the Release v2020.02.09 milestone Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:confirmed Issue is valid and can be reproduced type:bug Issue is a bug or describes an incorrect behavior that should be fixed
Projects
None yet
Development

No branches or pull requests

3 participants