Jump to content

Mob drop name lock


Recommended Posts

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • Premium

In original source it should be like this then:

char_item.cpp

void CHARACTER::AutoGiveItem(LPITEM item, bool longOwnerShip)
		if (longOwnerShip) {
			item->SetOwnership (this, 300);
		}
		else {
			item->SetOwnership (this, 60);
		}
LogManager::instance().ItemLog (this, item, "SYSTEM_DROP", item->GetName());

and

LPITEM CHARACTER::AutoGiveItem (DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg)
		if (IS_SET (item->GetAntiFlag(), ITEM_ANTIFLAG_DROP)) {
			item->SetOwnership (this, 300);
		}
		else {
			item->SetOwnership (this, 60);
		}
		LogManager::instance().ItemLog (this, item, "SYSTEM_DROP", item->GetName());

Your values may differ

(300 and 60 are the number of seconds)

 

 

Link to comment
Share on other sites

16 hours ago, tierrilopes said:

In original source it should be like this then:

char_item.cpp


void CHARACTER::AutoGiveItem(LPITEM item, bool longOwnerShip)

		if (longOwnerShip) {
			item->SetOwnership (this, 300);
		}
		else {
			item->SetOwnership (this, 60);
		}
LogManager::instance().ItemLog (this, item, "SYSTEM_DROP", item->GetName());

and


LPITEM CHARACTER::AutoGiveItem (DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg)

		if (IS_SET (item->GetAntiFlag(), ITEM_ANTIFLAG_DROP)) {
			item->SetOwnership (this, 300);
		}
		else {
			item->SetOwnership (this, 60);
		}
		LogManager::instance().ItemLog (this, item, "SYSTEM_DROP", item->GetName());

Your values may differ

(300 and 60 are the number of seconds)

 

 

I tried that but not successfully, i will try it again.

Link to comment
Share on other sites

On 31. 12. 2017 at 10:40 AM, tierrilopes said:

In original source it should be like this then:

char_item.cpp


void CHARACTER::AutoGiveItem(LPITEM item, bool longOwnerShip)

		if (longOwnerShip) {
			item->SetOwnership (this, 300);
		}
		else {
			item->SetOwnership (this, 60);
		}
LogManager::instance().ItemLog (this, item, "SYSTEM_DROP", item->GetName());

and


LPITEM CHARACTER::AutoGiveItem (DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg)

		if (IS_SET (item->GetAntiFlag(), ITEM_ANTIFLAG_DROP)) {
			item->SetOwnership (this, 300);
		}
		else {
			item->SetOwnership (this, 60);
		}
		LogManager::instance().ItemLog (this, item, "SYSTEM_DROP", item->GetName());

Your values may differ

(300 and 60 are the number of seconds)

 

 

I tested it again using different values (1).Time is same as was.

Spoiler



	{
		item->AddToGround(GetMapIndex(), GetXYZ());
		item->StartDestroyEvent();
		// 안티 드랍 flag가 걸려있는 아이템의 경우, 
		// 인벤에 빈 공간이 없어서 어쩔 수 없이 떨어트리게 되면,
		// ownership을 아이템이 사라질 때까지(300초) 유지한다.
		if (IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_DROP))
			item->SetOwnership(this, 1);
		else
			item->SetOwnership(this, 1);
		LogManager::instance().ItemLog(this, item, "SYSTEM_DROP", item->GetName());
	}

	{
		item->AddToGround (GetMapIndex(), GetXYZ());
		item->StartDestroyEvent();

		if (longOwnerShip)
			item->SetOwnership (this, 1);
		else
			item->SetOwnership (this, 1);
		LogManager::instance().ItemLog(this, item, "SYSTEM_DROP", item->GetName());
	}


 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.