Пример #1
0
void work(Set* _set, char op, long newTag) {
	if (op == 'I')
		return;
	long i;
	for (i = 0; i < lineNum; i++) {
		if (_set->line[i].valid > 0 && _set->line[i].tag == newTag) {
			addHit();			
			if (op == 'M') {
				addHit();
			}
			setValid(_set->line, i);
			printf("\n");
			return;
		}
	}
	addMiss();
	if (!updateLast(_set)) {
		addEvic();
	}
	setValid(_set->line, _set->lastLine);
	_set->line[_set->lastLine].tag = newTag;
	if (op == 'M'){
		addHit();
	}
	printf("\n");
}
Пример #2
0
//----------------------------------------------------------------------
// Spawn
Spawn::Spawn()
  : Item(tSpawn, 0)
{
  m_name = "fake";
  setNPC(SPAWN_NPC_UNKNOWN);

  Item::setPos(0, 0, 0);
  setDeltas(0, 0, 0);
  setHeading(0, 0);
  setAnimation(0);
  setPetOwnerID(0);
  setLight(0);
  setGender(0);
  setDeity(0);
  setRace(0);
  setClassVal(0);
  setHP(0);
  setMaxHP(0);
  setGuildID(0xffff);
  setGuildTag(NULL);
  setLevel(0);
  setTypeflag(0);
  for (int i = 0; i < tNumWearSlots; i++)
    setEquipment(i, 0);

  // just clear the considred flag since data would be outdated
  setConsidered(false);

  // finally, note when this update occurred.
  updateLast();
}
Пример #3
0
void tabTA::updateAll()
{
	if (devices->current()->media.layers.toInt() < 2) {
		layer0->setChecked(true);
		layer1->setEnabled(false);
	} else {
		layer1->setEnabled(true);
	}
	updateLast();
}
Пример #4
0
void tabTA::selectDevice()
{
#ifndef QT_NO_DEBUG
	qDebug("tabTA::selectDevice()");
#endif
	device *dev = devices->current();
	graphPit->update();
	graphLand->update();
	QObject::connect( dev, SIGNAL(doneMInfo(int)), this, SLOT(updateAll()) );
	QObject::connect( dev, SIGNAL(block_TA()), this, SLOT(updateLast()) );
}
void ConnectivityManager::startSocket() {
   autoDetected = false;

   disconnect();

   if(ClientManager::getInstance()->isActive()) {
       listen();

    // must be done after listen calls; otherwise ports won't be set
    if(SETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_FIREWALL_UPNP)
       UPnPManager::getInstance()->open();
    }

    updateLast();
}
Пример #6
0
Spawn::Spawn(uint16_t id, 
	     int16_t x, int16_t y, int16_t z,
	     int16_t deltaX, int16_t deltaY, int16_t deltaZ,
	     int8_t heading, int8_t deltaHeading,
	     uint8_t animation) 
  : Item(tSpawn, id)
{
  // apply the unknown mob values
  m_name = "unknown";
  m_lastName = "";
  setNPC(SPAWN_NPC_UNKNOWN);

  // set what is known
  setPos(x, y, z);
  setDeltas(deltaX, deltaY, deltaZ);
  setHeading(heading, deltaHeading);
  setAnimation(animation);
  
  // initialize what isn't to 0
  setPetOwnerID(0);
  setLight(0);
  setGender(0);
  setDeity(0);
  setRace(0);
  setClassVal(0);
  setHP(0);
  setMaxHP(0);
  setLevel(0);
  setGuildID(0xffff);
  setGuildTag(NULL);
  for (int i = 0; i < tNumWearSlots; i++)
    setEquipment(i, SlotEmpty);
  setTypeflag(0);
  setGM(0);
  setConsidered(false);

  // turn on auto delete for the track list
  m_spawnTrackList.setAutoDelete(true);

  // Finally, note when this update ocurred
  updateLast();
}
ConnectivityManager::ConnectivityManager() :
autoDetected(false),
running(false)
{
    updateLast();
}