Jump to content

Bloquear Itens Em Mapas


Zarcky
 Share

Recommended Posts

Bloquear itens nos mapas através da source é bem simples, além de ser bem mais eficiente do que por quests.

 

Primeiro precisamos ir até o arquivo char_item.cpp.

 

 

Agora procuramos pela função:

 

static bool IS_SUMMON_ITEM(int vnum)

 

Abaixo dela adicionamos a seguinte:

 

static bool IS_ENABLE_ITEM(int vnum)

{

switch (vnum)

{

case 39011:

case 39012:

case 39013:

return true;

}

 

return false;

}

 

Sendo 39011 , 39012 e 39013 os itens a se bloquear.

 

 

 

Agora vamos procurar pela seguinte função:

 

bool IS_BOTARYABLE_ZONE(int nMapIndex)

 

Acima dela adicionamos:

 

bool IS_ENABLE_ITEM_ZONE(int map_index)

{

switch (map_index)

{

case 29:

case 30:

case 31:

return false;

}

 

return true;

}

 

Sendo 29, 30 e 31 os index dos mapas a se bloquear.

 

 

Por fim procuramos por:

 

//PREVENT_TRADE_WINDOW

 

E antes dele colocamos:

 

if (IS_ENABLE_ITEM(item->GetVnum()))

{

if (false == IS_ENABLE_ITEM_ZONE(GetMapIndex()))

{

ChatPacket(CHAT_TYPE_INFO, LC_TEXT("현재 위치에서 사용할 수 없습니다."));

return false;

}

}

 

Pronto, agora já estamos bloqueando o uso dos itens 39011 , 39012 e 39013 nos mapas com index 29, 30 e 31.

 

Créditos pelo sistema são de akrmoa

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...