From 3faad4db287b51da2ec4341b4bb9f811d07fc43a Mon Sep 17 00:00:00 2001 From: Raydie <50953519+raydienull@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:23:46 +0100 Subject: [PATCH] Add T_FLETCHING type to open bowcraft menu --- src/game/clients/CClientUse.cpp | 11 ++++++----- src/game/items/item_types.h | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/game/clients/CClientUse.cpp b/src/game/clients/CClientUse.cpp index 2b13591ab..2e536abee 100644 --- a/src/game/clients/CClientUse.cpp +++ b/src/game/clients/CClientUse.cpp @@ -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 ? @@ -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; @@ -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; @@ -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; } @@ -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) ) { @@ -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. diff --git a/src/game/items/item_types.h b/src/game/items/item_types.h index 64000b465..438e0569c 100644 --- a/src/game/items/item_types.h +++ b/src/game/items/item_types.h @@ -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 @@ -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