********************************
Little fix to stop support summons attacking / moving. (Bonfire, Mana Flame etc)
(monster.cpp)
- bool CMonster::UpdateValues( )
- {
- if(IsSummon( ) && CanMove( ))
- {
- CPlayer* thisclient = GetOwner( );
- if(thisclient!=NULL)
- {
- if(!IsOnBattle( ) && thisclient->IsAttacking( ))
- {
- Battle->target = thisclient->Battle->target;
- Battle->atktarget = Battle->target;
- Battle->atktype = NORMAL_ATTACK;
- Battle->contatk = true;
- CCharacter* Enemy = GetCharTarget( );
- if(Enemy!=NULL)
- StartAction( Enemy, NORMAL_ATTACK );
- }
- else
- if(!IsOnBattle( ))
- {
- Position->source = thisclient->Position->current;
- float distance = GServer->distance( Position->destiny , thisclient->Position->current );
- if((distance>15 && !IsOnBattle()) || distance>50)
- Move( );
- }
- }
- else
- {
- UnspawnMonster( );
- return false;
- }
- }
- if(!IsMoving( ) && !IsOnBattle( ) && CanMove( ))
- {
- clock_t etime = clock() - Position->lastMoveTime;
- if(etime > 20*CLOCKS_PER_SEC)
- Move( );
- }
- if(!IsSummon( ))
- {
- CPlayer* player = GetNearPlayer( 10 );
- if(player!=NULL)
- OnEnemyOnSight( (CCharacter*)player );
- }
- return true;
- }