void CClientSession::SendCharLearnSkillReq(CNtlPacket * pPacket, CGameServer * app)
{
sUG_SKILL_LEARN_REQ * req = (sUG_SKILL_LEARN_REQ*)pPacket->GetPacketData();
PlayersMain* plr = g_pPlayerManager->GetPlayer(this->GetavatarHandle());
CNtlPacket packetSkill(sizeof(sGU_SKILL_LEARNED_NFY));
sGU_SKILL_LEARNED_NFY * res = (sGU_SKILL_LEARNED_NFY*)packetSkill.GetPacketData();
CSkillTable * pSkillTable = app->g_pTableContainer->GetSkillTable();
sSKILL_TBLDAT *pSkillSetTblData = reinterpret_cast<sSKILL_TBLDAT*>(pSkillTable->FindData(req->skillTblidx));
res->wOpCode = GU_SKILL_LEARNED_NFY;
res->skillId = pSkillSetTblData->tblidx;
res->bySlot = pSkillSetTblData->bySlot_Index;
packetSkill.SetPacketLen(sizeof(sGU_SKILL_LEARNED_NFY));
g_pApp->Send(this->GetHandle(), &packetSkill);
app->qry->InsertNewSkill(pSkillSetTblData->tblidx, plr->GetCharID(), pSkillSetTblData->bySlot_Index, 0, 0);
CNtlPacket packetSkill1(sizeof(sGU_SKILL_LEARN_RES));
sGU_SKILL_LEARN_RES * res1 = (sGU_SKILL_LEARN_RES *)packetSkill1.GetPacketData();
res1->wOpCode = GU_SKILL_LEARN_RES;
res1->wResultCode = 500;
packetSkill1.SetPacketLen(sizeof(sGU_SKILL_LEARN_RES));
g_pApp->Send(this->GetHandle(), &packetSkill1);
CNtlPacket packet2(sizeof(sGU_UPDATE_CHAR_SP));
sGU_UPDATE_CHAR_SP * res3 = (sGU_UPDATE_CHAR_SP *)packet2.GetPacketData();
//Update player's SP
plr->GetPcProfile()->dwSpPoint -= 1;
app->qry->UpdateSPPoint(plr->GetCharID(), plr->GetPcProfile()->dwSpPoint);
//Send a response to client to get Update SP OK
res3->wOpCode = GU_UPDATE_CHAR_SP;
res3->dwSpPoint = plr->GetPcProfile()->dwSpPoint;
packet2.SetPacketLen(sizeof(sGU_UPDATE_CHAR_SP));
g_pApp->Send(this->GetHandle(), &packet2);
plr = NULL;
delete plr;
}