Files
Client/Server/RylServerProject/RylGameLibrary/Network/Dispatch/GameClient/ParseCharSkill.cpp
LGram16 dd97ddec92 Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:17:20 +09:00

60 lines
1.9 KiB
C++

#include "stdafx.h"
#include "ParseCharSkill.h"
#include "SendCharSkill.h"
#include "GameClientDispatch.h"
#include <Creature/Character/Character.h>
#include <Item/ItemStructure.h>
#include <Network/Dispatch/ParseUtils.h>
#include <Network/Packet/PacketCommand.h>
#include <Network/Packet/PacketStruct/CharStatusPacket.h>
// 스킬 사용
bool GameClientParsePacket::ParseCharUseSkill(CGameClientDispatch& GameClientDispatch, PktBase* lpPktBase)
{
return true;
}
// 스킬 지우기
bool GameClientParsePacket::ParseCharSkillErase(CGameClientDispatch& GameClientDispatch, PktBase* lpPktBase)
{
CHECK_FIXED_PACKETSIZE(lpPktBase, sizeof(PktSk), GameClientDispatch);
PktSk* lpPktSk = static_cast<PktSk*>(lpPktBase);
CCharacter* lpCharacter = GameClientDispatch.GetCharacter();
CHECK_CHARACTER_PTR(lpCharacter, GameClientDispatch, lpPktBase->GetCmd());
unsigned long dwCharID = lpPktSk->m_dwCharID;
unsigned short usSkill = lpPktSk->m_wSkill;
unsigned char cIndex = lpPktSk->m_cIndex;
Item::ItemPos ItemPos = lpPktSk->m_ItemPos; // 망각의 돌 위치
if(0x1000 <= usSkill && usSkill < 0x2000)
{
if (false == lpCharacter->AbilityErase(cIndex, ItemPos))
{
GameClientSendPacket::SendCharSkillCommand(GameClientDispatch.GetSendStream(), dwCharID,
CmdCharSkillErase, cIndex, usSkill, PktSk::SERVER_ERROR);
ERRLOG3(g_Log, "CID:0x%08x 스킬 지우기 패킷 처리에 실패하였습니다. Skill: %d, Index: %d", dwCharID, usSkill, cIndex);
}
}
else
{
// edith 2008.02.14 스킬 삭제부분 (유료아이템이 있어야 지울수 있게 하자??)
if (false == lpCharacter->SkillErase(cIndex, ItemPos))
{
GameClientSendPacket::SendCharSkillCommand(GameClientDispatch.GetSendStream(), dwCharID,
CmdCharSkillErase, cIndex, usSkill, PktSk::SERVER_ERROR);
ERRLOG3(g_Log, "CID:0x%08x 스킬 지우기 패킷 처리에 실패하였습니다. Skill: %d, Index: %d", dwCharID, usSkill, cIndex);
}
}
return true;
}