diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-28 12:32:02 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-28 12:32:02 +0000 |
commit | e865d9496fe8b896082d5f62e73300b1262ddf02 (patch) | |
tree | 10b205e61957c4bc2b2a365d74b7c2223c7abfea | |
parent | 925b181de6d2c6a1ae3a1ed11d806bfe5785379c (diff) | |
download | hercules-e865d9496fe8b896082d5f62e73300b1262ddf02.tar.gz hercules-e865d9496fe8b896082d5f62e73300b1262ddf02.tar.bz2 hercules-e865d9496fe8b896082d5f62e73300b1262ddf02.tar.xz hercules-e865d9496fe8b896082d5f62e73300b1262ddf02.zip |
* Added script command 'equip' to equip items.
* Fixed dependancies in map-server compiling (VC7.1).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5400 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/script.c | 29 | ||||
-rw-r--r-- | vcproj-7.1/map-server_sql.vcproj | 15 | ||||
-rw-r--r-- | vcproj-7.1/map-server_txt.vcproj | 9 |
4 files changed, 51 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index e8c658999..41420ff35 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -7,6 +7,8 @@ GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALAR 2006/02/28
* Rewrote LAN support code. Changed configuration file name
lan_support.conf to subnet_athena.conf, changed it syntax. [LuzZza]
+ * Added script command 'equip' to equip items. [Lance]
+ * Fixed dependancies in map-server compiling (VC7.1). [Lance]
2006/02/24
* Prevented guild/party recall to work on GMs of greater level than
yourself. [Skotlex]
diff --git a/src/map/script.c b/src/map/script.c index 34aedaa35..4f99870d4 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -401,6 +401,7 @@ int buildin_setd(struct script_state *st); // <--- [zBuffer] List of dynamic var commands
int buildin_petstat(struct script_state *st); // [Lance] Pet Stat Rq: Dubby
int buildin_callshop(struct script_state *st); // [Skotlex]
+int buildin_equip(struct script_state *st);
void push_val(struct script_stack *stack,int type,int val);
int run_func(struct script_state *st);
@@ -702,6 +703,7 @@ struct { // <--- [zBuffer] List of dynamic var commands
{buildin_petstat,"petstat","i"},
{buildin_callshop,"callshop","si"}, // [Skotlex]
+ {buildin_equip,"equip","i"},
{buildin_setitemscript,"setitemscript","is"}, //Set NEW item bonus script. Lupus
{buildin_disguise,"disguise","i"}, //disguise player. Lupus
{buildin_undisguise,"undisguise","i"}, //undisguise player. Lupus
@@ -9379,6 +9381,33 @@ int buildin_unequip(struct script_state *st) return 0;
}
+int buildin_equip(struct script_state *st)
+{
+ int nameid=0,count=0,i;
+ struct map_session_data *sd;
+ struct item_data *item_data;
+
+ sd = script_rid2sd(st);
+
+ nameid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if(nameid>=500 && (item_data = itemdb_search(nameid)) != NULL)
+ for(i=0;i<MAX_INVENTORY;i++){
+ if(sd->status.inventory[i].nameid==nameid)
+ count+=sd->status.inventory[i].amount;
+ }
+ else{
+ if(battle_config.error_log)
+ ShowError("wrong item ID : equipitem(%i)\n",nameid);
+ return 1;
+ }
+
+ if(count){
+ pc_equipitem(sd,nameid,item_data->equip);
+ }
+
+ return 0;
+}
+
//=======================================================
// strlen [Valaris]
//-------------------------------------------------------
diff --git a/vcproj-7.1/map-server_sql.vcproj b/vcproj-7.1/map-server_sql.vcproj index 196aed45e..646c2eb42 100644 --- a/vcproj-7.1/map-server_sql.vcproj +++ b/vcproj-7.1/map-server_sql.vcproj @@ -171,8 +171,7 @@ RelativePath="..\src\common\db.c">
</File>
<File
- RelativePath="..\src\common\ers.c"
- >
+ RelativePath="..\src\common\ers.c">
</File>
<File
RelativePath="..\src\common\graph.c">
@@ -193,6 +192,9 @@ RelativePath="..\src\zlib\iowin32.c">
</File>
<File
+ RelativePath="..\src\map\irc.c">
+ </File>
+ <File
RelativePath="..\src\map\itemdb.c">
</File>
<File
@@ -287,6 +289,9 @@ RelativePath="..\src\map\battle.h">
</File>
<File
+ RelativePath="..\src\common\cbasetypes.h">
+ </File>
+ <File
RelativePath="..\src\map\charcommand.h">
</File>
<File
@@ -311,6 +316,9 @@ RelativePath="..\src\common\db.h">
</File>
<File
+ RelativePath="..\src\common\ers.h">
+ </File>
+ <File
RelativePath="..\src\common\graph.h">
</File>
<File
@@ -323,6 +331,9 @@ RelativePath="..\src\map\intif.h">
</File>
<File
+ RelativePath="..\src\map\irc.h">
+ </File>
+ <File
RelativePath="..\src\map\itemdb.h">
</File>
<File
diff --git a/vcproj-7.1/map-server_txt.vcproj b/vcproj-7.1/map-server_txt.vcproj index 59844eb92..06d49cb2b 100644 --- a/vcproj-7.1/map-server_txt.vcproj +++ b/vcproj-7.1/map-server_txt.vcproj @@ -171,8 +171,7 @@ RelativePath="..\src\common\db.c">
</File>
<File
- RelativePath="..\src\common\ers.c"
- >
+ RelativePath="..\src\common\ers.c">
</File>
<File
RelativePath="..\src\common\graph.c">
@@ -287,6 +286,9 @@ RelativePath="..\src\map\battle.h">
</File>
<File
+ RelativePath="..\src\common\cbasetypes.h">
+ </File>
+ <File
RelativePath="..\src\map\charcommand.h">
</File>
<File
@@ -311,6 +313,9 @@ RelativePath="..\src\common\db.h">
</File>
<File
+ RelativePath="..\src\common\ers.h">
+ </File>
+ <File
RelativePath="..\src\common\graph.h">
</File>
<File
|