summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--db/Changelog.txt1
-rw-r--r--db/skill_require_db.txt2
-rw-r--r--src/map/atcommand.c38
-rw-r--r--src/map/npc.c2
5 files changed, 19 insertions, 28 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 8d9a9105e..8fc9dbcaf 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/04/16
+ * Modified @monster command to use map_search_freecell (prevents mobs
+ spawning on non-walkable tiles) [Skotlex]
+ * Modified @nuke to invoke skill_cast_nodamage_id instead of the damage_id
+ version (fixes sprite and splash damage for the skill) [Skotlex]
* Fixed char-sql server still reading the old lanconfig format rather than
the new one. [Skotlex]
* Removed water_height.txt reading (since it is always done from the rsw
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 008dc5c51..d2d8c81f0 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -27,6 +27,7 @@
=========================
04/16
+ * Corrected Venom Knife's requiring two knives per use. [Skotlex]
* Adjusted more delays/speed of Lighthalzen mobs thanks to Tharis [Playtester]
* Fixed Job_Equip values for all one-handed-swords thanks to Haplo [Playtester]
* Fixed wrong effect 4175,Poisonous_Toad_Card [Lupus]
diff --git a/db/skill_require_db.txt b/db/skill_require_db.txt
index 0030e86d0..fe830e964 100644
--- a/db/skill_require_db.txt
+++ b/db/skill_require_db.txt
@@ -434,7 +434,7 @@
1001,0,0,40,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_CHARGEATK#ƒ`ƒƒ?[ƒWƒAƒ^ƒbƒN#
1002,0,0,15,0,0,0,99,0,0,shield,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_SHRINK#ƒVƒ…ƒŠƒ“ƒN#
-1004,0,0,15,0,0,0,99,2,1,none,0,1771,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_VENOMKNIFE#ƒxƒiƒ€ƒiƒCƒt#
+1004,0,0,15,0,0,0,99,2,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_VENOMKNIFE#ƒxƒiƒ€ƒiƒCƒt#
1005,0,0,25,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#ƒNƒ??[ƒYƒRƒ“ƒtƒ@ƒCƒ“#
1006,0,0,40,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_SIGHTBLASTER#ƒTƒCƒgƒuƒ‰ƒXƒ^?[#
1007,0,0,30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#ƒGƒ‹ƒŒƒ?ƒ“ƒ^ƒ‹ƒRƒ“ƒo?[ƒ^?»‘¢#
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d32d0fa66..d6a7e12ef 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3386,10 +3386,9 @@ int atcommand_monster(
char monster[NAME_LENGTH];
int mob_id;
int number = 0;
- int x = 0, y = 0;
int count;
- int i, j, k;
- int mx, my, range;
+ int i, k, range;
+ short mx, my;
nullpo_retr(-1, sd);
memset(name, '\0', sizeof(name));
@@ -3400,14 +3399,14 @@ int atcommand_monster(
clif_displaymessage(fd, msg_table[80]); // Give a display name and monster name/id please.
return -1;
}
- if (sscanf(message, "\"%23[^\"]\" %23s %d %d %d", name, monster, &number, &x, &y) > 1 ||
- sscanf(message, "%23s \"%23[^\"]\" %d %d %d", monster, name, &number, &x, &y) > 1) {
+ if (sscanf(message, "\"%23[^\"]\" %23s %d", name, monster, &number) > 1 ||
+ sscanf(message, "%23s \"%23[^\"]\" %d", monster, name, &number) > 1) {
//All data can be left as it is.
- } else if ((count=sscanf(message, "%23s %d %23s %d %d", monster, &number, name, &x, &y)) > 1) {
+ } else if ((count=sscanf(message, "%23s %d %23s", monster, &number, name)) > 1) {
//Here, it is possible name was not given and we are using monster for it.
if (count < 3) //Blank mob's name.
name[0] = '\0';
- } else if (sscanf(message, "%23s %23s %d %d %d", name, monster, &number, &x, &y) > 1) {
+ } else if (sscanf(message, "%23s %23s %d", name, monster, &number) > 1) {
//All data can be left as it is.
} else if (sscanf(message, "%23s", monster) > 0) {
//As before, name may be already filled.
@@ -3437,29 +3436,17 @@ int atcommand_monster(
strcpy(name, "--ja--");
// If value of atcommand_spawn_quantity_limit directive is greater than or equal to 1 and quantity of monsters is greater than value of the directive
- if (battle_config.atc_spawn_quantity_limit >= 1 && number > battle_config.atc_spawn_quantity_limit)
+ if (battle_config.atc_spawn_quantity_limit && number > battle_config.atc_spawn_quantity_limit)
number = battle_config.atc_spawn_quantity_limit;
if (battle_config.etc_log)
- ShowInfo("%s monster='%s' name='%s' id=%d count=%d (%d,%d)\n", command, monster, name, mob_id, number, x, y);
+ ShowInfo("%s monster='%s' name='%s' id=%d count=%d (%d,%d)\n", command, monster, name, mob_id, number, sd->bl.x, sd->bl.y);
count = 0;
- range = (int)sqrt(number) / 2;
- range = range * 2 + 5; // calculation of an odd number (+ 4 area around)
+ range = (int)sqrt(number) +2; // calculation of an odd number (+ 4 area around)
for (i = 0; i < number; i++) {
- j = 0;
- k = 0;
- while(j++ < 8 && k == 0) { // try 8 times to spawn the monster (needed for close area)
- if (x <= 0)
- mx = sd->bl.x + (rand() % range - (range / 2));
- else
- mx = x;
- if (y <= 0)
- my = sd->bl.y + (rand() % range - (range / 2));
- else
- my = y;
- k = mob_once_spawn((struct map_session_data*)sd, "this", mx, my, name, mob_id, 1, "");
- }
+ map_search_freecell(&sd->bl, 0, &mx, &my, range, range, 0);
+ k = mob_once_spawn(sd, "this", mx, my, name, mob_id, 1, "");
count += (k != 0) ? 1 : 0;
}
@@ -6005,8 +5992,7 @@ int atcommand_nuke(
if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kill only lower or same GM level
- clif_skill_nodamage(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, -1, 1);
- skill_castend_damage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, gettick(), 0);
+ skill_castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, gettick(), 0);
clif_displaymessage(fd, msg_table[109]); // Player has been nuked!
} else {
clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
diff --git a/src/map/npc.c b/src/map/npc.c
index a5014de51..f09a4a367 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1072,7 +1072,7 @@ int npc_scriptcont(struct map_session_data *sd,int id)
nullpo_retr(1, sd);
if (id!=sd->npc_id){
- ShowWarning("npc_scriptcont: sd->npc_id is not id.\n");
+ ShowWarning("npc_scriptcont: sd->npc_id (%d) is not id (%d).\n", sd->npc_id, id);
return 1;
}
if (npc_checknear(sd,id)){