Crossfire Server, Branch 1.12
R12190
|
00001 /* 00002 CrossFire, A Multiplayer game for X-windows 00003 00004 Copyright (C) 2006 Mark Wedel & Crossfire Development Team 00005 Copyright (C) 1992 Frank Tore Johansen 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00020 00021 The authors can be reached via e-mail to crossfire-devel@real-time.com 00022 */ 00023 #include <global.h> 00024 #include <ob_methods.h> 00025 #include <ob_types.h> 00026 #include <sproto.h> 00027 00031 method_ret legacy_ob_process(ob_methods *context, object *op) { 00032 switch (op->type) { 00033 case ROD: 00034 case HORN: 00035 regenerate_rod(op); 00036 return METHOD_OK; 00037 00038 case FORCE: 00039 case POTION_EFFECT: 00040 legacy_remove_force(op); 00041 return METHOD_OK; 00042 00043 case DISEASE: 00044 move_disease(op); 00045 return METHOD_OK; 00046 00047 case SYMPTOM: 00048 move_symptom(op); 00049 return METHOD_OK; 00050 00051 case DOOR: 00052 remove_door(op); 00053 return METHOD_OK; 00054 00055 case LOCKED_DOOR: 00056 remove_locked_door(op); 00057 return METHOD_OK; 00058 00059 case GOLEM: 00060 move_golem(op); 00061 return METHOD_OK; 00062 00063 case EARTHWALL: 00064 hit_player(op, 2, op, AT_PHYSICAL, 1); 00065 return METHOD_OK; 00066 00067 case FIREWALL: 00068 move_firewall(op); 00069 if (op->stats.maxsp) 00070 animate_turning(op); 00071 return METHOD_OK; 00072 00073 case TRIGGER_BUTTON: 00074 case TRIGGER_PEDESTAL: 00075 case TRIGGER_ALTAR: 00076 legacy_animate_trigger(op); 00077 return METHOD_OK; 00078 00079 case DIRECTOR: 00080 if (op->stats.maxsp) 00081 animate_turning(op); 00082 return METHOD_OK; 00083 00084 case HOLE: 00085 legacy_move_hole(op); 00086 return METHOD_OK; 00087 00088 case PLAYERMOVER: 00089 move_player_mover(op); 00090 return METHOD_OK; 00091 } 00092 return METHOD_UNHANDLED; 00093 }