本文整理汇总了C++中CMonster::IsBonfire方法的典型用法代码示例。如果您正苦于以下问题:C++ CMonster::IsBonfire方法的具体用法?C++ CMonster::IsBonfire怎么用?C++ CMonster::IsBonfire使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMonster
的用法示例。
在下文中一共展示了CMonster::IsBonfire方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddMonster
// add a new monster to this map
CMonster* CMap::AddMonster( UINT montype, fPoint position, UINT owner, CMDrops* MonsterDrop, CMDrops* MapDrop, UINT spawnid , bool GetDropData )
{
// check if is a valid monster
CNPCData* thisnpc = GServer->GetNPCDataByID( montype );
if(thisnpc==NULL)
{
Log( MSG_WARNING, "Invalid montype %i", montype );
return NULL;
}
CMonster* monster = new (nothrow) CMonster( position, montype, this->id, owner, spawnid );
if(monster==NULL)
{
Log( MSG_WARNING, "Error allocing memory" );
return NULL;
}
monster->thisnpc = thisnpc;
monster->SetStats( );
monster->Stats->HP = monster->Stats->MaxHP;
if(GetDropData && owner==0)
{
monster->MonsterDrop->mobdrop = GServer->GetDropData( monster->thisnpc->dropid );
monster->MonsterDrop->mapdrop = GServer->GetDropData( id );
}
else
{
monster->MonsterDrop->mobdrop = MonsterDrop;
monster->MonsterDrop->mapdrop = MapDrop;
}
MonsterList.push_back( monster );
if(spawnid!=0)
{
CSpawnArea* thisspawn = GServer->GetSpawnArea( spawnid, this->id );
if(thisspawn!=NULL)
thisspawn->amon++;
}
monster->SpawnTime = clock( );
monster->OnSpawn( false );
//LMA BEGIN
//20070621-211100/test
//The bug still exists, I activate it...
//solves 99.99% this problem.
//We search if a player is nearby and we force the refresh
/*
CPlayer* player = monster->GetNearPlayer( );
if(player!=NULL)
{
player->ForceRefreshMonster(false,monster->clientid);
}
*/
//LMA END
monster->hitcount=0;
monster->maxhitcount=0;
monster->stay_still=false;
if(monster->thisnpc->id==659)
{
monster->maxhitcount=3; //LMA: MoonChild
monster->stay_still=true;
}
if(monster->thisnpc->id==201)
{
monster->maxhitcount=1; //LMA: Worm dragon
}
//Sunrise, Sunset and Dusk Crystal in Junon Cartel
if (monster->thisnpc->id>=431&&monster->thisnpc->id<=433)
monster->stay_still=true;
//LMA: bonfire (and salamender...) don't move and don't attack ;)
if (monster->IsBonfire())
{
monster->stay_still=true;
monster->Battle->target=owner;
}
monster->bonushp=0;
monster->bonusmp=0;
monster->maxvalue=0;
monster->minvalue=0;
monster->skillid=0;
monster->range=0;
monster->buffid=0;
return monster;
}
示例2: AddMonster
//.........这里部分代码省略.........
CMobGroup* thisgroup = GServer->GetMobGroup( spawnid, this->id );
if(thisgroup!=NULL)
{
//LMA: only if not a tactical.
if(!monster->is_tactical)
{
thisgroup->active++;
}
}
//LMA: daynight
monster->daynight=thisgroup->daynight;
}
*/
monster->SpawnTime = clock( );
monster->lastDegenTime=clock();
monster->OnSpawn( false );
monster->lastAiUpdate = clock();
monster->nextAi_attacked=clock();
monster->hitcount = 0xFF;
monster->hitcount=0;
monster->maxhitcount=0;
monster->stay_still=false;
if(monster->thisnpc->id==659)
{
monster->maxhitcount=3; //LMA: MoonChild
monster->stay_still=true;
}
if(monster->thisnpc->id==201)
{
monster->maxhitcount=1; //LMA: Worm dragon
}
if(monster->thisnpc->id==1572)
{
monster->maxhitcount=1; //rl2171: Cursed Ant Vagabond
}
if(monster->thisnpc->id==662 || monster->thisnpc->id==667 || monster->thisnpc->id==673 || monster->thisnpc->id==678)
{
monster->maxhitcount=3; //rl2171: Dragon Egg for Clan Wars - 662, 667, 673, 678
monster->stay_still=true;
}
if(monster->thisnpc->id==558)
{
monster->maxhitcount=1; //rl2171: 1st Turak
}
if(monster->thisnpc->id==559)
{
monster->maxhitcount=1; //rl2171: 2nd Turak
}
/*if(monster->thisnpc->id==560)
{
monster->maxhitcount=1; //rl2171: 3rd Turak
}
*/
//Sunrise, Sunset and Dusk Crystal in Junon Cartel
if (monster->thisnpc->id>=431&&monster->thisnpc->id<=433)
monster->stay_still=true;
//Rune Stone, Green, Blue, Red, White Crystal in Luna
// if (monster->thisnpc->id>=325&&monster->thisnpc->id<=329)
// monster->stay_still=true;
//Seal Stone
// if (monster->thisnpc->id>=451&&monster->thisnpc->id<=457)
// monster->stay_still=true;
//Clan Wars gate - wall
// if (monster->thisnpc->id>=1022&&monster->thisnpc->id<=1023)
// monster->stay_still=true;
//LMA: bonfire (and salamender...) don't move and don't attack ;)
if (monster->IsBonfire())
{
monster->stay_still=true;
monster->Battle->target=owner;
}
monster->bonushp=0;
monster->bonusmp=0;
monster->maxvalue=0;
monster->minvalue=0;
monster->skillid=0;
monster->range=0;
monster->buffid=0;
monster->char_montype=montype;
//Log(MSG_INFO,"XCID, Addmonster %i in map %i",montype,monster->Position->Map);
return monster;
}
示例3: AddMonster
//.........这里部分代码省略.........
{
CMobGroup* thisgroup = GServer->GetMobGroup( spawnid, this->id );
if(thisgroup!=NULL)
{
//LMA: only if not a tactical.
if(!monster->is_tactical)
{
thisgroup->active++;
}
}
//LMA: daynight
monster->daynight=thisgroup->daynight;
}
monster->SpawnTime = clock( );
monster->lastDegenTime=clock();
monster->OnSpawn( false );
monster->lastAiUpdate = clock();
monster->hitcount = 0xFF;
monster->hitcount=0;
monster->maxhitcount=0;
monster->stay_still=false;
if(monster->thisnpc->id==659)
{
monster->maxhitcount=3; //LMA: MoonChild
monster->stay_still=true;
}
if(monster->thisnpc->id==201)
{
monster->maxhitcount=1; //LMA: Worm dragon
}
if(monster->thisnpc->id==1572)
{
monster->maxhitcount=1; //rl2171: Cursed Ant Vagabond
}
if(monster->thisnpc->id==662)
{
monster->maxhitcount=3; //rl2171: Dragon Egg for Clan Wars - 662, 667, 673, 678
monster->stay_still=true;
}
if(monster->thisnpc->id==558)
{
monster->maxhitcount=1; //rl2171: 1st Turak
}
if(monster->thisnpc->id==559)
{
monster->maxhitcount=1; //rl2171: 2nd Turak
}
/*if(monster->thisnpc->id==560)
{
monster->maxhitcount=1; //rl2171: 3rd Turak
}
*/
//Sunrise, Sunset and Dusk Crystal in Junon Cartel
if (monster->thisnpc->id>=431&&monster->thisnpc->id<=433)
monster->stay_still=true;
//Rune Stone, Green, Blue, Red, White Crystal in Luna
// if (monster->thisnpc->id>=325&&monster->thisnpc->id<=329)
// monster->stay_still=true;
//Seal Stone
// if (monster->thisnpc->id>=451&&monster->thisnpc->id<=457)
// monster->stay_still=true;
//Clan Wars gate - wall
// if (monster->thisnpc->id>=1022&&monster->thisnpc->id<=1023)
// monster->stay_still=true;
//LMA: bonfire (and salamender...) don't move and don't attack ;)
if (monster->IsBonfire())
{
monster->stay_still=true;
monster->Battle->target=owner;
}
monster->bonushp=0;
monster->bonusmp=0;
monster->maxvalue=0;
monster->minvalue=0;
monster->skillid=0;
monster->range=0;
monster->buffid=0;
monster->char_montype=montype;
//Log(MSG_INFO,"XCID, Addmonster %i in map %i",montype,monster->Position->Map);
return monster;
}