void Pnj::moveY(int i) { if (gpJeu->isLink(x + gpZoneBase->getZone()->x, y + gpZoneBase->getZone()->y + i, gpZoneBase->getZone()->w, gpZoneBase->getZone()->h)) return; if (gpJeu->isEnnemi(x + gpZoneBase->getZone()->x, y + gpZoneBase->getZone()->y + i, gpZoneBase->getZone()->w, gpZoneBase->getZone()->h)) return; if (gpJeu->isPnj(x + gpZoneBase->getZone()->x, y + gpZoneBase->getZone()->y + i, gpZoneBase->getZone()->w, gpZoneBase->getZone()->h, getListId())) return; if (!gpJeu->isNotFull(x + gpZoneBase->getZone()->x, y + gpZoneBase->getZone()->y + i, gpZoneBase->getZone()->w, gpZoneBase->getZone()->h, 0, 0, 0)) return; y+=i; }
bool StatsStreamList::update() { time_t now; time (&now); int diff = difftime (now,this->timeStamp); if (diff > 10) { this->calculateRate(diff); cout << "list_id " << getListId() << " rate= "<< actualRate << endl; this->updateTimeStamp(); } }