Page 1 of 1

errors compiling mqext - wrong _CHARINFO structure?

Posted: Sat Aug 30, 2003 8:37 pm
by shuttle
I am getting this set of errors when compliling mqext. I am using 8-30-03 MQ code. is there another _Charinfo structure I am supposed to use?

shuttle

Compiling...
exts2.cpp
exts2.cpp(64) : error C2039: 'EquipType' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(64) : error C2039: 'EquipType' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(65) : error C2039: 'emptyforexpansion' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(65) : error C2039: 'emptyforexpansion' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(66) : error C2039: 'EquipColor' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(66) : error C2039: 'EquipColor' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(67) : error C2039: 'Equipment' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(67) : error C2039: 'Equipment' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(68) : error C2039: 'InventoryBagIDs' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(68) : error C2039: 'InventoryBagIDs' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(73) : error C2039: 'InventoryBag1' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(73) : error C2039: 'InventoryBag1' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(74) : error C2039: 'InventoryBag2' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(74) : error C2039: 'InventoryBag2' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(75) : error C2039: 'InventoryBag3' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(75) : error C2039: 'InventoryBag3' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(76) : error C2039: 'InventoryBag4' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(76) : error C2039: 'InventoryBag4' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(77) : error C2039: 'InventoryBag5' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(77) : error C2039: 'InventoryBag5' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(78) : error C2039: 'InventoryBag6' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(78) : error C2039: 'InventoryBag6' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(79) : error C2039: 'InventoryBag7' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(79) : error C2039: 'InventoryBag7' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(80) : error C2039: 'InventoryBag8' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(80) : error C2039: 'InventoryBag8' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(81) : error C2039: 'InventoryBag9' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(81) : error C2039: 'InventoryBag9' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(104) : error C2039: 'UnknownFlag0x160c' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(105) : error C2039: 'UnknownFlag0x160c' : is not a member of '_CHARINFO'
c:\CVS\macroquest\mqext\../EQLib\MQ.h(375) : see declaration of '_CHARINFO'
exts2.cpp(105) : fatal error C1903: unable to recover from previous error(s); stopping compilation

Posted: Sat Aug 30, 2003 9:05 pm
by Amadeus
Using this line as an example:
exts2.cpp(81) : error C2039: 'InventoryBag9' : is not a member of '_CHARINFO'
Go into exts2.cpp and delete line 81. Do that for every line that you have an error for (ie, the numbers in parenthesis).

It will then compile.

Posted: Sat Aug 30, 2003 9:07 pm
by Amadeus
Or, if you wish, this is my current exts2.cpp file (that should be checked into CVS when time permits):

NOTE: I'm not sure how long lines turn out when you copy/paste from this forum, so you may have to go through this and manually make sure that the long lines stay as long lines and don't accidentally have a carriage return added in it.

Code: Select all


#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINNT 0x510
#define DIRECTINPUT_VERSION 0x800

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "dinput.h"
#include <time.h>
#include <io.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <winsock.h>
#include "../eqlib/mq.h"

#include "mqext.h"

#define KP(X)		dprintf(#X " = %d (offset 0x%x)\n", ci.X, &pnull->X)		
#define KPs(X)      dprintf(#X " = %s (offset 0x%x)\n", ci.X, &pnull->X)
#define KPf(X)      dprintf(#X " = %f (offset 0x%x)\n", ci.X, &pnull->X)

#if defined(EXT_API_VERSION_NUMBER64)
#define PARAM1 ULONG64
#else
#define PARAM1 ULONG
#endif

