Character 's HP increse to one million after transforming into a mob
Character 's HP increse to one million after transforming into a mob
Warning! This is the old Hercules bugtracker archive, and may not reflect the current state of Hercules. The current bugtracker is on GitHub Issues.
Issue information
Issue ID
#8394
Status
Confirmed
Severity
None
Started
Angelmelody
Oct 11, 2014 2:56
Last Post
Angelmelody
Oct 31, 2014 18:11
Confirmation
Yes (3)
No (0)
Angelmelody - Oct 11, 2014 2:56
How to reproduce:
Paste the below script into your head gear for test , when you trigger autobonus
and transform into a mob , you will see your HP was incresed to one million ....[code=auto:0]autobonus "{ sc_start SC_MONSTER_TRANSFORM,3000,1115; bonus bAtk,25*getrefine(); bonus2 bSPLossRate,5,1000; }",2000,3000,0,"{}";
[/code][spoiler]
[img]http://1.ii.gl/J1GL3Fa8.jpg[/img]
[/spoiler]
This post has been edited by
Angelmelody
on Oct 11, 2014 5:00
malufett - Oct 30, 2014 15:42
hmm..me I can't reproduce..is there any factors?
[img]http://i59.tinypic.com/qqcznl.jpg[/img]
:meow:
Playtester - Oct 31, 2014 8:15
Just a hint: This is usually caused by a number underflow problems (200 MaxHP - 300 MaxHP = 1000000 HP)
Angelmelody - Oct 31, 2014 18:11
[quote name="malufett" timestamp="1414683726"]
hmm..me I can't reproduce..is there any factors?
[img]http://i59.tinypic.com/qqcznl.jpg[/img]
:meow:[/quote]
I m sorry, it was affected by custom event , if you are transforming into a mob and trigging a custom event at the same time, your HP will be increased to one million,I think this topic should be marked with [b]Unable To Reproduce[/b] -_-
[spoiler]
if you wanna test what I mentioned, here is my custom event..[code=auto:0]
npc.h
NPCE_SC_START,
npc.c
{"PC SC Start Event",script->config.sc_start_event_name},
script.h
const char* sc_start_event_name;
script.c
script->config.sc_start_event_name = "OnPCSCStartEvent";
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -9562,6 +9564,11 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
if( opt_flag&2 && sd && sd->touching_id )
npc->touchnext_areanpc(sd,false); // run OnTouch_ on next char in range
+ if(sd) {
+ pc->setreg(sd, script->add_str("@startedsc"), type);
+ npc->script_event(sd, NPCE_SC_START);
+ }
+
return 1;
[/code]
[/spoiler]
This post has been edited by
Angelmelody
on Nov 1, 2014 12:40