Revert "shared_ptr -> std::shared_ptr"

This reverts commit 7074f35e4b.
This commit is contained in:
void_17
2026-03-02 17:37:16 +07:00
parent 8a2a62ea1d
commit 119bff3514
1373 changed files with 12049 additions and 12049 deletions

View File

@@ -10,7 +10,7 @@ EGameCommand GiveItemCommand::getId()
return eGameCommand_Give;
}
void GiveItemCommand::execute(std::shared_ptr<CommandSender> source, byteArray commandData)
void GiveItemCommand::execute(shared_ptr<CommandSender> source, byteArray commandData)
{
ByteArrayInputStream bais(commandData);
DataInputStream dis(&bais);
@@ -20,20 +20,20 @@ void GiveItemCommand::execute(std::shared_ptr<CommandSender> source, byteArray c
int amount = dis.readInt();
int aux = dis.readInt();
wstring tag = dis.readUTF();
bais.reset();
std::shared_ptr<ServerPlayer> player = getPlayer(uid);
shared_ptr<ServerPlayer> player = getPlayer(uid);
if(player != NULL && item > 0 && Item::items[item] != NULL)
{
std::shared_ptr<ItemInstance> itemInstance = std::shared_ptr<ItemInstance>(new ItemInstance(item, amount, aux));
shared_ptr<ItemInstance> itemInstance = shared_ptr<ItemInstance>(new ItemInstance(item, amount, aux));
player->drop(itemInstance);
//logAdminAction(source, L"commands.give.success", ChatPacket::e_ChatCustom, Item::items[item]->getName(itemInstance), item, amount, player->getAName());
logAdminAction(source, ChatPacket::e_ChatCustom, L"commands.give.success", item, player->getAName());
}
}
std::shared_ptr<GameCommandPacket> GiveItemCommand::preparePacket(std::shared_ptr<Player> player, int item, int amount, int aux, const wstring &tag)
shared_ptr<GameCommandPacket> GiveItemCommand::preparePacket(shared_ptr<Player> player, int item, int amount, int aux, const wstring &tag)
{
if(player == NULL) return nullptr;
@@ -46,5 +46,5 @@ std::shared_ptr<GameCommandPacket> GiveItemCommand::preparePacket(std::shared_pt
dos.writeInt(aux);
dos.writeUTF(tag);
return std::shared_ptr<GameCommandPacket>( new GameCommandPacket(eGameCommand_Give, baos.toByteArray() ));
return shared_ptr<GameCommandPacket>( new GameCommandPacket(eGameCommand_Give, baos.toByteArray() ));
}