Fix #244 alter table items add column body_drop tinyint(3) not null default '0';
@@ -0,0 +1 @@
+alter table items add column body_drop tinyint(3) not null default '0';
@@ -1281,6 +1281,10 @@ bool Item::IsHarvest() {
return generic_info.harvest == 1;
}
+bool Item::IsBodyDrop() {
+ return generic_info.body_drop == 1;
+}
+
bool Item::IsTradeskill(){
LogWrite(MISC__TODO, 1, "TODO", "Item Is Crafted\n\t(%s, function: %s, line #: %i)", __FILE__, __FUNCTION__, __LINE__);
return false;
@@ -697,6 +697,7 @@ public:
int16 tradeskill_default_level;
int8 usable;
int8 harvest;
+ int8 body_drop;
};
struct Armor_Info {
int16 mitigation_low;
@@ -913,6 +914,7 @@ public:
bool IsTradeskill();
bool IsThrown();
bool IsHarvest();
+ bool IsBodyDrop();
void SetItemScript(string name);
const char* GetItemScript();
int32 CalculateRepairCost();
@@ -282,6 +282,7 @@ void WorldDatabase::LoadDataFromRow(DatabaseResult* result, Item* item)
item->details.soe_id = result->GetSInt32Str("soe_item_id");
item->generic_info.harvest = result->GetInt8Str("harvest");
+ item->generic_info.body_drop = result->GetInt8Str("body_drop");
int32 WorldDatabase::LoadSkillItems()
@@ -453,7 +453,7 @@ NPC* Entity::DropChest() {
int8 highest_tier = 0;
vector<Item*>::iterator itr;
for (itr = ((Spawn*)this)->GetLootItems()->begin(); itr != ((Spawn*)this)->GetLootItems()->end(); ) {
- if ((*itr)->details.tier >= ITEM_TAG_UNCOMMON) {
+ if ((*itr)->details.tier >= ITEM_TAG_UNCOMMON && !(*itr)->IsBodyDrop()) {
if ((*itr)->details.tier > highest_tier)
highest_tier = (*itr)->details.tier;