nb Core Community
February 09, 2012, 10:01:07 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: 1.2.3 +nb is now final and released

@new registrations. I will not allow any new registrations here as there are more (real person) spambots here than ever.... captcha proved to be ineffective.

After your registration, mail me at ( admin AT shinobilegends.com ) from the mail address you want to register. Provide some text about you and possibly your game.
 
   Home   Help Search Calendar Downloads Login Register  
Pages: [1]
  Print  
Author Topic: Issue with not counting extratravels given by mounts with cities module...  (Read 843 times)
Alchemion
Guest
« on: January 15, 2010, 03:13:41 pm »

Hi,
Did you encounter this type of issue ? the extratravel set for mounts , ie. 24 free extra travel given by stallion, does not add to daily travel allowance set with the cities module...
At the begining of each day, count travel gives only cities module set allowance...
Any idea why this happens or how to remedy it ?

The code that I guess it's incident in the issue is this:

Code:
case "count-travels":
global $playermount;
$args['available'] += get_module_setting("allowance");
if ($playermount && isset($playermount['mountid'])) {
$id = $playermount['mountid'];
$extra = get_module_objpref("mounts", $id, "extratravel");
$args['available'] += $extra;
}
$args['used'] += get_module_pref("traveltoday");
break;

++

 
Code:
case "mountfeatures":
$extra = get_module_objpref("mounts", $args['id'], "extratravel");
$args['features']['Travel']=$extra;
break;

++

Code:
case "newday":
if ($args['resurrection'] != 'true') {
set_module_pref("traveltoday",0);
}
set_module_pref("paidcost", 0);
break;

++

Code:
case "charstats":
if ($session['user']['alive']){
//addcharstat("Personal Info");
//addcharstat("Home City", get_module_pref("homecity"));
$args = modulehook("count-travels", array('available'=>0,'used'=>0));
$free = max(0, $args['available'] - $args['used']);
addcharstat("Extra Info");
addcharstat("Free Travel", $free);
}
break;

I thought maybe you modified something to the mounts core files... I don't know...

Any hint?

Thank You.
Logged
Nightborn
Administrator
Sr. Member
*****

Karma: +20/-0
Posts: 306



View Profile WWW
« Reply #1 on: January 16, 2010, 09:36:14 am »

Which cities module do you use? The one I ship with, or the one from DP?

I modified the cities module, but I cannot remember modifying any mount-related things.
Logged

It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro
Alchemion
Guest
« Reply #2 on: January 17, 2010, 01:38:19 pm »

Hi,
I was using the DP cities module, but now, since you mentioned it, I have installed your supplied modified version.
Yet, the error persisted and that made me search a little more in the modules that interfered with the village stats... I found the template village of amwayr doing the problem...
I don't know why the author added the charstats for counting the remaing travels, since this counting was provided by the cities module...
The light was given by your cities module, that showed the correct remaing travels at the travelpoints nav and made me wonder why...
Thanks for the useful reply.
Emanuel.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!