mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 07:37:45 +00:00
minor fixes
This commit is contained in:
parent
be1a5d53f3
commit
ff43c45f67
2 changed files with 5 additions and 2 deletions
|
@ -217,6 +217,9 @@ namespace Core {
|
||||||
startTown = 3;
|
startTown = 3;
|
||||||
startZone = 182;
|
startZone = 182;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// "(AccountId, CharacterId, ContentId, Name, Hp, Mp, "
|
// "(AccountId, CharacterId, ContentId, Name, Hp, Mp, "
|
||||||
|
|
|
@ -82,7 +82,7 @@ int8_t Core::ItemContainer::getFreeSlot()
|
||||||
Core::ItemPtr Core::ItemContainer::getItem( uint8_t slotId )
|
Core::ItemPtr Core::ItemContainer::getItem( uint8_t slotId )
|
||||||
{
|
{
|
||||||
|
|
||||||
if( ( slotId > m_size ) || ( slotId == -1 ) )
|
if( ( slotId > m_size ) )
|
||||||
{
|
{
|
||||||
auto pLog = g_fw.get< Logger >();
|
auto pLog = g_fw.get< Logger >();
|
||||||
pLog->error( "Slot out of range " + std::to_string( slotId ) );
|
pLog->error( "Slot out of range " + std::to_string( slotId ) );
|
||||||
|
@ -94,7 +94,7 @@ Core::ItemPtr Core::ItemContainer::getItem( uint8_t slotId )
|
||||||
|
|
||||||
void Core::ItemContainer::setItem( uint8_t slotId, ItemPtr pItem )
|
void Core::ItemContainer::setItem( uint8_t slotId, ItemPtr pItem )
|
||||||
{
|
{
|
||||||
if( ( slotId > m_size ) )
|
if( slotId > m_size )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_itemMap[slotId] = pItem;
|
m_itemMap[slotId] = pItem;
|
||||||
|
|
Loading…
Add table
Reference in a new issue