Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #006727

  • 0 - None Assigned

  • Fixed

Issue Confirmations

  • Yes (2)No (0)
Photo

@go mora problem.

Posted by Hercules Bot on 22 September 2012 - 12:40 AM

Originally posted by Brynner
when you type @go mora it will warped you to moroc instead of mora map. but when you type @warp mora there is no problem. im just using the latest revision.

Originally posted by Euphy
@go only compares the first three letters, so this would be a problem.
    } else if (strncmp(map_name, "morocc", 3) == 0) {
        town = 1;
...
    } else if (strncmp(map_name, "mora", 3) == 0) {
        town = 31;


Originally posted by Spre
w00t my first rathena stroke of genious and it works just tested it!

If you change morroc entry to..

} else if (strncmp(map_name, "morocc", 4) == 0) {
  town = 1;
} else if (strncmp(map_name, "mora", 4) == 0) {
        town = 31;

@go mora takes you to mora,

looks like there were other conflicts in the @go and that was the remedy(name wise and i saw the remedy AFTER i changed it :P)

can i hab candy now plz?  :P

e
dit:

Oops i only posted have the code LMAO you change morocc AND moras coding and it works perfectly! .. that is if you type @go morocc instead of @go morroc when you are testing it LOL

Edited by Spre, 22 September 2012 - 04:59 AM.


Originally posted by Brynner
just make this only }elseif(strncmp(map_name,"morocc",4)==0){
no need to change the mora.

Originally posted by Spre
If you only edit

} else if (strncmp(map_name, "morocc", 4) == 0) {
  town = 1;

@go mora sends you to mora, but @go morroc also sends you to mora


with both changed from 3 to 4, each one sends you to the right place when the full name is typed out.

Originally posted by Euphy
I would suggest instead to place the mora check before morocc, given the spelling discrepancy between "Morocc" and "Morroc":
    } else if (strncmp(map_name, "mora", 4) == 0) { //Increase comparison to 4.
        town = 31;
    } else if (strncmp(map_name, "morocc", 3) == 0) {
        town = 1;
...


Originally posted by Spre
it is spelled morocc everywhere in the server side files and I believe client side aswell, so when spelled right , it won't be an issue,


I myself have never used @go mapname, I always have reserved @go NUMBER and used @warp map_name

but if you wanted then this should be the solution, same way multiple maps with multiple names are defined, but I only looked at it for..... 2 minutes.

  } else if (strncmp(map_name, "morocc", 4) == 0 ||
	  strncmp(map_name, "morroc", 4 == 0) {
  town = 1;


I still believe 4 should be on all 3, when i tested the change by just changing one value it defaulted to mora after only changing morroc and vice versa with changing mora it took me to morroc.

Originally posted by Brian
How about increase strncmp to 4, and add "morroc" as an alternate spelling for morocc. (Keeping the towns in numeric order.)

    } else if (strncmp(map_name, "morocc", 4) == 0 ||<br />               strncmp(map_name, "morroc", 4) == 0) {<br />        town = 1;<br />...<br />    } else if (strcmp(map_name, "mora") == 0) {<br />        town = 31;<br />


PS: Spre, do you want to commit?

Originally posted by Spre
Fixed at [rev=16791]

Cuz i goofed like a goober