Page 1 of 1

MoveUtils update

Posted: Mon Sep 25, 2006 9:09 am
by echoism
diff -rubB ISXEQMoveUtils.h-old ISXEQMoveUtils.h

Code: Select all

--- ISXEQMoveUtils.h-old        2006-09-25 09:25:34.000000000 -0400
+++ ISXEQMoveUtils.h    2006-09-24 12:38:26.799750000 -0400
@@ -295,6 +295,7 @@
                Behind=9,
                Stopped=10,
                Pin=11,
[color=red]+               StickTarget=12,[/color]
        };

        MQ2StickType():LSTypeDefinition("stick")
@@ -310,6 +311,7 @@
                TypeMember(Behind);
                TypeMember(Stopped);
                TypeMember(Pin);
[color=red]+               TypeMember(StickTarget);[/color]
        }
        ~MQ2StickType()
        {
@@ -381,6 +383,12 @@
                        Dest.DWord=movePin;
                        Dest.Type=pBoolType;
                        return true;
[color=red]+               case StickTarget:
+                       if( (stickHold && (!stickTarget || !(stickTarget->SpawnID) || stickTarget_Type!=GetSpawnType(stickTarget))) || (!stickHold && ((!ppTarget) || (!pTarget))) ) {
+                               Dest.Int=0;
+                       } else Dest.Int=stickHold?stickTarget->SpawnID:((PSPAWNINFO)pTarget)->SpawnID;
+                               Dest.Type=pIntType;
+                       return true;[/color]
                }
                return false;
        }

diff -rubB ISXEQMoveUtils.cpp-old ISXEQMoveUtils.cpp

Code: Select all

--- ISXEQMoveUtils.cpp-old      2006-09-24 12:35:22.000000000 -0400
+++ ISXEQMoveUtils.cpp  2006-09-24 23:58:44.000000000 -0400
@@ -560,11 +560,11 @@
        float newHeading=0.0f;

 //     if (!pChSpawn || /*!pChSpawn->pActorInfo ||*/ !pLPlayer || !pLPlayer->pCharInfo) {
