Exemple #1
0
void PartyTab::getAutoCompleteList(std::vector<std::string> &names) const
{
    Party *p = local_player->getParty();

    if (p)
        p->getNames(names);
}
unsigned int
processOneTestCase(vector<Party>& partyList)
{
    vector<Party>::iterator it;
    unsigned long daysCount = partyList[0].getTotDaysCount();
    set<unsigned long>      workingSet;
    
    for(it=partyList.begin();it!=partyList.end();it++){
        Party  pr = *it;
        unsigned int  bp         = pr.getBandhParam();
        unsigned long index      = 1;
        unsigned long condVal    = index*bp;

        while(condVal <= daysCount){

            unsigned int rd = (condVal%DAYS_INTERVAL); // Remaining Days
            if(rd>0 && rd <(DAYS_INTERVAL-1)){ // Sat-Sun exclude
                workingSet.insert(index*bp);
            }
            index++;
            condVal = (index*bp);
        }
    }

    return workingSet.size();
}
    bool CharacterSelectionWindow::update()
    {
        Party party = PartyManager::getSingleton().getCharacters();
        
        while (party.size() > mCharacterWindows.size())
        {
            Element* elem = new Element(this);
            mCharacterWindow->addChildWindow(elem->getWindow());
            CEGUI::Size size = elem->getWindow()->getPixelSize();
            size_t windowNum = mCharacterWindows.size();
			elem->getWindow()->setPosition(UVector2(UDim(0, 0), UDim(0, windowNum * size.d_height)));
            elem->setVisible(true);
            elem->getWindow()->subscribeEvent(
                 Window::EventMouseClick,
                 boost::bind(&CharacterSelectionWindow::handleClickOnCharacter, this, windowNum));
            
            mCharacterWindows.push_back(elem);
        }
        
        while (party.size() < mCharacterWindows.size())
        {
            Element* elem = mCharacterWindows.back();
            mCharacterWindows.pop_back();
            mCharacterWindow->removeChildWindow(elem->getWindow());
            delete elem;
        }
        
        for (unsigned int i = 0; i < party.size(); ++i)
        {
            mCharacterWindows[i]->setCreature(party[i]);
        }
        
        return true;
    }