DECLARE_API ( pchar )
{
    CHARINFO *p, *pnull=NULL, ci;
    DWORD cb;
	CHAR buffer[MAX_STRING] = {0};
	CHAR tmp[MAX_STRING] = {0};
	unsigned int bitval = 1;
	int i=0;

    // read param from command line
    p = (CHARINFO *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb); 

    dprintf("\n\n\n");
    KPs(Name);
    KPs(Lastname);
    KP(Gender);
    KP(Race);
    KP(Class);
    KP(Level);
    KP(Exp);
    KP(PracticePoints);
    KP(Mana);
    KP(BaseHP);
    KP(Stunned);
    KP(BaseSTR);
    KP(BaseSTA);
    KP(BaseCHA);
    KP(BaseDEX);
    KP(BaseINT);
    KP(BaseAGI);
    KP(BaseWIS);
	KP(Face);
	KP(languages);
	KP(Buff);
	KP(SpellBook);
	KP(MemorizedSpells);
	KPf(y);
	KPf(x);
	KPf(z);
	KPf(heading);
	KP(standstate);
    KP(Plat);
    KP(Gold);
    KP(Silver);
    KP(Copper);
    KP(BankPlat);
    KP(BankGold);
    KP(BankSilver);
    KP(BankCopper);
	KP(BankSharedPlat);
	KP(Skill);
    KP(UnknownData0x0ca8);
	KPf(UnknownData0x0cac);
	KPf(UnknownData0x0cb0);
	KPf(UnknownData0x0cb4);
	KPf(UnknownData0x0cb8);
	KP(UnknownData0x0cfc);
	KP(UnknownData0x0d00);
	KP(UnknownData0x0d10);
	KP(UnknownData0x0d24);
    KP(UnknownData0x0d3c);
	KP(UnknownData0x0d44);
	KP(UnknownData0x0d4c);
	KP(hungerlevel);
	KP(thirstlevel);
	KP(zoneId);
	KP(STR);
    KP(STA);
    KP(CHA);
    KP(DEX);
    KP(INT);
    KP(AGI);
    KP(WIS);
	KP(UnknownData0x0e1c);
    KP(SaveMagic);
    KP(SaveFire);
    KP(SaveCold);
    KP(SavePoison);
    KP(SaveDisease);
    KP(CurrWeight);
    KP(UnknownData0x0e3c);
	KP(UnknownData0x0e40);
    KP(UnknownData0x0e80);
	KP(UnknownData0x0ff0);
    KP(UnknownData0x1020);
	KP(UnknownData0x1028);
	KP(UnknownData0x1078);
	KP(UnknownData0x1084);
	KP(UnknownData0x108c);
	KP(UnknownData0x10a8);
	KP(UnknownData0x10fc);
	KP(UnknownData0x110c);
	KP(UnknownData0x11ac);
	KP(UnknownData0x11b0);
	KP(ZoneBoundId);
	KPf(ZoneBoundY);
	KPf(ZoneBoundX);
	KPf(ZoneBoundZ);
	KPf(UnknownData0x12ec);
	KPf(UnknownData0x12f0);
	KPf(UnknownData0x12f4);
	KPf(UnknownData0x12f8);
	KPf(UnknownData0x12fc);
	KPf(UnknownData0x1310);
	KP(Diety);
	KP(GuildID);
    KPf(UnknownData0x131c);
    KPf(UnknownData0x1320);
	KP(UnknownData0x1324);
	KP(UnknownData0x1328);
	KP(UnknownData0x1348);
	KP(UnknownData0x1354);
	KP(AAExp);
	KPs(Server);

}

