|
@@ -75,13 +75,14 @@ class StoreProc {
|
|
|
$heroId = $user->heros->CurrentHeroId;
|
|
|
|
|
|
$user->store->equip->$uid->posId = $posId;
|
|
|
- if ($user->heros->Dic->$heroId->equipPosition->$posId > 0) {
|
|
|
- $oldUid = $user->heros->Dic->$heroId->equipPosition->$posId;
|
|
|
+ if ($user->store->equipPosition->$posId > 0) {
|
|
|
+ $oldUid = $user->store->equipPosition->$posId;
|
|
|
$user->store->equip->$oldUid->posId = 0;
|
|
|
}
|
|
|
|
|
|
- $user->heros->Dic->$heroId->equipPosition->$posId = $uid;
|
|
|
+ $user->store->equipPosition->$posId = $uid;
|
|
|
|
|
|
+ ctx($user);
|
|
|
UserProc::updateUserInfo();
|
|
|
return Resp::ok(array(
|
|
|
'heros' => $user->heros,
|
|
@@ -97,10 +98,10 @@ class StoreProc {
|
|
|
$user = ctx();
|
|
|
|
|
|
$heroId = $user->heros->CurrentHeroId;
|
|
|
- if ($user->heros->Dic->$heroId->equipPosition->$posId > 0) {
|
|
|
- $oldUid = $user->heros->Dic->$heroId->equipPosition->$posId;
|
|
|
+ if ($user->store->equipPosition->$posId > 0) {
|
|
|
+ $oldUid = $user->store->equipPosition->$posId;
|
|
|
$user->store->equip->$oldUid->posId = 0;
|
|
|
- $user->heros->Dic->$heroId->equipPosition->$posId = 0;
|
|
|
+ $user->store->equipPosition->$posId = 0;
|
|
|
}
|
|
|
|
|
|
UserProc::updateUserInfo();
|