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

Comparing deliantra/server/common/init.C (file contents):
Revision 1.57 by root, Thu Apr 15 06:05:52 2010 UTC vs.
Revision 1.61 by root, Mon Oct 11 18:40:43 2010 UTC

27#include <global.h> 27#include <global.h>
28#include <object.h> 28#include <object.h>
29 29
30dynbuf_text msg_dynbuf (65536, 65536); 30dynbuf_text msg_dynbuf (65536, 65536);
31 31
32extern const char *const attacktype_name[NROFATTACKS] = {
33# define def(uc, lc, desc, plus, change) # lc,
34# include "attackinc.h"
35# undef def
36};
37
32extern const char *const attacktype_desc[NROFATTACKS] = { 38extern const char *const attacktype_desc[NROFATTACKS] = {
33# define def(uc, lc, name, plus, change) # name, 39# define def(uc, lc, desc, plus, change) # desc,
34# include "attackinc.h" 40# include "attackinc.h"
35# undef def 41# undef def
36}; 42};
37 43
38extern const char *const resist_plus[NROFATTACKS] = { 44extern const char *const resist_plus[NROFATTACKS] = {
39# define def(uc, lc, name, plus, change) # plus, 45# define def(uc, lc, desc, plus, change) # plus,
40# include "attackinc.h" 46# include "attackinc.h"
41# undef def 47# undef def
42}; 48};
43 49
44extern const char *const change_resist_msg[NROFATTACKS] = { 50extern const char *const change_resist_msg[NROFATTACKS] = {
45# define def(uc, lc, name, plus, change) # change, 51# define def(uc, lc, desc, plus, change) # change,
46# include "attackinc.h" 52# include "attackinc.h"
47# undef def 53# undef def
48}; 54};
49 55
50int resist_table[NROFATTACKS] = { 56int resist_table[NROFATTACKS] = {
51# define def(uc, lc, name, plus, change) ATNR_ ## uc, 57# define def(uc, lc, desc, plus, change) ATNR_ ## uc,
52# include "attackinc.h" 58# include "attackinc.h"
53# undef def 59# undef def
54}; 60};
55 61
56/* You unforunately need to looking in include/global.h to see what these 62/* You unforunately need to looking in include/global.h to see what these
57 * correspond to. 63 * correspond to.
58 */ 64 */
59struct Settings settings = { 65struct Settings settings = {
60 LOGFILE, /* Logfile */ 66 LOGFILE, /* Logfile */
61 CSPORT, /* Client/server port */ 67 CSPORT, /* Client/server port */
62 68 llevTrace, /* Log level */
63/* Debug level */
64#ifdef DEBUG
65 llevDebug,
66#else
67 llevInfo,
68#endif
69
70 0, NULL, 0, /* dumpvalues, dumparg, daemonmode */ 69 0, NULL, 0, /* dumpvalues, dumparg, daemonmode */
71 0, /* argc */ 70 0, /* argc */
72 NULL, /* argv */ 71 NULL, /* argv */
73 CONFDIR, 72 CONFDIR,
74 DATADIR, 73 DATADIR,
93 0, 92 0,
94 0, 93 0,
95 EXPLORE_MODE, 94 EXPLORE_MODE,
96 SPELLPOINT_LEVEL_DEPEND, 95 SPELLPOINT_LEVEL_DEPEND,
97 0, 96 0,
98 1.0, 97 1.25,
99 98
100/* Armor enchantment stuff */ 99/* Armor enchantment stuff */
101 ARMOR_MAX_ENCHANT, 100 ARMOR_MAX_ENCHANT,
102 ARMOR_WEIGHT_REDUCTION, 101 ARMOR_WEIGHT_REDUCTION,
103 ARMOR_WEIGHT_LINEAR, 102 ARMOR_WEIGHT_LINEAR,
193//attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]; 192//attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS];
194 193
195void 194void
196init_attackmess () 195init_attackmess ()
197{ 196{
198 char filename[MAX_BUF]; 197 object_thawer thawer (settings.datadir, "attackmess");
199
200 sprintf (filename, "%s/attackmess", settings.datadir);
201 LOG (llevDebug, "Reading attack messages from %s...\n", filename);
202
203 object_thawer thawer (filename);
204 198
205 if (!thawer) 199 if (!thawer)
206 { 200 {
207 LOG (llevError, "Can't open %s.\n", filename); 201 LOG (llevError, "Can't open %s.\n", thawer.name);
208 return; 202 return;
209 } 203 }
210 204
211 int msgnum = -1; 205 int msgnum = -1;
212 int total = 0; 206 int total = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines