Jump to content

Recommended Posts

  • 1 month later...
Posted

Pending approval:

  • Updated item_vending_db.yml to Rapid YAML.
  • Updated some deprecated functions regarding item database.
  • Fixed an issue with bound item battle config.
  • Updated to latest GitHash: d93d41
  • Upvote 1
  • Love 1
Posted
34 minutes ago, Easycore said:

Pending approval:

  • Updated item_vending_db.yml to Rapid YAML.
  • Updated some deprecated functions regarding item database.
  • Fixed an issue with bound item battle config.
  • Updated to latest GitHash: d93d41

this is for the latest version correct?

Posted (edited)

bump to this

sir @Easycore

i did recv error on this part

image.png.f1edd31baf8ec4c1bd95de199206b9ae.png

 

EDIT: figured out 

 

#include "../common/malloc.hpp" // aMalloc, aFree
#include "../common/nullpo.hpp"
#include "../common/showmsg.hpp" // ShowInfo
#include "../common/strlib.hpp"
#include "../common/timer.hpp"  // DIFF_TICK
#include "../common/utils.hpp"
#include "achievement.hpp"
#include "atcommand.hpp"
#include "battle.hpp"
#include "buyingstore.hpp"
#include "buyingstore.hpp" // struct s_autotrade_entry, struct s_autotrader
#include "chrif.hpp"
#include "clif.hpp"
#include "itemdb.hpp"
#include "intif.hpp" <------ the diff file doenst include this
#include "log.hpp"
#include "npc.hpp"
#include "path.hpp"
#include "pc.hpp"
#include "pc_groups.hpp"

 

Edited by AinsLord
solved
Posted (edited)
On 2/1/2023 at 3:49 AM, Easycore said:

@AinsLord

Fixed. Waiting for approval.

cash and zeny is missing.

 

it works i forgot the db\import\item_db_ex.yml

image.png.e7db42f6bbe9f6328e49da9fdb774a8e.png

Edited by Brynner
Posted (edited)
4 hours ago, Brynner said:

cash and zeny is missing.

 

it works i forgot the db\import\item_db_ex.yml

image.png.e7db42f6bbe9f6328e49da9fdb774a8e.png

add this to your import/item_db.yml

#=============================================================
# Extended Vending Items
#=============================================================
  - Id: 30000
    AegisName: Zeny
    Name: Zeny
    Type: Etc
    Weight: 1
  - Id: 30001
    AegisName: Cash
    Name: Cash
    Type: Etc
    Weight: 1

 

Edited by AinsLord
  • 2 weeks later...
Posted

hi @Easycore there was a problem with the latest rathena git hash

https://github.com/rathena/rathena/commit/a35063dfd653ee19385a4d8599822247abdee170

i update my git to this latest pull in rathena

no problem compiling however when doing @reloaditemdb this error occurs

image.png.b0abf5e7a0d6d6cef1e0b4f59db3e97b.png

i tried to edit the file src\map\vending.cpp since the latest have this

#include <common/malloc.hpp> // aMalloc, aFree
#include <common/nullpo.hpp>
#include <common/showmsg.hpp> // ShowInfo
#include <common/strlib.hpp>
#include <common/timer.hpp>  // DIFF_TICK

and not this one

#include "../common/malloc.hpp" // aMalloc, aFree
#include "../common/nullpo.hpp"
#include "../common/showmsg.hpp" // ShowInfo
#include "../common/strlib.hpp"
#include "../common/timer.hpp"  // DIFF_TICK

i changed

#include "../common/utils.hpp"

to

#include <common/utils.hpp>

works fine after compiling

but do @reloaditemdb mapcrash error will occur

 

thanks i hope this will be notice ?

Posted
On 2/14/2023 at 6:00 PM, AinsLord said:

hi @Easycore there was a problem with the latest rathena git hash

https://github.com/rathena/rathena/commit/a35063dfd653ee19385a4d8599822247abdee170

i update my git to this latest pull in rathena

no problem compiling however when doing @reloaditemdb this error occurs

image.png.b0abf5e7a0d6d6cef1e0b4f59db3e97b.png

