void MissionManager::missionFailedEntertainer(PlayerObject* player) { Datapad* datapad = dynamic_cast<Datapad*>(player->getEquipManager()->getEquippedObject(CreatureEquipSlot_Datapad)); if(datapad->hasMission()) //player has a mission { MissionList::iterator it = datapad->getMissions()->begin(); while(it != datapad->getMissions()->end()) { MissionObject* mission = dynamic_cast<MissionObject*>(*it); if(mission->getMissionType() == dancer || mission->getMissionType() == musician) { if(!mission->getInProgress()) { ++it; continue; } if(glm::distance(player->mPosition, mission->getDestination().Coordinates) < 20) { missionFailed(player,mission); it = datapad->removeMission(it); delete mission; return; } } ++it; } } }
void MissionManager::checkDancerMission(PlayerObject* player) { Datapad* datapad = dynamic_cast<Datapad*>(player->getEquipManager()->getEquippedObject(CreatureEquipSlot_Datapad)); if(datapad->hasMission()) //player has a mission { MissionList::iterator it = datapad->getMissions()->begin(); while(it != datapad->getMissions()->end()) { MissionObject* mission = dynamic_cast<MissionObject*>(*it); if(mission->getMissionType() == dancer) { if(mission->getInProgress()) { ++it; continue; } if(glm::distance(player->mPosition, mission->getDestination().Coordinates) < 20) { BuffAttribute* performance_timer = new BuffAttribute(Mission_Timer, 0,0,0); Buff* timer = Buff::SimpleBuff(player, player, 600000, 0, gWorldManager->GetCurrentGlobalTick()); timer->AddAttribute(performance_timer); player->AddBuff(timer); mission->setInProgress(true); } } ++it; } } return; }
ConversationScreen* InformantMissionScreenHandler::handleScreen(CreatureObject* conversingPlayer, CreatureObject* conversingNPC, int selectedOption, ConversationScreen* conversationScreen) { //Get informant level. int informantLevel; if (conversationScreen->getOptionLink(0) == "1") { informantLevel = 1; } else if (conversationScreen->getOptionLink(0) == "2") { informantLevel = 2; } else if (conversationScreen->getOptionLink(0) == "3") { informantLevel = 3; } else { error("Informant level incorrect."); return NULL; } //Check if player is bounty hunter. if (!conversingPlayer->hasSkill("combat_bountyhunter_novice")) { conversationScreen->setDialogText(String("@mission/mission_generic:informant_not_bounty_hunter")); } else { //Get bounty mission object if it exists. MissionObject* mission = getBountyMissionObject(conversingPlayer); if (mission == NULL) { //Player has no bounty mission. conversationScreen->setDialogText(String("@mission/mission_generic:informant_no_bounty_mission")); } else { //Check mission level. if (mission->getMissionLevel() < informantLevel) { //Incorrect informant level. conversationScreen->setDialogText(String("@mission/mission_bounty_informant:informant_find_easier")); } else if (mission->getMissionLevel() > informantLevel) { //Incorrect informant level. conversationScreen->setDialogText(String("@mission/mission_bounty_informant:informant_find_harder")); } else { //Player has bounty mission. BountyMissionObjective* objective = cast<BountyMissionObjective*>(mission->getMissionObjective()); if (objective != NULL) { //Run mission logic. if (objective->getObjectiveStatus() == BountyMissionObjective::INITSTATUS) { objective->updateMissionStatus(informantLevel); if (objective->getObjectiveStatus() == BountyMissionObjective::HASBIOSIGNATURESTATUS) { //Player received info about target position. int randomStringValue = System::random(4) + 1; conversationScreen->setDialogText("@mission/mission_bounty_informant:target_easy_" + String::valueOf(randomStringValue)); } else { //Should never happen. error("Bounty mission update failed."); } } else { //Player has already got the target position. conversationScreen->setDialogText(String("@mission/mission_generic:informant_no_bounty_mission")); } } else { //Player has already got the target position. conversationScreen->setDialogText(String("@mission/mission_generic:informant_no_bounty_mission")); } } } } return conversationScreen; }
ConversationScreen* DeliverMissionScreenHandler::handleScreen(CreatureObject* conversingPlayer, CreatureObject* conversingNPC, int selectedOption, ConversationScreen* conversationScreen) { //Get relevant mission object if it exists. MissionObject* mission = getRelevantMissionObject(conversingPlayer, conversingNPC); if (mission == NULL) { //NPC is not related to any mission for this player. int randomAnswer = System::random(4); conversationScreen->setDialogText("@mission/mission_generic:deliver_incorrect_player_" + String::valueOf(randomAnswer)); } else { //NPC is related to a mission for this player. Reference<DeliverMissionObjective*> objective = cast<DeliverMissionObjective*>(mission->getMissionObjective()); if (objective != NULL) { Locker locker(objective, conversingPlayer); //Run mission logic. String text; if (isTargetNpc(objective, conversingNPC->getPosition())) { //Target NPC. if (objective->getObjectiveStatus() == DeliverMissionObjective::INITSTATUS) { //Update mission objective status. objective->updateMissionStatus(conversingPlayer); //Converse with the player. performPickupConversation(conversationScreen, mission); } else { //Target NPC already talked to. text = "@mission/mission_generic:deliver_already_picked_up"; conversationScreen->setDialogText(text); } } else { //Destination NPC. if (objective->getObjectiveStatus() == DeliverMissionObjective::PICKEDUPSTATUS) { //Update mission objective status. objective->updateMissionStatus(conversingPlayer); if (objective->getObjectiveStatus() == DeliverMissionObjective::DELIVEREDSTATUS) { //Item delivered. performDeliverConversation(conversationScreen, mission); } else { //Item not found. text = "@mission/mission_generic:give_item"; conversationScreen->setDialogText(text); } } else if (objective->getObjectiveStatus() == DeliverMissionObjective::INITSTATUS) { //Item not picked up yet. text = "@mission/mission_generic:give_item"; conversationScreen->setDialogText(text); } else { //Item already dropped off. text = "@mission/mission_generic:deliver_already_dropped_off"; conversationScreen->setDialogText(text); } } } } return conversationScreen; }
void GroupManager::sendGroupMissionUpdate(GroupObject* group) { // this procedure ensures, that in case of a change in the mission pool of the group // all players get updated Mission waypoints // it concerns all players of the group on the zone, but not on other zones //get us the mission nearest to the most players on the Zone MissionObject* mission = getZoneGroupMission(group->getPlayerList()); if(!mission) return; //now set the GroupWaypoint for all onZone groupmembers Uint64List::iterator playerListIt = group->getPlayerList()->begin(); while(playerListIt != group->getPlayerList()->end()) { PlayerObject* player = dynamic_cast<PlayerObject*> (gWorldManager->getObjectById((*playerListIt))); Datapad* datapad = dynamic_cast<Datapad*>(player->getEquipManager()->getEquippedObject(CreatureEquipSlot_Datapad)); WaypointObject* waypoint = datapad->getWaypointByName("@group:groupwaypoint"); // remove the old one if(waypoint) { gMessageLib->sendUpdateWaypoint(waypoint,ObjectUpdateAdd,player); datapad->removeWaypoint(waypoint); gObjectFactory->deleteObjectFromDB(waypoint); } else // create a new one if(datapad->getCapacity()) { datapad->requestNewWaypoint("@group:groupwaypoint",mission->getDestination().Coordinates,static_cast<uint16>(gWorldManager->getZoneId()),Waypoint_blue); gMessageLib->sendSystemMessage(player,L"","group","groupwaypoint"); } playerListIt++; } }
/* * Player aborted the mission */ void MissionManager::missionAbort(PlayerObject* player, uint64 mission_id) { gLogger->logMsg("ABORT MISSION"); Datapad* datapad = dynamic_cast<Datapad*>(player->getEquipManager()->getEquippedObject(CreatureEquipSlot_Datapad)); MissionObject* mission = datapad->getMissionById(mission_id); if(mission) { datapad->removeMission(mission); gMessageLib->sendSystemMessage(player,L"","mission/mission_generic","incomplete"); gMessageLib->sendSetWaypointActiveStatus(mission->getWaypoint(),false,player); gMessageLib->sendMissionAbort(mission,player); gMessageLib->sendContainmentMessage(mission->getId(), datapad->getId(), 4, player); gMessageLib->sendDestroyObject(mission_id,player); delete mission; } else { gLogger->logMsg("ERROR: Attempt to abort an invalid mission, with id %.8X, from the datapad.", static_cast<int>(mission_id)); } return; }
/* * Player opened a mission terminal or pressed refresh */ void MissionManager::listRequest(PlayerObject* player, uint64 terminal_id,uint8 refresh_count) { Terminal* terminal = dynamic_cast<Terminal*> (gWorldManager->getObjectById(terminal_id)); //uint32 terminal_type = terminal->getTerminalType(); int8 terminal_name[255]; strcpy(terminal_name,terminal->getName().getAnsi()); gLogger->logMsgF("Terminal id %"PRIu64" is type '%s'", MSG_NORMAL, terminal_id, terminal_name); int count = 0; int len = strlen(terminal_name); MissionBag* mission_bag = dynamic_cast<MissionBag*>(player->getEquipManager()->getEquippedObject(CreatureEquipSlot_MissionBag)); MissionList::iterator it = mission_bag->getMissions()->begin(); while(it != mission_bag->getMissions()->end()) { MissionObject* mission = dynamic_cast<MissionObject*>(*it); mission->clear(); mission->setIssuingTerminal(terminal); mission->setRefreshCount(refresh_count); switch(len) { case 16: //terminal_mission count < 5 ? generateDestroyMission(mission,terminal_id) : generateDeliverMission(mission); break; case 22: //terminal_mission_scout if (count < 5) { mission->setRefreshCount(0); } else { generateReconMission(mission); } break; case 24: //terminal_mission_artisan count < 5 ? generateCraftingMission(mission) : generateSurveyMission(mission); break; case 28: //terminal_mission_entertainer generateEntertainerMission(mission,count); break; default: gLogger->logMsgF("Terminal id %"PRIu64" is type '%s'", MSG_NORMAL, terminal_id, terminal_name); mission->setRefreshCount(0); } gMessageLib->sendMISO_Delta(mission, player); count++; ++it; } }
void MissionManager::checkSurveyMission(PlayerObject* player,CurrentResource* resource,ResourceLocation highestDist) { Datapad* datapad = dynamic_cast<Datapad*>(player->getEquipManager()->getEquippedObject(CreatureEquipSlot_Datapad)); if(datapad->hasMission()) //player has a mission { MissionList::iterator it = datapad->getMissions()->begin(); while(it != datapad->getMissions()->end()) { MissionObject* mission = dynamic_cast<MissionObject*>(*it); if(mission->getMissionType() == survey) { if(mission->getTargetResource() == resource->getType()) { if(mission->getDifficulty() <= (highestDist.ratio*100)) { if(glm::distance(mission->getIssuingTerminal()->mPosition, highestDist.position) > 1024) { gLogger->logMsg("PE > 500: ready to apply new BF/wound dmg"); missionComplete(player,mission); it = datapad->removeMission(it); delete mission; return; } else { int8 sm[500]; sprintf(sm,"That resource pocket is too close (%"PRIu32" meters) to the mission giver to be useful to them. Go find one at least %"PRIu32" meters away to complete your survey mission. ", static_cast<uint32>(glm::distance(mission->getIssuingTerminal()->mPosition, highestDist.position)), (1024 - (int)glm::distance(mission->getIssuingTerminal()->mPosition, highestDist.position))); string s = BString(sm); s.convert(BSTRType_Unicode16); gMessageLib->sendSystemMessage(player,s); } } } } ++it; } } }
bool MissionManager::checkCraftingMission(PlayerObject* player,NPCObject* npc) { Datapad* datapad = dynamic_cast<Datapad*>(player->getEquipManager()->getEquippedObject(CreatureEquipSlot_Datapad)); if(datapad->hasMission()) //player has a mission { MissionList::iterator it = datapad->getMissions()->begin(); while(it != datapad->getMissions()->end()) { MissionObject* mission = dynamic_cast<MissionObject*>(*it); if(mission->getMissionType() == crafting) { if(mission->getStartNPC() == npc) { //This is the start npc for the deliver mission char mp[10]; sprintf(mp,"m%dp",mission->getNum()); gMessageLib->sendSpatialChat(npc,player,L"",mission->getTitleFile(),mp); mission->setStartNPC(NULL); gMessageLib->sendSystemMessage(player,L"","mission/mission_generic","deliver_received_data"); MissionObject* updater = new MissionObject(); updater->clear(); updater->setId(mission->getId()); updater->getWaypoint()->setId(mission->getId()+1); updater->getWaypoint()->setCoords(mission->getDestination().Coordinates); updater->getWaypoint()->setPlanetCRC(mission->getDestination().PlanetCRC); char name[150]; sprintf(name, "@%s:%s",mission->getTitleFile().getRawData(),mission->getTitle().getRawData()); updater->getWaypoint()->setName(name); updater->getWaypoint()->setActive(true); gMessageLib->sendMISO_Delta(updater,player); delete updater; return true; } else if(mission->getDestinationNPC() == npc && mission->getStartNPC() == NULL) { //This is the end npc for the deliver mission. char mr[10]; sprintf(mr,"m%dr",mission->getNum()); gMessageLib->sendSpatialChat(npc,player,L"",mission->getTitleFile(),mr); missionComplete(player,mission); mission->setDestinationNPC(NULL); it = datapad->removeMission(it); delete mission; return true; } } ++it; } } return false; }
/* * Player Accepted Mission */ void MissionManager::missionRequest(PlayerObject* player, uint64 mission_id) { Datapad* datapad = dynamic_cast<Datapad*>(player->getEquipManager()->getEquippedObject(CreatureEquipSlot_Datapad)); //Move the mission from the player's mission bag to his datapad. MissionBag* mission_bag = dynamic_cast<MissionBag*>(player->getEquipManager()->getEquippedObject(CreatureEquipSlot_MissionBag)); MissionObject* mission = mission_bag->getMissionById(mission_id); if(mission == NULL) { gLogger->logMsgF("ERROR: Failed to retrieve mission with id %"PRIu64". Unable to accept mission!", MSG_HIGH, mission_id); return; } //automatically checks the datapads capacity if(!datapad->addMission(mission)) { gMessageLib->sendSystemMessage(player,L"","mission/mission_generic","too_many_missions"); return; } mission_bag->removeMission(mission); gMessageLib->sendContainmentMessage(mission->getId(), datapad->getId(), 0xffffffff, player); //Replace it with a new mission. mission_bag->spawnNAdd(); //Send MissionGenericResponse to tell the client its been accepted gMessageLib->sendMissionGenericResponse(mission,player); //Update the name and mission waypoint MissionObject* updater = new MissionObject(); updater->clear(); updater->setId(mission->getId()); updater->setNameFile(mission->getTitleFile().getRawData()); updater->setName(mission->getTitle().getRawData()); if(mission->getMissionType() != survey) { updater->getWaypoint()->setId(mission->getId()+1); if(mission->getMissionType() == deliver || mission->getMissionType() == crafting) { updater->getWaypoint()->setCoords(mission->getStart().Coordinates); updater->getWaypoint()->setPlanetCRC(mission->getStart().PlanetCRC); } else { updater->getWaypoint()->setCoords(mission->getDestination().Coordinates); updater->getWaypoint()->setPlanetCRC(mission->getDestination().PlanetCRC); } char name[150]; sprintf(name, "@%s:%s",mission->getTitleFile().getRawData(),mission->getTitle().getRawData()); updater->getWaypoint()->setName(name); updater->getWaypoint()->setActive(true); } else { gMessageLib->sendSystemMessage(player,L"","mission/mission_generic","survey_start"); } //Accept the mission let the player know gMessageLib->sendPlayMusicMessage(WMSound_Mission_Accepted,player); //3887, 'sound/music_mission_accepted.snd' gMessageLib->sendMISO_Delta(updater,player); mission->sendAttributes(mission->getOwner()); delete updater; if(mission->getMissionType() == recon) mission->setTaskId(gWorldManager->addMissionToProcess(mission)); //check if we need to inform our group if((mission->getMissionType() == destroy)&&(player->getGroupId() != 0)) { // we are in a group and just accepted a destroy mission // check the missions and update the nearest waypoint GroupObject* group = gGroupManager->getGroupObject(player->getGroupId()); gGroupManager->sendGroupMissionUpdate(group); } return; }
MissionObject* GroupManager::getZoneGroupMission(std::list<uint64>* members) { // we will iterate through all onZone groupmembers and compile a list of missions // we will find the mission nearest to the most players // and set the waypoints accordingly MissionObject* chosenMission = NULL; uint32 chosenRubberPoints = 0; if(!members->size()) return NULL; MissionGroupRangeList missionRangeList; //compile the missionlist Uint64List::iterator playerListIt = members->begin(); while(playerListIt != members->end()) { PlayerObject* groupMember = dynamic_cast<PlayerObject*> (gWorldManager->getObjectById((*playerListIt))); if(!groupMember) { playerListIt++; continue; } Datapad* datapad = dynamic_cast<Datapad*>(groupMember->getEquipManager()->getEquippedObject(CreatureEquipSlot_Datapad)); MissionList* missionList = datapad->getMissions(); MissionList::iterator missionListIt = missionList->begin(); //add all Missions of the player to our List while(missionListIt != missionList->end()) { //the rubber point counter will be set to 0 initially missionRangeList.push_back(std::make_pair((*missionListIt),0)); missionListIt++; } playerListIt++; } //do we have missions in the first place ? if(!missionRangeList.size()) return NULL; //now iterate through all players and determine their nearest mission playerListIt = members->begin(); while(playerListIt != members->end()) { PlayerObject* groupMember = dynamic_cast<PlayerObject*> (gWorldManager->getObjectById((*playerListIt))); //now check for the nearest mission - increase its counter MissionGroupRangeList::iterator missionRangeListIt = missionRangeList.begin(); MissionGroupRangeList::iterator missionRangeListStorage = missionRangeList.begin(); while(missionRangeListIt != missionRangeList.end()) { MissionObject* nearestMission = NULL; float nearestDistance = 88000.0; MissionObject* currentMission = (*missionRangeListIt).first; float currentDistance = glm::distance(groupMember->mPosition, currentMission->getDestination().Coordinates); //store the nearest Mission if(currentDistance < nearestDistance) { nearestDistance = currentDistance; nearestMission = currentMission; //store the lists iterator for future reference missionRangeListStorage = missionRangeListIt; } missionRangeListIt++; } //now take the nearest Mission and give it a rubberpoint (*missionRangeListStorage).second++; //does our mission have enough rubberpoints? if((*missionRangeListStorage).second > (uint32)(members->size() /2)) { //jupp :) return (*missionRangeListStorage).first; } //remember the mission with the most rubberpoints anyway in case we dont have a clear winner if((*missionRangeListStorage).second > chosenRubberPoints) { chosenRubberPoints = (*missionRangeListStorage).second; chosenMission = (*missionRangeListStorage).first; } playerListIt++; } return chosenMission; }
void ObjectController::_handleGetAttributesBatch(uint64 targetId,Message* message,ObjectControllerCmdProperties* cmdProperties) { PlayerObject* playerObject = dynamic_cast<PlayerObject*>(mObject); BString requestStr; BStringVector dataElements; BStringVector dataElements2; uint16 elementCount; message->getStringUnicode16(requestStr); requestStr.convert(BSTRType_ANSI); requestStr.getRawData()[requestStr.getLength()] = 0; elementCount = requestStr.split(dataElements,' '); if(!elementCount) { return; } Message* newMessage; for(uint16 i = 0; i < elementCount; i++) { uint64 itemId = boost::lexical_cast<uint64>(dataElements[i].getAnsi()); Object* object = gWorldManager->getObjectById(itemId); if(object == NULL) { // could be a resource Resource* resource = gResourceManager->getResourceById(itemId); if(resource != NULL) { resource->sendAttributes(playerObject); continue; } //could be a schematic! Datapad* datapad = playerObject->getDataPad(); ManufacturingSchematic* schem = datapad->getManufacturingSchematicById(itemId); if(schem != NULL) { schem->sendAttributes(playerObject); continue; } MissionObject* mission = datapad->getMissionById(itemId); if(mission != NULL) { mission->sendAttributes(playerObject); continue; } IntangibleObject* data = datapad->getDataById(itemId); if(data != NULL) { data->sendAttributes(playerObject); continue; } // TODO: check our datapad items if(playerObject->isConnected()) { // default reply for schematics gMessageFactory->StartMessage(); gMessageFactory->addUint32(opAttributeListMessage); gMessageFactory->addUint64(itemId); gMessageFactory->addUint32(0); //gMessageFactory->addUint16(0); //gMessageFactory->addUint32(40); newMessage = gMessageFactory->EndMessage(); (playerObject->getClient())->SendChannelAUnreliable(newMessage, playerObject->getAccountId(), CR_Client, 8); } //finally, when we are crafting this could be the new item, not yet added to the worldmanager?? if(playerObject->getCraftingSession()) { if(playerObject->getCraftingSession()->getItem()&&playerObject->getCraftingSession()->getItem()->getId() == itemId) { playerObject->getCraftingSession()->getItem()->sendAttributes(playerObject); } } } else { // Tutorial: I (Eru) have to do some hacks here, since I don't know how to get the info of what object the client has selected (by single click) in the Inventory. if (gWorldConfig->isTutorial()) { // Let's see if the actual object is the food item "Melon" in our inventory. if (dynamic_cast<Inventory*>(playerObject->getEquipManager()->getEquippedObject(CreatureEquipSlot_Inventory))->getId() == object->getParentId()) { //uint64 id = object->getId(); // Is it an Item? Item* item = dynamic_cast<Item*>(object); // Check if this item is a food item. if (item) { if (item->getItemFamily() == ItemFamily_Foods) { playerObject->getTutorial()->tutorialResponse("foodSelected"); } } } } object->sendAttributes(playerObject); } } }
//====================================================================================================================== // // create player // bool MessageLib::sendCreatePlayer(PlayerObject* playerObject,PlayerObject* targetObject) { if(!_checkPlayer(targetObject)) return(false); sendCreateObjectByCRC(playerObject,targetObject,false); if(targetObject == playerObject) { sendBaselinesCREO_1(playerObject); sendBaselinesCREO_4(playerObject); } sendBaselinesCREO_3(playerObject,targetObject); sendBaselinesCREO_6(playerObject,targetObject); sendCreateObjectByCRC(playerObject,targetObject,true); sendContainmentMessage(playerObject->getPlayerObjId(),playerObject->getId(),4,targetObject); sendBaselinesPLAY_3(playerObject,targetObject); sendBaselinesPLAY_6(playerObject,targetObject); if(targetObject == playerObject) { sendBaselinesPLAY_8(playerObject,targetObject); sendBaselinesPLAY_9(playerObject,targetObject); } //close the yalp sendEndBaselines(playerObject->getPlayerObjId(),targetObject); sendPostureMessage(playerObject,targetObject); if(playerObject->getParentId()) { sendContainmentMessage(playerObject->getId(),playerObject->getParentId(),4,targetObject); } if(targetObject == playerObject) { // tangible objects if(TangibleObject* hair = dynamic_cast<TangibleObject*>(playerObject->getEquipManager()->getEquippedObject(CreatureEquipSlot_Hair))) { //only create the hair as the helmet will be created at a different time if(hair->getTangibleType() == TanType_Hair) { sendCreateTangible(hair,targetObject); } } // create inventory and contents if(dynamic_cast<TangibleObject*>(playerObject->getEquipManager()->getEquippedObject(CreatureEquipSlot_Inventory))) { sendInventory(playerObject); } // mission bag if(TangibleObject* missionBag = dynamic_cast<TangibleObject*>(playerObject->getEquipManager()->getEquippedObject(CreatureEquipSlot_Mission))) { gMessageLib->sendCreateTangible(missionBag,playerObject); //Now iterate through the missions and create them clientside MissionBag* mbag = dynamic_cast<MissionBag*> (missionBag); MissionList::iterator it = mbag->getMissions()->begin(); while(it != mbag->getMissions()->end()) { MissionObject* mission = dynamic_cast<MissionObject*>(*it); sendCreateObjectByCRC(mission, targetObject, false); sendContainmentMessage(mission->getId(), mbag->getId(), 4, targetObject); sendBaselinesMISO_3(mission, targetObject); sendBaselinesMISO_6(mission, targetObject); sendBaselinesMISO_8(mission, targetObject); sendBaselinesMISO_9(mission, targetObject); sendEndBaselines(mission->getId(), targetObject); ++it; } } // datapad Datapad* datapad = playerObject->getDataPad(); if(datapad) { //would be nice to use the tangibles objectcontainer for the datapad //need to get missionobjects intangibles, Man Schematics, waypoints and stuff in though, so better do it manually gMessageLib->sendCreateTangible(datapad,playerObject); //now iterate through the schematics and create them clientside Datapad* dpad = dynamic_cast<Datapad*> (datapad); ManufacturingSchematicList* manufacturingSchematics = dpad->getManufacturingSchematics(); ManufacturingSchematicList::iterator it = manufacturingSchematics->begin(); while(it != manufacturingSchematics->end()) { gMessageLib->sendCreateManufacturingSchematic((dynamic_cast<ManufacturingSchematic*>(*it)),playerObject ,false); ++it; } //Send player's intangibles vehicles,pets,droids...etc DataList* intangibles = dpad->getData(); DataList::iterator ite = intangibles->begin(); while(ite != intangibles->end()) { if(IntangibleObject* itno = dynamic_cast<IntangibleObject*>(*ite)) { gMessageLib->sendCreateInTangible(itno, dpad->getId(), playerObject); //dont add it to the MainObjectMap //gWorldManager->addObject(itno,true); switch(itno->getItnoGroup()) { case ItnoGroup_Vehicle: { // set Owner for vehicles if(VehicleController* vehicle = dynamic_cast<VehicleController*>(itno)) { vehicle->set_owner(playerObject); } } break; default: break; } } ++ite; } //Should send accepted missions here } } //equipped items are already in the creo6 so only send them for ourselves sendEndBaselines(playerObject->getId(),targetObject); sendUpdatePvpStatus(playerObject,targetObject); if(targetObject == playerObject) { // We are actually sending this info from CharacterLoginHandler::handleDispatchMessage at the opCmdSceneReady event. // sendFriendListPlay9(playerObject); // sendIgnoreListPlay9(playerObject); //request the GRUP baselines from chatserver if grouped if(playerObject->getGroupId() != 0) { gMessageLib->sendIsmGroupBaselineRequest(playerObject); } } //Player mounts if(playerObject->checkIfMountCalled()) { if(playerObject->getMount()) { gMessageLib->sendCreateObject(playerObject->getMount(),targetObject); if(playerObject->checkIfMounted()) { gMessageLib->sendContainmentMessage(playerObject->getId(), playerObject->getMount()->getId(), 0xffffffff, targetObject); } } } return(true); }