When you are dropping stars, it will drop only 1 from the stars, and when you are looting stars it will add them to the exist set...
This fix will fix it and when you will drop stars set, it will drop all the set, and when you will loot stars set it wont add it to exist one.
Open Inventory.cpp
find:
replace with:
find:
add above:
Save & compile, and have fun
EDIT1:
Fix for attacking with stars ^_^
open Mobs.cpp
find ~In damageMobS function~:
add above:
find:
add below:
done have fun~
This fix will fix it and when you will drop stars set, it will drop all the set, and when you will loot stars set it wont add it to exist one.
Open Inventory.cpp
find:
Code:
void Inventory::addItem(Player* player, Item* item, bool is){
for(int i=0; i<player->inv->getItemNum(); i++){
if(player->inv->getItem(i)->id == item->id && Drops::items[player->inv->getItem(i)->id].type == item->inv && player->inv->getItem(i)->amount < Drops::items[item->id].maxslot){
Item* olditem = player->inv->getItem(i);
if(item->amount + olditem->amount > Drops::items[item->id].maxslot){
int amount = Drops::items[item->id].maxslot-olditem->amount;
item->amount-=amount;
olditem->amount = Drops::items[item->id].maxslot;
InventoryPacket::addItem(player, olditem, is);
}
else{
item->amount += olditem->amount;
item->pos = olditem->pos;
player->inv->deleteItem(i);
player->inv->addItem(item);
InventoryPacket::addItem(player, item, is);
return;
}
}
}
InventoryPacket::addNewItem(player, item, is);
player->inv->addItem(item);
}
Code:
void Inventory::addItem(Player* player, Item* item, bool is){
if (!ISSTAR(item->id))
{
for(int i=0; i<player->inv->getItemNum(); i++){
if(player->inv->getItem(i)->id == item->id && Drops::items[player->inv->getItem(i)->id].type == item->inv && player->inv->getItem(i)->amount < Drops::items[item->id].maxslot){
Item* olditem = player->inv->getItem(i);
if(item->amount + olditem->amount > Drops::items[item->id].maxslot){
int amount = Drops::items[item->id].maxslot-olditem->amount;
item->amount-=amount;
olditem->amount = Drops::items[item->id].maxslot;
InventoryPacket::addItem(player, olditem, is);
}
else{
item->amount += olditem->amount;
item->pos = olditem->pos;
player->inv->deleteItem(i);
player->inv->addItem(item);
InventoryPacket::addItem(player, item, is);
return;
}
}
}
}
InventoryPacket::addNewItem(player, item, is);
player->inv->addItem(item);
}
Code:
if(item->amount - amount == 0){
Code:
if (ISSTAR(item->id)) amount = item->amount;
EDIT1:
Fix for attacking with stars ^_^
open Mobs.cpp
find ~In damageMobS function~:
Code:
if(skillid > 0)
Skills::useAttackSkill(player, skillid);
for(int i=0; i<howmany; i++){
int mobid = getInt(packet+19+i*(22+4*(hits-1)));
add above:
Code:
if (skillid == 4111005)
Inventory::takeItemSlot(player, pos, 2, 3);
else
Inventory::takeItemSlot(player, pos, 2, hits);
find:
Code:
#include "Skills.h"
add below:
Code:
#include "Inventory.h"
done have fun~