DECLARE_API ( pspawn )
{
    SPAWNINFO *p, *pnull=NULL, ci;
    DWORD cb;

    // read param from command line
    p = (SPAWNINFO *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");
    KPs(Name);
	KPf(Y);
	KPf(X);
	KPf(Z);
	KPf(SpeedY);
	KPf(SpeedX);
	KPf(SpeedZ);
	KPf(SpeedRun);
	KPf(SpeedHeading);
	KPf(CameraAngle);
	KPf(Heading);
	KP(pActorInfo);
	KP(LFG);
	KP(Zone);
	KP(pNext);
	KP(pCharInfo);
	KP(pPrev);
    KPs(Lastname);
	KPf(Unknownf0x120);
	KPf(Unknownf0x124);
	KPf(Unknownf0x128);
	KPf(Unknownf0x12c);
	KPf(Unknownf0x130);
	KP(Type);
	KP(Light);
	KP(Level);
	KP(Gender);
	KP(HideMode);
	KP(StandState);
	KP(Class);
	KP(GM);
	KP(SpawnID);
	KP(MasterID);
	KP(Race);
	KP(Anon);
	KP(AARank);
	KP(AFK);
	KP(VisType);
	KP(HPCurrent);
	KP(Deity);
	KP(HPMax);
	KP(GuildID);
}

DECLARE_API ( pitem )
{
    ITEMINFO *p, *pnull=NULL, ci;
    DWORD cb;

    // read param from command line
    p = (ITEMINFO *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");
    KPs(Name);
	KPs(LoreName);
	KPs(IDFile);
	KP(ItemNumber);
	KP(EquipSlots);
	KP(Cost);
	KP(IconNumber);
	KP(TradeSkills);
	KP(Weight);
	KP(NoRent);
	KP(NoDrop);
	KP(Size);
	KP(Type);
	dprintf("\tNote:  The COMMON, CONTAINER, or BOOK union starts at 0xd6\n" );
}

DECLARE_API ( pcommon )
{
    COMMON *p, *pnull=NULL, ci;
    DWORD cb;

    // read param from command line
    p = (COMMON *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");
	KP(Stackable);
	KP(SvCold);
	KP(SvFire);
	KP(SvMagic);
	KP(SvDisease);
	KP(SvPoison);
	KP(STR);
	KP(STA);
	KP(AGI);
	KP(DEX);
	KP(CHA);
	KP(INT);
	KP(WIS);
	KP(HP);
	KP(Mana);
	KP(AC);
	KP(SkillModType);
	KP(RequiredLevel);
	KP(Classes);
	KP(Races);
	KP(Diety);
	KP(SpellID);
	KP(Color);
	KP(SkillModValue);
	KP(Magic);
	KP(Light);
	KP(Delay);
	KP(RecommendedLevel);
	KP(Damage);
	KP(ItemType);
	KP(Material);
	KPs(CharmFile);
	KP(FocusId);
	KP(CastTime);
	KP(MaxCharges);
	KP(EffectType);
	KP(StackCount);
}

DECLARE_API ( pcontainer )
{
    CONTAINER *p, *pnull=NULL, ci;
    DWORD cb;

    // read param from command line
    p = (CONTAINER *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");
	KP(Combine);
	KP(Slots);
	KP(SizeCapacity);
	KP(WeightReduction);
}


DECLARE_API ( pgroundspawn )
{
    GROUNDITEM *p, *pnull=NULL, ci;
    DWORD cb;

    // read param from command line
    p = (GROUNDITEM *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");
	KP(pPrev);
	KP(pNext);
	KP(ID);
	KP(DropID);
	KP(DxID);
	KP(Unknown0xc8);
	KPf(Heading);
	KPf(Z);
	KPf(X);
	KPf(Y);
    KPs(Name);
}

DECLARE_API ( pdoor ) 
{ 
DOOR *p, *pnull=NULL, ci; 
    DWORD cb; 

    // read param from command line 
    p = (DOOR *)GetExpression(args); 

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb); 

   dprintf("\n\n\n"); 

   KP(Unknown0x00); 
   KP(ID); 
   KPs(Name); 
   KP(Unknown0x0d); 
   KPf(DefaultY); 
   KPf(DefaultX); 
   KPf(DefaultZ); 
   KPf(DefaultHeading); 
   KPf(DoorAngle); 
   KPf(Y); 
   KPf(X); 
   KPf(Z); 
   KPf(Heading); 
} 

DECLARE_API ( pspellbuff )
{
    SPELLBUFF *p, *pnull=NULL, ci;
    DWORD cb;

    // read param from command line
    p = (SPELLBUFF *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");

	KP(Level);
	KP(SpellID);
	KP(Duration);
}

//Be sure that you take into account SPELLLIST_STARTOFFSET when testing
//this structure!
DECLARE_API ( pspell )
{
    SPELLLIST *p, *pnull=NULL, ci;
    DWORD cb;
	CHAR tmp[1024];
	CHAR buffer[MAX_STRING] = {0};
	unsigned int bitval = 1;

    // read param from command line
    p = (SPELLLIST *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");

	KP(ID);
	KPf(Range);
	KP(CastTime);
	KP(FizzleTime);
	KP(RecastTime);
	KP(DurationType);
	KP(DurationValue1);
	KP(Mana);
	for (int i=0; i < 12; i++)
		dprintf("Base%d = %d (offset 0x%x)\n", i+1, ci.Base[i], &pnull->Base[i]);
	for (i=0; i < 12; i++)
		dprintf("Max%d = %d (offset 0x%x)\n", i+1, ci.Max[i], &pnull->Max[i]);
	KP(BookIcon);
	KP(GemIcon);
	for (i=0; i < 4; i++)
		dprintf("ReagentId%d = %d (offset 0x%x)\n", i+1, ci.ReagentId[i], &pnull->ReagentId[i]);
	for (i=0; i < 4; i++)
		dprintf("ReagentCount%d = %d (offset 0x%x)\n", i+1, ci.ReagentCount[i], &pnull->ReagentCount[i]);
	for (i=0; i < 12; i++)
		dprintf("Calc%d = %d (offset 0x%x)\n", i+1, ci.Calc[i], &pnull->Calc[i]);
	KP(Deletable);
	for (i=0; i < 12; i++)
		dprintf("Attrib%d = %d (offset 0x%x)\n", i+1, ci.Attrib[i], &pnull->Attrib[i]);
	KP(UnknownData0x0e4);
	KP(FizzLeadj);
	KP(UnknownData0x0e6);
	for (i=0; i < 15; i++)
		dprintf("Level(Class %d) = %d (offset 0x%x)\n", i+1, ci.Level[i], &pnull->Level[i]);
	KP(CastingAnim);
	KP(descnum);

	i = ci.UnknownFlags0x114;
	while (ci.UnknownFlags0x114 > 0)
	{
		if ( ci.UnknownFlags0x114 & 1 )
		{
			sprintf(tmp, "%d ", bitval );
			strcat(buffer, tmp);
		}
		ci.UnknownFlags0x114 >>= 1;
		bitval <<= 1;
	} 
	dprintf("UnknownFlags0x114 = %d [%s] (Offset: 0x%x)\n", i, buffer, &pnull->UnknownFlags0x114 );
	bitval = 1, tmp[0] = '\0', buffer[0] = '\0';
	i = ci.UnknownFlags0x124;
	while (ci.UnknownFlags0x124 > 0)
	{
		if ( ci.UnknownFlags0x124 & 1 )
		{
			sprintf(tmp, "%d ", bitval );
			strcat(buffer, tmp);
		}
		ci.UnknownFlags0x124 >>= 1;
		bitval <<= 1;
	} 
	dprintf("UnknownFlags0x124 = %d [%s] (Offset: 0x%x)\n", i, buffer, &pnull->UnknownFlags0x124 );
	bitval = 1, tmp[0] = '\0', buffer[0] = '\0';
	i = ci.UnknownFlags0x128;
	while (ci.UnknownFlags0x128 > 0)
	{
		if ( ci.UnknownFlags0x128 & 1 )
		{
			sprintf(tmp, "%d ", bitval );
			strcat(buffer, tmp);
		}
		ci.UnknownFlags0x128 >>= 1;
		bitval <<= 1;
	} 
	dprintf("UnknownFlags0x128 = %d [%s] (Offset: 0x%x)\n", i, buffer, &pnull->UnknownFlags0x128 );
	bitval = 1, tmp[0] = '\0', buffer[0] = '\0';
	i = ci.UnknownFlags0x12c;
	while (ci.UnknownFlags0x12c > 0)
	{
		if ( ci.UnknownFlags0x12c & 1 )
		{
			sprintf(tmp, "%d ", bitval );
			strcat(buffer, tmp);
		}
		ci.UnknownFlags0x12c >>= 1;
		bitval <<= 1;
	} 
	dprintf("UnknownFlags0x12c = %d [%s] (Offset: 0x%x)\n", i, buffer, &pnull->UnknownFlags0x12c );
	bitval = 1, tmp[0] = '\0', buffer[0] = '\0';

	ReadMemory((PARAM1)ci.Name, tmp, 128, &cb );
	dprintf("Name = %s (offset *0x%x)\n", tmp, &pnull->Name);
	ReadMemory((PARAM1)ci.Target, tmp, 128, &cb );
	dprintf("Target = %s (offset *0x%x)\n", tmp, &pnull->Target);
	ReadMemory((PARAM1)ci.CastOnYou, tmp, 256, &cb );
	dprintf("CastOnYou = %s (offset *0x%x)\n", tmp, &pnull->CastOnYou);
	ReadMemory((PARAM1)ci.CastOnAnother, tmp, 256, &cb );
	dprintf("CastOnAnother = Someone%s (offset *0x%x)\n", tmp, &pnull->CastOnAnother);
	ReadMemory((PARAM1)ci.WearOff, tmp, 256, &cb );
	dprintf("WearOff = %s (offset *0x%x)\n", tmp, &pnull->WearOff);
	KP(spaindex);
	KP(SpellAnim);
	KP(SpellIcon);
}

DECLARE_API ( pzone )
{
    ZONELIST *p, *pnull=NULL, ci;
    DWORD cb;
	CHAR buffer[MAX_STRING] = {0};
	CHAR tmp[MAX_STRING] = {0};
	unsigned int bitval = 1;
	int i=0;

    // read param from command line
    p = (ZONELIST *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");

	KP(Header);
	KP(Expansion);
	KP(Id);
	KPs(ShortName);
	KPs(LongName);

	i = ci.Flags;
	while (ci.Flags > 0)
	{
		if ( ci.Flags & 1 )
		{
			sprintf(tmp, "%d ", bitval );
			strcat(buffer, tmp);
		}
		ci.Flags >>= 1;
		bitval <<= 1;
	} 
	dprintf("Flags = %d [%s] (Offset: 0x%x)\n", i, buffer, &pnull->Flags );

	KP(Id2);
	KP(PoPValue);
	KP(MinLevel);
	KP(Revamped);
}

DECLARE_API ( pzoneinfo )
{
    ZONEINFO *p, *pnull=NULL, ci;
    DWORD cb;

    // read param from command line
    p = (ZONEINFO *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");

	KPs(CharacterName);
	KPs(ShortName);
	KPs(LongName);
	for (int i=0; i < 11; i++)
		dprintf("Unknown0x177[%d] = %d (offset 0x%x)\n", i, ci.Unknown0x177[i], &pnull->Unknown0x177[i]);
	KP(Unknown0x182);
	for (i=0; i < 4; i++)
		dprintf("Unknown0x184[%d] = %f (offset 0x%x)\n", i, ci.Unknown0x184[i], &pnull->Unknown0x184[i]);
	for (i=0; i < 4; i++)
		dprintf("Unknown0x194[%d] = %f (offset 0x%x)\n", i, ci.Unknown0x194[i], &pnull->Unknown0x194[i]);
	KPf(Unknown0x1a4);
	for (i=0; i < 15; i++)
		dprintf("Unknown0x1ac[%d] = %d (offset 0x%x)\n", i, ci.Unknown0x1ac[i], &pnull->Unknown0x1ac[i]);
	KPf(ZoneExpModifier);
	for (i=0; i < 4; i++)
		dprintf("Unknown0x1f8[%d] = %f (offset 0x%x)\n", i, ci.Unknown0x1f8[i], &pnull->Unknown0x1f8[i]);
	for (i=0; i < 6; i++)
		dprintf("Unknown0x208[%d] = %d (offset 0x%x)\n", i, ci.Unknown0x208[i], &pnull->Unknown0x208[i]);
	for (i=0; i < 14; i++)
		dprintf("Unknown0x220[%d] = %d (offset 0x%x)\n", i, ci.Unknown0x220[i], &pnull->Unknown0x220[i]);
	for (i=0; i < 2; i++)
		dprintf("Unknown0x258[%d] = %d (offset 0x%x)\n", i, ci.Unknown0x258[i], &pnull->Unknown0x258[i]);
	KP(Unknown0x25c);
	KPf(Unknown0x350);
	KPf(Unknown0x354);
}

DECLARE_API ( peqwindow )
{
    EQWINDOW *p, *pnull=NULL, ci;
    DWORD cb;
	CHAR buffer[MAX_STRING] = {0};
	CHAR tmp[MAX_STRING] = {0};
	unsigned int bitval = 1;
	int i=0;

    // read param from command line
    p = (EQWINDOW *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");
	
	// There is probably an easier way of doing all these, but things change so much
	// I didn't want to take time to worry about it.
	i = ci.Flags4;
	while (ci.Flags4 > 0)
	{
		if ( ci.Flags4 & 1 )
		{
			sprintf(tmp, "%d ", bitval );
			strcat(buffer, tmp);
		}
		ci.Flags4 >>= 1;
		bitval <<= 1;
	} 
	dprintf("Flags4 = %d [%s] (Offset: 0x%x)\n", i, buffer, &pnull->Flags4 );
	bitval = 1, tmp[0] = '\0', buffer[0] = '\0';

	KP(X);
	KP(Y);
	KP(Height);
	KP(Width);
	KP(Open);
} 

DECLARE_API ( plootcorpse )
{
    LOOTCORPSE *p, *pnull=NULL, ci;
    DWORD cb;
	CHAR buffer[MAX_STRING] = {0};
	CHAR tmp[MAX_STRING] = {0};
	unsigned int bitval = 1;
	int i=0;

    // read param from command line
    p = (LOOTCORPSE *)GetExpression(args);

    ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb);

	dprintf("\n\n\n");

	KP(Unknown0x000);
	KPs(Name);
	KPf(Timer);
	KPf(X);
	KPf(Y);
	KPf(Z);
	i = ci.Flags;
	while (ci.Flags > 0)
	{
		if ( ci.Flags & 1 )
		{
			sprintf(tmp, "%d ", bitval );
			strcat(buffer, tmp);
		}
		ci.Flags >>= 1;
		bitval <<= 1;
	} 
	dprintf("Flags = %d [%s] (Offset: 0x%x)\n", i, buffer, &pnull->Flags );
	KP(Unknown0x08c);
}


// This routine exports all spell information in the game (stored
// in memory) into a tilde delimited format which works well with 
// Microsoft Excel.
// Note:  Add "Levels"
DECLARE_API ( exportallspells )
{
    SPELLLIST *p, *pnull=NULL, ci, *r;
	DWORD *q, cb;
	CHAR Name[MAX_STRING] = {0};
	CHAR Target[MAX_STRING] = {0};
	CHAR CastOnYou[MAX_STRING] = {0};
	CHAR CastOnAnother[MAX_STRING] = {0};
	CHAR WearOff[MAX_STRING] = {0};
	int i=1;
	int j=0;
	int k=0;



	dprintf("ID~Name~Range~CastTime~FizzleTime~RecastTime~DurationType~DurationValue1~Mana~");
	dprintf("Target~CastOnYou~CastOnAnother~WearOff~");
	dprintf("BookIcon~GemIcon~SpellIcon~");
	dprintf("CastingAnim~SpellAnim~");
	for (k=0;k<4;k++) dprintf("ReagentID%d~ReagentCount%d~",k+1,k+1);
	for (k=0;k<12;k++) dprintf("Base%d~",k+1);
	for (k=0;k<12;k++) dprintf("Max%d~",k+1);
	for (k=0;k<12;k++) dprintf("Calc%d~",k+1);
	for (k=0;k<12;k++) dprintf("Attrib%d~",k+1);
	dprintf("DescNum~FizzLeadj\n");

	while( i <= (TOTAL_SPELL_COUNT+2) )
	{
		q = (DWORD*) GetExpression(args)+j;
		ReadMemory((PARAM1)q, &r, sizeof(r), &cb);

		p = (SPELLLIST * )r;
		ReadMemory((PARAM1)p,&ci,sizeof(ci),&cb); 

		//Read some memory locations into buffers
		ReadMemory((PARAM1)ci.Name,Name,256,&cb);
		ReadMemory((PARAM1)ci.Target,Target,256,&cb);
		ReadMemory((PARAM1)ci.CastOnYou,CastOnYou,256,&cb);
		ReadMemory((PARAM1)ci.CastOnAnother,CastOnAnother,256,&cb);
		ReadMemory((PARAM1)ci.WearOff,WearOff,256,&cb);
		//

		dprintf("%d~%s~%2f~%d~%d~%d~%d~%d~%d~", ci.ID, Name, ci.Range, ci.CastTime, ci.FizzleTime, ci.RecastTime, ci.DurationType, ci.DurationValue1, ci.Mana );
		dprintf("%s~%s~Someone%s~%s~", Target, CastOnYou, CastOnAnother, WearOff );
		dprintf("%d~%d~%d~", ci.BookIcon, ci.GemIcon, ci.SpellIcon );
		dprintf("%d~%d~", ci.CastingAnim, ci.SpellAnim );
		for (k=0;k<4;k++)  dprintf("%d~%d~", ci.ReagentId[k], ci.ReagentCount[k] );
		for (k=0;k<12;k++) dprintf("%d~", ci.Base[k]);
		for (k=0;k<12;k++) dprintf("%d~", ci.Max[k]);
		for (k=0;k<12;k++) dprintf("%d~", ci.Calc[k]);
		for (k=0;k<12;k++) dprintf("%d~", ci.Attrib[k]);
		dprintf("%d~%d\n", ci.descnum, ci.FizzLeadj );

	
		//Clean up (always better to be safe than sorry)
		Name[0] = Target[0] = CastOnYou[0] = CastOnAnother[0] = WearOff[0] = '\0';
		i++;
		j++;
	} 
}


Posted: Sun Aug 31, 2003 9:41 am
by MegaHertz
Please don't take this the wrong way but I am curious how a broken mqext got checked into the CVS? I have been a builder before and I always gave the devs hell for breaking the build ;)

Oh wait i know how it happend the dev that checked it in compiled on his machine with that nifty little switch that says dev ;) (in other words not a clean build hehe)

You all that code on this project and check in to it do a great job, Please don't take this the wrong way I am just used to having to back out dev changes when the they break the build, and they always answer well it compiled on my machine LOL Now we make them buddy build IE someone other then them has to run a synced build to the source with the dev's checkin added. (although they still find a way to break it :lol: )

Posted: Sun Aug 31, 2003 9:44 am
by Valerian
broken mqext got checked in because I don't use mqext, and the only thing mqext is for is for finding structs. if you use mqext, you know enough about mqext to fix it yourself.

ignore any errors when compiling mqext, if you don't use it, you don't need it.

Posted: Sun Aug 31, 2003 9:54 am
by MegaHertz
Yes I know I presonally do not need it. I guess it stems from my build days that all code in a projet should compile without errors. and your reply was spoken like a true dev. ;) (sometimes I miss m old dev team lol then I just have to think about the 24 hour shifts trying to get a build past bvt and remeber why testing is so much more stress free.) Like I said don't take it the wrong way I was just curious how it happend. And I am impressed that you all write code that compiles without warnings. My old devs never seemed to be able to do that, although warnings really are not a big deal it's just nice to see people can code without getting them.

Posted: Sun Aug 31, 2003 1:54 pm
by Zeus
I used Amadeus exts2.cpp, still got around 14 errors and after commenting the lines out I got this:

Code: Select all

ext.def : error LNK2001: unresolved external symbol pcmdlist
Release/mqext.lib : fatal error LNK1120: 1 unresolved externals
LINK : fatal error LNK1141: failure during build of exports file
Can't find that pcmdlist thing anywhere =\ Any ideas?

Edit: Found the pcmdlist but can't pinpoint the error still, compiled it on debug mode but can anyone tell me what the error is? Bugs me when I don't understand things :)

Posted: Sun Aug 31, 2003 2:05 pm
by Amadeus
try 'release' instead of 'debug' and delete the MacroQuest.ncb file in the root directory and the MacroQuest.pdb and EQLib.map files in the release directory.

Then do a 'clean solution' and 'build solution'.

Posted: Sun Aug 31, 2003 4:35 pm
by Zeus
I always clean and rebuild, gonna try deleteing those and trying tho, and the first errors was on a release compile.


Ps: I got a copy working by removing the mqext from the solution is not a big deal at all just wanted to satisfy my curiosity I don't like believing things work just by faith :)

Posted: Sun Aug 31, 2003 4:49 pm
by Amadeus
Well, mqext has absolutely nothing to do with MQ as you know it. It's only useful for those of us that use mqext specifically in conjunction with programs like windbg

Posted: Sun Aug 31, 2003 6:08 pm
by dont_know_at_all
Fixed in CVS and zip file.

Posted: Sun Aug 31, 2003 10:01 pm
by Nanan
DKAA can you post a link to the download zip? The new webpage doesnt seem to have the link there yet.

Posted: Sun Aug 31, 2003 11:07 pm
by dont_know_at_all
http://macroquest2.com/downloads/

I see Tux changed the format. I will fix the downloads when I get a chance.