cleanup
This commit is contained in:
parent
fbab8fe5e8
commit
4f8a75f9d7
@ -785,7 +785,6 @@ where
|
|||||||
let func1 = Arc::new(func1);
|
let func1 = Arc::new(func1);
|
||||||
let func2 = Arc::new(func2);
|
let func2 = Arc::new(func2);
|
||||||
move |(item_state, transaction), input| {
|
move |(item_state, transaction), input| {
|
||||||
let input = input.clone();
|
|
||||||
let func1 = func1.clone();
|
let func1 = func1.clone();
|
||||||
let func2 = func2.clone();
|
let func2 = func2.clone();
|
||||||
Box::pin(async move {
|
Box::pin(async move {
|
||||||
@ -1106,9 +1105,8 @@ where
|
|||||||
let mut character = character.clone();
|
let mut character = character.clone();
|
||||||
Box::pin(async move {
|
Box::pin(async move {
|
||||||
for action in apply_item_actions {
|
for action in apply_item_actions {
|
||||||
match action {
|
if let ApplyItemAction::UpdateCharacter(new_character) = action {
|
||||||
ApplyItemAction::UpdateCharacter(new_character) => character = *new_character,
|
character = *new_character
|
||||||
_ => {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
use futures::future::{join_all, BoxFuture, LocalBoxFuture};
|
use futures::future::join_all;
|
||||||
use futures::stream::{FuturesOrdered, StreamExt};
|
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
use rand::{Rng, SeedableRng};
|
use rand::SeedableRng;
|
||||||
use rand::distributions::{WeightedIndex, Distribution};
|
use rand::distributions::{WeightedIndex, Distribution};
|
||||||
use crate::entity::gateway::{EntityGateway, GatewayError};
|
use crate::entity::gateway::{EntityGateway, GatewayError};
|
||||||
use crate::entity::character::CharacterEntity;
|
use crate::entity::character::CharacterEntity;
|
||||||
use crate::entity::item::mag::{MagType, MagCell, MagCellError};
|
use crate::entity::item::mag::{MagCell, MagCellError};
|
||||||
use crate::entity::item::tool::{Tool, ToolType};
|
use crate::entity::item::tool::{Tool, ToolType};
|
||||||
use crate::entity::item::{ItemDetail, ItemEntityId};
|
use crate::entity::item::{ItemDetail, ItemEntityId};
|
||||||
use crate::ship::items::state::{ItemStateProxy, ItemStateError};
|
use crate::ship::items::state::{ItemStateProxy, ItemStateError};
|
||||||
|
@ -9,7 +9,6 @@ use crate::ship::items::state::{ItemState, ItemStateProxy, ItemStateError, Indiv
|
|||||||
use crate::ship::items::itemstateaction::{ItemStateAction, ItemAction};
|
use crate::ship::items::itemstateaction::{ItemStateAction, ItemAction};
|
||||||
use crate::ship::items::inventory::InventoryItem;
|
use crate::ship::items::inventory::InventoryItem;
|
||||||
use crate::ship::items::floor::FloorItem;
|
use crate::ship::items::floor::FloorItem;
|
||||||
use crate::ship::items::apply_item::ApplyItemAction;
|
|
||||||
use crate::entity::item::ItemModifier;
|
use crate::entity::item::ItemModifier;
|
||||||
use crate::ship::shops::ShopItem;
|
use crate::ship::shops::ShopItem;
|
||||||
use crate::ship::trade::TradeItem;
|
use crate::ship::trade::TradeItem;
|
||||||
@ -283,7 +282,7 @@ where
|
|||||||
let item_state_proxy = ItemStateProxy::new(item_state.clone());
|
let item_state_proxy = ItemStateProxy::new(item_state.clone());
|
||||||
let ((item_state_proxy, transaction), (pkts, new_character)) = ItemStateAction::default()
|
let ((item_state_proxy, transaction), (pkts, new_character)) = ItemStateAction::default()
|
||||||
.act(actions::take_item_from_inventory(character.id, *item_id, amount))
|
.act(actions::take_item_from_inventory(character.id, *item_id, amount))
|
||||||
.act(actions::use_consumed_item(&character))
|
.act(actions::use_consumed_item(character))
|
||||||
.act(actions::fork(
|
.act(actions::fork(
|
||||||
actions::foreach(actions::apply_item_action_packets(character.id, area_client)),
|
actions::foreach(actions::apply_item_action_packets(character.id, area_client)),
|
||||||
actions::apply_item_action_character(character)
|
actions::apply_item_action_character(character)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user