- 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://svn.code.sf.net/p/rathena/svn/trunk@12033 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex
2008-01-08 13:30:43 +00:00
parent 25aebd3e08
commit 9a2033c364
7 changed files with 14 additions and 11 deletions

View File

@@ -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);