Hi!
Ich schreibe gerade den Boss Mar’li in ZulGurub neu und er läst sich fast Fehlerfrei übersetzen. Habe da zwei Fehlermeldungen mit dennen ich nicht schlau werde!
Wäre super wenn mir da einer Weiterhelfen könnte
Script
[SPOILER]
[CODE]
#include “ScriptPCH.h”
#include “zulgurub.h”
// Zauber Definitionen
#define SPELL_AOE 14538 // Fluch = 35% Langsahmer Zaubern 2 Minunten Laufzeit!
#define SPELL_GESPINST 24110 // Kurzer unbeweglichkeits Effekt. Netz!
#define SPELL_SPIDER_FORM 24084 // Spinnen Form
#define SPELL_ENRAGE 54356 // Enrage - 25% dmg + 50% tempo
// Coords der Spinnen spawns
#define CORD_1_X -12320.0732f
#define CORD_1_Y -1584.3980f
#define CORD_1_Z 132.8214f
#define CORD_2_X -12332.8134f
#define CORD_2_Y -1597.2281f
#define CORD_2_Z 132.6992f
#define CORD_3_X -12317.5136f
#define CORD_3_Y -1609.3076f
#define CORD_3_Z 133.3880
// Ansagen
#define SAY_AGGRO -1309005
#define SAY_TRANSFORM -1309006
#define SAY_SPIDER_SPAWN -1309007
#define SAY_DEATH -1309008
// Spider Spells
#define SPELL_SPIDER_LEVELUP 24312 // LevelUp-Effekt und Scale wird vergrößert
// Boss
class Boss_Marli : public CreatureScript
{
public: Boss_Marli() : CreatureScript("Boss_Marli") {}
struct Boss_MarliAI : public ScriptedAI
{
Boss_MarliAI( Creature *c ) : ScriptedAI(c)
{
m_pInstance = c->GetInstanceScript();
}
InstanceScript *m_pInstance;
uint32 Spider_Timer;
uint32 AOE_Timer;
uint32 Enrage_Timer;
bool verwandelt;
bool rueckverwandelt;
void Reset()
{
Spider_Timer = 60000;
AOE_Timer = 60000;
Enrage_Timer = 300000;
verwandelt = false;
// Zurück in die normale Gestahlt
me->SetDisplayId(15220);
DoResetThreat();
}
void EnterCombat( Unit * )
{
DoScriptText( SAY_AGGRO, me );
}
void JustDied( Unit * )
{
DoScriptText( SAY_DEATH, me );
if (m_pInstance)
m_pInstance->SetData(TYPE_MARLI, DONE);
}
void UpdateAI( const uint32 diff )
{
if (!UpdateVictim())
return;
if (me->getVictim() && me->isAlive())
{
// Leben <= 96% dann hier starten!
if ( HealthAbovePct(96) )
{
// Adds Spawnen 3x
DoScriptText( SAY_SPIDER_SPAWN, me );
Creature *spider = NULL;
spider = me->SummonCreature( 15041, CORD_1_X, CORD_1_Y, CORD_1_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
spider = me->SummonCreature( 15041, CORD_2_X, CORD_2_Y, CORD_2_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
spider = me->SummonCreature( 15041, CORD_3_X, CORD_3_Y, CORD_3_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
// Leben <= 90% dann hier weiter
if ( HealthAbovePct(90) )
{
// Ist bereits verwandelt? Wenn nicht, verwandeln!
if ( verwandelt == true )
{
if( AOE_Timer <= diff )
{
// Gruppe Verfluchen!
DoCast(me->getVictim(), SPELL_AOE);
AOE_Timer = 120000; // Nach zwei Minuten neu Verfluchen!
} else AOE_Timer -= diff;
// Leben <= 60% dann hier weiter
if ( HealthAbovePct(60) && rueckverwandelt == true )
{
// Spinnen rufen
if ( Spider_Timer <= diff )
{
Creature *spider = NULL;
spider = me->SummonCreature( 15041, CORD_1_X, CORD_1_Y, CORD_1_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
spider = me->SummonCreature( 15041, CORD_2_X, CORD_2_Y, CORD_2_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
spider = me->SummonCreature( 15041, CORD_3_X, CORD_3_Y, CORD_3_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
Spider_Timer = 45000;
} else Spider_Timer -= diff;
// Leben <= 10% dann hier weiter
if ( HealthAbovePct(10) )
{
if( Enrage_Timer <= diff )
{
DoCast(me, SPELL_ENRAGE);
Enrage_Timer = 300000; // 5 Minuten
} else Enrage_Timer -= diff;
}
}
else
{
me->SetDisplayId(15220);
DoResetThreat();
rueckverwandelt = true;
}
}
else
{
// Nein, wurde noch nicht verwandelt. Verwandeln!
DoScriptText( SAY_TRANSFORM, me );
me->SetDisplayId(SPELL_SPIDER_FORM);
DoResetThreat();
verwandelt = true;
}
}
}
DoMeleeAttackIfReady();
}
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new Boss_MarliAI(creature);
}
};
// Spider
class Spinnen_von_Marli : public CreatureScript
{
public: Spinnen_von_Marli() : CreatureScript("Spinnen_von_Marli") {}
struct Spinnen_von_MarliAI : public ScriptedAI
{
Spinnen_von_MarliAI(Creature *c) : ScriptedAI(c) {}
static uint32 Levelup_Step;
void Reset()
{
Levelup_Step = 0;
}
void EnterCombat( Unit * ) {}
void UpdateAI( const uint32 diff )
{
if(!UpdateVictim())
return;
if( HealthAbovePct(67) )
{
if( Levelup_Step <= 0 )
{
const CreatureInfo *cinfo = me->GetCreatureInfo();
DoCast(me, SPELL_SPIDER_LEVELUP);
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 5)));
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 5)));
me->UpdateDamagePhysical(BASE_ATTACK);
Levelup_Step = 1;
}
if( HealthAbovePct(34) )
{
if( Levelup_Step == 1 )
{
const CreatureInfo* cinfo = me->GetCreatureInfo();
DoCast(me, SPELL_SPIDER_LEVELUP);
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 10)));
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 10)));
me->UpdateDamagePhysical(BASE_ATTACK);
Levelup_Step = 2;
}
}
}
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new Spinnen_von_MarliAI(creature);
}
};
void AddSC_Boss_Marli()
{
new Boss_Marli();
new Spinnen_von_Marli();
}
[/CODE][/SPOILER]
Compiler Error
/home/trinity/source/335a/23-06-2011/TrinityCore/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp: In member function ‘virtual void Spinnen_von_Marli::Spinnen_von_MarliAI::UpdateAI(uint32)’:
/home/trinity/source/335a/23-06-2011/TrinityCore/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp:187: error: ‘CreatureInfo’ was not declared in this scope
/home/trinity/source/335a/23-06-2011/TrinityCore/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp:187: error: ‘cinfo’ was not declared in this scope
/home/trinity/source/335a/23-06-2011/TrinityCore/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp:199: error: expected initializer before ‘*’ token
/home/trinity/source/335a/23-06-2011/TrinityCore/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp:201: error: ‘cinfo’ was not declared in this scope
make[2]: *** [src/server/scripts/CMakeFiles/scripts.dir/EasternKingdoms/ZulGurub/boss_marli.cpp.o] Error 1
make[1]: *** [src/server/scripts/CMakeFiles/scripts.dir/all] Error 2
Möchte gerne den normalen Waffenschaden in zwei Schritten erhöhen! Aber leider läst sich die CreatureInfo nicht deklarieren /emoticons/default_sad.png
Liebe Grüße
Yellow