It's balancing on a knife-edge at the moment. If you don't go back to that employer, then yes, you would be illegal, but if you can go back, even temporarily while you sort out another job, or if he'd be prepared to have you on record as being on unpaid leave until you get another offer and apply for a Variation of Conditions or new visa as appropriate
https://www.immigration.govt.nz/new-...c-are-changing, that could keep you legal.
The important thing with any work visa linked to a named job is not to leave the job until you have your next (qualifying) job all lined up, and have liaised with INZ to make the visa change from one to the next happen at the right time, allowing for giving proper notice to one place and the wished-for start date at the next. The job is what gives you the visa, so there mustn't be a gap with no job. (For the record, if anyone has an application in for residence under SMC, that also depends on there being continuous employment in a skilled job or series of skilled jobs.)
Here's hoping the employer will be kind enough to keep you on the books in some way at least until you sort out what you are going to do.