Exemple #4
0
int main(int argc, char** argv)
{
	if(argc < 4){
		printf("Not enough arguments");
	}

	Party *p = new Party(argv[3]);
	p->loadFile(argv[2]);


	int steps = (int)strtol(argv[1], NULL, 10);


	for(int i = 0; i < steps; ++i){
		p->getNextWeek();
	}
	for(int i = 0; i < p->size; ++i){
		for(int j = 0; j < p->size; ++j){
			fprintf(p->outFile, "%d ", p->currentWeek[i][j]);
		}
		fprintf(p->outFile, "\n");
	}

	delete p;
	return 0;
}
Exemple #5
0
Village* Village::getVillage(int party, int village) {
	Party* p = Party::getParty(party);
	if (p != 0) {
		if (village < p->nrVillages()) 
			return p->getVillage(village);
	}
	return 0;
}
Party* DB_TEST_BASE::InitializeClientObject(Person* Primary)
{
    Party* object = new Party;
    PartyObjectsTracker.push_back(object);

    object->SetPrimary(Primary);

    return object;
}
Exemple #7
0
void PartyTab::getAutoCompleteList(StringVect &names) const
{
    if (!player_node)
        return;

    Party *p = player_node->getParty();

    if (p)
        p->getNames(names);
}
/*---------------------------------------------------------------------*//**
	リーダー不在の場合はいるメンバーをリーダーにする
**//*---------------------------------------------------------------------*/
void WalkingMode::setSafeLeader()
{
	Party* party = Game::getGame()->getMyParty();
	if(!party->getLeaderPcUnit()->isEnable())
	{
		for(int i = 0; i < party->getPcNum(); i++)
		{
			if(party->setLeader(i))	{	break;	}
		}
	}
}
Exemple #9
0
void MapEventHero::Activate()
{
    PartyMember* p = CharacterClass::GetRandomCharacterClass()->GetNewPartyMember();
    p->SetTeamId(0);
    Party* party = GameController::getInstance()->getParty();
    p->AddExp(party->GetActivePartyMembers()->at(0)->GetExp());
    p->GetStartingSkills(p->GetLevel() - 1);
    party->AddPartyMember(p);

    m_finished = true;
    m_node->GetParent()->removeChild(m_node);
    delete m_node;
}
/*---------------------------------------------------------------------*//**
	デフォルトアイテムの追加
**//*---------------------------------------------------------------------*/
void StoryManager::setupDefaultItems()
{
	ItemManager* itmmng = ((MyParty*)Game::getGame()->getMyParty())->getItemManager();

	// 武器が無い場合
	{
		ItemArray itmarr = itmmng->findByCategory(ItemDef::CAT_WEAPON, true);
		if(itmarr.getCount() <= 0)	// 武器がない
		{
			// デフォルトのこん棒を追加
			itmmng->newItem(ItemIdDef::ITEMDID_WEP_FIRST, 0L, Item::F_NOEDIT, true);	// 編集不可で末尾に追加
		}
	}
	
	// 盾が無い場合
	{
		ItemArray itmarr = itmmng->findByCategory(ItemDef::CAT_SHIELD, true);
		if(itmarr.getCount() <= 0)	// 盾がない
		{
			itmarr = itmmng->findByItemDefId(ItemIdDef::ITEMDID_DUMMY, true);
			if(itmarr.getCount() <= 0)	// 盾入手場所確保用のダミーアイテムもない
			{
				// 盾入手場所確保用のダミーアイテムを追加
				itmmng->newItem(ItemIdDef::ITEMDID_DUMMY, 0L, Item::F_NOEDIT, true);		// 編集不可で末尾に追加
			}

			// ダミーを盾に変更
			if(_storyid >= StoryIdDef::STID_EP01_ASA__START_)
			{
				itmarr = itmmng->findByItemDefId(ItemIdDef::ITEMDID_DUMMY, true);	// 予約用ダミーの検索
				if(itmarr.getCount() > 0)
				{
					// 盾入手場所確保用のダミーアイテムを削除
					Item* item = itmarr.item(0);
					itmmng->removeItem(item->getItemGenId());
					// 盾の追加
					itmmng->newItem(ItemIdDef::ITEMDID_SHLD_FIRST, 0L, Item::F_NOEDIT, true);	// 編集不可を末尾に
				}
			}
		}
	}

	// 最強装備に
	Party* party = Game::getGame()->getMyParty(); ASSERT(party != 0L);
	PartnerUnit* unitPc2 = (PartnerUnit*)party->pcUnit(MyParty::PC_PTN);
	unitPc2->equipBest();
}
/*---------------------------------------------------------------------*//**
	フレーム制御
**//*---------------------------------------------------------------------*/
void StMod10401::exec(ExecRes* res, const ExecCtx* ec)
{
	if(Game::getGame()->getMoveMap()->getCurMapId() == MapIdDef::MAPID_EP01_FOREST4_EXIT_SQUARE)	// シネンの森出口広場マップ
	{
		SaveData* svd = Game::getGame()->getSaveSys()->getSaveData(); ASSERT(svd != 0L);
		if(	svd->getSaveF(SaveIdDef::SFID_ST10401_DONE_YASAN_THANK) &&	// ヤサンイベントが終わっている
			!svd->getSaveF(SaveIdDef::SFID_ST10204_MEET_KOTSUME) )		// コツメが合流していない
		{
			UnitManager* unitmng = Game::getGame()->getUnitManager(); ASSERT(unitmng != 0L);
			if(!unitmng->checkEnableEnemy())	// 有効な敵がいない場合のみ
			{
				// キャラクタの位置によってイベント起動
				const PcUnit* unitLeader = Game::getGame()->getMyParty()->getLeaderPcUnit();
				if(unitLeader != 0L)
				{
					const Vector3F* posLeader = unitLeader->getPosition();
					if(posLeader->x() <= 2700.0f)	// 大猿に近づいた
					{
						// 次のイベント起動確認
						do
						{
							// 通常歩行時以外(ソウマ詠唱中や対決中など)は失敗
							GameMode::ModeKind kindEnd = Game::getGame()->getGameMode()->getChildEndModeKind();
							if(kindEnd != GameMode::MODE_GAME_INGAME_WALKING_NORMAL)	{	break;	}

							Party* party = Game::getGame()->getMyParty();
							// アサダウン中は失敗
							if(party->getPcUnit(MyParty::PC_MY)->getCharStat()->getStat() != CharStat::STAT_ALIVE)	{	break;	}
							// コルポダウン中は失敗
							if(party->getPcUnit(MyParty::PC_PTN)->getCharStat()->getStat() != CharStat::STAT_ALIVE)	{	break;	}

							// イベント起動
							EventSys* evsys = Game::getGame()->getEventSys(); ASSERT(evsys != 0L);
							EvCause evcause(EventCause::CID_NULL);
							evsys->begin(EVID_KOTSUME_MEET_AGAIN, 0, &evcause);
						}
						while(false);
					}
				}
			}
		}
	}

	StMod10000::exec(res, ec);
}
SRCR_BEGIN_NS

