Simplify core/client/ai/ai event loop.

Since WNEXT_APPEARED will come first, we don't need to consider when frameId = 1.