- Fixed .@GID not being set in Gld_Trea_Spawn, since r13559. (bugreport:5067)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14974 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
d86eaff5e6
commit
b6e6bec3c6
@ -2208,8 +2208,9 @@ This is equivalent to using:
|
|||||||
The reason for this is, that this short form is internally converted into a call
|
The reason for this is, that this short form is internally converted into a call
|
||||||
to getelementofarray, when the script is loaded.
|
to getelementofarray, when the script is loaded.
|
||||||
|
|
||||||
Also useful when passing arrays to functions.
|
Also useful when passing arrays to functions or accessing another npc's arrays:
|
||||||
getelementofarray(getarg(0),<index>) will work, but getarg(0)[<index>] will not.
|
getelementofarray(getarg(0),<index>)
|
||||||
|
getelementofarray(getvariableofnpc(.var, "testNPC"),<index>)
|
||||||
|
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
|
@ -1156,8 +1156,10 @@ OnClock0001:
|
|||||||
// Do nothing if this script is the template.
|
// Do nothing if this script is the template.
|
||||||
if (strnpcinfo(1) == "Gld_Trea_Spawn") end;
|
if (strnpcinfo(1) == "Gld_Trea_Spawn") end;
|
||||||
|
|
||||||
|
set .@GID, GetCastleData(strnpcinfo(2),1);
|
||||||
|
|
||||||
// If there is no owner, do nothing.
|
// If there is no owner, do nothing.
|
||||||
if (!GetCastleData(strnpcinfo(2),1)) end;
|
if (!.@GID) end;
|
||||||
|
|
||||||
// Is there Economy in this castle?
|
// Is there Economy in this castle?
|
||||||
set .@Treasure,GetCastleData(strnpcinfo(2),2)/5+4;
|
set .@Treasure,GetCastleData(strnpcinfo(2),2)/5+4;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#define STORAGE_MEMINC 16
|
#define STORAGE_MEMINC 16
|
||||||
|
|
||||||
/// Save guild_storage data to sql
|
/// Save storage data to sql
|
||||||
int storage_tosql(int account_id, struct storage_data* p)
|
int storage_tosql(int account_id, struct storage_data* p)
|
||||||
{
|
{
|
||||||
memitemdata_to_sql(p->items, MAX_STORAGE, account_id, TABLE_STORAGE);
|
memitemdata_to_sql(p->items, MAX_STORAGE, account_id, TABLE_STORAGE);
|
||||||
@ -25,7 +25,7 @@ int storage_tosql(int account_id, struct storage_data* p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TXT_SQL_CONVERT
|
#ifndef TXT_SQL_CONVERT
|
||||||
/// Load guild_storage data to mem
|
/// Load storage data to mem
|
||||||
int storage_fromsql(int account_id, struct storage_data* p)
|
int storage_fromsql(int account_id, struct storage_data* p)
|
||||||
{
|
{
|
||||||
StringBuf buf;
|
StringBuf buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user