summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-08 13:30:43 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-08 13:30:43 +0000
commit5d658f9d7b68c96839baf7932dc8a3cb30adef5f (patch)
treeb84a2d99b5045775b57908b25bd7dccd2056c9b5 /src/map/script.c
parente134818e33b34c84eba8770087a330f99607c4b6 (diff)
downloadhercules-5d658f9d7b68c96839baf7932dc8a3cb30adef5f.tar.gz
hercules-5d658f9d7b68c96839baf7932dc8a3cb30adef5f.tar.bz2
hercules-5d658f9d7b68c96839baf7932dc8a3cb30adef5f.tar.xz
hercules-5d658f9d7b68c96839baf7932dc8a3cb30adef5f.zip
- Made the pc reg variables receive a const char* as the argument, since they duplicate the value anyway (and they were receiving const char* values from the setd function)
- Fixed Wand of Hermod not starting the SC_HERMOD status change (which blocks spells) - Fixed a missing break in the cast cancel code. - Fixed additional def/mdef from vit/int bonuses being lost when a status change that affects def/mdef triggers (for homunculus) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12033 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 90df0f884..ffd40aa68 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2250,13 +2250,13 @@ void* get_val2(struct script_state* st, int uid, struct linkdb_node** ref)
* Stores the value of a script variable
* Return value is 0 on fail, 1 on success.
*------------------------------------------*/
-static int set_reg(struct script_state* st, TBL_PC* sd, int num, char* name, void* value, struct linkdb_node** ref)
+static int set_reg(struct script_state* st, TBL_PC* sd, int num, char* name, const void* value, struct linkdb_node** ref)
{
char prefix = name[0]; char postfix = name[strlen(name)-1];
if (postfix == '$') { // string variable
- char* str = (char*)value;
+ const char* str = (const char*)value;
switch (prefix) {
case '@':
return pc_setregstr(sd, num, str);