Jump to content
×
×
  • Create New...
  • 0

How can I show Skill Book in chat box?


Reliable

Question

  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

4 answers to this question

Recommended Posts

  • 0
  • Premium


 

Packet.h Server
typedef struct packet_item_ground_add
{
	BYTE	bHeader;
	long 	x, y, z;
	DWORD	dwVID;
	DWORD	dwVnum;
} TPacketGCItemGroundAdd;

Add this
int		iSkillIndex;

Item.cpp
	pack.bHeader	= HEADER_GC_ITEM_GROUND_ADD;
	pack.x		= c_pos.x;
	pack.y		= c_pos.y;
	pack.z		= c_pos.z;
	pack.dwVnum		= GetVnum();
	pack.dwVID		= m_dwVID;

Under add this
	if (GetVnum() == 50300) {
		pack.iSkillIndex = GetSocket(0);
	}
	else {
		pack.iSkillIndex = -1;
	}

Client Packet.h
typedef struct packet_ground_add_item
{
    BYTE        bHeader;
    long        lX;
	long		lY;
	long		lZ;

    DWORD       dwVID;
    DWORD       dwVnum;
} TPacketGCItemGroundAdd;

Add this
int			iSkillIndex;

Pythonitem.h
void	CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop=true);
Replace
void	CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop=true, int iSkillIndex=-1);

PythonItem.cpp
Add
#include "PythonSkill.h"
and
void CPythonItem::CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop)
Replace
void CPythonItem::CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop, int iSkillIndex)

	CPythonTextTail& rkTextTail=CPythonTextTail::Instance();
	rkTextTail.RegisterItemTextTail(
		dwVirtualID,
		pItemData->GetName(),
		&pGroundItemInstance->ThingInstance);

Replace like this

	CPythonTextTail& rkTextTail=CPythonTextTail::Instance();
	string name = "";
	if (dwVirtualNumber == 50300) {
		CPythonSkill::SSkillData * c_pSkillData;
		if (CPythonSkill::Instance().GetSkillData(iSkillIndex, &c_pSkillData))
		{
			name = c_pSkillData->GradeData[0].strName.c_str();
			name += " ";
		}
	}
	name += pItemData->GetName();
	rkTextTail.RegisterItemTextTail(
		dwVirtualID,
		name.c_str(),
		&pGroundItemInstance->ThingInstance);

PythonNetwordStreamPhaseGameItem.cpp

	CPythonItem::Instance().CreateItem(packet_item_ground_add.dwVID, 
									   packet_item_ground_add.dwVnum,
									   packet_item_ground_add.lX,
									   packet_item_ground_add.lY,
									   packet_item_ground_add.lZ);

edit like 

	CPythonItem::Instance().CreateItem(packet_item_ground_add.dwVID, 
									   packet_item_ground_add.dwVnum,
									   packet_item_ground_add.lX,
									   packet_item_ground_add.lY,
									   packet_item_ground_add.lZ,
									   true,
									   packet_item_ground_add.iSkillIndex);


Done, caw.

 


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.