Allow NPC view data modifications (#4385)
* Fixes #4289. * Updated script commands setunitdata and getunitdata to support the modification of NPC view data. * Converted mob_avail database to YAML. Thanks to @Lemongrass3110, @4144, @exneval, @Balferian, @cahya1992 and @teededung! Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
@@ -3134,6 +3134,26 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh the area with a change in display of a unit.
|
||||
* @bl: Object to update
|
||||
*/
|
||||
void unit_refresh(struct block_list *bl) {
|
||||
nullpo_retv(bl);
|
||||
|
||||
if (bl->m < 0)
|
||||
return;
|
||||
|
||||
struct map_data *mapdata = map_getmapdata(bl->m);
|
||||
|
||||
// Using CLR_TRICKDEAD because other flags show effects
|
||||
// Probably need to use another flag or other way to refresh it
|
||||
if (mapdata->users) {
|
||||
clif_clearunit_area(bl, CLR_TRICKDEAD); // Fade out
|
||||
clif_spawn(bl); // Fade in
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes units of a master when the master is removed from map
|
||||
* @param sd: Player
|
||||
|
||||
Reference in New Issue
Block a user