Skip to content

Commit

Permalink
Add T_FLETCHING type to open bowcraft menu
Browse files Browse the repository at this point in the history
  • Loading branch information
raydienull committed Dec 2, 2024
1 parent 81a1508 commit 3faad4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/game/clients/CClientUse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ bool CClient::Cmd_Use_Item( CItem *pItem, bool fTestTouch, bool fScript )

case IT_SHAFT:
case IT_FEATHER:
case IT_FLETCHING:
return Skill_Menu(SKILL_BOWCRAFT, "sm_bolts", pItem->GetID());

case IT_FISH_POLE: // Just be near water ?
Expand Down Expand Up @@ -185,7 +186,7 @@ bool CClient::Cmd_Use_Item( CItem *pItem, bool fTestTouch, bool fScript )
}
else // I have the key but i need to use it to unlock the container.
{
SysMessageDefault(DEFMSG_LOCK_HAS_KEY);
SysMessageDefault(DEFMSG_LOCK_HAS_KEY);
return false;
}
break;
Expand All @@ -194,7 +195,7 @@ bool CClient::Cmd_Use_Item( CItem *pItem, bool fTestTouch, bool fScript )
SysMessageDefault(DEFMSG_ITEMUSE_LOCKED);
if ( !m_pChar->GetPackSafe()->ContentFindKeyFor(pItem) ) // I don't have the hold key
{

SysMessageDefault(DEFMSG_LOCK_HOLD_NO_KEY);
if ( !IsPriv(PRIV_GM) )
return false;
Expand Down Expand Up @@ -225,7 +226,7 @@ bool CClient::Cmd_Use_Item( CItem *pItem, bool fTestTouch, bool fScript )
if ( m_pChar->CheckCorpseCrime(pCorpseItem, true, true) )
SysMessageDefault(DEFMSG_LOOT_CRIMINAL_ACT);
}

return true;
}

Expand Down Expand Up @@ -849,7 +850,7 @@ int CClient::Cmd_Skill_Menu_Build( const CResourceID& rid, int iSelect, CMenuIte
{
if ( (iSelect < -1) && (iShowCount >= 1) ) // just a test. so we are done.
return 1;

CMenuItem miTest;
if ( !miTest.ParseLine(s.GetArgRaw(), nullptr, m_pChar) )
{
Expand Down Expand Up @@ -1150,7 +1151,7 @@ bool CClient::Cmd_Skill_Tracking( uint track_sel, bool fExec )
When the Tracking skill starts and the Effect property is defined on the Tracking skill use it
instead of the hardcoded formula for the maximum distance.
*/

if (m_pChar->m_Act_Effect >= 0)
m_pChar->m_atTracking.m_dwDistMax = (dword)m_pChar->m_Act_Effect;
else //This is default Sphere maximum tracking distance.
Expand Down
4 changes: 2 additions & 2 deletions src/game/items/item_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ enum IT_TYPE : int32_t // double click type action.
IT_TRAIN_DUMMY, // 156
IT_TRAIN_PICKPOCKET, // 157
IT_BEDROLL, // 158
IT_UNUSED_159, // 159
IT_FLETCHING, // 159
IT_HIDE, // 160 = hides are cured to make leather.
IT_CLOTH_BOLT, // 161 = must be cut up to make cloth squares.
IT_BOARD, // 162 = logs are plained into decent lumber
Expand Down Expand Up @@ -214,7 +214,7 @@ enum IT_TYPE : int32_t // double click type action.
IT_PILOT, // 197 = ship's pilot (PacketWheelMove)
IT_ROPE, // 198 = t_rope (working like t_ship_plank but without id changes)
IT_WEAPON_WHIP, // 199

// New SphereX hardcoded types starting from 300
IT_SPAWN_CHAMPION = 300,// 300 = t_spawn_champion
IT_MULTI_ADDON, // 301 = t_multi_addon
Expand Down

0 comments on commit 3faad4d

Please sign in to comment.