i tried to edit the file src\map\vending.cpp since the latest have this

#include <common/malloc.hpp> // aMalloc, aFree
#include <common/nullpo.hpp>
#include <common/showmsg.hpp> // ShowInfo
#include <common/strlib.hpp>
#include <common/timer.hpp>  // DIFF_TICK

and not this one

#include "../common/malloc.hpp" // aMalloc, aFree
#include "../common/nullpo.hpp"
#include "../common/showmsg.hpp" // ShowInfo
#include "../common/strlib.hpp"
#include "../common/timer.hpp"  // DIFF_TICK

i changed

#include "../common/utils.hpp"

to

#include <common/utils.hpp>

works fine after compiling

but do @reloaditemdb mapcrash error will occur

 

thanks i hope this will be notice ?

we have the same problem, although I still don't understand which part of the mod the crash comes from. 

Posted
2 hours ago, AinsLord said:

encontraste alguna solucion a esto?

?

I only had to omit that one commit, all the others are correct, it does not interfere with extending vending. 

  • Upvote 1
Posted
1 hour ago, AinsLord said:

hi @Easycore i found some problem with the vending system

when i try to cancel the vending it shows me this

image.png.ce35afa62515b0d79258b0626780206f.png

and the vending still opens up

what you say does not happen to me, did you install the manual diff?

Posted
On 2/20/2023 at 7:20 AM, JinYuichi said:

what you say does not happen to me, did you install the manual diff?

yea manual diff im using the latest one he updated

 

Bump to my post

yea i tried to re-diff again again using the latest rathena git

and once i press the vending skill and instead of selecting 

a currency press cancel and still the vending window will open

im using this latest rev of extended vending

ExtendedVending_[Rev8].diff

  • Upvote 1
  • 2 weeks later...
Posted
On 2/4/2023 at 1:03 AM, Brynner said:

cash and zeny is missing.

 

it works i forgot the db\import\item_db_ex.yml

image.png.e7db42f6bbe9f6328e49da9fdb774a8e.png

In db/import-tmpl and db/import add in item_db.yml
Body:
  - Id: 30000
    AegisName: Zeny
    Name: Zeny
    Type: Etc
    Weight: 1
  - Id: 30001
    AegisName: Cash
    Name: Cash
    Type: Etc
    Weight: 1

If not resolved. create a file called item_db_ex.yml and add it inside and put it in db/import-tmpl and db/import.

I had the same problem and after doing that it fixed it.

 

Posted (edited)

  

On 2/19/2023 at 3:47 PM, AinsLord said:

hi @Easycore i found some problem with the vending system

when i try to cancel the vending it shows me this

image.png.ce35afa62515b0d79258b0626780206f.png

and the vending still opens up

 

On 2/27/2023 at 10:16 AM, Lelouch vi Britannia said:

I also have the same issues with that cancel but still the vending tab opens and item id does not exist that @AinsLord have experienced.

 

On 3/15/2023 at 11:32 PM, adisutomo89 said:

if the vending skill is closed, or not vending. such an error appears

Screenshot_2.png

Screenshot_3.png

 

 

To fix this you gotta change this code from the skill_vending() function;

 

if (!pc_can_give_items(sd) || (item = itemdb_search(nameid)) == NULL) 

to this 

if (!pc_can_give_items(sd) || item_db.find(nameid)) {

 

and this 

struct item_data *item;
 
to this
std::shared_ptr<item_data> item;




Ending up with something like this

/**
* Extended Vending system [Lilith]
**/
int skill_vending(struct map_session_data *sd, t_itemid nameid) {
   
    std::shared_ptr<item_data> item;
    char output[1024];
    nullpo_ret(sd);
 
    if (!pc_can_give_items(sd) || !item_db.exists(nameid)) {
        sd->state.prevend = 0;
        sd->vend_loot = 0;
        sd->state.workinprogress = WIP_DISABLE_NONE;
        clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0);
    }
    else {
        sd->vend_loot = nameid;
        sd->state.prevend = 1;
        clif_openvendingreq(sd, 2 + sd->vend_lvl);
        sprintf(output, msg_txt(sd, 1594), item->ename.c_str());
        clif_messagecolor(&sd->bl, color_table[COLOR_CYAN], output, false, SELF);
    }
    return 0;
}
 