////////////////////////////////////////////////////////////////////////////
// クラス

//==========================================================================
// Char1401_Ungetsuiwa_EnemySpirit メソッド

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// 外部サービス

/*---------------------------------------------------------------------*//**
	次の対決時行動の取得
**//*---------------------------------------------------------------------*/
s16 Char1401_Ungetsuiwa_EnemySpirit::decideNextConfrontAction()
{
	// 倦怠時は攻撃のみ
	if(TFW_IS_FLAG(getCharStat()->getSpStatFlags(), CharStat::SPSTAT_HEAVY))
	{
		return EnemyMode::ACT_ATTACK;
	}
	else
	{
		// 相手が一人のときは攻撃のみ
		Party* party = Game::getGame()->getMyParty();
		if(party != 0L)
		{
			int cnt = 0;
			for(int i = 0; i < party->getPcNum(); i++)
			{
				if((party->getPcUnit(i) != 0L) && party->getPcUnit(i)->isEnable())
				{
					cnt++;
				}
			}
			if(cnt <= 1)
			{
				return EnemyMode::ACT_ATTACK;
			}
		}

		// 通常判定
		return SkilledEnemySpiritBase::decideNextConfrontAction();
	}
}
/*---------------------------------------------------------------------*//**
	アイテム譲渡処理
**//*---------------------------------------------------------------------*/
void MapEmp_10243_1002_HandoverItemToCollector::handoverItem(const Item* item)
{
    const ItemDef* itmdef = (item != 0L) ? item->getItemDef() : 0L;
    if(itmdef == 0L)
    {
        // キャンセルイベントへ
        EvCause evcause(EventCause::CID_EVENT);
        getOwner()->begin(EVID_CANCELED, 0, &evcause);
        return;
    }

    // 石以外は拒否
    if(itmdef->getCategory() != ItemDef::CAT_STONE)
    {
        EvCause evcause(EventCause::CID_EVENT);
        getOwner()->begin(EVID_CANCELED, 0, &evcause);
        return;
    }

    // 経験値取得
    u16 exp = itmdef->getPrice() / 20;
    if(exp < 3)	{
        exp = 3;
    }
    Conductor* conductor = Game::getGame()->getConductor();
    ASSERT(conductor != 0L);
    conductor->onExperienceNow(exp);

    // トロフィー処理
#if defined(_ENLIGHT_V01) && ENABLE_PSNS
    Game::getGame()->getTrophy()->achievementTrophy(Trophy::TI_ITEM_ADEPT_3_EXCHANGED_FOR_EXP, 100);
#endif

    // アイテム消滅
    Party* party = Game::getGame()->getMyParty();
    ASSERT(party != 0L);
    ItemManager* itmmng = party->getItemManager();
    ASSERT(itmmng != 0L);
    itmmng->removeItem(item->getItemGenId());	// アイテムを失う

    // 返答イベントへ
    EvCause evcause(EventCause::CID_EVENT);
    getOwner()->begin(exp >= 20 ? EVID_SUCCEEDED_GOOD : EVID_SUCCEEDED_BAD, 0, &evcause);
}
Exemple #14
0
Party* Party::NewPartyFromData(Data data)
{
  Party* party = new Party;
  
  party->name = data["name"].Value();
  for_each(data["members"].begin(), data["members"].end(), [party](Data member_data)
  {
    unsigned int count = member_data.Or(1);
    unsigned int clones = 0;

    for (; clones < count ; ++clones)
    {
      stringstream unique_name;

      unique_name << "member-" << party->name << "-" << count;
      party->Join(member_data.Key(), unique_name.str());
    }
  });
  return (party);
}
Exemple #15
0
void
RoomContainer::_LoadActors()
{
	std::cout << "Loading Actors...";
	std::flush(std::cout);

	// TODO: Check if it's okay
	Party* party = Game::Get()->Party();
	for (uint16 a = 0; a < party->CountActors(); a++) {
		party->ActorAt(a)->SetArea(fArea->Name());
		Core::Get()->RegisterObject(party->ActorAt(a));
	}

	for (uint16 i = 0; i < fArea->CountActors(); i++) {
		Actor* actor = fArea->GetActorAt(i);
		actor->SetArea(fArea->Name());
		Core::Get()->RegisterObject(actor);
	}

	std::cout << "Done!" << std::endl;
}
/*---------------------------------------------------------------------*//**
	セーブストラクチャーから読み込む
**//*---------------------------------------------------------------------*/
bool ItemEquip::restoreFromStructure(const SaveStructure* svst)
{
	ASSERT(sizeof(SaveStructure) == SaveStructure::SIZE_THIS);

	Party* party = Game::getGame()->getMyParty();
	if(party == 0L)	{	ASSERT(party != 0L);	return false;	}
	_eqstat->restoreFromStructure(&svst->_eqssvst, party->getItemManager());

	// ユニット化
	for(int ieqp = 0; ieqp < EquipPlace::NUM_EQP; ieqp++)
	{
		_spidarrEq[ieqp] = svst->_spid[ieqp];

		Item* item = _eqstat->equipItem(ieqp);
		if(item != 0)
		{
			unitization(ieqp, item, _spidarrEq[ieqp]);
		}
	}

	return true;
}
Exemple #17
0
void Being::setParty(Party *party)
{
    if (party == mParty)
        return;

    Party *old = mParty;
    mParty = party;

    if (old)
    {
        old->removeMember(mId);
    }

    updateColors();

    if (this == local_player && socialWindow)
    {
        if (old)
            socialWindow->removeTab(old);

        if (party)
            socialWindow->addTab(party);
    }
}
Exemple #18
0
int main() // PLEASE DO NOT MODIFY THE MAIN FUNCTION
{
	Party *myparty = PartyFactory::factory("dinner"); // Create a dinner party with the party factory

	// Let's add a couple of people to the dinner party, and store their tickets in variables
	PartyTicket *ticket1 = myparty->add("Mike");
	PartyTicket *ticket2 = myparty->add("Jane");
	PartyTicket *ticket3 = myparty->add("Antonio");
	PartyTicket *ticket4 = myparty->add("Sue");

	cout << "Party before Jane leaves\n";
	myparty->list(); // List the people currently in the dinner party
	//_sleep(2000);
	// Jane decides to leave the party. Darn!  She was really fun to have around!
	ticket2->leave();

	cout << "Party after Jane leaves:\n";
	myparty->list(); // List the people left in the dinner party
	//_sleep(2000);
}
Exemple #19
0
void Creature::onDeath()
{
	bool lastHitUnjustified = false;
	bool mostDamageUnjustified = false;
	Creature* lastHitCreature = g_game.getCreatureByID(lastHitCreatureId);
	Creature* lastHitCreatureMaster;
	if (lastHitCreature) {
		lastHitUnjustified = lastHitCreature->onKilledCreature(this);
		lastHitCreatureMaster = lastHitCreature->getMaster();
	} else {
		lastHitCreatureMaster = nullptr;
	}

	Creature* mostDamageCreature = nullptr;

	const int64_t timeNow = OTSYS_TIME();
	const uint32_t inFightTicks = g_config.getNumber(ConfigManager::PZ_LOCKED);
	int32_t mostDamage = 0;
	std::map<Creature*, uint64_t> experienceMap;
	for (const auto& it : damageMap) {
		if (Creature* attacker = g_game.getCreatureByID(it.first)) {
			CountBlock_t cb = it.second;
			if ((cb.total > mostDamage && (timeNow - cb.ticks <= inFightTicks))) {
				mostDamage = cb.total;
				mostDamageCreature = attacker;
			}

			if (attacker != this) {
				uint64_t gainExp = getGainedExperience(attacker);
				if (Player* player = attacker->getPlayer()) {
					Party* party = player->getParty();
					if (party && party->getLeader() && party->isSharedExperienceActive() && party->isSharedExperienceEnabled()) {
						attacker = party->getLeader();
					}
				}

				auto tmpIt = experienceMap.find(attacker);
				if (tmpIt == experienceMap.end()) {
					experienceMap[attacker] = gainExp;
				} else {
					tmpIt->second += gainExp;
				}
			}
		}
	}

	for (const auto& it : experienceMap) {
		it.first->onGainExperience(it.second, this);
	}

	if (mostDamageCreature) {
		if (mostDamageCreature != lastHitCreature && mostDamageCreature != lastHitCreatureMaster) {
			Creature* mostDamageCreatureMaster = mostDamageCreature->getMaster();
			if (lastHitCreature != mostDamageCreatureMaster && (lastHitCreatureMaster == nullptr || mostDamageCreatureMaster != lastHitCreatureMaster)) {
				mostDamageUnjustified = mostDamageCreature->onKilledCreature(this, false);
			}
		}
	}

	bool droppedCorpse = dropCorpse(lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);
	death(lastHitCreature);

	if (master) {
		master->removeSummon(this);
	}

	if (droppedCorpse) {
		g_game.removeCreature(this, false);
	}
}
/*---------------------------------------------------------------------*//**
	呼び出し通知
**//*---------------------------------------------------------------------*/
bool MenuFuncTable_Focus::onCall(smenu::Menu* menu, const ExecCtx* ec, smenu::MenuTreeNode* mtnodeCall, smenu::MenuTreeNode* mtnodeParent, void* objCreateParam, void* objShowParam)
{
	const GameExecCtx* gec = (const GameExecCtx*)ec;
	const VcString* cmd = mtnodeCall->getName();
	GameMode* gmode = Game::getGame()->getGameMode();
	GameMenuShowParam* showprm = (GameMenuShowParam*)objShowParam;

	if( cmd->equals("Focus") )
	{
		if(showprm->_unitRef != 0L)
		{
			// フォーカスをセットする
			GameGui* gui = Game::getGame()->getGui();	ASSERT(gui != 0L);
			FocusCursor* fccsr = gui->getFocusCursor();
			fccsr->setFocus(0, showprm->_unitRef);
		}
	}
	else if( cmd->equals("FocusWeapon") )
	{
		if(showprm->_unitRef != 0L)
		{
			ASSERT(TFW_IS_FLAG(showprm->_unitRef->getUnitFlags(), Unit::UNITFLAG_PC));	// 現状では PcUnit のはず
			if(TFW_IS_FLAG(showprm->_unitRef->getUnitFlags(), Unit::UNITFLAG_PC))
			{
				PcUnit* unitPc = (PcUnit*)showprm->_unitRef;
				s32 ieqp = EquipPlace::EQP_RHAND;	// 現状では右手装備のみ対応
				const ItemEquip* itmeq = unitPc->getItemEquip();
				if(itmeq != 0L)
				{
					const Item* item = itmeq->getEquipStat()->getEquipItem(ieqp);
					if(item != 0L)
					{
						// 装備品は存在する
						Unit* unitWep = itmeq->getEquipUnit(ieqp);
						// フォーカスをセットする
						GameGui* gui = Game::getGame()->getGui();	ASSERT(gui != 0L);
						FocusCursor* fccsr = gui->getFocusCursor();
						fccsr->setFocus(0, unitWep);
					}
				}
			}
		}
	}
	else if( cmd->equals("Fight") )
	{
		if(showprm->_unitRef != 0L)
		{
			Confront* cf = Game::getGame()->getConfront(); ASSERT(cf != 0L);
			bool isFound = false;
			const UnitArray* uaTrg = cf->getTargets();
			for(int i = 0; i < uaTrg->getCount(); i++)
			{
				if(uaTrg->getUnit(i) == showprm->_unitRef)
				{
					isFound = true;
				}
			}
			// ゲーム本体に対決通知を送り、モードを変更する
			if(!isFound)
			{
				Party* party = Game::getGame()->getMyParty(); ASSERT(party != 0L);
				Game::getGame()->getConfront()->start(showprm->_unitRef, 0, party->getLeaderPcUnit());
			}
		}
	}
	else if( cmd->equals("Talk") || cmd->equals("Check") )
	{
		Unit* unitRef = showprm->_unitRef;
		if(unitRef != 0L)
		{
			if(TFW_IS_FLAG(unitRef->getUnitFlags(), Unit::UNITFLAG_NPC))
			{
				NpcCharUnit* npc = (NpcCharUnit*)unitRef;
				// こちらに注目させる
				if(cmd->equals("Talk") && (npc->getSpirit() != 0))
				{
					npc->spirit()->setFocusUnit(Game::getGame()->getMyParty()->leaderPcUnit(), false);
				}
				// 話す、もしくは拾う
				PlacementObj* pobj = npc->getPlacementObj();
				const EventIdInfoArray::EventIdInfo* cii = pobj->getCallEvi()->getInfo(pobj->getActiveCallEviIndex());
				if(cii != 0L)
				{
					EventSys* evsys = Game::getGame()->getEventSys();
					EvCause evcause(EventCause::CID_FOCUSMENU);
					evcause.setParameter(npc);
					Game::getGame()->getMyParty()->animUnitOnEvent(npc, cii->getEvid());	// ユニットを注視
					evsys->begin(cii->getEvid(), cii->getEventParam(), &evcause);
					pobj->nextCallEvi(false);	// イベントを次へ
				}
			}
		}
	}
	else if( cmd->equals("Leader") )
	{
		// リーダーを設定する
		Party* party = Game::getGame()->getMyParty(); ASSERT(party != 0L);
		s32 ipc = party->findPcUnit(showprm->_unitRef);
		if(ipc >= 0)
		{
			party->setLeader(ipc);
		}
	}
	else if( cmd->equals("Souma") )
	{
		// ソウマ入力へモード変更
		GameModeParam* gmparam = (GameModeParam*)gmode->getParameter();
		gmparam->setFocusMenuUnit(showprm->_unitRef);
		if(Game::getGame()->isConfront())
		{
			gec->getGameMode()->changeEndMode(GameMode::MODE_GAME_INGAME_CONFRONT_MAGICTYPING);
		}
		else
		{
			gec->getGameMode()->changeEndMode(GameMode::MODE_GAME_INGAME_WALKING_MAGICTYPING);
		}
	}
	else if( cmd->equals("Meditation") )
	{
		Spirit* sprt = showprm->_unitRef->spirit();
		sprt->startBehavior(Spirit::BEHV_MEDITATION, 0L);
	}
	else if( cmd->equals("GuardCharge") )
	{
		Spirit* sprt = showprm->_unitRef->spirit();
		sprt->startBehavior(Spirit::BEHV_GUARD_CHARGE, 0L);
	}
	else if( cmd->equals("Attract") )
	{
		Spirit* sprt = showprm->_unitRef->spirit();
		sprt->startBehavior(Spirit::BEHV_ATTRACT, 0L);
	}
	else if( cmd->equals("CureParty") )
	{
		Spirit* sprt = showprm->_unitRef->spirit();
		sprt->startBehavior(Spirit::BEHV_CURE, 0L);
	}
	else if( cmd->equals("Item") )
	{
		// アイテム使用モードへ変更
		GameModeParam* gmparam = (GameModeParam*)gmode->getParameter();
		gmparam->setFocusMenuUnit(showprm->_unitRef);
		if(Game::getGame()->isConfront())
		{
			gec->getGameMode()->changeEndMode(GameMode::MODE_GAME_INGAME_CONFRONT_ITEMUSING);
		}
		else
		{
			gec->getGameMode()->changeEndMode(GameMode::MODE_GAME_INGAME_WALKING_ITEMUSING);
		}
	}
	else if( cmd->equals("StopBehavior") )
	{
		Spirit* sprt = showprm->_unitRef->spirit();
		sprt->breakBehavior(Spirit::BEHV_NULL, true, false);	// BEHV_NULL は全てを対象とした汎用中断
	}
	else if( cmd->equals("Pick") )
	{
		// アイテムを拾う
		Unit* unitRef = showprm->_unitRef;
		if(unitRef != 0L)
		{
			if(unitRef->getUnitType() == UNITTYPE_PUT_ITEM)
			{
				Party* party = Game::getGame()->getMyParty(); ASSERT(party != 0L);
				const Unit* unitActor = party->getPcUnit(0);
				ItemManager* itmmng = party->getItemManager(); ASSERT(itmmng != 0L);
				PutItemUnit* ditmu = (PutItemUnit*)unitRef;
				if(itmmng->pickupItem(Game::getGame()->getMap(), ditmu->getPlacementObj(), ditmu->getEleneStat()))
				{
					// 成功
					ditmu->setPlacementObj(0L);
					ditmu->setEnable(false);

					// メッセージを表示する
					const ItemDef* itmdf = ditmu->getItemDef();	ASSERT(itmdf != 0L);
					VcString msg(VcString::format(GameFixedStrTbl::getString(GameFixedStrTbl::SID_GET_SOMETHING)->getRaw(), itmdf->getName(Env_getLangId())->getRaw(), "\n"));
					Game::getGame()->getConductor()->on(&msg, unitActor, 0);

					// 通知発行
					Game::getGame()->getGameNotifier()->notifyPickupItem(unitActor, ditmu);
					// クエストの可変達成状態の更新
					QuestManager* qsmng = Game::getGame()->getQuestManager();
					qsmng->updateVariableAchievementState();
				}
				else
				{
					// 失敗
					GameSysMsgWindow* wndSysMsg = (GameSysMsgWindow*)Game::getGame()->getGui()->getSysMsgWindow(); ASSERT(wndSysMsg != 0L);
					VcString msg(VcString::format(GameFixedStrTbl::getString(GameFixedStrTbl::SID_ERROR_ITEM_FULL)->getRaw(), ""));
					wndSysMsg->showStdMsg(&msg);	// メッセージ表示
				}
			}
		}
	}

	return true;
}
SRCR_BEGIN_NS

