DragonNest/Server/ServiceManagerEx/ItemData.cpp
2024-12-20 16:56:44 +08:00

59 lines
No EOL
1.8 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "stdafx.h"
#include "ItemData.h"
ItemData::ItemData(const wstring& name, int id, ItemData::Type type, ItemData::State state)
: item(NULL), name(name), id(id), type(type), state(state), final(false), bFail(false)
{
}
ItemData::~ItemData()
{
}
wstring ItemData::TypeToString(ItemData::Type type)
{
switch (type)
{
case ItemData::Partition:
return L"Partition";
case ItemData::World:
return L"World";
case ItemData::Launcher:
return L"Launcher";
case ItemData::Server:
return L"Server";
default:
return L"";
}
}
wstring ItemData::StateToString(ItemData::State state)
{
switch (state)
{
case ItemData::Off:
return L"Off";
case ItemData::Activity:
return L"Activity";
case ItemData::Deactivity:
return L"Deactivity";
default:
return L"";
}
}
wstring ItemData::FinalToString(bool bFinal)
{
if (bFinal)
return L"Yes";
return L"No";
}