ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/plugins.C
(Generate patch)

Comparing deliantra/server/server/plugins.C (file contents):
Revision 1.20 by root, Tue Dec 12 20:53:03 2006 UTC vs.
Revision 1.21 by root, Tue Dec 12 21:39:57 2006 UTC

2621 2621
2622 op = va_arg (args, object *); 2622 op = va_arg (args, object *);
2623 2623
2624 va_end (args); 2624 va_end (args);
2625 2625
2626 op->destroy (0); 2626 op->destroy ();
2627 2627
2628 *type = CFAPI_NONE; 2628 *type = CFAPI_NONE;
2629 return NULL; 2629 return NULL;
2630} 2630}
2631 2631
2650 } 2650 }
2651 else 2651 else
2652 { 2652 {
2653 object *tmp; 2653 object *tmp;
2654 2654
2655 tmp = get_object (); 2655 tmp = object::create ();
2656 copy_object (op, tmp); 2656 op->copy_to (tmp);
2657 *type = CFAPI_POBJECT; 2657 *type = CFAPI_POBJECT;
2658 return tmp; 2658 return tmp;
2659 } 2659 }
2660} 2660}
2661void * 2661void *
2725 *type = CFAPI_POBJECT; 2725 *type = CFAPI_POBJECT;
2726 switch (ival) 2726 switch (ival)
2727 { 2727 {
2728 case 0: 2728 case 0:
2729 va_end (args); 2729 va_end (args);
2730 return get_object (); 2730 return object::create ();
2731 break; 2731 break;
2732 2732
2733 case 1: /* Named object. Nearly the old plugin behavior, but we don't add artifact suffixes */ 2733 case 1: /* Named object. Nearly the old plugin behavior, but we don't add artifact suffixes */
2734 { 2734 {
2735 char *sval; 2735 char *sval;
2738 2738
2739 op = get_archetype_by_object_name (sval); 2739 op = get_archetype_by_object_name (sval);
2740 2740
2741 if (strncmp (query_name (op), ARCH_SINGULARITY, ARCH_SINGULARITY_LEN) == 0) 2741 if (strncmp (query_name (op), ARCH_SINGULARITY, ARCH_SINGULARITY_LEN) == 0)
2742 { 2742 {
2743 op->destroy (0); 2743 op->destroy ();
2744 /* Try with archetype names... */ 2744 /* Try with archetype names... */
2745 op = get_archetype (sval); 2745 op = get_archetype (sval);
2746 if (strncmp (query_name (op), ARCH_SINGULARITY, ARCH_SINGULARITY_LEN) == 0) 2746 if (strncmp (query_name (op), ARCH_SINGULARITY, ARCH_SINGULARITY_LEN) == 0)
2747 { 2747 {
2748 op->destroy (0); 2748 op->destroy ();
2749 *type = CFAPI_NONE; 2749 *type = CFAPI_NONE;
2750 va_end (args); 2750 va_end (args);
2751 return NULL; 2751 return NULL;
2752 } 2752 }
2753 } 2753 }
3222 x = map->enter_x; 3222 x = map->enter_x;
3223 y = map->enter_y; 3223 y = map->enter_y;
3224 } 3224 }
3225 3225
3226/* 3226/*
3227 originator = get_object(); 3227 originator = object::create();
3228 EXIT_PATH(originator) = add_string(map->path); 3228 EXIT_PATH(originator) = add_string(map->path);
3229 EXIT_X(originator) = x; 3229 EXIT_X(originator) = x;
3230 EXIT_Y(originator) = y; 3230 EXIT_Y(originator) = y;
3231 printf("B Transfer: X=%d, Y=%d, OP=%s\n", x, y, op->name);*/ 3231 printf("B Transfer: X=%d, Y=%d, OP=%s\n", x, y, op->name);*/
3232 /*enter_exit(op, originator); */ 3232 /*enter_exit(op, originator); */
3233 insert_ob_in_map_at (op, map, NULL, 0, x, y); 3233 insert_ob_in_map_at (op, map, NULL, 0, x, y);
3234 /*printf("A Transfer: X=%d, Y=%d, MAP=%s\n", x, y, op->map->name); 3234 /*printf("A Transfer: X=%d, Y=%d, MAP=%s\n", x, y, op->map->name);
3235 originator->destroy (0); 3235 originator->destroy ();
3236 */ 3236 */
3237 *type = CFAPI_INT; 3237 *type = CFAPI_INT;
3238 return &rv; 3238 return &rv;
3239 break; 3239 break;
3240 3240

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines