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);