That change will fix the problem; 
Edited by sapitosucio
Fix by @JinYuichi
Posted
7 hours ago, sapitosucio said:

  

 

 

 

 

To fix this you gotta change this code from the skill_vending() function;

 

if (!pc_can_give_items(sd) || (item = itemdb_search(nameid)) == NULL) 

to this 

if (!pc_can_give_items(sd) || item_db.find(nameid)) {

 

and this 

struct item_data *item;
 
to this
std::shared_ptr<item_data> item;




Ending up with something like this

/**
* Extended Vending system [Lilith]
**/
int skill_vending(struct map_session_data *sd, t_itemid nameid) {
   
    std::shared_ptr<item_data> item;
    char output[1024];
    nullpo_ret(sd);
 
    if (!pc_can_give_items(sd) || !item_db.exists(nameid)) {
        sd->state.prevend = 0;
        sd->vend_loot = 0;
        sd->state.workinprogress = WIP_DISABLE_NONE;
        clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0);
    }
    else {
        sd->vend_loot = nameid;
        sd->state.prevend = 1;
        clif_openvendingreq(sd, 2 + sd->vend_lvl);
        sprintf(output, msg_txt(sd, 1594), item->ename.c_str());
        clif_messagecolor(&sd->bl, color_table[COLOR_CYAN], output, false, SELF);
    }
    return 0;
}
 
That change will fix the problem; 

yeyy thanks.. work perfectly 

using patch manual 9.1

Posted (edited)
On 3/21/2023 at 3:05 PM, sapitosucio said:

  

 

 

 

 

To fix this you gotta change this code from the skill_vending() function;

 

if (!pc_can_give_items(sd) || (item = itemdb_search(nameid)) == NULL) 

to this 

if (!pc_can_give_items(sd) || item_db.find(nameid)) {

 

and this 

struct item_data *item;
 
to this
std::shared_ptr<item_data> item;




Ending up with something like this

/**
* Extended Vending system [Lilith]
**/
int skill_vending(struct map_session_data *sd, t_itemid nameid) {
   
    std::shared_ptr<item_data> item;
    char output[1024];
    nullpo_ret(sd);
 
    if (!pc_can_give_items(sd) || !item_db.exists(nameid)) {
        sd->state.prevend = 0;
        sd->vend_loot = 0;
        sd->state.workinprogress = WIP_DISABLE_NONE;
        clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0);
    }
    else {
        sd->vend_loot = nameid;
        sd->state.prevend = 1;
        clif_openvendingreq(sd, 2 + sd->vend_lvl);
        sprintf(output, msg_txt(sd, 1594), item->ename.c_str());
        clif_messagecolor(&sd->bl, color_table[COLOR_CYAN], output, false, SELF);
    }
    return 0;
}
 
That change will fix the problem; 

in what src file should i edit this lines

thanks

 

EDIT: i modified skill.cpp after opening the veding skill and close it map server crashed and DCed

/**
* Extended Vending system [Lilith]
**/
int skill_vending(struct map_session_data *sd, t_itemid nameid) {
	std::shared_ptr<item_data> item;
	char output[1024];
	nullpo_ret(sd);

	if (!pc_can_give_items(sd) || item_db.find(nameid)) {
		sd->state.prevend = 0;
		sd->vend_loot = 0;
		sd->state.workinprogress = WIP_DISABLE_NONE;
		clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0);
	}
	else {
		sd->vend_loot = nameid;
		sd->state.prevend = 1;
		clif_openvendingreq(sd, 2 + sd->vend_lvl);
		sprintf(output, msg_txt(sd, 1594), item->ename.c_str());
		clif_messagecolor(&sd->bl, color_table[COLOR_CYAN], output, false, SELF);
	}
	return 0;

its exactly the same as yours

Edited by AinsLord

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...