|
@@ -1143,6 +1143,25 @@ void StatusDatabase::removeByStatusFlag(block_list *bl, std::vector<e_status_cha
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+status_change::status_change(){
|
|
|
+ this->option = OPTION_NOTHING;
|
|
|
+ this->opt3 = OPT3_NORMAL;
|
|
|
+ this->opt1 = OPT1_NONE;
|
|
|
+ this->opt2 = OPT2_NONE;
|
|
|
+ this->count = 0;
|
|
|
+ this->lastEffect = SC_NONE;
|
|
|
+ this->lastEffectTimer = INVALID_TIMER;
|
|
|
+ this->cant = {};
|
|
|
+ this->comet_x = 0;
|
|
|
+ this->comet_y = 0;
|
|
|
+#ifndef RENEWAL
|
|
|
+ this->sg_counter = 0;
|
|
|
+#endif
|
|
|
+ std::fill( std::begin( this->data ), std::end( this->data ), nullptr );
|
|
|
+ this->lastStatus = { SC_NONE, nullptr };
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* Accessor for a status_change_entry in a status_change
|
|
|
*/
|
|
@@ -9406,9 +9425,7 @@ void status_change_init(struct block_list *bl)
|
|
|
{
|
|
|
status_change *sc = status_get_sc(bl);
|
|
|
nullpo_retv(sc);
|
|
|
- memset(sc, 0, sizeof (status_change));
|
|
|
- sc->lastEffect = SC_NONE;
|
|
|
- sc->lastEffectTimer = INVALID_TIMER;
|
|
|
+ new (sc) status_change();
|
|
|
}
|
|
|
|
|
|
/*========================================== [Playtester]
|