[color=red]-       if (!pChSpawn || !pLPlayer || !pLPlayer->pCharInfo) {
+       if (!pChSpawn || !pLPlayer || !pLPlayer->pCharInfo_vtable2) {[/color]
                WriteChatColor("Null pointer, breaking HandleMakeCamp");
                return;
        }
[color=red]-       if ( ( ((long) (pChSpawn->CastingSpellID)) >= 0 && !(IsBardClass()) ) || (pChSpawn->StandState != STANDSTATE_STAND && pChSpawn->StandState != STANDSTATE_DUCK)|| pLPlayer->pCharInfo->Stunned) {
+       if ( ( ((long) (pChSpawn->CastingSpellID)) >= 0 && !(IsBardClass()) ) || (pChSpawn->StandState != STANDSTATE_STAND && pChSpawn->StandState != STANDSTATE_DUCK)|| GetCharInfo()->Stunned) {[/color]
                if( !casting ) {
                        casting = true;
                        ReleaseKeys();
@@ -729,7 +729,7 @@
                                        breakStick(true, true);
                                        break;
                                }
[color=red]-                               breakStick();
+//                             breakStick();[/color]
                                stickOn= true;
                                stickHold = true;
                                stickTarget = (PSPAWNINFO)pTarget;
@@ -824,7 +824,7 @@
        PSPAWNINFO pChSpawn = (PSPAWNINFO) pCharSpawn;
        PSPAWNINFO pLPlayer = (PSPAWNINFO) pLocalPlayer;
 //     if (!pChSpawn || /*!pChSpawn->pActorInfo ||*/ !psTarget || !pLPlayer || !pLPlayer->pCharInfo) {
[color=red]-       if (!pChSpawn || !psTarget || !pLPlayer || !pLPlayer->pCharInfo) {
+       if (!pChSpawn || !psTarget || !pLPlayer || !pLPlayer->pCharInfo_vtable2) {[/color]
                WriteChatColor("Null pointer, breaking stick");
                breakStick();
                return;
@@ -834,14 +834,14 @@
        bool mounted;
        mounted = pChSpawn->Mount ? true : false;
        if( !setDist ) {
[color=red]-               stickDist = (psTarget->StandState?get_melee_range((EQPlayer *)pChSpawn,(EQPlayer *)psTarget):15.0f)* stickDistModP + stickDistMod;
+               stickDist = (psTarget->StandState?get_melee_range(pLocalPlayer,(EQPlayer *)psTarget):15.0f) * stickDistModP + stickDistMod;[/color]
        }
        currentDist=GetDistance(pChSpawn,psTarget);
        if( breakOnWarpEnabled && (currentDist-prevDist) > breakDist ) {
                breakStick();
                return;
        }
[color=red]-       if ( ( ((long) (pChSpawn->CastingSpellID)) >= 0 && !(IsBardClass()) ) || (pChSpawn->StandState != STANDSTATE_STAND && pChSpawn->StandState != STANDSTATE_DUCK)|| pLPlayer->pCharInfo->Stunned==1 || psTarget->SpawnID == pChSpawn->SpawnID ) {
+       if ( ( ((long) (pChSpawn->CastingSpellID)) >= 0 && !(IsBardClass()) ) || (pChSpawn->StandState != STANDSTATE_STAND && pChSpawn->StandState != STANDSTATE_DUCK)|| GetCharInfo()->Stunned || psTarget->SpawnID == pChSpawn->SpawnID ) {[/color]
                if( !casting ) {
                        casting = true;
                        ReleaseKeys();
@@ -1189,13 +1189,13 @@
 {
        PSPAWNINFO pChSpawn = (PSPAWNINFO) pCharSpawn;
        PSPAWNINFO pLPlayer = (PSPAWNINFO) pLocalPlayer;
[color=red]-       if (!pChSpawn || /*!pChSpawn->pActorInfo ||*/ !pLPlayer || !pLPlayer->pCharInfo) {
+       if (!pChSpawn || /*!pChSpawn->pActorInfo ||*/ !pLPlayer || !pLPlayer->pCharInfo_vtable2) {[/color]
                WriteChatColor("Null pointer, breaking MoveTo");
                breakMoveTo();
                return;
        }

[color=red]-       if ( ( ((long) (pChSpawn->CastingSpellID)) >= 0 && !(IsBardClass()) ) || (pChSpawn->StandState != STANDSTATE_STAND && pChSpawn->StandState != STANDSTATE_DUCK)|| pLPlayer->pCharInfo->Stunned==1 ) {
+       if ( ( ((long) (pChSpawn->CastingSpellID)) >= 0 && !(IsBardClass()) ) || (pChSpawn->StandState != STANDSTATE_STAND && pChSpawn->StandState != STANDSTATE_DUCK)|| GetCharInfo()->Stunned ) {[/color]
                if( !casting ) {
                        casting = true;
                        DoFwd(false);
@@ -1405,13 +1405,13 @@
        PSPAWNINFO pChSpawn = (PSPAWNINFO) pCharSpawn;
        PSPAWNINFO pLPlayer = (PSPAWNINFO) pLocalPlayer;
 //     if (!pChSpawn || /*!pChSpawn->pActorInfo ||*/ !pLPlayer || !pLPlayer->pCharInfo) {
-       if (!pChSpawn || !pLPlayer || !pLPlayer->pCharInfo) {
+       if (!pChSpawn || !pLPlayer || !pLPlayer->pCharInfo_vtable2) {
                WriteChatColor("Null pointer, breaking Circle");
                breakCircle();
                return;
        }

[color=red]-       if ( ( ((long) (pChSpawn->CastingSpellID)) >= 0 && !(IsBardClass()) ) || (pChSpawn->StandState != STANDSTATE_STAND && pChSpawn->StandState != STANDSTATE_DUCK)|| pLPlayer->pCharInfo->Stunned==1 ) {
+       if ( ( ((long) (pChSpawn->CastingSpellID)) >= 0 && !(IsBardClass()) ) || (pChSpawn->StandState != STANDSTATE_STAND && pChSpawn->StandState != STANDSTATE_DUCK)|| GetCharInfo()->Stunned ) {[/color]
                if( !casting ) {
                        casting = true;
                        DoFwd(false);

Posted: Mon Sep 25, 2006 11:00 am
by grakef
sorry a bit clueless here your old date is newer then your new date. What trying to figure out what version of the file this diff was done off so that I can apply it while I wait for the dll ot be tested and released.

Thank you for the diff though. Looking forward to your release of the dll on ismods.com

Posted: Tue Sep 26, 2006 9:08 am
by echoism
Heh, yeah, the date on the old one was off... I had copied the file, but forgot to leave the old date intact.

Posted: Wed Sep 27, 2006 7:14 pm
by iluvseq
I'd like to nab a copy of the sourcecode for this, if it's available? I wasn't able to find it posted anywhere on this site.

I know there's an ancient version posted in VIP, but it hasn't been updated in a year :)

Could you post an update to the VIP thread with the current version of the code?

Thanks!

Posted: Wed Feb 10, 2010 12:42 am
by Charisa
Is there actually a working copy of this and isxeqmelee hanging around somewhere?

The copies I found were compiled against old isdk's and the sources I can find won't compile (:.

Sorry if Im asking something stupid seems that there is much less out there for IS than ther ewas for MQ :(

Posted: Wed Feb 10, 2010 12:43 pm
by spanners
There are conversions for MoveUtils and Melee in the VIP section for ISX.

I can confirm the MoveUtils conversion is functional "as is" from that forum. I haven't used the Melee conversions

Posted: Wed Feb 10, 2010 2:01 pm
by Charisa
Hmmm, well the only thread I can find for that seems to have issues with

these lines

if ( ( ((long) (pChSpawn->CastingSpellID)) >= 0 && !(IsBardClass()) ) || (pChSpawn->StandState != STANDSTATE_STAND && pChSpawn->StandState != STANDSTATE_DUCK)|| pLPlayer->pCharInfo->Stunned==1) {

specificially the castingspellID call.

I don't know enough C to figure out how to fix it, I've been digging through the .h file in mq2main trying to find if that nformation has moved or been renamed.

There is a link to a file on that site that is hosted off site which doesn't open, perhaps thats the one that works 'as is'?

Re: MoveUtils update

Posted: Wed Jul 30, 2025 9:58 pm
by xyilla

Re: MoveUtils update

Posted: Wed Jul 30, 2025 9:59 pm
by xyilla