1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
… | |
… | |
63 | // next=NULL; /* next god in this linked list */ |
63 | // next=NULL; /* next god in this linked list */ |
64 | |
64 | |
65 | god->arch = god_arch; |
65 | god->arch = god_arch; |
66 | god->name = god_arch->object::name; |
66 | god->name = god_arch->object::name; |
67 | |
67 | |
|
|
68 | // first_god->id MUST be the highest god number for other code to work currently |
68 | if (!first_god) |
69 | if (!first_god) |
69 | god->id = 1; |
70 | god->id = 1; |
70 | else |
71 | else |
71 | { |
72 | { |
72 | god->id = first_god->id + 1; |
73 | god->id = first_god->id + 1; |
… | |
… | |
81 | } |
82 | } |
82 | |
83 | |
83 | /* baptize_altar() - (cosmetically) change the name to that of the |
84 | /* baptize_altar() - (cosmetically) change the name to that of the |
84 | * god in question, then set the title for later use. -b.t. |
85 | * god in question, then set the title for later use. -b.t. |
85 | */ |
86 | */ |
86 | |
|
|
87 | int |
87 | int |
88 | baptize_altar (object *op) |
88 | baptize_altar (object *op) |
89 | { |
89 | { |
90 | char buf[MAX_BUF]; |
90 | char buf[MAX_BUF]; |
91 | |
91 | |
… | |
… | |
99 | { |
99 | { |
100 | LOG (llevError, "baptise_altar(): bizarre nameless god!\n"); |
100 | LOG (llevError, "baptise_altar(): bizarre nameless god!\n"); |
101 | return 0; |
101 | return 0; |
102 | } |
102 | } |
103 | /* if the object name hasnt' been changed, we tack on the gods name */ |
103 | /* if the object name hasnt' been changed, we tack on the gods name */ |
104 | if (!strcmp (op->name, op->arch->object::name)) |
104 | if (op->name == op->arch->object::name) |
105 | { |
105 | { |
106 | sprintf (buf, "%s of %s", &op->name, &god->name); |
106 | sprintf (buf, "%s of %s", &op->name, &god->name); |
107 | op->name = buf; |
107 | op->name = buf; |
108 | } |
108 | } |
109 | op->title = god->name; |
109 | op->title = god->name; |