////////////////////////////////////////////////////////////////////////////
// クラス

//==========================================================================
// WorldMapStateUpdaterVol01 メソッド

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// 内部制御

/*---------------------------------------------------------------------*//**
	ワールドマップ開始通知
**//*---------------------------------------------------------------------*/
void WorldMapStateUpdaterVol01::notifyBegin(WorldMap* worldmap)
{
    StoryManager* strymng = Game::getGame()->getStoryManager();
    ASSERT(strymng != 0L);
    SaveSys* svsys = Game::getGame()->getSaveSys();
    ASSERT(svsys != 0L);
    SaveData* svdat = (svsys != 0L) ? svsys->getSaveData() : 0L;
    ASSERT(svdat != 0L);
    Party* party = Game::getGame()->getMyParty();
    ASSERT(party != 0L);

    if((strymng == 0L) || (svdat == 0L)) {
        return;
    }

    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    // ストーリーによるスポット更新

    // ストーリースポットを一度クリアする
    worldmap->clearSpot(WorldMap::SPOTKIND_MAINEV);
    worldmap->clearSpot(WorldMap::SPOTKIND_SUBEV);

    s32 stryid = strymng->getCurrentStoryId();
    switch(stryid)
    {
    case 10101:
        // ◆ メインイベント
        if(svdat->getSaveF(SaveIdDef::SFID_ST10101_MEET_CORPO))
        {
            // シネンの森の入口へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_FOREST4_ENTRANCE_SQUARE, WorldMap::SPOTKIND_MAINEV, true);
        }
        else	// コルポと会ってない
        {
            // 寺院入口の橋へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_TEMPLE_BRIDGE, WorldMap::SPOTKIND_MAINEV, true);
        }
        break;
    case 10201:
        // ◆ メインイベント
        // シネンの森の池へ
        worldmap->markSpot(MapIdDef::MAPID_EP01_FOREST4_ROCK_POND, WorldMap::SPOTKIND_MAINEV, true);
        break;
    case 10202:
        // ◆ メインイベント
        ASSERT(party != 0L);
        if(	party->isEnablePc(MyParty::PC_MY) &&
                !party->isEnablePc(MyParty::PC_PTN) &&
                !party->isEnablePc(MyParty::PC_HLP) )
        {
            // シネンの森の池へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_FOREST4_ROCK_POND, WorldMap::SPOTKIND_MAINEV, true);
        }
        else	// 自宅で休む必要あり
        {
            // コメサット村の水の区へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_WATER_WARD, WorldMap::SPOTKIND_MAINEV, true);
        }
        break;
    case 10203:
        // ◆ メインイベント
        // シネンの森の池へ
        worldmap->markSpot(MapIdDef::MAPID_EP01_FOREST4_ROCK_POND, WorldMap::SPOTKIND_MAINEV, true);
        // ◆ サブイベント
        if(!svdat->getSaveF(SaveIdDef::SFID_ST10203_DONE_KABAL_TALK))
        {
            // コメサット村の風の区へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_WIND_WARD, WorldMap::SPOTKIND_SUBEV, true);
        }
        break;
    case 10204:
        // ◆ メインイベント
        if(svdat->getSaveF(SaveIdDef::SFID_ST10204_GET_LUMIN_SOUMA_FROM_HERMIT))
        {
            // シネンの森の池へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_FOREST4_ROCK_POND, WorldMap::SPOTKIND_MAINEV, true);
        }
        else	// 発光ソウマを得ていない
        {
            // 寺院の回廊へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_TEMPLE_CORRIDOR, WorldMap::SPOTKIND_MAINEV, true);
        }
        // ◆ サブイベント
        if(!svdat->getSaveF(SaveIdDef::SFID_ST10204_DONE_KABAL_TALK))
        {
            // コメサット村の風の区へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_WIND_WARD, WorldMap::SPOTKIND_SUBEV, true);
        }
        break;
    case 10301:
        // ◆ メインイベント
        if(svdat->getSaveF(SaveIdDef::SFID_ST10301_READ_CERJA_LETTER))
        {
            // シネンの森の桜へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_FOREST4_BLOSSOMS, WorldMap::SPOTKIND_MAINEV, true);
        }
        else	// セルジャの手紙を読んでいない
        {
            // コメサット村の火の区へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_FIRE_WARD, WorldMap::SPOTKIND_MAINEV, true);
        }
        break;
    case 10302:
        // ◆ メインイベント
        // 寺院の回廊へ
        worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_TEMPLE_CORRIDOR, WorldMap::SPOTKIND_MAINEV, true);
        break;
    case 10303:
        // ◆ メインイベント
        // シネンの森の桜へ
        worldmap->markSpot(MapIdDef::MAPID_EP01_FOREST4_BLOSSOMS, WorldMap::SPOTKIND_MAINEV, true);
        break;
    case 10304:
        // ◆ メインイベント
        // コメサット村の水の区へ
        worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_WATER_WARD, WorldMap::SPOTKIND_MAINEV, true);
        // ◆ サブイベント
        if(!svdat->getSaveF(SaveIdDef::SFID_ST10304_TALK_KABAL_BEFORE_REBECCA))
        {
            // コメサット村の風の区へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_WIND_WARD, WorldMap::SPOTKIND_SUBEV, true);
        }
        break;
    case 10305:
        // ◆ メインイベント
        // シネンの森の桜へ
        worldmap->markSpot(MapIdDef::MAPID_EP01_FOREST4_BLOSSOMS, WorldMap::SPOTKIND_MAINEV, true);
        break;
    case 10306:
        // ◆ メインイベント
        if(svdat->getSaveF(SaveIdDef::SFID_ST10306_TOOK_CERJA_LETTER))
        {
            // シネンの森の桜へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_FOREST4_BLOSSOMS, WorldMap::SPOTKIND_MAINEV, true);
        }
        else	// セルジャの手紙を取得していない
        {
            // コメサット村の火の区へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_FIRE_WARD, WorldMap::SPOTKIND_MAINEV, true);
        }
        break;
    case 10401:
        // ◆ メインイベント
        if(svdat->getSaveF(SaveIdDef::SFID_ST10401_DONE_YASAN_THANK))
        {
            // シネンの森の出口広場へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_FOREST4_EXIT_SQUARE, WorldMap::SPOTKIND_MAINEV, true);
        }
        else	// ヤサンからソースを得ていない
        {
            // コメサット村の水の区へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_WATER_WARD, WorldMap::SPOTKIND_MAINEV, true);
        }
        // ◆ サブイベント
        if(!svdat->getSaveF(SaveIdDef::SFID_ST10401_DONE_KABAL_TALK))
        {
            // コメサット村の風の区へ
            worldmap->markSpot(MapIdDef::MAPID_EP01_BASE_VILLAGE_WIND_WARD, WorldMap::SPOTKIND_SUBEV, true);
        }
        break;
    }

    WorldMapStateUpdaterDefault::notifyBegin(worldmap);
}