Skip to content

Commit

Permalink
Fixed Bug 7799 - SC_MOONSTAR neverending
Browse files Browse the repository at this point in the history
Follows up 665f130
http://hercules.ws/board/tracker/issue-7799-sc-moonstar/

Signed-off-by: shennetsind <ind@henn.et>
  • Loading branch information
shennetsind committed Nov 19, 2013
1 parent 54cc3cd commit d076f12
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion db/sc_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// 16 - SC considered as buff and be removed by Hermode and etc.
// 32 - SC considered as debuff and be removed by Gospel and etc.
// 64 - SC cannot be reset when MADO Gear is taken off.
// 128 - SC cannot be reset by sc_end and change clear.
// 128 - SC cannot be reset by 'sc_end SC_ALL' and status change clear.
//Example:
//SC_ENDURE, 21 //SC_ENDURE: cannot be removed by death and dispell and cosidered as buff. (16 + 4 + 1 = 21)

Expand Down
12 changes: 10 additions & 2 deletions src/map/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -9697,8 +9697,16 @@ BUILDIN(sc_end) {
if (!sce)
return true;

if( status->get_sc_type(type)&SC_NO_CLEAR )
return true;
/* status that can't be individually removed (TODO sc_config option?) */
switch (type) {
case SC_WEIGHTOVER50:
case SC_WEIGHTOVER90:
case SC_NOCHAT:
case SC_PUSH_CART:
return true;
default:
break;
}

//This should help status_change_end force disabling the SC in case it has no limit.
sce->val1 = sce->val2 = sce->val3 = sce->val4 = 0;
Expand Down

0 comments on commit d076f12

Please sign in to comment.