package Ġworld s . greg s . hest ia . content . interaction . player Ċ Ċ import Ġworld s . greg s . hest ia . core . action . model . Entity Action Ċ import Ġworld s . greg s . hest ia . core . display . client . model . events . Chat Ċ import Ġworld s . greg s . hest ia . core . display . dialog ue . model . Chat Type . Game Trade Ċ import Ġworld s . greg s . hest ia . core . display . interfaces . api . Interfaces . Companion . Trade Main Ċ import Ġworld s . greg s . hest ia . core . display . request . logic . Request System Ċ import Ġworld s . greg s . hest ia . core . display . interfaces . model . Player Options . TRA DE Ċ import Ġworld s . greg s . hest ia . core . display . request . model . Request Ċ import Ġworld s . greg s . hest ia . core . display . interfaces . model . Window Ċ import Ġworld s . greg s . hest ia . core . display . interfaces . model . events . request . Close Window Ċ import Ġworld s . greg s . hest ia . core . display . interfaces . model . events . request . Open Interface Ċ import Ġworld s . greg s . hest ia . core . display . request . model . events . Accepted Request Ċ import Ġworld s . greg s . hest ia . core . display . interfaces . model . events . Player Option Ċ import Ġworld s . greg s . hest ia . core . display . request . model . events . Request Response Ċ import Ġworld s . greg s . hest ia . core . task . model . await . Within Range Ċ import Ġworld s . greg s . hest ia . core . world . movement . model . events . Follow Ċ Ċ on < Player Option > Ġ{ ĊĠĠĠ Ġwhere Ġ{ Ġoption Ġ== ĠTR ADE Ġ} ĊĠĠĠ Ġfun ĠPlayer Option . task () Ġ= Ġstrong Queue Ġ{ ĊĠĠĠĠĠĠĠ Ġentity Ġperform ĠFollow ( target ) ĊĠĠĠĠĠĠĠ Ġval Ġwithin Ġ= Ġawait ( Within Range ( target , Ġ 1 )) ĊĠĠĠĠĠĠĠ Ġentity Ġperform ĠFollow (- 1 ) ĊĊĠĠĠĠĠĠĠ Ġif (! within ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentity Ġperform ĠChat (" You Ġcan 't Ġreach Ġthat .") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn @ strong Queue ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġsystem ( Request System :: class ). send Request ( entity , Ġtarget , ĠRequest . TRA DE ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġthen ( Player Option :: task ) Ċ } Ċ Ċ // The Ġoriginal Ġrequest er Ċ on < Request Response > Ġ{ ĊĠĠĠ Ġwhere Ġ{ Ġrequest Ġ== ĠRequest . TRA DE Ġ} ĊĠĠĠ Ġfun ĠRequest Response . task () Ġ= Ġstrong Queue Ġ{ ĊĠĠĠĠĠĠĠ Ġtrade ( this , Ġtarget ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġthen ( Request Response :: task ) Ċ } Ċ Ċ // The Ġresponder Ċ on < Accepted Request > Ġ{ ĊĠĠĠ Ġwhere Ġ{ Ġrequest Ġ== ĠRequest . TRA DE Ġ} ĊĠĠĠ Ġfun ĠAccept ed Request . task () Ġ= Ġstrong Queue Ġ{ ĊĠĠĠĠĠĠĠ Ġtrade ( this , Ġtarget ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġthen ( Accepted Request :: task ) Ċ } Ċ Ċ fun ĠEntity Action . trade ( task : ĠTask , Ġtarget : ĠInt ) Ġ{ ĊĠĠĠ Ġtask . on Cancel Ġ{ ĊĠĠĠĠĠĠĠ Ġentity Ġperform ĠClose Window ( Window . MAIN _ SCREEN ) ĊĠĠĠĠĠĠĠ Ġtarget Ġperform ĠClose Window ( Window . MAIN _ SCREEN ) ĊĠĠĠĠĠĠĠ Ġentity Ġperform ĠChat (" Trade Ġdecl ined .", ĠGame Trade ) ĊĠĠĠĠĠĠĠ Ġtarget Ġperform ĠChat (" Other Ġplayer Ġdecl ined Ġtrade .", ĠGame Trade ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġentity Ġperform ĠOpen Interface ( Trade Main ) Ċ }