Pages:<< prev 1 next >>



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
Since there isn't a LoP main forum site anymore figured I'd post this here for everyone
In act_wiz.c function do_bodybag
find
change it to this
This makes it so bodybag will work correctly.
in act_obj.c function do_gift
find
change it to this
This will make gift work correctly.
The problem with these and maybe a few others was I at one point had obj_to_char, obj_to_room, etc... remove the old info and looks like at some point I stopped it there and forgot to update it in a few places to remove from old pointers.

In act_wiz.c function do_bodybag
find
for( obj = first_corpse; obj; obj = obj->next_corpse ) { if( obj->pIndexData->vnum != OBJ_VNUM_CORPSE_PC || str_cmp( buf2, obj->short_descr ) ) continue; pager_printf( ch, "\r\n&P%sCorpse: &w%-12.12s %2s ", bag ? "Bagging " : "", capitalize( arg1 ), is_obj_stat( obj, ITEM_CLANCORPSE ) ? "&RPK" : "" ); if( obj->in_room ) pager_printf( ch, "&PIn Room: &w%-22.22s &P[&w%5d&P] ", obj->in_room->area->name, obj->in_room->vnum ); else if( obj->in_obj ) pager_printf( ch, "&PIn Obj: &w%-22.22s &P[&w%5d&P] ", obj->in_obj->short_descr, obj->in_obj->pIndexData->vnum ); else if( obj->carried_by ) pager_printf( ch, "&PCarried: &w%-30.30s ", obj->carried_by->name ); else pager_printf( ch, "&P%-39.39s ", "Unknown Location!!!" ); pager_printf( ch, "&PTimer: &w%d\r\n", obj->timer ); /* Maybe we should only move the ones in a room */ if( bag && obj->in_room ) { obj = obj_to_char( obj, ch ); obj->timer = -1; save_char_obj( ch ); } }
change it to this
for( obj = first_corpse; obj; obj = obj->next_corpse ) { if( obj->pIndexData->vnum != OBJ_VNUM_CORPSE_PC || str_cmp( buf2, obj->short_descr ) ) continue; found = true; pager_printf( ch, "\r\n&P%sCorpse: &w%-12.12s %2s ", bag ? "Bagging " : "", capitalize( arg1 ), is_obj_stat( obj, ITEM_CLANCORPSE ) ? "&RPK" : "" ); if( obj->in_room ) pager_printf( ch, "&PIn Room: &w%-22.22s &P[&w%5d&P] ", obj->in_room->area->name, obj->in_room->vnum ); else if( obj->in_obj ) pager_printf( ch, "&PIn Obj: &w%-22.22s &P[&w%5d&P] ", obj->in_obj->short_descr, obj->in_obj->pIndexData->vnum ); else if( obj->carried_by ) pager_printf( ch, "&PCarried: &w%-30.30s ", obj->carried_by->name ); else pager_printf( ch, "&P%-39.39s ", "Unknown Location!!!" ); pager_printf( ch, "&PTimer: &w%d\r\n", obj->timer ); /* Maybe we should only move the ones in a room */ if( bag && obj->in_room ) { obj_from_room( obj ); obj = obj_to_char( obj, ch ); obj->timer = -1; save_char_obj( ch ); } }
This makes it so bodybag will work correctly.
in act_obj.c function do_gift
find
obj = obj_to_char( obj, victim ); if( !is_npc( ch ) && !char_died( ch ) ) save_char_obj( ch ); if( !is_npc( victim ) && !char_died( victim ) ) save_char_obj( victim );
change it to this
obj_from_char( obj ); obj = obj_to_char( obj, victim ); if( !is_npc( ch ) && !char_died( ch ) ) save_char_obj( ch ); if( !is_npc( victim ) && !char_died( victim ) ) save_char_obj( victim );
This will make gift work correctly.
The problem with these and maybe a few others was I at one point had obj_to_char, obj_to_room, etc... remove the old info and looks like at some point I stopped it there and forgot to update it in a few places to remove from old pointers.
Pages:<< prev 1 next >>